@stridge/kit 0.1.0-alpha.52 → 0.1.0-alpha.54

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 (45) hide show
  1. package/dist/activity/dialog/index.d.ts +2 -1
  2. package/dist/activity/widgets/index.d.ts +2 -1
  3. package/dist/deposit/dialog/index.d.ts +2 -1
  4. package/dist/deposit/widgets/index.d.ts +2 -1
  5. package/dist/flows/activity/dialog/ActivityDialog.d.ts +10 -1
  6. package/dist/flows/activity/dialog/ActivityDialog.js +1 -1
  7. package/dist/flows/deposit/dialog/DepositDialog.d.ts +10 -1
  8. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  9. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +10 -1
  10. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/package.js +1 -1
  13. package/dist/scope/KitScope.d.ts +9 -0
  14. package/dist/scope/KitScope.js +1 -1
  15. package/dist/scope/context.d.ts +7 -0
  16. package/dist/shared/dialog/DialogShell.d.ts +21 -6
  17. package/dist/shared/dialog/DialogShell.js +1 -1
  18. package/dist/shared/dialog/StepTransition.js +1 -1
  19. package/dist/shared/presentation/index.js +1 -0
  20. package/dist/shared/presentation/types.d.ts +30 -0
  21. package/dist/shared/presentation/types.js +1 -0
  22. package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
  23. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
  24. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
  25. package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
  26. package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
  27. package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
  28. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  29. package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
  30. package/dist/shared/ui/Drawer/Drawer.js +1 -0
  31. package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
  32. package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
  33. package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
  34. package/dist/shared/ui/Drawer/index.d.ts +2 -0
  35. package/dist/shared/ui/Drawer/index.js +1 -0
  36. package/dist/shared/ui/surfaceContext.d.ts +9 -0
  37. package/dist/shared/ui/surfaceContext.js +1 -0
  38. package/dist/stridge/StridgeProvider.d.ts +8 -0
  39. package/dist/stridge/StridgeProvider.js +1 -1
  40. package/dist/styles/index.css +100 -0
  41. package/dist/types.d.ts +2 -1
  42. package/dist/ui/index.d.ts +5 -1
  43. package/dist/ui/index.js +1 -1
  44. package/dist/withdraw/dialog/index.d.ts +2 -1
  45. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
1
2
  import { ActivityBoundary, Props } from "../../flows/activity/compound/components/Boundary.js";
2
3
  import { ActivityDialog } from "../../flows/activity/dialog/ActivityDialog.js";
3
- export { ActivityDialog, ActivityBoundary as ActivityFlowBoundary, type Props as ActivityFlowBoundaryProps };
4
+ export { ActivityDialog, ActivityBoundary as ActivityFlowBoundary, type Props as ActivityFlowBoundaryProps, type Presentation, type PresentationConfig, type PresentationMode };
@@ -1,4 +1,5 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
1
2
  import { DialogShell, DialogShellControls, DialogShellProps } from "../../shared/dialog/DialogShell.js";
2
3
  import { ActivityDetail } from "../../flows/activity/widgets/ActivityDetail.js";
3
4
  import { ActivityList } from "../../flows/activity/widgets/ActivityList.js";
4
- export { ActivityDetail, ActivityList, DialogShell, type DialogShellControls, type DialogShellProps };
5
+ export { ActivityDetail, ActivityList, DialogShell, type DialogShellControls, type DialogShellProps, type Presentation, type PresentationConfig, type PresentationMode };
@@ -1,2 +1,3 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
1
2
  import { DepositDialog } from "../../flows/deposit/dialog/DepositDialog.js";
2
- export { DepositDialog };
3
+ export { DepositDialog, type Presentation, type PresentationConfig, type PresentationMode };
@@ -1,3 +1,4 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
1
2
  import { DialogShell, DialogShellControls, DialogShellProps } from "../../shared/dialog/DialogShell.js";
2
3
  import { DepositActivityDetail } from "../../flows/deposit/widgets/activity/DepositActivityDetail.js";
3
4
  import { DepositActivityList } from "../../flows/deposit/widgets/activity/DepositActivityList.js";
@@ -10,4 +11,4 @@ import { ErrorState } from "../../flows/deposit/widgets/error-state/ErrorState.j
10
11
  import { ProcessingState } from "../../flows/deposit/widgets/processing-state/ProcessingState.js";
11
12
  import { SuccessState } from "../../flows/deposit/widgets/success-state/SuccessState.js";
12
13
  import { TransferCrypto } from "../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";
13
- export { AmountEntry, AssetPicker, ConfirmDeposit, Deposit, DepositActivityDetail, DepositActivityList, DepositStatusBanner, DialogShell, type DialogShellControls, type DialogShellProps, ErrorState, ProcessingState, SuccessState, TransferCrypto };
14
+ export { AmountEntry, AssetPicker, ConfirmDeposit, Deposit, DepositActivityDetail, DepositActivityList, DepositStatusBanner, DialogShell, type DialogShellControls, type DialogShellProps, ErrorState, type Presentation, type PresentationConfig, type PresentationMode, ProcessingState, SuccessState, TransferCrypto };
@@ -1,3 +1,4 @@
1
+ import { Presentation } from "../../../shared/presentation/types.js";
1
2
  import { ErrorInfo } from "react";
2
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
4
 
@@ -16,7 +17,8 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
16
17
  */
17
18
  declare function ActivityDialog({
18
19
  container,
19
- onError
20
+ onError,
21
+ presentation
20
22
  }?: ActivityDialog.Props): _$react_jsx_runtime0.JSX.Element;
21
23
  declare namespace ActivityDialog {
22
24
  interface Props {
@@ -32,6 +34,13 @@ declare namespace ActivityDialog {
32
34
  * `useActivity().close()`.
33
35
  */
34
36
  onError?: (error: Error, errorInfo: ErrorInfo) => void;
37
+ /**
38
+ * Per-dialog surface override. `"auto"` (default) renders a centred dialog on wide
39
+ * containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"`
40
+ * force one surface. Pass `{ mode, breakpoint }` to tune the px threshold (default 600).
41
+ * Wins over the provider's `appearance.presentation`; omit to inherit it.
42
+ */
43
+ presentation?: Presentation;
35
44
  }
36
45
  }
37
46
  //#endregion
@@ -1 +1 @@
1
- "use client";import{useActivityControllerContext as e}from"../orchestrator/controller.js";import"../orchestrator/index.js";import{useIntercomShutdownOnUnmount as t}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{Dialog as n}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{ActivityFlow as r}from"../compound/ActivityFlow.js";import"../../../activity/compound/index.js";import{ActivityDetail as i}from"../widgets/ActivityDetail.js";import{ActivityList as a}from"../widgets/ActivityList.js";import"../../../activity/widgets/index.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({container:c,onError:l}={}){let{state:u,controller:d}=e(),f=u.name!==`closed`;return t(),o(n,{open:f,onOpenChange:e=>{e||d.close()},children:o(n.Content,{container:c,children:o(r.Boundary,{...l?{onError:l}:{},children:s(r.Steps,{children:[o(r.Step,{name:`activityList`,children:o(a,{})}),o(r.Step,{name:`activityDetail`,children:o(i,{})})]})})})})}export{c as ActivityDialog};
1
+ "use client";import{useActivityControllerContext as e}from"../orchestrator/controller.js";import"../orchestrator/index.js";import{useIntercomShutdownOnUnmount as t}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{AdaptiveSurface as n}from"../../../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../../../shared/ui/AdaptiveSurface/index.js";import{ActivityFlow as r}from"../compound/ActivityFlow.js";import"../../../activity/compound/index.js";import{ActivityDetail as i}from"../widgets/ActivityDetail.js";import{ActivityList as a}from"../widgets/ActivityList.js";import"../../../activity/widgets/index.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({container:c,onError:l,presentation:u}={}){let{state:d,controller:f}=e(),p=d.name!==`closed`;return t(),o(n,{open:p,onOpenChange:e=>{e||f.close()},container:c,...u?{presentation:u}:{},children:o(r.Boundary,{...l?{onError:l}:{},children:s(r.Steps,{children:[o(r.Step,{name:`activityList`,children:o(a,{})}),o(r.Step,{name:`activityDetail`,children:o(i,{})})]})})})}export{c as ActivityDialog};
@@ -1,3 +1,4 @@
1
+ import { Presentation } from "../../../shared/presentation/types.js";
1
2
  import { ErrorInfo } from "react";
2
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
4
 
@@ -22,7 +23,8 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
22
23
  declare function DepositDialog({
23
24
  container,
24
25
  metadata,
25
- onError
26
+ onError,
27
+ presentation
26
28
  }?: DepositDialog.Props): _$react_jsx_runtime0.JSX.Element;
27
29
  declare namespace DepositDialog {
28
30
  interface Props {
@@ -44,6 +46,13 @@ declare namespace DepositDialog {
44
46
  * boundary's `onReset` is wired automatically through `useDeposit().close()`.
45
47
  */
46
48
  onError?: (error: Error, errorInfo: ErrorInfo) => void;
49
+ /**
50
+ * Per-dialog surface override. `"auto"` (default) renders a centred dialog on wide
51
+ * containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"`
52
+ * force one surface. Pass `{ mode, breakpoint }` to tune the px threshold (default 600).
53
+ * Wins over the provider's `appearance.presentation`; omit to inherit it.
54
+ */
55
+ presentation?: Presentation;
47
56
  }
48
57
  }
49
58
  //#endregion
@@ -1 +1 @@
1
- "use client";import{useDepositSnapshot as e}from"../driver/context.js";import{useControllerContext as t}from"../orchestrator/controller.js";import{useDepositEmissions as n}from"../../../events/emit/useDepositEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as r}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{Dialog as i}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{Deposit as a}from"../widgets/deposit/compound/Deposit.js";import"../widgets/deposit/compound/index.js";import{DepositActivityDetail as o}from"../widgets/activity/DepositActivityDetail.js";import{DepositActivityList as s}from"../widgets/activity/DepositActivityList.js";import"../widgets/activity/index.js";import{AmountEntry as c}from"../widgets/amount-entry/AmountEntry.js";import"../widgets/amount-entry/index.js";import{AssetPicker as l}from"../widgets/asset-picker/AssetPicker.js";import"../widgets/asset-picker/index.js";import{ConfirmDeposit as u}from"../widgets/confirm-deposit/ConfirmDeposit.js";import"../widgets/confirm-deposit/index.js";import{Deposit as d}from"../widgets/deposit/Deposit.js";import"../widgets/deposit/index.js";import{DepositStatusBanner as f}from"../widgets/deposit-status-banner/DepositStatusBanner.js";import"../widgets/deposit-status-banner/index.js";import{ErrorState as p}from"../widgets/error-state/ErrorState.js";import"../widgets/error-state/index.js";import{ProcessingState as m}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as h}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as g}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{jsx as _,jsxs as v}from"react/jsx-runtime";function y({container:y,metadata:b,onError:x}={}){let{state:S,controller:C}=t(),w=e(),T=S.name!==`closed`;return n({state:S,settlement:w.settlement,quote:w.quote,metadata:b}),r(),_(i,{open:T,onOpenChange:e=>{e||C.close()},children:_(i.Content,{container:y,children:v(a.Boundary,{...x?{onError:x}:{},children:[_(a.Guards,{children:v(a.Steps,{children:[_(a.Step,{name:`deposit`,children:_(d,{})}),_(a.Step,{name:`assetPicker`,children:_(l,{})}),_(a.Step,{name:`amountEntry`,children:_(c,{})}),_(a.Step,{name:`confirmDeposit`,children:_(u,{})}),_(a.Step,{name:`transferCrypto`,children:_(g,{})}),_(a.Step,{name:`processing`,children:_(m,{})}),_(a.Step,{name:`success`,children:_(h,{})}),_(a.Step,{name:`error`,children:_(p,{})}),_(a.Step,{name:`activityList`,children:_(s,{})}),_(a.Step,{name:`activityDetail`,children:_(o,{})})]})}),_(f,{})]})})})}export{y as DepositDialog};
1
+ "use client";import{useDepositSnapshot as e}from"../driver/context.js";import{useControllerContext as t}from"../orchestrator/controller.js";import{useDepositEmissions as n}from"../../../events/emit/useDepositEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as r}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{AdaptiveSurface as i}from"../../../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../../../shared/ui/AdaptiveSurface/index.js";import{Deposit as a}from"../widgets/deposit/compound/Deposit.js";import"../widgets/deposit/compound/index.js";import{DepositActivityDetail as o}from"../widgets/activity/DepositActivityDetail.js";import{DepositActivityList as s}from"../widgets/activity/DepositActivityList.js";import"../widgets/activity/index.js";import{AmountEntry as c}from"../widgets/amount-entry/AmountEntry.js";import"../widgets/amount-entry/index.js";import{AssetPicker as l}from"../widgets/asset-picker/AssetPicker.js";import"../widgets/asset-picker/index.js";import{ConfirmDeposit as u}from"../widgets/confirm-deposit/ConfirmDeposit.js";import"../widgets/confirm-deposit/index.js";import{Deposit as d}from"../widgets/deposit/Deposit.js";import"../widgets/deposit/index.js";import{DepositStatusBanner as f}from"../widgets/deposit-status-banner/DepositStatusBanner.js";import"../widgets/deposit-status-banner/index.js";import{ErrorState as p}from"../widgets/error-state/ErrorState.js";import"../widgets/error-state/index.js";import{ProcessingState as m}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as h}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as g}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{jsx as _,jsxs as v}from"react/jsx-runtime";function y({container:y,metadata:b,onError:x,presentation:S}={}){let{state:C,controller:w}=t(),T=e(),E=C.name!==`closed`;return n({state:C,settlement:T.settlement,quote:T.quote,metadata:b}),r(),_(i,{open:E,onOpenChange:e=>{e||w.close()},container:y,...S?{presentation:S}:{},children:v(a.Boundary,{...x?{onError:x}:{},children:[_(a.Guards,{children:v(a.Steps,{children:[_(a.Step,{name:`deposit`,children:_(d,{})}),_(a.Step,{name:`assetPicker`,children:_(l,{})}),_(a.Step,{name:`amountEntry`,children:_(c,{})}),_(a.Step,{name:`confirmDeposit`,children:_(u,{})}),_(a.Step,{name:`transferCrypto`,children:_(g,{})}),_(a.Step,{name:`processing`,children:_(m,{})}),_(a.Step,{name:`success`,children:_(h,{})}),_(a.Step,{name:`error`,children:_(p,{})}),_(a.Step,{name:`activityList`,children:_(s,{})}),_(a.Step,{name:`activityDetail`,children:_(o,{})})]})}),_(f,{})]})})}export{y as DepositDialog};
@@ -1,3 +1,4 @@
1
+ import { Presentation } from "../../../shared/presentation/types.js";
1
2
  import { WithdrawSubmitCallback } from "../orchestrator/types.js";
2
3
  import { WithdrawBalanceInput, WithdrawSuggestedRecipient } from "../bindings/WithdrawBindings.js";
3
4
  import { ErrorInfo } from "react";
@@ -23,7 +24,8 @@ declare function WithdrawDialog({
23
24
  onError,
24
25
  balance,
25
26
  onSubmit,
26
- suggestedRecipient
27
+ suggestedRecipient,
28
+ presentation
27
29
  }?: WithdrawDialog.Props): _$react_jsx_runtime0.JSX.Element;
28
30
  declare namespace WithdrawDialog {
29
31
  interface Props {
@@ -61,6 +63,13 @@ declare namespace WithdrawDialog {
61
63
  * explicit address you trust the user wants to fill with. Omit to hide the chip.
62
64
  */
63
65
  suggestedRecipient?: WithdrawSuggestedRecipient;
66
+ /**
67
+ * Per-dialog surface override. `"auto"` (default) renders a centred dialog on wide
68
+ * containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"`
69
+ * force one surface. Pass `{ mode, breakpoint }` to tune the px threshold (default 600).
70
+ * Wins over the provider's `appearance.presentation`; omit to inherit it.
71
+ */
72
+ presentation?: Presentation;
64
73
  }
65
74
  }
66
75
  //#endregion
@@ -1 +1 @@
1
- "use client";import{useWithdrawBindings as e}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawSnapshot as t}from"../driver/context.js";import{useWithdrawState as n}from"../orchestrator/controller.js";import{useWithdraw as r}from"../orchestrator/useWithdraw.js";import"../orchestrator/index.js";import{useWithdrawEmissions as i}from"../../../events/emit/useWithdrawEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as a}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{Dialog as o}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{Withdraw as s}from"../widgets/withdraw/compound/Withdraw.js";import"../../../withdraw/compound/index.js";import{WithdrawActivityDetail as c}from"../widgets/activity/WithdrawActivityDetail.js";import{WithdrawActivityList as l}from"../widgets/activity/WithdrawActivityList.js";import{WithdrawError as u}from"../widgets/withdraw-error/WithdrawError.js";import{WithdrawForm as d}from"../widgets/withdraw-form/WithdrawForm.js";import{WithdrawInProgress as f}from"../widgets/withdraw-in-progress/WithdrawInProgress.js";import{WithdrawSuccess as p}from"../widgets/withdraw-success/WithdrawSuccess.js";import"../../../withdraw/widgets/index.js";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({container:g,metadata:_,onError:v,balance:y,onSubmit:b,suggestedRecipient:x}={}){let S=n(),{close:C}=r(),w=t(),T=S.name!==`closed`;return i({state:S,settlement:w.settlement,quote:w.quote,metadata:_}),a(),e({...y===void 0?{}:{balance:y},...b?{onSubmit:b}:{},...x?{suggestedRecipient:x}:{}}),m(o,{open:T,onOpenChange:e=>e?void 0:C(),children:m(o.Content,{container:g,children:m(s.Boundary,{...v?{onError:v}:{},children:m(s.Guards,{children:h(s.Steps,{children:[m(s.Step,{name:`form`,children:m(d,{})}),m(s.Step,{name:`inProgress`,children:m(f,{})}),m(s.Step,{name:`success`,children:m(p,{})}),m(s.Step,{name:`error`,children:m(u,{})}),m(s.Step,{name:`activityList`,children:m(l,{})}),m(s.Step,{name:`activityDetail`,children:m(c,{})})]})})})})})}export{g as WithdrawDialog};
1
+ "use client";import{useWithdrawBindings as e}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawSnapshot as t}from"../driver/context.js";import{useWithdrawState as n}from"../orchestrator/controller.js";import{useWithdraw as r}from"../orchestrator/useWithdraw.js";import"../orchestrator/index.js";import{useWithdrawEmissions as i}from"../../../events/emit/useWithdrawEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as a}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{AdaptiveSurface as o}from"../../../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../../../shared/ui/AdaptiveSurface/index.js";import{Withdraw as s}from"../widgets/withdraw/compound/Withdraw.js";import"../../../withdraw/compound/index.js";import{WithdrawActivityDetail as c}from"../widgets/activity/WithdrawActivityDetail.js";import{WithdrawActivityList as l}from"../widgets/activity/WithdrawActivityList.js";import{WithdrawError as u}from"../widgets/withdraw-error/WithdrawError.js";import{WithdrawForm as d}from"../widgets/withdraw-form/WithdrawForm.js";import{WithdrawInProgress as f}from"../widgets/withdraw-in-progress/WithdrawInProgress.js";import{WithdrawSuccess as p}from"../widgets/withdraw-success/WithdrawSuccess.js";import"../../../withdraw/widgets/index.js";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({container:g,metadata:_,onError:v,balance:y,onSubmit:b,suggestedRecipient:x,presentation:S}={}){let C=n(),{close:w}=r(),T=t(),E=C.name!==`closed`;return i({state:C,settlement:T.settlement,quote:T.quote,metadata:_}),a(),e({...y===void 0?{}:{balance:y},...b?{onSubmit:b}:{},...x?{suggestedRecipient:x}:{}}),m(o,{open:E,onOpenChange:e=>e?void 0:w(),container:g,...S?{presentation:S}:{},children:m(s.Boundary,{...v?{onError:v}:{},children:m(s.Guards,{children:h(s.Steps,{children:[m(s.Step,{name:`form`,children:m(d,{})}),m(s.Step,{name:`inProgress`,children:m(f,{})}),m(s.Step,{name:`success`,children:m(p,{})}),m(s.Step,{name:`error`,children:m(u,{})}),m(s.Step,{name:`activityList`,children:m(l,{})}),m(s.Step,{name:`activityDetail`,children:m(c,{})})]})})})})}export{g as WithdrawDialog};
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { DepositActions, DepositController, DepositMethod, DepositMethodConfig,
9
9
  import { ChainType, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, toChainType } from "./shared/chains/index.js";
10
10
  import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
11
11
  import { useWithdrawSnapshot } from "./flows/withdraw/driver/context.js";
12
+ import { Presentation, PresentationConfig, PresentationMode } from "./shared/presentation/types.js";
12
13
  import { useKitConfig } from "./scope/context.js";
13
14
  import { KitPortalScope } from "./scope/KitPortalScope.js";
14
15
  import { IntercomMerchantContext } from "./shared/support/useIntercomMerchantContext.js";
@@ -42,4 +43,4 @@ import { useWithdrawState } from "./flows/withdraw/orchestrator/controller.js";
42
43
  import { useOptionalWithdraw, usePrefetchWithdraw, useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
43
44
  import { ConnectWalletConfig } from "./shared/wallet/ConnectWalletContext.js";
44
45
  import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgePrefetchConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
45
- export { type ActivityActions, type ActivityAmount, type ActivityController, type ActivityDirection, type ActivityDriver, type ActivityOpenInput, type ActivityPayload, type ActivityRowPayload, type ActivitySnapshot, type ActivityState, type ActivityStateName, type ActivityStatus, type ActivityStatusType, type BannerAckBucket, type ChainLogoInput, type ChainLogoMeta, type ChainType, type ConnectWalletConfig, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type DepositMethodConfig, type DepositMethodsConfig, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type FlowEvent, type FlowIdKey, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type PublicStridgeEventBus, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeDepositMethodConfig, type StridgeDepositMethodsConfig, type StridgeEnvironment, type StridgeEvent, type StridgeFlowOwner, type StridgePrefetchConfig, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TermsConfig, type TermsSelectContext, type TokenLogoInput, type TxRef, type UiEvent, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useActivity, useActivitySnapshot, useActivityState, useBannerAck, useBannerAckForSettlement, useCurrentFlowId, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalActivity, useOptionalDeposit, useOptionalPrefetchActivity, useOptionalWithdraw, usePrefetchActivity, usePrefetchDeposit, usePrefetchWithdraw, useStridgeEvent, useStridgeEventBus, useStridgeEvents, useStridgeFlowEvent, useStridgeFlowEvents, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
46
+ export { type ActivityActions, type ActivityAmount, type ActivityController, type ActivityDirection, type ActivityDriver, type ActivityOpenInput, type ActivityPayload, type ActivityRowPayload, type ActivitySnapshot, type ActivityState, type ActivityStateName, type ActivityStatus, type ActivityStatusType, type BannerAckBucket, type ChainLogoInput, type ChainLogoMeta, type ChainType, type ConnectWalletConfig, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type DepositMethodConfig, type DepositMethodsConfig, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type FlowEvent, type FlowIdKey, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type Presentation, type PresentationConfig, type PresentationMode, type PublicStridgeEventBus, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeDepositMethodConfig, type StridgeDepositMethodsConfig, type StridgeEnvironment, type StridgeEvent, type StridgeFlowOwner, type StridgePrefetchConfig, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TermsConfig, type TermsSelectContext, type TokenLogoInput, type TxRef, type UiEvent, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useActivity, useActivitySnapshot, useActivityState, useBannerAck, useBannerAckForSettlement, useCurrentFlowId, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalActivity, useOptionalDeposit, useOptionalPrefetchActivity, useOptionalWithdraw, usePrefetchActivity, usePrefetchDeposit, usePrefetchWithdraw, useStridgeEvent, useStridgeEventBus, useStridgeEvents, useStridgeFlowEvent, useStridgeFlowEvents, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
package/dist/package.js CHANGED
@@ -1 +1 @@
1
- var e=`0.1.0-alpha.52`;export{e as version};
1
+ var e=`0.1.0-alpha.54`;export{e as version};
@@ -1,3 +1,4 @@
1
+ import { Presentation } from "../shared/presentation/types.js";
1
2
  import { KitAttribution, KitDirection, KitRadius, KitTarget, KitTheme } from "./context.js";
2
3
  import { ComponentProps, ReactNode } from "react";
3
4
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
@@ -22,6 +23,7 @@ declare function KitScope({
22
23
  locale,
23
24
  target,
24
25
  attribution,
26
+ presentation,
25
27
  className,
26
28
  style,
27
29
  dir,
@@ -72,6 +74,13 @@ declare namespace KitScope {
72
74
  * compositions always render — set this to `"hidden"` when composing the brand row manually.
73
75
  */
74
76
  attribution?: KitAttribution;
77
+ /**
78
+ * How gateway surfaces present themselves. `"auto"` (default) renders a centred dialog on
79
+ * wide containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"`
80
+ * force one. Pass `{ mode, breakpoint }` to tune the px threshold. Published into kit config
81
+ * as the global default for `AdaptiveSurface`; a per-surface `presentation` prop overrides it.
82
+ */
83
+ presentation?: Presentation;
75
84
  /** Children rendered inside the kit scope. */
76
85
  children?: ReactNode;
77
86
  }
@@ -1 +1 @@
1
- "use client";import{KitContext as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{useCallback as n,useLayoutEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import{DirectionProvider as c}from"@base-ui/react/direction-provider";function l({accent:r,radius:o,theme:l,direction:d,locale:m,target:h,attribution:g,className:_,style:v,dir:y,ref:b,children:x,...S}){let C=a(null),w=f(C,y),T=u(y)??d??w,E=n(e=>{C.current=e,p(b,e)},[b]),D=i(()=>({accent:r,radius:o,theme:l,direction:T,locale:m,target:h,attribution:g}),[r,o,l,T,m,h,g]),O=r?{"--stridge-kit-primary":r}:void 0,k=O||v?{...O,...v}:void 0;return s(e.Provider,{value:D,children:s(c,{direction:T??`ltr`,children:s(`div`,{...S,ref:E,dir:y,"data-stridge-scope":``,"data-stridge-radius":o,"data-stridge-theme":l,"data-stridge-locale":m,"data-stridge-slot":t.root,className:_,style:k,children:x})})})}function u(e){return e===`ltr`||e===`rtl`?e:void 0}function d(e){for(let t=e;t;t=t.parentElement){let e=u(t.getAttribute(`dir`)??void 0);if(e)return e}if(!(typeof window>`u`))return u(window.getComputedStyle(e).direction)}function f(e,t){let[n,i]=o(()=>u(t));return r(()=>{let n=e.current;if(!n){i(u(t));return}let r=()=>{i(d(n))};if(r(),typeof MutationObserver>`u`)return;let a=new MutationObserver(r);for(let e=n;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`dir`]});return()=>a.disconnect()},[t,e]),n}function p(e,t){if(e){if(typeof e==`function`){e(t);return}e.current=t}}export{l as KitScope};
1
+ "use client";import{KitContext as e}from"./context.js";import{KIT_SCOPE_SLOTS as t}from"./KitScope.slots.js";import{useCallback as n,useLayoutEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import{DirectionProvider as c}from"@base-ui/react/direction-provider";function l({accent:r,radius:o,theme:l,direction:d,locale:m,target:h,attribution:g,presentation:_,className:v,style:y,dir:b,ref:x,children:S,...C}){let w=a(null),T=f(w,b),E=u(b)??d??T,D=n(e=>{w.current=e,p(x,e)},[x]),O=i(()=>({accent:r,radius:o,theme:l,direction:E,locale:m,target:h,attribution:g,presentation:_}),[r,o,l,E,m,h,g,_]),k=r?{"--stridge-kit-primary":r}:void 0,A=k||y?{...k,...y}:void 0;return s(e.Provider,{value:O,children:s(c,{direction:E??`ltr`,children:s(`div`,{...C,ref:D,dir:b,"data-stridge-scope":``,"data-stridge-radius":o,"data-stridge-theme":l,"data-stridge-locale":m,"data-stridge-slot":t.root,className:v,style:A,children:S})})})}function u(e){return e===`ltr`||e===`rtl`?e:void 0}function d(e){for(let t=e;t;t=t.parentElement){let e=u(t.getAttribute(`dir`)??void 0);if(e)return e}if(!(typeof window>`u`))return u(window.getComputedStyle(e).direction)}function f(e,t){let[n,i]=o(()=>u(t));return r(()=>{let n=e.current;if(!n){i(u(t));return}let r=()=>{i(d(n))};if(r(),typeof MutationObserver>`u`)return;let a=new MutationObserver(r);for(let e=n;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`dir`]});return()=>a.disconnect()},[t,e]),n}function p(e,t){if(e){if(typeof e==`function`){e(t);return}e.current=t}}export{l as KitScope};
@@ -1,3 +1,4 @@
1
+ import { Presentation } from "../shared/presentation/types.js";
1
2
  //#region src/scope/context.d.ts
2
3
  type KitRadius = "sharp" | "subtle" | "rounded" | "pill";
3
4
  type KitTheme = "dark" | "light";
@@ -73,6 +74,12 @@ interface KitConfig {
73
74
  * composing the brand row manually".
74
75
  */
75
76
  attribution?: KitAttribution;
77
+ /**
78
+ * How gateway surfaces present themselves — `"auto"` (default) renders a centred dialog on wide
79
+ * containers and a bottom-sheet drawer below the breakpoint, `"dialog"` / `"drawer"` force one.
80
+ * Read by {@link AdaptiveSurface} as the global default; a per-surface `presentation` prop wins.
81
+ */
82
+ presentation?: Presentation;
76
83
  }
77
84
  /**
78
85
  * Reads the active {@link KitConfig} from the nearest provider. Returns `{}` when no provider is
@@ -1,3 +1,4 @@
1
+ import { Presentation } from "../presentation/types.js";
1
2
  import { ReactElement, ReactNode } from "react";
2
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
4
 
@@ -22,18 +23,30 @@ interface DialogShellControls {
22
23
  }
23
24
  interface DialogShellProps extends DialogShellControls {
24
25
  /**
25
- * Widget JSX rendered inside `Dialog.Content`. Each widget detects
26
- * the dialog context and swaps to its bare frame, so the same
26
+ * Element the surface portals into. Defaults to `document.body`. Doubles as the measured
27
+ * containing block for `"auto"` presentation the dialog-vs-drawer breakpoint is measured
28
+ * against this element's width when supplied, else the viewport.
29
+ */
30
+ container?: HTMLElement | null;
31
+ /**
32
+ * Surface override forwarded to {@link AdaptiveSurface}. Falls back to the provider's
33
+ * `appearance.presentation`, then `"auto"`. Omit to inherit the provider default.
34
+ */
35
+ presentation?: Presentation;
36
+ /**
37
+ * Widget JSX rendered inside the surface. Each widget detects the
38
+ * surface context and swaps to its bare frame, so the same
27
39
  * composition that works inline as `Card variant="frame"` paints
28
40
  * the same surface chrome here.
29
41
  */
30
42
  children?: ReactNode;
31
43
  }
32
44
  /**
33
- * Pre-composed dialog shell for a kit widget. Wraps `Dialog.Root` +
34
- * (optional) `Dialog.Trigger` + `Dialog.Content` so consumers don't
35
- * re-stitch those three primitives every time they want to open a
36
- * widget in a modal.
45
+ * Pre-composed dialog shell for a kit widget. Wraps {@link AdaptiveSurface}
46
+ * so consumers don't re-stitch the surface primitives every time they want
47
+ * to open a widget in a modal. The surface is responsive — a centred dialog
48
+ * on wide containers, a bottom-sheet drawer below the breakpoint — and the
49
+ * widget renders its bare frame inside either via the shared surface context.
37
50
  *
38
51
  * Each widget also exposes a typed `.Dialog` form (`Deposit.Dialog`,
39
52
  * `AssetPicker.Dialog`, …) that wraps this shell and forwards the
@@ -57,6 +70,8 @@ declare function DialogShell({
57
70
  defaultOpen,
58
71
  onOpenChange,
59
72
  trigger,
73
+ container,
74
+ presentation,
60
75
  children
61
76
  }: DialogShellProps): _$react_jsx_runtime0.JSX.Element;
62
77
  //#endregion
@@ -1 +1 @@
1
- "use client";import{Dialog as e}from"../ui/Dialog/Dialog.js";import"../ui/Dialog/index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({open:r,defaultOpen:i,onOpenChange:a,trigger:o,children:s}){return n(e,{open:r,defaultOpen:i,onOpenChange:a,children:[o?t(e.Trigger,{render:o}):null,t(e.Content,{children:s})]})}export{r as DialogShell};
1
+ "use client";import{AdaptiveSurface as e}from"../ui/AdaptiveSurface/AdaptiveSurface.js";import"../ui/AdaptiveSurface/index.js";import{jsx as t}from"react/jsx-runtime";function n({open:n,defaultOpen:r,onOpenChange:i,trigger:a,container:o,presentation:s,children:c}){return t(e,{open:n,defaultOpen:r,onOpenChange:i,...a?{trigger:a}:{},container:o,...s?{presentation:s}:{},children:c})}export{n as DialogShell};
@@ -1 +1 @@
1
- "use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,m as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=e.getBoundingClientRect().height;if(h.current===o){m.current=t;return}let n=m.current;if(h.current=o,m.current=t,n===null||n===t||document.visibilityState===`hidden`)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${t}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>{let e=()=>{if(document.visibilityState!==`hidden`)return;_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),g.current!==null&&(window.clearTimeout(g.current),g.current=null);let e=u.current;e&&(e.style.height=``)};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)}},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
1
+ "use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,m as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=Array.from(e.children).find(e=>e instanceof HTMLElement&&getComputedStyle(e).position!==`absolute`),n=t?t.scrollHeight:e.getBoundingClientRect().height;if(h.current===o){m.current=n;return}let r=m.current;if(h.current=o,m.current=n,r===null||r===n||document.visibilityState===`hidden`)return;let i=e.style.transition;e.style.transition=`none`,e.style.height=`${r}px`,e.offsetHeight,e.style.transition=i,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${n}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>{let e=()=>{if(document.visibilityState!==`hidden`)return;_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),g.current!==null&&(window.clearTimeout(g.current),g.current=null);let e=u.current;e&&(e.style.height=``)};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)}},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
@@ -0,0 +1 @@
1
+ import"./types.js";import"./useResolvedSurfaceKind.js";
@@ -0,0 +1,30 @@
1
+ //#region src/shared/presentation/types.d.ts
2
+ /**
3
+ * How a kit surface presents itself.
4
+ *
5
+ * - `"auto"` (default) renders a centred dialog when the surface's containing block is at or above
6
+ * the breakpoint, and a bottom-sheet drawer below it.
7
+ * - `"dialog"` always renders the centred dialog.
8
+ * - `"drawer"` always renders the bottom-sheet drawer.
9
+ */
10
+ type PresentationMode = "auto" | "dialog" | "drawer";
11
+ /**
12
+ * Object form of {@link Presentation} for tuning the responsive breakpoint.
13
+ */
14
+ interface PresentationConfig {
15
+ /** @default "auto" */
16
+ mode?: PresentationMode;
17
+ /**
18
+ * Containing-block width (px) below which `"auto"` renders the drawer. Measured against the
19
+ * surface's portal `container` when one is supplied, else the viewport.
20
+ * @default 600
21
+ */
22
+ breakpoint?: number;
23
+ }
24
+ /**
25
+ * String shorthand for the common case, or the object form to tune the breakpoint. Set globally via
26
+ * `StridgeProvider`'s `appearance.presentation` or per-surface via the `presentation` prop.
27
+ */
28
+ type Presentation = PresentationMode | PresentationConfig;
29
+ //#endregion
30
+ export { Presentation, PresentationConfig, PresentationMode };
@@ -0,0 +1 @@
1
+ function e(e){if(e===void 0)return{mode:`auto`,breakpoint:600};if(typeof e==`string`)return{mode:e,breakpoint:600};let t=typeof e.breakpoint==`number`&&Number.isFinite(e.breakpoint)&&e.breakpoint>0?e.breakpoint:600;return{mode:e.mode??`auto`,breakpoint:t}}export{e as resolvePresentation};
@@ -0,0 +1 @@
1
+ "use client";import{resolvePresentation as e}from"./types.js";import{useEffect as t,useLayoutEffect as n,useState as r}from"react";const i=typeof window>`u`?t:n;function a(e){if(typeof window>`u`)return null;let t=e?e.getBoundingClientRect().width:document.documentElement.clientWidth;return t>0?t:null}function o({container:t,presentation:n}){let{mode:o,breakpoint:s}=e(n),[c,l]=r(`dialog`);return i(()=>{if(o!==`auto`)return;let e=()=>{let e=a(t);l(e!==null&&e<s?`drawer`:`dialog`)};if(e(),t){if(typeof ResizeObserver>`u`)return;let n=new ResizeObserver(e);return n.observe(t),()=>n.disconnect()}if(!(typeof window>`u`))return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[o,s,t]),o===`auto`?c:o}export{o as useResolvedSurfaceKind};
@@ -0,0 +1,52 @@
1
+ import { Presentation } from "../../presentation/types.js";
2
+ import { ReactElement, ReactNode } from "react";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts
6
+ interface AdaptiveSurfaceProps {
7
+ /** Controlled open state. Pair with `onOpenChange` for full control. */
8
+ open?: boolean;
9
+ /** Initial open state when uncontrolled. Ignored if `open` is set. */
10
+ defaultOpen?: boolean;
11
+ /** Fires whenever the surface open state changes. */
12
+ onOpenChange?: (open: boolean) => void;
13
+ /**
14
+ * Element rendered as the surface trigger. Omit when the surface is opened programmatically via
15
+ * `open`.
16
+ */
17
+ trigger?: ReactElement;
18
+ /**
19
+ * Element the surface portals into. Defaults to `document.body`. Doubles as the measured
20
+ * containing block for `"auto"` presentation — when supplied, the dialog-vs-drawer breakpoint is
21
+ * measured against this element's width instead of the viewport.
22
+ */
23
+ container?: HTMLElement | null;
24
+ /**
25
+ * Per-surface presentation override. Falls back to the provider's `appearance.presentation`
26
+ * (read from kit config), then to `"auto"`. Precedence: prop > provider config > `"auto"`.
27
+ */
28
+ presentation?: Presentation;
29
+ /** Content rendered inside the surface (dialog or drawer). */
30
+ children?: ReactNode;
31
+ }
32
+ /**
33
+ * Surface that renders a centred {@link Dialog} or a bottom-sheet {@link Drawer} depending on the
34
+ * resolved {@link Presentation}. In `"auto"` mode it measures the containing block (the `container`
35
+ * prop, else the viewport) and stays in sync with it — resizing across the breakpoint live swaps
36
+ * dialog↔drawer (see {@link useResolvedSurfaceKind}). The swap only remounts the surface subtree;
37
+ * flow state survives because the FSM controllers are mounted above the surface and the widgets
38
+ * re-read it from context. Both surfaces publish the shared surface-content context, so gateway
39
+ * widgets render their bare frame and `Dialog.CloseButton` (which closes either surface, since Base
40
+ * UI builds the drawer on the dialog store) works unchanged inside both.
41
+ */
42
+ declare function AdaptiveSurface({
43
+ open,
44
+ defaultOpen,
45
+ onOpenChange,
46
+ trigger,
47
+ container,
48
+ presentation,
49
+ children
50
+ }: AdaptiveSurfaceProps): _$react_jsx_runtime0.JSX.Element;
51
+ //#endregion
52
+ export { AdaptiveSurface, AdaptiveSurfaceProps };
@@ -0,0 +1 @@
1
+ "use client";import{useKitConfig as e}from"../../../scope/context.js";import{useResolvedSurfaceKind as t}from"../../presentation/useResolvedSurfaceKind.js";import"../../presentation/index.js";import{Dialog as n}from"../Dialog/Dialog.js";import"../Dialog/index.js";import{Drawer as r}from"../Drawer/Drawer.js";import"../Drawer/index.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({open:o,defaultOpen:s,onOpenChange:c,trigger:l,container:u,presentation:d,children:f}){let p=e();return t({container:u,presentation:d??p.presentation})===`drawer`?a(r,{open:o,defaultOpen:s,onOpenChange:c,children:[l?i(r.Trigger,{render:l}):null,i(r.Content,{container:u,children:f})]}):a(n,{open:o,defaultOpen:s,onOpenChange:c,children:[l?i(n.Trigger,{render:l}):null,i(n.Content,{container:u,children:f})]})}export{o as AdaptiveSurface};
@@ -0,0 +1,2 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../../presentation/types.js";
2
+ import { AdaptiveSurface, AdaptiveSurfaceProps } from "./AdaptiveSurface.js";
@@ -0,0 +1 @@
1
+ import"./AdaptiveSurface.js";
@@ -1,14 +1,15 @@
1
+ import { useIsInsideSurfaceContent } from "../surfaceContext.js";
1
2
  import { ComponentProps } from "react";
2
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
4
  import { Dialog } from "@base-ui/react/dialog";
4
5
 
5
6
  //#region src/shared/ui/Dialog/Dialog.d.ts
6
7
  /**
7
- * Returns `true` when the calling component is rendered inside a `Dialog.Content`. Lets gateway widgets pick the right
8
- * shell Card frame inline, dialog frame when portaled and lets header parts inject the close affordance only when it's
9
- * needed.
8
+ * Returns `true` when the calling component is rendered inside a kit surface's content region. Kept
9
+ * as the stable public name; aliases the surface-neutral {@link useIsInsideSurfaceContent} so the
10
+ * hook resolves `true` inside both `Dialog.Content` and `Drawer.Content`.
10
11
  */
11
- declare function useIsInsideDialogContent(): boolean;
12
+ declare const useIsInsideDialogContent: typeof useIsInsideSurfaceContent;
12
13
  /**
13
14
  * Root of the dialog compound. Wraps Base UI's `Dialog.Root` and stamps `data-stridge-slot` on the element.
14
15
  *
@@ -40,8 +41,8 @@ declare function DialogOverlay({
40
41
  }: Dialog$1.OverlayProps): _$react_jsx_runtime0.JSX.Element;
41
42
  /**
42
43
  * Popup shell for the dialog. Wraps Base UI's `Dialog.Popup` inside {@link Dialog.Portal} and
43
- * {@link Dialog.Overlay}, scopes the portal into `KitPortalScope`, and sets
44
- * {@link DialogContentContext} so descendants can detect they are inside a kit dialog.
44
+ * {@link Dialog.Overlay}, scopes the portal into `KitPortalScope`, and sets the shared
45
+ * surface-content context so descendants can detect they are inside a kit surface.
45
46
  *
46
47
  * @see {@link Dialog.ContentProps} for the `container` prop that scopes the overlay to a custom element.
47
48
  */
@@ -57,8 +58,9 @@ declare function DialogContent({
57
58
  * child of its parent (via `margin-inline-start: auto`) and wired through `Dialog.Close` so the dialog's open state is the
58
59
  * source of truth.
59
60
  *
60
- * Returns `null` when rendered outside a `Dialog.Content` gateway widget headers can compose it unconditionally and it
61
- * stays absent in card mode.
61
+ * Renders only inside a `Dialog.Content` (the X is a dialog affordance). Returns `null` in card mode (no surface) and in a
62
+ * `Drawer.Content` a drawer dismisses via its grabber / swipe-down / backdrop, not a close button — so gateway widget
63
+ * headers can compose it unconditionally and it self-hides in the drawer presentation.
62
64
  */
63
65
  declare function DialogCloseButton(): _$react_jsx_runtime0.JSX.Element | null;
64
66
  /**
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../i18n/useLingui.js";import"../../../i18n/index.js";import{KitPortalScope as t}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{joinClassNames as n}from"../../utils/joinClassNames.js";import{XIcon as r}from"../../icons/XIcon.js";import"../../../icons/index.js";import{mergeClassName as i}from"../../utils/mergeClassName.js";import{mergeStyle as a}from"../../utils/mergeStyle.js";import{IconButton as o}from"../IconButton/IconButton.js";import"../IconButton/index.js";import{ScrollArea as s}from"../ScrollArea/ScrollArea.js";import"../ScrollArea/index.js";import{DIALOG_SLOTS as c}from"./Dialog.slots.js";import{styles as l}from"./Dialog.styles.js";import{createContext as u,use as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";import{Dialog as h}from"@base-ui/react/dialog";const g=u(!1);function _(){return d(g)}function v(e){return f(h.Root,{"data-stridge-slot":c.root,...e})}function y(e){return f(h.Trigger,{"data-stridge-slot":c.trigger,...e})}function b(e){return f(h.Portal,{"data-stridge-slot":c.portal,...e})}function x(e){return f(h.Close,{"data-stridge-slot":c.close,...e})}function S({className:e,style:t,...n}){let r=m.props(l.overlay);return f(h.Backdrop,{"data-stridge-slot":c.overlay,...n,className:i(r.className,e),style:a(r.style,t)})}function C({children:e,className:n,style:r,container:o,...s}){let u=m.props(l.content);return f(b,{container:o??void 0,children:p(t,{children:[f(S,{}),f(h.Popup,{"data-stridge-slot":c.content,...s,className:i(u.className,n),style:a(u.style,r),children:f(g.Provider,{value:!0,children:e})})]})})}function w(){let t=_(),{_:n}=e();return t?f(h.Close,{"data-stridge-slot":c.close,render:f(o,{"aria-label":n({id:`yz7wBu`,message:`Close`}),...m.props(l.closeButton),children:f(r,{"aria-hidden":!0})})}):null}function T({className:e,style:t,...r}){let i=m.props(l.header);return f(`div`,{"data-stridge-slot":c.header,...r,className:n(i.className,e),style:{...i.style,...t}})}function E({className:e,style:t,children:r,...i}){let a=m.props(l.body),o=m.props(l.bodyScrollArea),u=m.props(l.bodyScrollViewport),d=m.props(l.bodyInner);return f(`div`,{"data-stridge-slot":c.body,className:a.className,style:a.style,children:p(s,{className:o.className,style:o.style,children:[f(s.Viewport,{...i,className:n(u.className,e),style:{...u.style,...t},children:f(`div`,{className:d.className,style:d.style,children:r})}),f(s.Scrollbar,{orientation:`vertical`,children:f(s.Thumb,{})})]})})}function D({className:e,style:t,...r}){let i=m.props(l.footer);return f(`div`,{"data-stridge-slot":c.footer,...r,className:n(i.className,e),style:{...i.style,...t}})}function O({className:e,style:t,...n}){let r=m.props(l.title);return f(h.Title,{"data-stridge-slot":c.title,...n,className:i(r.className,e),style:a(r.style,t)})}function k({className:e,style:t,...n}){let r=m.props(l.description);return f(h.Description,{"data-stridge-slot":c.description,...n,className:i(r.className,e),style:a(r.style,t)})}(function(e){e.Trigger=y,e.Close=x,e.CloseButton=w,e.Portal=b,e.Overlay=S,e.Content=C,e.Header=T,e.Body=E,e.Footer=D,e.Title=O,e.Description=k})(v||={});export{v as Dialog,_ as useIsInsideDialogContent};
1
+ "use client";import{useLingui as e}from"../../i18n/useLingui.js";import"../../../i18n/index.js";import{KitPortalScope as t}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{joinClassNames as n}from"../../utils/joinClassNames.js";import{XIcon as r}from"../../icons/XIcon.js";import"../../../icons/index.js";import{mergeClassName as i}from"../../utils/mergeClassName.js";import{mergeStyle as a}from"../../utils/mergeStyle.js";import{IconButton as o}from"../IconButton/IconButton.js";import"../IconButton/index.js";import{ScrollArea as s}from"../ScrollArea/ScrollArea.js";import"../ScrollArea/index.js";import{SurfaceContentContext as c,useIsInsideSurfaceContent as l,useSurfaceKind as u}from"../surfaceContext.js";import{DIALOG_SLOTS as d}from"./Dialog.slots.js";import{styles as f}from"./Dialog.styles.js";import{jsx as p,jsxs as m}from"react/jsx-runtime";import*as h from"@stylexjs/stylex";import{Dialog as g}from"@base-ui/react/dialog";const _=l;function v(e){return p(g.Root,{"data-stridge-slot":d.root,...e})}function y(e){return p(g.Trigger,{"data-stridge-slot":d.trigger,...e})}function b(e){return p(g.Portal,{"data-stridge-slot":d.portal,...e})}function x(e){return p(g.Close,{"data-stridge-slot":d.close,...e})}function S({className:e,style:t,...n}){let r=h.props(f.overlay);return p(g.Backdrop,{"data-stridge-slot":d.overlay,...n,className:i(r.className,e),style:a(r.style,t)})}function C({children:e,className:n,style:r,container:o,...s}){let l=h.props(f.content);return p(b,{container:o??void 0,children:m(t,{children:[p(S,{}),p(g.Popup,{"data-stridge-slot":d.content,...s,className:i(l.className,n),style:a(l.style,r),children:p(c,{value:`dialog`,children:e})})]})})}function w(){let t=u(),{_:n}=e();return t===`dialog`?p(g.Close,{"data-stridge-slot":d.close,render:p(o,{"aria-label":n({id:`yz7wBu`,message:`Close`}),...h.props(f.closeButton),children:p(r,{"aria-hidden":!0})})}):null}function T({className:e,style:t,...r}){let i=h.props(f.header);return p(`div`,{"data-stridge-slot":d.header,...r,className:n(i.className,e),style:{...i.style,...t}})}function E({className:e,style:t,children:r,...i}){let a=h.props(f.body),o=h.props(f.bodyScrollArea),c=h.props(f.bodyScrollViewport),l=h.props(f.bodyInner);return p(`div`,{"data-stridge-slot":d.body,className:a.className,style:a.style,children:m(s,{className:o.className,style:o.style,children:[p(s.Viewport,{...i,className:n(c.className,e),style:{...c.style,...t},children:p(`div`,{className:l.className,style:l.style,children:r})}),p(s.Scrollbar,{orientation:`vertical`,children:p(s.Thumb,{})})]})})}function D({className:e,style:t,...r}){let i=h.props(f.footer);return p(`div`,{"data-stridge-slot":d.footer,...r,className:n(i.className,e),style:{...i.style,...t}})}function O({className:e,style:t,...n}){let r=h.props(f.title);return p(g.Title,{"data-stridge-slot":d.title,...n,className:i(r.className,e),style:a(r.style,t)})}function k({className:e,style:t,...n}){let r=h.props(f.description);return p(g.Description,{"data-stridge-slot":d.description,...n,className:i(r.className,e),style:a(r.style,t)})}(function(e){e.Trigger=y,e.Close=x,e.CloseButton=w,e.Portal=b,e.Overlay=S,e.Content=C,e.Header=T,e.Body=E,e.Footer=D,e.Title=O,e.Description=k})(v||={});export{v as Dialog,_ as useIsInsideDialogContent};
@@ -0,0 +1,135 @@
1
+ import { ComponentProps } from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { Drawer } from "@base-ui/react/drawer";
4
+
5
+ //#region src/shared/ui/Drawer/Drawer.d.ts
6
+ /**
7
+ * Root of the drawer compound. Wraps Base UI's `Drawer.Root` as a bottom sheet (`swipeDirection`
8
+ * defaults to `"down"`) and stamps `data-stridge-slot`. A drawer is dismissed by swiping the grabber
9
+ * down, tapping the backdrop, or pressing escape — it ships no close (X) button; that's a dialog
10
+ * affordance. Base UI builds the drawer on the same dialog store as `Dialog`, so `Dialog.Close`
11
+ * (e.g. a "Cancel" action) still closes it; the kit's `Dialog.CloseButton` self-hides in a drawer
12
+ * (see {@link useSurfaceKind}), so gateway widget headers compose it unconditionally with no drawer X.
13
+ *
14
+ * Compose with {@link Drawer.Content}, {@link Drawer.Title}, and {@link Drawer.Description} to build
15
+ * an accessible bottom-sheet dialog.
16
+ */
17
+ declare function Drawer$1(props: Drawer$1.Props): _$react_jsx_runtime0.JSX.Element;
18
+ /**
19
+ * Toggles the drawer open state. Wraps Base UI's `Drawer.Trigger`.
20
+ */
21
+ declare function DrawerTrigger(props: Drawer$1.TriggerProps): _$react_jsx_runtime0.JSX.Element;
22
+ /**
23
+ * Portals its children outside the current DOM subtree. Wraps Base UI's `Drawer.Portal`.
24
+ */
25
+ declare function DrawerPortal(props: Drawer$1.PortalProps): _$react_jsx_runtime0.JSX.Element;
26
+ /**
27
+ * Closes the drawer when activated. Wraps Base UI's `Drawer.Close` — render a labelled action
28
+ * (e.g. a "Cancel" button) through it. A drawer has no close (X) affordance by design.
29
+ */
30
+ declare function DrawerClose(props: Drawer$1.CloseProps): _$react_jsx_runtime0.JSX.Element;
31
+ /**
32
+ * Full-viewport backdrop rendered behind the drawer popup. Wraps Base UI's `Drawer.Backdrop`.
33
+ * Automatically composed by {@link Drawer.Content} — mount separately only for custom layering.
34
+ */
35
+ declare function DrawerOverlay({
36
+ className,
37
+ style,
38
+ ...props
39
+ }: Drawer$1.OverlayProps): _$react_jsx_runtime0.JSX.Element;
40
+ /**
41
+ * Popup shell for the drawer — a bottom sheet. Wraps Base UI's `Drawer.Popup` inside
42
+ * {@link Drawer.Portal}, {@link Drawer.Overlay}, and Base UI's positioning `Drawer.Viewport`,
43
+ * scopes the portal into `KitPortalScope`, renders the grabber handle, and sets the shared
44
+ * surface-content context so descendants can detect they are inside a kit surface (gateway widgets
45
+ * then render their bare frame instead of a doubled `Card`).
46
+ *
47
+ * @see {@link Drawer.ContentProps} for the `container` prop that scopes the sheet to a custom element.
48
+ */
49
+ declare function DrawerContent({
50
+ children,
51
+ className,
52
+ style,
53
+ container,
54
+ ...props
55
+ }: Drawer$1.ContentProps): _$react_jsx_runtime0.JSX.Element;
56
+ /**
57
+ * Header row for the drawer. Renders as a styled `<div>` that lays out the title (and any actions)
58
+ * in a flex row. Compose with {@link Drawer.Title}. A drawer has no close (X) button.
59
+ */
60
+ declare function DrawerHeader({
61
+ className,
62
+ style,
63
+ ...props
64
+ }: Drawer$1.HeaderProps): _$react_jsx_runtime0.JSX.Element;
65
+ /**
66
+ * Body content slot for non-gateway drawer usage. Mirrors {@link import("../Dialog").Dialog.Body}:
67
+ * a flex column that absorbs leftover sheet height with an embedded {@link ScrollArea} as its sole
68
+ * flex child, so tall content scrolls inside the sheet while header and footer stay pinned. Padding
69
+ * lives on the inner wrapper so it scrolls with the content.
70
+ */
71
+ declare function DrawerBody({
72
+ className,
73
+ style,
74
+ children,
75
+ ...props
76
+ }: Drawer$1.BodyProps): _$react_jsx_runtime0.JSX.Element;
77
+ /**
78
+ * Footer row for the drawer. Renders as a styled `<div>` intended for action buttons placed at the
79
+ * bottom of the sheet.
80
+ */
81
+ declare function DrawerFooter({
82
+ className,
83
+ style,
84
+ ...props
85
+ }: Drawer$1.FooterProps): _$react_jsx_runtime0.JSX.Element;
86
+ /**
87
+ * Accessible title for the drawer. Wraps Base UI's `Drawer.Title` and is automatically referenced by
88
+ * the drawer's `aria-labelledby` attribute.
89
+ */
90
+ declare function DrawerTitle({
91
+ className,
92
+ style,
93
+ ...props
94
+ }: Drawer$1.TitleProps): _$react_jsx_runtime0.JSX.Element;
95
+ /**
96
+ * Accessible description for the drawer. Wraps Base UI's `Drawer.Description` and is automatically
97
+ * referenced by the drawer's `aria-describedby` attribute.
98
+ */
99
+ declare function DrawerDescription({
100
+ className,
101
+ style,
102
+ ...props
103
+ }: Drawer$1.DescriptionProps): _$react_jsx_runtime0.JSX.Element;
104
+ declare namespace Drawer$1 {
105
+ type Props = Drawer.Root.Props;
106
+ type TriggerProps = Drawer.Trigger.Props;
107
+ type PortalProps = Drawer.Portal.Props;
108
+ type CloseProps = Drawer.Close.Props;
109
+ type OverlayProps = Drawer.Backdrop.Props;
110
+ interface ContentProps extends Drawer.Popup.Props {
111
+ /**
112
+ * Element the drawer portals into. Defaults to `document.body` (full-page sheet). Pass a
113
+ * transformed ancestor with `overflow: clip` — e.g. a mobile mockup frame — to scope the
114
+ * sheet's width, height, and backdrop to that rect.
115
+ */
116
+ container?: HTMLElement | null;
117
+ }
118
+ type HeaderProps = ComponentProps<"div">;
119
+ type BodyProps = ComponentProps<"div">;
120
+ type FooterProps = ComponentProps<"div">;
121
+ type TitleProps = Drawer.Title.Props;
122
+ type DescriptionProps = Drawer.Description.Props;
123
+ const Trigger: typeof DrawerTrigger;
124
+ const Close: typeof DrawerClose;
125
+ const Portal: typeof DrawerPortal;
126
+ const Overlay: typeof DrawerOverlay;
127
+ const Content: typeof DrawerContent;
128
+ const Header: typeof DrawerHeader;
129
+ const Body: typeof DrawerBody;
130
+ const Footer: typeof DrawerFooter;
131
+ const Title: typeof DrawerTitle;
132
+ const Description: typeof DrawerDescription;
133
+ }
134
+ //#endregion
135
+ export { Drawer$1 as Drawer };
@@ -0,0 +1 @@
1
+ "use client";import{KitPortalScope as e}from"../../../scope/KitPortalScope.js";import"../../../scope/index.js";import{joinClassNames as t}from"../../utils/joinClassNames.js";import{mergeClassName as n}from"../../utils/mergeClassName.js";import{mergeStyle as r}from"../../utils/mergeStyle.js";import{ScrollArea as i}from"../ScrollArea/ScrollArea.js";import"../ScrollArea/index.js";import{SurfaceContentContext as a}from"../surfaceContext.js";import{DRAWER_SLOTS as o}from"./Drawer.slots.js";import{styles as s}from"./Drawer.styles.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";import*as u from"@stylexjs/stylex";import{Drawer as d}from"@base-ui/react/drawer";function f(e){return c(d.Root,{swipeDirection:`down`,"data-stridge-slot":o.root,...e})}function p(e){return c(d.Trigger,{"data-stridge-slot":o.trigger,...e})}function m(e){return c(d.Portal,{"data-stridge-slot":o.portal,...e})}function h(e){return c(d.Close,{"data-stridge-slot":o.close,...e})}function g({className:e,style:t,...i}){let a=u.props(s.overlay);return c(d.Backdrop,{"data-stridge-slot":o.overlay,...i,className:n(a.className,e),style:r(a.style,t)})}function _({children:t,className:i,style:f,container:p,...h}){let _=u.props(s.content),v=u.props(s.viewport),y=u.props(s.handle);return c(m,{container:p??void 0,children:l(e,{children:[c(g,{}),c(d.Viewport,{"data-stridge-slot":o.viewport,className:v.className,style:v.style,children:l(d.Popup,{"data-stridge-slot":o.content,...h,className:n(_.className,i),style:r(_.style,f),children:[c(`div`,{"data-stridge-slot":o.handle,"aria-hidden":!0,className:y.className,style:y.style}),c(a,{value:`drawer`,children:t})]})})]})})}function v({className:e,style:n,...r}){let i=u.props(s.header);return c(`div`,{"data-stridge-slot":o.header,...r,className:t(i.className,e),style:{...i.style,...n}})}function y({className:e,style:n,children:r,...a}){let d=u.props(s.body),f=u.props(s.bodyScrollArea),p=u.props(s.bodyScrollViewport),m=u.props(s.bodyInner);return c(`div`,{"data-stridge-slot":o.body,className:d.className,style:d.style,children:l(i,{className:f.className,style:f.style,children:[c(i.Viewport,{...a,className:t(p.className,e),style:{...p.style,...n},children:c(`div`,{className:m.className,style:m.style,children:r})}),c(i.Scrollbar,{orientation:`vertical`,children:c(i.Thumb,{})})]})})}function b({className:e,style:n,...r}){let i=u.props(s.footer);return c(`div`,{"data-stridge-slot":o.footer,...r,className:t(i.className,e),style:{...i.style,...n}})}function x({className:e,style:t,...i}){let a=u.props(s.title);return c(d.Title,{"data-stridge-slot":o.title,...i,className:n(a.className,e),style:r(a.style,t)})}function S({className:e,style:t,...i}){let a=u.props(s.description);return c(d.Description,{"data-stridge-slot":o.description,...i,className:n(a.className,e),style:r(a.style,t)})}(function(e){e.Trigger=p,e.Close=h,e.Portal=m,e.Overlay=g,e.Content=_,e.Header=v,e.Body=y,e.Footer=b,e.Title=x,e.Description=S})(f||={});export{f as Drawer};
@@ -0,0 +1,19 @@
1
+ //#region src/shared/ui/Drawer/Drawer.slots.d.ts
2
+ declare const DRAWER_SLOTS: {
3
+ readonly root: "drawer";
4
+ readonly trigger: "drawer-trigger";
5
+ readonly portal: "drawer-portal";
6
+ readonly overlay: "drawer-overlay";
7
+ readonly viewport: "drawer-viewport";
8
+ readonly content: "drawer-content";
9
+ readonly handle: "drawer-handle";
10
+ readonly close: "drawer-close";
11
+ readonly title: "drawer-title";
12
+ readonly description: "drawer-description";
13
+ readonly header: "drawer-header";
14
+ readonly body: "drawer-body";
15
+ readonly footer: "drawer-footer";
16
+ };
17
+ type DrawerSlot = (typeof DRAWER_SLOTS)[keyof typeof DRAWER_SLOTS];
18
+ //#endregion
19
+ export { DRAWER_SLOTS, DrawerSlot };
@@ -0,0 +1 @@
1
+ const e={root:`drawer`,trigger:`drawer-trigger`,portal:`drawer-portal`,overlay:`drawer-overlay`,viewport:`drawer-viewport`,content:`drawer-content`,handle:`drawer-handle`,close:`drawer-close`,title:`drawer-title`,description:`drawer-description`,header:`drawer-header`,body:`drawer-body`,footer:`drawer-footer`};export{e as DRAWER_SLOTS};
@@ -0,0 +1 @@
1
+ const e={overlay:{"Drawer__styles.overlay":`Drawer__styles.overlay`,"position-kVAEAm":`xixxii4`,"inset-kpwlN0":`x10a8y8t`,"zIndex-kY2c9j":`xg4qres`,"backgroundColor-kWkggS":`xyxldge`,"opacity-kSiTet":`x1hc1fzr`,"transitionProperty-k1ekBW":`x19991ni`,"transitionDuration-kIyJzY":`x1s4mzch`,"transitionTimingFunction-kAMwcw":`x1xv5090`,":is([data-starting-style], [data-ending-style])_opacity-kdD3Bq":`x1i2unn7`,"@media (prefers-reduced-motion: reduce)_transitionProperty-kXHXEI":`x4wkmsb`,"@media (prefers-reduced-motion: reduce)_transitionDuration-k6CgDc":`x12w9bfk`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:9`},viewport:{"Drawer__styles.viewport":`Drawer__styles.viewport`,"position-kVAEAm":`xixxii4`,"insetBlock-kYYq5F":`x10no89f`,"insetInline-kkqhue":`x17y0mx6`,"zIndex-kY2c9j":`x51lqrf`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"justifyContent-kjj79g":`x13a6bvl`,"alignItems-kGNEyG":`x6s0dn4`,"pointerEvents-kfzvcC":`x47corl`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:34`},content:{"Drawer__styles.content":`Drawer__styles.content`,"pointerEvents-kfzvcC":`x67bb7w`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x1qvtwti`,"minHeight-kAzted":`x2lwn1j`,"maxHeight-kskxy":`x96tae4`,"borderStartStartRadius-krdFHd":`x8htq0b`,"borderStartEndRadius-kfmiAY":`x1af6ir8`,"borderTopWidth-kEafiO":`x178xt8z`,"borderInlineWidth-kjGldf":`x1l0rsgs`,"borderBottomWidth-kt9PQ7":`x1qhh985`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1aqcfi1`,"backgroundColor-kWkggS":`x3cgcfv`,"color-kMwMTN":`xzn0pkc`,"boxShadow-kGVxlE":`xa2vu2y`,"fontFamily-kMv6JI":`xlaww2m`,"outline-kI3sdo":`x1a2a7pz`,"overflow-kVQacm":`x7giv3`,"transform-k3aq6I":`xacbhai`,"transitionProperty-k1ekBW":`x11xpdln`,"transitionDuration-kIyJzY":`x1s4mzch`,"transitionTimingFunction-kAMwcw":`xr4whw6`,":is([data-starting-style], [data-ending-style])_transform-koVVf4":`xjvuu2i`,"[data-swiping]_transitionDuration-kRUqrN":`xsqp3co`,"@media (prefers-reduced-motion: reduce)_transitionProperty-kXHXEI":`x4wkmsb`,"@media (prefers-reduced-motion: reduce)_transitionDuration-k6CgDc":`x12w9bfk`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:61`},handle:{"Drawer__styles.handle":`Drawer__styles.handle`,"flexShrink-kmuXW":`x2lah0s`,"width-kzqmXN":`x19k59d4`,"height-kZKoxP":`xl3s093`,"marginInline-kUOVxO":`xvueqy4`,"marginTop-keoZOQ":`xq9mr0s`,"marginBottom-k1K539":`x1782xsq`,"borderRadius-kaIpWk":`x1npxkrn`,"backgroundColor-kWkggS":`x1p0xf7o`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:101`},header:{"Drawer__styles.header":`Drawer__styles.header`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1hhzuzn`,"paddingInlineStart-kZCmMZ":`xz7312c`,"borderBottomWidth-kt9PQ7":`xso031l`,"borderBottomStyle-kfdmCh":`x1q0q8m5`,"borderBottomColor-kL6WhQ":`x188r5k3`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:112`},body:{"Drawer__styles.body":`Drawer__styles.body`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:126`},bodyScrollArea:{"Drawer__styles.bodyScrollArea":`Drawer__styles.bodyScrollArea`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flex-kUk6DE":`x12lumcd`,"minHeight-kAzted":`x2lwn1j`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:132`},bodyScrollViewport:{"Drawer__styles.bodyScrollViewport":`Drawer__styles.bodyScrollViewport`,"flex-kUk6DE":`x845mor`,"minHeight-kAzted":`x2lwn1j`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x193iq5w`,"height-kZKoxP":`xt7dq6l`,"maxHeight-kskxy":`xmz0i5r`,"overflowX-kXHlph":`x6ikm8r`,"overflowY-kORKVm":`x1odjw0f`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:138`},bodyInner:{"Drawer__styles.bodyInner":`Drawer__styles.bodyInner`,"boxSizing-kB7OPa":`x9f619`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x193iq5w`,"minWidth-k7Eaqz":`xeuugli`,"paddingTop-kLKAdn":`x1h03h88`,"paddingBottom-kGO01o":`xfvigk`,"paddingInlineStart-kZCmMZ":`xz7312c`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:148`},footer:{"Drawer__styles.footer":`Drawer__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"borderTopWidth-kEafiO":`x178xt8z`,"borderTopStyle-kPef9Z":`x13fuv20`,"borderTopColor-kLZC3w":`x1wc9ssx`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:159`},title:{"Drawer__styles.title":`Drawer__styles.title`,"marginTop-keoZOQ":`xdj266r`,"marginBottom-k1K539":`xat24cr`,"color-kMwMTN":`xzn0pkc`,"fontFamily-kMv6JI":`xlaww2m`,"fontSize-kGuDYH":`x126f79r`,"fontWeight-k63SB2":`x1qvi77d`,"lineHeight-kLWn49":`xfh9y1j`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:168`},description:{"Drawer__styles.description":`Drawer__styles.description`,"marginTop-keoZOQ":`xdj266r`,"marginBottom-k1K539":`xat24cr`,"color-kMwMTN":`xi96bwj`,"fontFamily-kMv6JI":`xlaww2m`,"fontSize-kGuDYH":`x14qa7mu`,"lineHeight-kLWn49":`x14vj8e1`,$$css:`@stridge/kit:src/shared/ui/Drawer/Drawer.styles.ts:177`}};export{e as styles};
@@ -0,0 +1,2 @@
1
+ import { Drawer } from "./Drawer.js";
2
+ import { DRAWER_SLOTS, DrawerSlot } from "./Drawer.slots.js";
@@ -0,0 +1 @@
1
+ import"./Drawer.slots.js";import"./Drawer.js";
@@ -0,0 +1,9 @@
1
+ //#region src/shared/ui/surfaceContext.d.ts
2
+ /**
3
+ * Returns `true` when the calling component is rendered inside any kit surface's content region
4
+ * (`Dialog.Content` or `Drawer.Content`). Lets gateway widgets pick the right shell — `Card` frame
5
+ * inline, bare frame when portaled.
6
+ */
7
+ declare function useIsInsideSurfaceContent(): boolean;
8
+ //#endregion
9
+ export { useIsInsideSurfaceContent };
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`SurfaceContentContext`;function r(){return t(n)!==null}function i(){return t(n)}export{n as SurfaceContentContext,r as useIsInsideSurfaceContent,i as useSurfaceKind};
@@ -1,4 +1,5 @@
1
1
  import { DepositMethodConfig, DepositMethodsConfig } from "../flows/deposit/orchestrator/types.js";
2
+ import { Presentation } from "../shared/presentation/types.js";
2
3
  import { KitI18nConfig } from "../shared/i18n/createKitI18n.js";
3
4
  import { SupportConfig } from "../shared/support/types.js";
4
5
  import { TermsConfig } from "../shared/terms/types.js";
@@ -130,6 +131,13 @@ interface StridgeAppearance {
130
131
  * Controls the "Powered by Stridge" attribution row inside every gateway widget frame.
131
132
  */
132
133
  attribution?: "visible" | "hidden";
134
+ /**
135
+ * How gateway dialogs present themselves. `"auto"` (default) renders a centred dialog on wide
136
+ * containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"` force one
137
+ * surface. Pass `{ mode, breakpoint }` to tune the px threshold (default 600). Measured against
138
+ * the dialog's containing block (its portal `container`, else the viewport).
139
+ */
140
+ presentation?: Presentation;
133
141
  }
134
142
  /**
135
143
  * Development / preview-only knobs. Grouped under a single `dev` prop so production integrations
@@ -1 +1 @@
1
- "use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{createStridgeCatalog as n}from"../drivers/stridge/catalog.js";import{createStridgeActivityDriver as r}from"../drivers/stridge/createStridgeActivityDriver.js";import{createStridgeDepositDriver as i}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as a}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{createBus as ee}from"../events/bus/createBus.js";import{createFlowIdRegistry as te}from"../events/bus/flowIdRegistry.js";import{createMetadataStore as o}from"../events/bus/metadata.js";import"../events/bus/index.js";import{KitProvider as s}from"../KitProvider.js";import{resolveMerchantLink as c}from"../shared/merchant-link/resolveMerchantLink.js";import"../shared/merchant-link/index.js";import{useIntercomMerchantContext as l}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as u}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useDeepMemo as d}from"../shared/utils/useDeepMemo.js";import{ConnectWalletContext as f}from"../shared/wallet/ConnectWalletContext.js";import{DepositOwnerContext as p}from"./depositOwner.js";import{useOptionalWagmi as m}from"./optionalWagmi.js";import{createStubDepositDriver as h,createStubWithdrawDriver as g}from"./stubs.js";import{useEffect as _,useMemo as v,useRef as y}from"react";import{jsx as b}from"react/jsx-runtime";function x({gatewayKey:x,environment:S,asset:C,flows:w,appearance:T,i18n:E,storage:D,dev:O,support:k,terms:ne,prefetch:A,connectWallet:j,className:re,children:ie}){if(!w.deposit&&!w.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!C)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:M,address:N}=m(),P=v(()=>t(E??{}),[E?.locale,E?.messages]),F=y(P);F.current=P;let I=d(C),L=d(w.deposit),R=d(w.withdraw),z=I.networkId,B=I.symbol,V=L?.owner?.address??N??O?.userAddressOverride,H=R?.owner.address,U=v(()=>n({projectKey:x,...S?{environment:S}:{}}),[x,S]),W=v(()=>{if(!(!L||!V))return i({userAddress:V,projectKey:x,destination:{network_id:z,asset_symbol:B,to_address:L.destination.address},wagmiConfig:M,catalog:U,getI18n:()=>F.current,...S?{environment:S}:{},...L.minAmountUsd===void 0?{}:{minAmountUsd:L.minAmountUsd},...L.maxAmountUsd===void 0?{}:{maxAmountUsd:L.maxAmountUsd},...L.metadata?{metadata:L.metadata}:{}})},[L,V,x,S,z,B,M,U]),G=v(()=>h(),[]),K=L?W??G:void 0,q=v(()=>{if(!(!R||!H))return a({userAddress:H,projectKey:x,currency:{networkId:z,assetSymbol:B},wagmiConfig:M,catalog:U,getI18n:()=>F.current,...S?{environment:S}:{},...R.minAmountUsd===void 0?{}:{minAmountUsd:R.minAmountUsd},...R.maxAmountUsd===void 0?{}:{maxAmountUsd:R.maxAmountUsd},...R.metadata?{metadata:R.metadata}:{}})},[R,H,x,S,z,B,M,U]),J=v(()=>g(),[]),Y=R?q??J:void 0,X=(L?V:void 0)??(R?H:void 0),Z=v(()=>{if(X)return r({userAddress:X,projectKey:x,catalog:U,...S?{environment:S}:{}})},[X,x,S,U]);_(()=>{if(!A)return;let e=A===!0||A.includes(`deposit`),t=A===!0||A.includes(`withdraw`),n=A===!0||A.includes(`activity`)||e||t;e&&W?.arm(),t&&q?.arm(),n&&Z?.arm()},[A,W,q,Z]);let ae=v(()=>L?{resolved:V!==void 0}:null,[L,V]),oe=v(()=>j?{onClick:j.onClick,...j.label===void 0?{}:{label:j.label}}:null,[j?.onClick,j?.label]),Q=V??H,$=u({gatewayKey:x,environment:S??`production`,assetChain:z,assetSymbol:B,...Q?{userAddress:Q}:{},...W?{depositDriver:W}:{}});return l(c(k?{url:k.url,onSelect:k.onOpen}:void 0).kind===`default`?$:null),b(e,{value:v(()=>({bus:ee(),flowIds:te(),metadata:o()}),[]),children:b(f,{value:oe,children:b(p,{value:ae,children:b(s,{theme:T?.theme,accent:T?.accent,radius:T?.radius,direction:T?.direction,attribution:T?.attribution,i18n:E,storage:D?.driver,storageNamespace:D?.namespace,className:re,support:k,merchantContext:$,terms:ne,...K?{deposit:K}:{},...L?.methods?{depositMethods:L.methods}:{},...Y?{withdraw:Y}:{},...Z?{activity:Z}:{},children:ie})})})})}export{x as StridgeProvider};
1
+ "use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{createStridgeCatalog as n}from"../drivers/stridge/catalog.js";import{createStridgeActivityDriver as r}from"../drivers/stridge/createStridgeActivityDriver.js";import{createStridgeDepositDriver as i}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as a}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{createBus as ee}from"../events/bus/createBus.js";import{createFlowIdRegistry as te}from"../events/bus/flowIdRegistry.js";import{createMetadataStore as o}from"../events/bus/metadata.js";import"../events/bus/index.js";import{KitProvider as s}from"../KitProvider.js";import{resolveMerchantLink as c}from"../shared/merchant-link/resolveMerchantLink.js";import"../shared/merchant-link/index.js";import{useIntercomMerchantContext as l}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as u}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useDeepMemo as d}from"../shared/utils/useDeepMemo.js";import{ConnectWalletContext as f}from"../shared/wallet/ConnectWalletContext.js";import{DepositOwnerContext as p}from"./depositOwner.js";import{useOptionalWagmi as m}from"./optionalWagmi.js";import{createStubDepositDriver as h,createStubWithdrawDriver as g}from"./stubs.js";import{useEffect as _,useMemo as v,useRef as y}from"react";import{jsx as b}from"react/jsx-runtime";function x({gatewayKey:x,environment:S,asset:C,flows:w,appearance:T,i18n:E,storage:D,dev:O,support:k,terms:ne,prefetch:A,connectWallet:j,className:re,children:ie}){if(!w.deposit&&!w.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!C)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:M,address:N}=m(),P=v(()=>t(E??{}),[E?.locale,E?.messages]),F=y(P);F.current=P;let I=d(C),L=d(w.deposit),R=d(w.withdraw),z=I.networkId,B=I.symbol,V=L?.owner?.address??N??O?.userAddressOverride,H=R?.owner.address,U=v(()=>n({projectKey:x,...S?{environment:S}:{}}),[x,S]),W=v(()=>{if(!(!L||!V))return i({userAddress:V,projectKey:x,destination:{network_id:z,asset_symbol:B,to_address:L.destination.address},wagmiConfig:M,catalog:U,getI18n:()=>F.current,...S?{environment:S}:{},...L.minAmountUsd===void 0?{}:{minAmountUsd:L.minAmountUsd},...L.maxAmountUsd===void 0?{}:{maxAmountUsd:L.maxAmountUsd},...L.metadata?{metadata:L.metadata}:{}})},[L,V,x,S,z,B,M,U]),G=v(()=>h(),[]),K=L?W??G:void 0,q=v(()=>{if(!(!R||!H))return a({userAddress:H,projectKey:x,currency:{networkId:z,assetSymbol:B},wagmiConfig:M,catalog:U,getI18n:()=>F.current,...S?{environment:S}:{},...R.minAmountUsd===void 0?{}:{minAmountUsd:R.minAmountUsd},...R.maxAmountUsd===void 0?{}:{maxAmountUsd:R.maxAmountUsd},...R.metadata?{metadata:R.metadata}:{}})},[R,H,x,S,z,B,M,U]),J=v(()=>g(),[]),Y=R?q??J:void 0,X=(L?V:void 0)??(R?H:void 0),Z=v(()=>{if(X)return r({userAddress:X,projectKey:x,catalog:U,...S?{environment:S}:{}})},[X,x,S,U]);_(()=>{if(!A)return;let e=A===!0||A.includes(`deposit`),t=A===!0||A.includes(`withdraw`),n=A===!0||A.includes(`activity`)||e||t;e&&W?.arm(),t&&q?.arm(),n&&Z?.arm()},[A,W,q,Z]);let ae=v(()=>L?{resolved:V!==void 0}:null,[L,V]),oe=v(()=>j?{onClick:j.onClick,...j.label===void 0?{}:{label:j.label}}:null,[j?.onClick,j?.label]),Q=V??H,$=u({gatewayKey:x,environment:S??`production`,assetChain:z,assetSymbol:B,...Q?{userAddress:Q}:{},...W?{depositDriver:W}:{}});return l(c(k?{url:k.url,onSelect:k.onOpen}:void 0).kind===`default`?$:null),b(e,{value:v(()=>({bus:ee(),flowIds:te(),metadata:o()}),[]),children:b(f,{value:oe,children:b(p,{value:ae,children:b(s,{theme:T?.theme,accent:T?.accent,radius:T?.radius,direction:T?.direction,attribution:T?.attribution,presentation:T?.presentation,i18n:E,storage:D?.driver,storageNamespace:D?.namespace,className:re,support:k,merchantContext:$,terms:ne,...K?{deposit:K}:{},...L?.methods?{depositMethods:L.methods}:{},...Y?{withdraw:Y}:{},...Z?{activity:Z}:{},children:ie})})})})}export{x as StridgeProvider};
@@ -66,6 +66,10 @@
66
66
  --stridge-kit-z-tooltip: 1070;
67
67
  --stridge-kit-overlay: oklch(0% 0 0 / .4);
68
68
  --stridge-kit-dialog-width: 480px;
69
+ --stridge-kit-drawer-max-inline-size: var(--stridge-kit-dialog-width);
70
+ --stridge-kit-drawer-max-block-size: calc(100% - 2rem);
71
+ --stridge-kit-drawer-handle-size: 36px;
72
+ --stridge-kit-drawer-handle-thickness: 4px;
69
73
  }
70
74
 
71
75
  :root, [data-stridge-scope] {
@@ -196,6 +200,7 @@
196
200
  --stridge-kit-card-border: oklch(29.55% .01 285.72);
197
201
  --stridge-kit-card-border-frame: oklch(27.07% .01 285.77);
198
202
  --stridge-kit-card-shadow: 0 30px 80px oklch(0% 0 0 / .6), 0 2px 6px oklch(0% 0 0 / .4);
203
+ --stridge-kit-drawer-handle-color: oklch(52.95% .01 286.13 / .55);
199
204
  --stridge-kit-skeleton-base: oklch(29.55% .01 285.72);
200
205
  --stridge-kit-skeleton-highlight: oklch(35.16% .01 285.67);
201
206
  --stridge-kit-attribution-prefix-color: oklch(62% .005 286);
@@ -257,6 +262,7 @@
257
262
  --stridge-kit-card-border: oklch(91% 0 286);
258
263
  --stridge-kit-card-border-frame: oklch(91% 0 286);
259
264
  --stridge-kit-card-shadow: 0 30px 80px oklch(0% 0 0 / .16), 0 2px 6px oklch(0% 0 0 / .08);
265
+ --stridge-kit-drawer-handle-color: oklch(60% .01 286 / .4);
260
266
  --stridge-kit-skeleton-base: oklch(91% 0 286);
261
267
  --stridge-kit-skeleton-highlight: oklch(95% 0 286);
262
268
  --stridge-kit-attribution-prefix-color: oklch(50% .01 286);
@@ -269,6 +275,16 @@
269
275
  --stridge-kit-shadow-xl: 0 24px 56px -12px oklch(0% 0 0 / .1), 0 8px 16px -4px oklch(0% 0 0 / .06);
270
276
  }
271
277
 
278
+ [data-stridge-scope] {
279
+ -webkit-user-select: none;
280
+ user-select: none;
281
+ }
282
+
283
+ [data-stridge-scope] :is(input, textarea, [contenteditable="true"]) {
284
+ -webkit-user-select: text;
285
+ user-select: text;
286
+ }
287
+
272
288
  @stylex;
273
289
 
274
290
  @layer priority1;
@@ -396,6 +412,10 @@
396
412
  border-color: var(--stridge-kit-border);
397
413
  }
398
414
 
415
+ .x1l0rsgs {
416
+ border-inline-width: 1px;
417
+ }
418
+
399
419
  .x6i6fhv {
400
420
  border-radius: .375rem;
401
421
  }
@@ -604,6 +624,14 @@
604
624
  gap: var(--stridge-kit-space-2);
605
625
  }
606
626
 
627
+ .x10no89f {
628
+ inset-block: 0;
629
+ }
630
+
631
+ .x17y0mx6 {
632
+ inset-inline: 0;
633
+ }
634
+
607
635
  .x10im51j {
608
636
  margin-block: 0;
609
637
  }
@@ -612,6 +640,10 @@
612
640
  margin-inline: 22px;
613
641
  }
614
642
 
643
+ .xvueqy4 {
644
+ margin-inline: auto;
645
+ }
646
+
615
647
  .x1mqxmvn {
616
648
  margin-inline: calc(var(--stridge-kit-space-1) * -1);
617
649
  }
@@ -1144,6 +1176,10 @@
1144
1176
  background-color: var(--stridge-kit-skeleton-base);
1145
1177
  }
1146
1178
 
1179
+ .x1p0xf7o {
1180
+ background-color: var(--stridge-kit-drawer-handle-color);
1181
+ }
1182
+
1147
1183
  .xfhhmty {
1148
1184
  background-color: var(--stridge-kit-destructive-soft);
1149
1185
  }
@@ -1196,10 +1232,18 @@
1196
1232
  border-start-end-radius: var(--stridge-kit-radius-md);
1197
1233
  }
1198
1234
 
1235
+ .x1af6ir8 {
1236
+ border-start-end-radius: var(--stridge-kit-card-radius-frame);
1237
+ }
1238
+
1199
1239
  .x1d6sz28 {
1200
1240
  border-start-start-radius: var(--stridge-kit-radius-md);
1201
1241
  }
1202
1242
 
1243
+ .x8htq0b {
1244
+ border-start-start-radius: var(--stridge-kit-card-radius-frame);
1245
+ }
1246
+
1203
1247
  .x1gsh91t {
1204
1248
  box-shadow: 0 0 0 1.5px var(--stridge-kit-tile-surface);
1205
1249
  }
@@ -1672,6 +1716,10 @@
1672
1716
  justify-content: center;
1673
1717
  }
1674
1718
 
1719
+ .x13a6bvl {
1720
+ justify-content: flex-end;
1721
+ }
1722
+
1675
1723
  .x1nhvcw1 {
1676
1724
  justify-content: flex-start;
1677
1725
  }
@@ -1844,6 +1892,10 @@
1844
1892
  opacity: 0;
1845
1893
  }
1846
1894
 
1895
+ .x1hc1fzr {
1896
+ opacity: 1;
1897
+ }
1898
+
1847
1899
  .x1clqncf {
1848
1900
  order: -1;
1849
1901
  }
@@ -1944,6 +1996,10 @@
1944
1996
  padding-inline-start: var(--stridge-kit-space-2);
1945
1997
  }
1946
1998
 
1999
+ .x67bb7w {
2000
+ pointer-events: auto;
2001
+ }
2002
+
1947
2003
  .x47corl {
1948
2004
  pointer-events: none;
1949
2005
  }
@@ -2108,6 +2164,10 @@
2108
2164
  transform: translate(-50%, -50%);
2109
2165
  }
2110
2166
 
2167
+ .xacbhai {
2168
+ transform: translateY(var(--drawer-swipe-movement-y, 0px));
2169
+ }
2170
+
2111
2171
  .xx6bhzk {
2112
2172
  transition-duration: .15s;
2113
2173
  }
@@ -2128,6 +2188,10 @@
2128
2188
  transition-duration: var(--stridge-kit-duration-fast);
2129
2189
  }
2130
2190
 
2191
+ .x1s4mzch {
2192
+ transition-duration: var(--stridge-kit-duration-slow);
2193
+ }
2194
+
2131
2195
  .x11vqxbs {
2132
2196
  transition-property: background-color, border-color, box-shadow;
2133
2197
  }
@@ -2196,6 +2260,10 @@
2196
2260
  transition-timing-function: ease-out;
2197
2261
  }
2198
2262
 
2263
+ .xr4whw6 {
2264
+ transition-timing-function: var(--stridge-kit-ease-enter);
2265
+ }
2266
+
2199
2267
  .x1xv5090 {
2200
2268
  transition-timing-function: var(--stridge-kit-ease-out);
2201
2269
  }
@@ -2365,6 +2433,10 @@
2365
2433
  color: var(--stridge-kit-muted-foreground);
2366
2434
  }
2367
2435
 
2436
+ .x1i2unn7:is([data-starting-style], [data-ending-style]) {
2437
+ opacity: 0;
2438
+ }
2439
+
2368
2440
  .x11ayl2i:focus-visible {
2369
2441
  outline-color: var(--stridge-kit-ring);
2370
2442
  }
@@ -2389,6 +2461,10 @@
2389
2461
  text-underline-offset: 2px;
2390
2462
  }
2391
2463
 
2464
+ .xjvuu2i:is([data-starting-style], [data-ending-style]) {
2465
+ transform: translateY(100%);
2466
+ }
2467
+
2392
2468
  .x1yi73pz:has( > input:focus-visible, > textarea:focus-visible) {
2393
2469
  box-shadow: var(--stridge-kit-shadow-ring-focus);
2394
2470
  }
@@ -2533,6 +2609,10 @@
2533
2609
  .x12w9bfk.x12w9bfk {
2534
2610
  transition-duration: 0s;
2535
2611
  }
2612
+
2613
+ .x4wkmsb.x4wkmsb {
2614
+ transition-property: none;
2615
+ }
2536
2616
  }
2537
2617
 
2538
2618
  @container field-group (width >= 32rem) {
@@ -2729,6 +2809,10 @@
2729
2809
  height: var(--collapsible-panel-height);
2730
2810
  }
2731
2811
 
2812
+ .xl3s093 {
2813
+ height: var(--stridge-kit-drawer-handle-thickness);
2814
+ }
2815
+
2732
2816
  .x1nrll8i {
2733
2817
  left: 50%;
2734
2818
  }
@@ -2841,6 +2925,10 @@
2841
2925
  max-height: min(var(--available-height),200px);
2842
2926
  }
2843
2927
 
2928
+ .x96tae4 {
2929
+ max-height: var(--stridge-kit-drawer-max-block-size);
2930
+ }
2931
+
2844
2932
  .x193iq5w {
2845
2933
  max-width: 100%;
2846
2934
  }
@@ -2865,6 +2953,10 @@
2865
2953
  max-width: min(var(--stridge-kit-dialog-width),calc(100% - 2rem));
2866
2954
  }
2867
2955
 
2956
+ .x1qvtwti {
2957
+ max-width: var(--stridge-kit-drawer-max-inline-size);
2958
+ }
2959
+
2868
2960
  .x2lwn1j {
2869
2961
  min-height: 0;
2870
2962
  }
@@ -3173,6 +3265,10 @@
3173
3265
  width: max-content;
3174
3266
  }
3175
3267
 
3268
+ .x19k59d4 {
3269
+ width: var(--stridge-kit-drawer-handle-size);
3270
+ }
3271
+
3176
3272
  .x1g31smg:first-child {
3177
3273
  border-top-width: 0;
3178
3274
  }
@@ -3387,6 +3483,10 @@
3387
3483
  transform: rotate(90deg);
3388
3484
  }
3389
3485
 
3486
+ .xsqp3co[data-swiping] {
3487
+ transition-duration: 0s;
3488
+ }
3489
+
3390
3490
  @media (prefers-reduced-motion: reduce) {
3391
3491
  .xgx5xwo.xgx5xwo[data-closed], .xslpr3k.xslpr3k[data-open] {
3392
3492
  animation-duration: 0s;
package/dist/types.d.ts CHANGED
@@ -6,6 +6,7 @@ import { ConfirmDepositPhase, DepositActions, DepositController, DepositMethod,
6
6
  import { ReceiveOptionDto, ReceiveOptionsResponse, WithdrawableBalanceDto, WithdrawableBalancesResponse, WithdrawalQuoteDto, WithdrawalQuoteResponse, WithdrawalSettlementDto, WithdrawalSettlementResponse } from "./flows/withdraw/driver/dto.js";
7
7
  import { ReceiveChainPayload, ReceiveTokenOptionPayload, WithdrawableBalanceItemPayload, WithdrawalQuoteBreakdownPayload, WithdrawalQuotePayload, WithdrawalReceiveAssetPayload, WithdrawalSettlementFailurePayload, WithdrawalSettlementPayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "./flows/withdraw/driver/payloads.js";
8
8
  import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
9
+ import { Presentation, PresentationConfig, PresentationMode } from "./shared/presentation/types.js";
9
10
  import { KitConfig, KitDirection, KitRadius, KitTarget, KitTheme } from "./scope/context.js";
10
11
  import { KitStorageAdapter, KitStoragePersistence } from "./storage/types.js";
11
12
  import { KitStorage } from "./storage/createKitStorage.js";
@@ -13,4 +14,4 @@ import { WithdrawActions, WithdrawController, WithdrawEvent, WithdrawState, With
13
14
  import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient } from "./flows/withdraw/bindings/WithdrawBindings.js";
14
15
  import { BannerAckBucket } from "./banners/useBannerAck.js";
15
16
  import { STEPS_WITH_OWN_SETTLEMENT_VIEW, stepRendersSettlement } from "./flows/deposit/orchestrator/steps.js";
16
- export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BannerAckBucket, type BrandPayload, type ChainPayload, type ConfirmDepositPhase, type DepositActions, type DepositController, type DepositMethod, type DepositSnapshot, type DepositState, type DepositStateName, type Entity, type FailureInfo, type GatewayEvent, type KitConfig, type KitDirection, type KitRadius, type KitStorage, type KitStorageAdapter, type KitStoragePersistence, type KitTarget, type KitTheme, type OpenInput, type QuoteBreakdownPayload, type QuotePayload, type QuoteRoutePayload, type ReceiveChainPayload, type ReceiveOptionDto, type ReceiveOptionsResponse, type ReceiveTokenOptionPayload, type ResolvedOpenInput, type RetryTargetSpec, STEPS_WITH_OWN_SETTLEMENT_VIEW, type SettlementFailureKind, type SettlementFailurePayload, type SettlementPayload, type SettlementPendingPayload, type SettlementSuccessPayload, type SourceWalletPayload, type TargetPayload, type TxRef, type WalletInfo, type WalletPayload, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawEvent, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawableBalanceDto, type WithdrawableBalanceItemPayload, type WithdrawableBalancesResponse, type WithdrawalFormSnapshot, type WithdrawalQuoteBreakdownPayload, type WithdrawalQuoteDto, type WithdrawalQuotePayload, type WithdrawalQuoteResponse, type WithdrawalReceiveAssetPayload, type WithdrawalSettlementDto, type WithdrawalSettlementFailurePayload, type WithdrawalSettlementPayload, type WithdrawalSettlementPendingPayload, type WithdrawalSettlementResponse, type WithdrawalSettlementSuccessPayload, stepRendersSettlement };
17
+ export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BannerAckBucket, type BrandPayload, type ChainPayload, type ConfirmDepositPhase, type DepositActions, type DepositController, type DepositMethod, type DepositSnapshot, type DepositState, type DepositStateName, type Entity, type FailureInfo, type GatewayEvent, type KitConfig, type KitDirection, type KitRadius, type KitStorage, type KitStorageAdapter, type KitStoragePersistence, type KitTarget, type KitTheme, type OpenInput, type Presentation, type PresentationConfig, type PresentationMode, type QuoteBreakdownPayload, type QuotePayload, type QuoteRoutePayload, type ReceiveChainPayload, type ReceiveOptionDto, type ReceiveOptionsResponse, type ReceiveTokenOptionPayload, type ResolvedOpenInput, type RetryTargetSpec, STEPS_WITH_OWN_SETTLEMENT_VIEW, type SettlementFailureKind, type SettlementFailurePayload, type SettlementPayload, type SettlementPendingPayload, type SettlementSuccessPayload, type SourceWalletPayload, type TargetPayload, type TxRef, type WalletInfo, type WalletPayload, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawEvent, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawableBalanceDto, type WithdrawableBalanceItemPayload, type WithdrawableBalancesResponse, type WithdrawalFormSnapshot, type WithdrawalQuoteBreakdownPayload, type WithdrawalQuoteDto, type WithdrawalQuotePayload, type WithdrawalQuoteResponse, type WithdrawalReceiveAssetPayload, type WithdrawalSettlementDto, type WithdrawalSettlementFailurePayload, type WithdrawalSettlementPayload, type WithdrawalSettlementPendingPayload, type WithdrawalSettlementResponse, type WithdrawalSettlementSuccessPayload, stepRendersSettlement };
@@ -1,5 +1,7 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../shared/presentation/types.js";
1
2
  import { WalletRow, WalletRowDensity, WalletRowProps } from "../shared/ui/WalletRow/WalletRow.js";
2
3
  import { WALLET_ROW_SLOTS, WalletRowSlot } from "../shared/ui/WalletRow/WalletRow.slots.js";
4
+ import { AdaptiveSurface, AdaptiveSurfaceProps } from "../shared/ui/AdaptiveSurface/AdaptiveSurface.js";
3
5
  import { Alert, AlertVariant } from "../shared/ui/Alert/Alert.js";
4
6
  import { ALERT_SLOTS, AlertSlot } from "../shared/ui/Alert/Alert.slots.js";
5
7
  import { AmountInput } from "../shared/ui/AmountInput/AmountInput.js";
@@ -17,6 +19,8 @@ import { Details } from "../shared/ui/Details/Details.js";
17
19
  import { DETAILS_SLOTS, DetailsSlot } from "../shared/ui/Details/Details.slots.js";
18
20
  import { Dialog, useIsInsideDialogContent } from "../shared/ui/Dialog/Dialog.js";
19
21
  import { DIALOG_SLOTS, DialogSlot } from "../shared/ui/Dialog/Dialog.slots.js";
22
+ import { Drawer } from "../shared/ui/Drawer/Drawer.js";
23
+ import { DRAWER_SLOTS, DrawerSlot } from "../shared/ui/Drawer/Drawer.slots.js";
20
24
  import { ExternalLink } from "../shared/ui/ExternalLink/ExternalLink.js";
21
25
  import { EXTERNAL_LINK_SLOTS, ExternalLinkSlot } from "../shared/ui/ExternalLink/ExternalLink.slots.js";
22
26
  import { Field, FieldOrientation } from "../shared/ui/Field/Field.js";
@@ -47,4 +51,4 @@ import { TokenLogoProps } from "../shared/ui/TokenLogo/types.js";
47
51
  import { TokenLogo } from "../shared/ui/TokenLogo/TokenLogo.js";
48
52
  import { Tooltip, TooltipVariant } from "../shared/ui/Tooltip/Tooltip.js";
49
53
  import { TOOLTIP_SLOTS, TooltipSlot } from "../shared/ui/Tooltip/Tooltip.slots.js";
50
- export { ALERT_SLOTS, AMOUNT_INPUT_SLOTS, Alert, AlertSlot, AlertVariant, AmountInput, AmountInputSlot, BADGE_SLOTS, BUTTON_SLOTS, Badge, BadgeColor, BadgeRoundness, BadgeSize, BadgeSlot, BadgeVariant, Button, ButtonSize, ButtonSlot, ButtonVariant, CARD_SLOTS, COLLAPSIBLE_SLOTS, Card, CardSlot, CardVariant, Collapsible, CollapsibleSlot, DETAILS_SLOTS, DIALOG_SLOTS, Details, DetailsSlot, Dialog, DialogSlot, EXTERNAL_LINK_SLOTS, ExternalLink, ExternalLinkSlot, FIELD_SLOTS, Field, FieldOrientation, FieldSlot, HtmlTags, ICON_BUTTON_SLOTS, IMAGE_SLOTS, INPUT_GROUP_SLOTS, IconButton, IconButtonSize, IconButtonSlot, Image, ImageGroupProps, ImageOverlayProps, ImageProps, ImageShape, ImageSize, ImageSlot, InputGroup, InputGroupAddonAlign, InputGroupSlot, LtrAtom, LtrAtomProps, SCROLL_AREA_SLOTS, SELECTABLE_TILE_SLOTS, SELECT_SLOTS, SKELETON_SLOTS, STEPS_SLOTS, ScrollArea, ScrollAreaSlot, Select, SelectSlot, SelectVariant, SelectableTile, SelectableTileGroup, SelectableTileGroupProps, SelectableTileShape, SelectableTileSlot, Skeleton, SkeletonSlot, Step, Steps, StepsSlot, TEXT_SLOTS, TOOLTIP_SLOTS, TextAlign, TextColor, TextComponent, TextFactory, TextFont, TextFontWeight, TextLeading, TextProps, TextSize, TextSlot, TextTracking, TextTransform, TokenLogo, TokenLogoProps, Tooltip, TooltipSlot, TooltipVariant, WALLET_ROW_SLOTS, WalletRow, WalletRowDensity, WalletRowProps, WalletRowSlot, formatAmountForInput, parseAmountInputValue, text, useIsInsideDialogContent };
54
+ export { ALERT_SLOTS, AMOUNT_INPUT_SLOTS, AdaptiveSurface, AdaptiveSurfaceProps, Alert, AlertSlot, AlertVariant, AmountInput, AmountInputSlot, BADGE_SLOTS, BUTTON_SLOTS, Badge, BadgeColor, BadgeRoundness, BadgeSize, BadgeSlot, BadgeVariant, Button, ButtonSize, ButtonSlot, ButtonVariant, CARD_SLOTS, COLLAPSIBLE_SLOTS, Card, CardSlot, CardVariant, Collapsible, CollapsibleSlot, DETAILS_SLOTS, DIALOG_SLOTS, DRAWER_SLOTS, Details, DetailsSlot, Dialog, DialogSlot, Drawer, DrawerSlot, EXTERNAL_LINK_SLOTS, ExternalLink, ExternalLinkSlot, FIELD_SLOTS, Field, FieldOrientation, FieldSlot, HtmlTags, ICON_BUTTON_SLOTS, IMAGE_SLOTS, INPUT_GROUP_SLOTS, IconButton, IconButtonSize, IconButtonSlot, Image, ImageGroupProps, ImageOverlayProps, ImageProps, ImageShape, ImageSize, ImageSlot, InputGroup, InputGroupAddonAlign, InputGroupSlot, LtrAtom, LtrAtomProps, Presentation, PresentationConfig, PresentationMode, SCROLL_AREA_SLOTS, SELECTABLE_TILE_SLOTS, SELECT_SLOTS, SKELETON_SLOTS, STEPS_SLOTS, ScrollArea, ScrollAreaSlot, Select, SelectSlot, SelectVariant, SelectableTile, SelectableTileGroup, SelectableTileGroupProps, SelectableTileShape, SelectableTileSlot, Skeleton, SkeletonSlot, Step, Steps, StepsSlot, TEXT_SLOTS, TOOLTIP_SLOTS, TextAlign, TextColor, TextComponent, TextFactory, TextFont, TextFontWeight, TextLeading, TextProps, TextSize, TextSlot, TextTracking, TextTransform, TokenLogo, TokenLogoProps, Tooltip, TooltipSlot, TooltipVariant, WALLET_ROW_SLOTS, WalletRow, WalletRowDensity, WalletRowProps, WalletRowSlot, formatAmountForInput, parseAmountInputValue, text, useIsInsideDialogContent };
package/dist/ui/index.js CHANGED
@@ -1 +1 @@
1
- import{EXTERNAL_LINK_SLOTS as e}from"../shared/ui/ExternalLink/ExternalLink.slots.js";import{ExternalLink as t}from"../shared/ui/ExternalLink/ExternalLink.js";import"../shared/ui/ExternalLink/index.js";import{BUTTON_SLOTS as n}from"../shared/ui/Button/Button.slots.js";import{Button as r}from"../shared/ui/Button/Button.js";import"../shared/ui/Button/index.js";import{ICON_BUTTON_SLOTS as i}from"../shared/ui/IconButton/IconButton.slots.js";import{IconButton as a}from"../shared/ui/IconButton/IconButton.js";import"../shared/ui/IconButton/index.js";import{SCROLL_AREA_SLOTS as o}from"../shared/ui/ScrollArea/ScrollArea.slots.js";import{ScrollArea as s}from"../shared/ui/ScrollArea/ScrollArea.js";import"../shared/ui/ScrollArea/index.js";import{DIALOG_SLOTS as c}from"../shared/ui/Dialog/Dialog.slots.js";import{Dialog as l,useIsInsideDialogContent as u}from"../shared/ui/Dialog/Dialog.js";import"../shared/ui/Dialog/index.js";import{ALERT_SLOTS as d}from"../shared/ui/Alert/Alert.slots.js";import{Alert as f}from"../shared/ui/Alert/Alert.js";import"../shared/ui/Alert/index.js";import{AMOUNT_INPUT_SLOTS as p}from"../shared/ui/AmountInput/AmountInput.slots.js";import{formatAmountForInput as m,parseAmountInputValue as h}from"../shared/ui/AmountInput/utils.js";import{AmountInput as g}from"../shared/ui/AmountInput/AmountInput.js";import"../shared/ui/AmountInput/index.js";import{BADGE_SLOTS as _}from"../shared/ui/Badge/Badge.slots.js";import{Badge as v}from"../shared/ui/Badge/Badge.js";import"../shared/ui/Badge/index.js";import{CARD_SLOTS as y}from"../shared/ui/Card/Card.slots.js";import{Card as b}from"../shared/ui/Card/Card.js";import"../shared/ui/Card/index.js";import{COLLAPSIBLE_SLOTS as x}from"../shared/ui/Collapsible/Collapsible.slots.js";import{Collapsible as S}from"../shared/ui/Collapsible/Collapsible.js";import"../shared/ui/Collapsible/index.js";import{DETAILS_SLOTS as C}from"../shared/ui/Details/Details.slots.js";import{Details as w}from"../shared/ui/Details/Details.js";import"../shared/ui/Details/index.js";import{FIELD_SLOTS as T}from"../shared/ui/Field/Field.slots.js";import{Field as E}from"../shared/ui/Field/Field.js";import"../shared/ui/Field/index.js";import{IMAGE_SLOTS as D}from"../shared/ui/Image/Image.slots.js";import{Image as O}from"../shared/ui/Image/Image.js";import"../shared/ui/Image/index.js";import{INPUT_GROUP_SLOTS as k}from"../shared/ui/InputGroup/InputGroup.slots.js";import{InputGroup as A}from"../shared/ui/InputGroup/InputGroup.js";import"../shared/ui/InputGroup/index.js";import{LtrAtom as j}from"../shared/ui/LtrAtom/LtrAtom.js";import"../shared/ui/LtrAtom/index.js";import{SELECT_SLOTS as M}from"../shared/ui/Select/Select.slots.js";import{Select as N}from"../shared/ui/Select/Select.js";import"../shared/ui/Select/index.js";import{SELECTABLE_TILE_SLOTS as P}from"../shared/ui/SelectableTile/SelectableTile.slots.js";import{SelectableTile as F}from"../shared/ui/SelectableTile/SelectableTile.js";import{SelectableTileGroup as I}from"../shared/ui/SelectableTile/SelectableTileGroup.js";import"../shared/ui/SelectableTile/index.js";import{SKELETON_SLOTS as L}from"../shared/ui/Skeleton/Skeleton.slots.js";import{Skeleton as R}from"../shared/ui/Skeleton/Skeleton.js";import"../shared/ui/Skeleton/index.js";import{STEPS_SLOTS as z}from"../shared/ui/Steps/Steps.slots.js";import{Step as B,Steps as V}from"../shared/ui/Steps/Steps.js";import"../shared/ui/Steps/index.js";import{TEXT_SLOTS as H}from"../shared/ui/Text/Text.slots.js";import{text as U}from"../shared/ui/Text/Text.js";import"../shared/ui/Text/index.js";import{TokenLogo as W}from"../shared/ui/TokenLogo/TokenLogo.js";import"../shared/ui/TokenLogo/index.js";import{TOOLTIP_SLOTS as G}from"../shared/ui/Tooltip/Tooltip.slots.js";import{Tooltip as K}from"../shared/ui/Tooltip/Tooltip.js";import"../shared/ui/Tooltip/index.js";import{WALLET_ROW_SLOTS as q}from"../shared/ui/WalletRow/WalletRow.slots.js";import{WalletRow as J}from"../shared/ui/WalletRow/WalletRow.js";import"../shared/ui/WalletRow/index.js";export{d as ALERT_SLOTS,p as AMOUNT_INPUT_SLOTS,f as Alert,g as AmountInput,_ as BADGE_SLOTS,n as BUTTON_SLOTS,v as Badge,r as Button,y as CARD_SLOTS,x as COLLAPSIBLE_SLOTS,b as Card,S as Collapsible,C as DETAILS_SLOTS,c as DIALOG_SLOTS,w as Details,l as Dialog,e as EXTERNAL_LINK_SLOTS,t as ExternalLink,T as FIELD_SLOTS,E as Field,i as ICON_BUTTON_SLOTS,D as IMAGE_SLOTS,k as INPUT_GROUP_SLOTS,a as IconButton,O as Image,A as InputGroup,j as LtrAtom,o as SCROLL_AREA_SLOTS,P as SELECTABLE_TILE_SLOTS,M as SELECT_SLOTS,L as SKELETON_SLOTS,z as STEPS_SLOTS,s as ScrollArea,N as Select,F as SelectableTile,I as SelectableTileGroup,R as Skeleton,B as Step,V as Steps,H as TEXT_SLOTS,G as TOOLTIP_SLOTS,W as TokenLogo,K as Tooltip,q as WALLET_ROW_SLOTS,J as WalletRow,m as formatAmountForInput,h as parseAmountInputValue,U as text,u as useIsInsideDialogContent};
1
+ import{EXTERNAL_LINK_SLOTS as e}from"../shared/ui/ExternalLink/ExternalLink.slots.js";import{ExternalLink as t}from"../shared/ui/ExternalLink/ExternalLink.js";import"../shared/ui/ExternalLink/index.js";import{BUTTON_SLOTS as n}from"../shared/ui/Button/Button.slots.js";import{Button as r}from"../shared/ui/Button/Button.js";import"../shared/ui/Button/index.js";import{ICON_BUTTON_SLOTS as i}from"../shared/ui/IconButton/IconButton.slots.js";import{IconButton as a}from"../shared/ui/IconButton/IconButton.js";import"../shared/ui/IconButton/index.js";import{SCROLL_AREA_SLOTS as o}from"../shared/ui/ScrollArea/ScrollArea.slots.js";import{ScrollArea as s}from"../shared/ui/ScrollArea/ScrollArea.js";import"../shared/ui/ScrollArea/index.js";import{DIALOG_SLOTS as c}from"../shared/ui/Dialog/Dialog.slots.js";import{Dialog as l,useIsInsideDialogContent as u}from"../shared/ui/Dialog/Dialog.js";import"../shared/ui/Dialog/index.js";import{DRAWER_SLOTS as d}from"../shared/ui/Drawer/Drawer.slots.js";import{Drawer as f}from"../shared/ui/Drawer/Drawer.js";import"../shared/ui/Drawer/index.js";import{AdaptiveSurface as p}from"../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../shared/ui/AdaptiveSurface/index.js";import{ALERT_SLOTS as m}from"../shared/ui/Alert/Alert.slots.js";import{Alert as h}from"../shared/ui/Alert/Alert.js";import"../shared/ui/Alert/index.js";import{AMOUNT_INPUT_SLOTS as g}from"../shared/ui/AmountInput/AmountInput.slots.js";import{formatAmountForInput as _,parseAmountInputValue as v}from"../shared/ui/AmountInput/utils.js";import{AmountInput as y}from"../shared/ui/AmountInput/AmountInput.js";import"../shared/ui/AmountInput/index.js";import{BADGE_SLOTS as b}from"../shared/ui/Badge/Badge.slots.js";import{Badge as x}from"../shared/ui/Badge/Badge.js";import"../shared/ui/Badge/index.js";import{CARD_SLOTS as S}from"../shared/ui/Card/Card.slots.js";import{Card as C}from"../shared/ui/Card/Card.js";import"../shared/ui/Card/index.js";import{COLLAPSIBLE_SLOTS as w}from"../shared/ui/Collapsible/Collapsible.slots.js";import{Collapsible as T}from"../shared/ui/Collapsible/Collapsible.js";import"../shared/ui/Collapsible/index.js";import{DETAILS_SLOTS as E}from"../shared/ui/Details/Details.slots.js";import{Details as D}from"../shared/ui/Details/Details.js";import"../shared/ui/Details/index.js";import{FIELD_SLOTS as O}from"../shared/ui/Field/Field.slots.js";import{Field as k}from"../shared/ui/Field/Field.js";import"../shared/ui/Field/index.js";import{IMAGE_SLOTS as A}from"../shared/ui/Image/Image.slots.js";import{Image as j}from"../shared/ui/Image/Image.js";import"../shared/ui/Image/index.js";import{INPUT_GROUP_SLOTS as M}from"../shared/ui/InputGroup/InputGroup.slots.js";import{InputGroup as N}from"../shared/ui/InputGroup/InputGroup.js";import"../shared/ui/InputGroup/index.js";import{LtrAtom as P}from"../shared/ui/LtrAtom/LtrAtom.js";import"../shared/ui/LtrAtom/index.js";import{SELECT_SLOTS as F}from"../shared/ui/Select/Select.slots.js";import{Select as I}from"../shared/ui/Select/Select.js";import"../shared/ui/Select/index.js";import{SELECTABLE_TILE_SLOTS as L}from"../shared/ui/SelectableTile/SelectableTile.slots.js";import{SelectableTile as R}from"../shared/ui/SelectableTile/SelectableTile.js";import{SelectableTileGroup as z}from"../shared/ui/SelectableTile/SelectableTileGroup.js";import"../shared/ui/SelectableTile/index.js";import{SKELETON_SLOTS as B}from"../shared/ui/Skeleton/Skeleton.slots.js";import{Skeleton as V}from"../shared/ui/Skeleton/Skeleton.js";import"../shared/ui/Skeleton/index.js";import{STEPS_SLOTS as H}from"../shared/ui/Steps/Steps.slots.js";import{Step as U,Steps as W}from"../shared/ui/Steps/Steps.js";import"../shared/ui/Steps/index.js";import{TEXT_SLOTS as G}from"../shared/ui/Text/Text.slots.js";import{text as K}from"../shared/ui/Text/Text.js";import"../shared/ui/Text/index.js";import{TokenLogo as q}from"../shared/ui/TokenLogo/TokenLogo.js";import"../shared/ui/TokenLogo/index.js";import{TOOLTIP_SLOTS as J}from"../shared/ui/Tooltip/Tooltip.slots.js";import{Tooltip as Y}from"../shared/ui/Tooltip/Tooltip.js";import"../shared/ui/Tooltip/index.js";import{WALLET_ROW_SLOTS as X}from"../shared/ui/WalletRow/WalletRow.slots.js";import{WalletRow as Z}from"../shared/ui/WalletRow/WalletRow.js";import"../shared/ui/WalletRow/index.js";export{m as ALERT_SLOTS,g as AMOUNT_INPUT_SLOTS,p as AdaptiveSurface,h as Alert,y as AmountInput,b as BADGE_SLOTS,n as BUTTON_SLOTS,x as Badge,r as Button,S as CARD_SLOTS,w as COLLAPSIBLE_SLOTS,C as Card,T as Collapsible,E as DETAILS_SLOTS,c as DIALOG_SLOTS,d as DRAWER_SLOTS,D as Details,l as Dialog,f as Drawer,e as EXTERNAL_LINK_SLOTS,t as ExternalLink,O as FIELD_SLOTS,k as Field,i as ICON_BUTTON_SLOTS,A as IMAGE_SLOTS,M as INPUT_GROUP_SLOTS,a as IconButton,j as Image,N as InputGroup,P as LtrAtom,o as SCROLL_AREA_SLOTS,L as SELECTABLE_TILE_SLOTS,F as SELECT_SLOTS,B as SKELETON_SLOTS,H as STEPS_SLOTS,s as ScrollArea,I as Select,R as SelectableTile,z as SelectableTileGroup,V as Skeleton,U as Step,W as Steps,G as TEXT_SLOTS,J as TOOLTIP_SLOTS,q as TokenLogo,Y as Tooltip,X as WALLET_ROW_SLOTS,Z as WalletRow,_ as formatAmountForInput,v as parseAmountInputValue,K as text,u as useIsInsideDialogContent};
@@ -1,4 +1,5 @@
1
+ import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
1
2
  import { WithdrawSubmitActions, WithdrawSubmitCallback, WithdrawSubmitInput } from "../../flows/withdraw/orchestrator/types.js";
2
3
  import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient } from "../../flows/withdraw/bindings/WithdrawBindings.js";
3
4
  import { WithdrawDialog } from "../../flows/withdraw/dialog/WithdrawDialog.js";
4
- export { type WithdrawBalanceInput, type WithdrawBindings, WithdrawDialog, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient };
5
+ export { type Presentation, type PresentationConfig, type PresentationMode, type WithdrawBalanceInput, type WithdrawBindings, WithdrawDialog, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/kit",
3
- "version": "0.1.0-alpha.52",
3
+ "version": "0.1.0-alpha.54",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [