@stridge/kit 0.1.0-alpha.49 → 0.1.0-alpha.50

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 (114) hide show
  1. package/dist/_internal/deposit/widgets/index.d.ts +3 -1
  2. package/dist/_internal/deposit/widgets/index.js +1 -1
  3. package/dist/_internal/withdraw/widgets/index.d.ts +3 -1
  4. package/dist/_internal/withdraw/widgets/index.js +1 -1
  5. package/dist/activity-history/compound/index.d.ts +9 -0
  6. package/dist/activity-history/compound/index.js +1 -0
  7. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  8. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  9. package/dist/drivers/stridge/internal/pollOnce.js +1 -1
  10. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +2 -0
  11. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  12. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +2 -1
  13. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  14. package/dist/drivers/stridge-mock/fixtures.d.ts +1 -1
  15. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  16. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  17. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
  18. package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
  19. package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
  20. package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
  21. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
  22. package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
  23. package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
  24. package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
  25. package/dist/flows/deposit/driver/types.d.ts +38 -1
  26. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  27. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  28. package/dist/flows/deposit/orchestrator/types.d.ts +73 -0
  29. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.d.ts +40 -0
  30. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +1 -0
  31. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +38 -0
  32. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +1 -0
  33. package/dist/flows/deposit/widgets/activity-history/index.d.ts +2 -0
  34. package/dist/flows/deposit/widgets/activity-history/index.js +1 -0
  35. package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +1 -0
  36. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  37. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
  38. package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
  39. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +10 -0
  40. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
  41. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
  42. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +5 -0
  43. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
  44. package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
  45. package/dist/flows/shared/transformers/index.d.ts +1 -0
  46. package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
  47. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  48. package/dist/flows/withdraw/driver/types.d.ts +34 -0
  49. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  50. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  51. package/dist/flows/withdraw/orchestrator/types.d.ts +70 -0
  52. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.d.ts +39 -0
  53. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +1 -0
  54. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +36 -0
  55. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +1 -0
  56. package/dist/flows/withdraw/widgets/activity-history/index.d.ts +2 -0
  57. package/dist/flows/withdraw/widgets/activity-history/index.js +1 -0
  58. package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +1 -0
  59. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
  60. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
  61. package/dist/i18n/locales/ar.js +1 -1
  62. package/dist/i18n/locales/es.js +1 -1
  63. package/dist/i18n/locales/source-keys.d.ts +1 -1
  64. package/dist/icons/index.d.ts +2 -1
  65. package/dist/icons/index.js +1 -1
  66. package/dist/index.d.ts +2 -1
  67. package/dist/package.js +1 -1
  68. package/dist/shared/icons/HistoryIcon.d.ts +12 -0
  69. package/dist/shared/icons/HistoryIcon.js +1 -0
  70. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
  71. package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
  72. package/dist/shared/widgets/activity-history/ActivityTrigger.js +1 -0
  73. package/dist/shared/widgets/activity-history/ActivityTrigger.styles.js +1 -0
  74. package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +1 -0
  75. package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +95 -0
  76. package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +1 -0
  77. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +22 -0
  78. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +1 -0
  79. package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +1 -0
  80. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.d.ts +75 -0
  81. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +1 -0
  82. package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +21 -0
  83. package/dist/shared/widgets/activity-history/compound/Row.slots.js +1 -0
  84. package/dist/shared/widgets/activity-history/compound/Row.styles.js +1 -0
  85. package/dist/shared/widgets/activity-history/compound/components/Empty.d.ts +15 -0
  86. package/dist/shared/widgets/activity-history/compound/components/Empty.js +1 -0
  87. package/dist/shared/widgets/activity-history/compound/components/ErrorView.d.ts +26 -0
  88. package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +1 -0
  89. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.d.ts +39 -0
  90. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +1 -0
  91. package/dist/shared/widgets/activity-history/compound/components/List.d.ts +23 -0
  92. package/dist/shared/widgets/activity-history/compound/components/List.js +1 -0
  93. package/dist/shared/widgets/activity-history/compound/components/Row.d.ts +54 -0
  94. package/dist/shared/widgets/activity-history/compound/components/Row.js +1 -0
  95. package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +1 -0
  96. package/dist/shared/widgets/activity-history/compound/context.d.ts +79 -0
  97. package/dist/shared/widgets/activity-history/compound/context.js +1 -0
  98. package/dist/shared/widgets/activity-history/index.js +1 -0
  99. package/dist/shared/widgets/activity-history/payloads.d.ts +81 -0
  100. package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +1 -0
  101. package/dist/shared/widgets/activity-history/transformers/resolveDirection.js +1 -0
  102. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
  103. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
  104. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
  105. package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
  106. package/dist/shared/widgets/amount-entry/compound/types.d.ts +14 -0
  107. package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
  108. package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
  109. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
  110. package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
  111. package/dist/shared/widgets/asset-picker/compound/types.d.ts +14 -0
  112. package/dist/stridge/stubs.js +1 -1
  113. package/dist/styles/index.css +86 -0
  114. package/package.json +7 -3
@@ -0,0 +1 @@
1
+ "use client";import{Frame as e}from"../../../dialog/Frame.js";import{ACTIVITY_HISTORY_SLOTS as t}from"./ActivityHistory.slots.js";import{styles as n}from"./ActivityHistory.styles.js";import{ActivityHistoryEmpty as r}from"./components/Empty.js";import{ActivityHistoryErrorView as i}from"./components/ErrorView.js";import{ActivityHistoryHeader as a,ActivityHistoryListHeader as o}from"./components/HistoryHeader.js";import{ActivityHistoryRow as s}from"./components/Row.js";import{ActivityHistoryList as c}from"./components/List.js";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";const p=d(l,{children:[u(a,{}),u(c,{})]});function m({children:r,...i}){return u(e,{"data-stridge-slot":t.root,...f.props(n.root),...i,children:r??p})}(function(e){e.Header=a,e.ListHeader=o,e.List=c,e.Row=s,e.Empty=r,e.ErrorView=i})(m||={});export{m as ActivityHistory};
@@ -0,0 +1,22 @@
1
+ //#region src/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts
2
+ /**
3
+ * Slot vocabulary for `<ActivityHistory>`. Each meaningful element carries
4
+ * `data-stridge-slot={ACTIVITY_HISTORY_SLOTS.<part>}` so hosts can target a sub-part with
5
+ * `[data-stridge-slot="activity-history-row"]` without forking the kit. Slots are public API —
6
+ * renames are breaking changes.
7
+ */
8
+ declare const ACTIVITY_HISTORY_SLOTS: {
9
+ readonly root: "activity-history";
10
+ readonly header: "activity-history-header";
11
+ readonly body: "activity-history-body";
12
+ readonly list: "activity-history-list";
13
+ readonly empty: "activity-history-empty";
14
+ readonly emptyIcon: "activity-history-empty-icon";
15
+ readonly error: "activity-history-error";
16
+ readonly retry: "activity-history-retry";
17
+ readonly skeleton: "activity-history-skeleton";
18
+ readonly skeletonRow: "activity-history-skeleton-row";
19
+ };
20
+ type ActivityHistorySlot = (typeof ACTIVITY_HISTORY_SLOTS)[keyof typeof ACTIVITY_HISTORY_SLOTS];
21
+ //#endregion
22
+ export { ACTIVITY_HISTORY_SLOTS, ActivityHistorySlot };
@@ -0,0 +1 @@
1
+ const e={root:`activity-history`,header:`activity-history-header`,body:`activity-history-body`,list:`activity-history-list`,empty:`activity-history-empty`,emptyIcon:`activity-history-empty-icon`,error:`activity-history-error`,retry:`activity-history-retry`,skeleton:`activity-history-skeleton`,skeletonRow:`activity-history-skeleton-row`};export{e as ACTIVITY_HISTORY_SLOTS};
@@ -0,0 +1 @@
1
+ const e={root:{"ActivityHistory__styles.root":`ActivityHistory__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:21`},header:{"ActivityHistory__styles.header":`ActivityHistory__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:28`},headerLeft:{"ActivityHistory__styles.headerLeft":`ActivityHistory__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:31`},headerRight:{"ActivityHistory__styles.headerRight":`ActivityHistory__styles.headerRight`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:37`},backIcon:{"ActivityHistory__styles.backIcon":`ActivityHistory__styles.backIcon`,"width-kzqmXN":`x1xp8n7a`,"height-kZKoxP":`xmix8c7`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:42`},body:{"ActivityHistory__styles.body":`ActivityHistory__styles.body`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x1a6yh9e`,"paddingTop-kLKAdn":`x4xct4k`,"paddingBottom-kGO01o":`xpnfv0q`,"paddingInlineStart-kZCmMZ":`xmg6hw8`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:51`},skeletonRow:{"ActivityHistory__styles.skeletonRow":`ActivityHistory__styles.skeletonRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`xqsvw4s`,"backgroundColor-kWkggS":`xjbqb8w`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:62`},skeletonText:{"ActivityHistory__styles.skeletonText":`ActivityHistory__styles.skeletonText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1r05nms`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:70`},empty:{"ActivityHistory__styles.empty":`ActivityHistory__styles.empty`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"gap-kOIVth":`x1a6yh9e`,"paddingTop-kLKAdn":`x1saie51`,"paddingBottom-kGO01o":`x1ej8hiu`,"paddingInlineStart-kZCmMZ":`xmg6hw8`,"paddingInlineEnd-kwRFfy":`x1hvdk87`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:81`},emptyIcon:{"ActivityHistory__styles.emptyIcon":`ActivityHistory__styles.emptyIcon`,"width-kzqmXN":`x1td3qas`,"height-kZKoxP":`x10w6t97`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:93`},error:{"ActivityHistory__styles.error":`ActivityHistory__styles.error`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x2blr79`,"paddingTop-kLKAdn":`x2tg1xt`,"paddingBottom-kGO01o":`x1ww8orz`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:101`},retryRow:{"ActivityHistory__styles.retryRow":`ActivityHistory__styles.retryRow`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:108`},bodyEnter:{"ActivityHistory__styles.bodyEnter":`ActivityHistory__styles.bodyEnter`,"animationName-kKVMdj":`xqcmdr3`,"animationDuration-k44tkh":`x19y0sg2`,"animationTimingFunction-kyAemX":`xrkt6z0`,"animationFillMode-kWV6AL":`x1u6ievf`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/ActivityHistory.styles.ts:113`}};export{e as styles};
@@ -0,0 +1,75 @@
1
+ import { ReactNode } from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/shared/widgets/activity-history/compound/ActivityHistoryDetail.d.ts
5
+ interface ActivityHistoryDetailOwnProps {
6
+ /**
7
+ * Optional custom composition. Defaults to mounting all three per-kind parts — each gates
8
+ * internally on the resolved payload's `kind`, so only the matching one renders.
9
+ */
10
+ children?: ReactNode;
11
+ }
12
+ /**
13
+ * Per-settlement detail compound — peer of {@link ActivityHistory}. Mounted by the dialog's
14
+ * `historyDetail` step. Resolves the selected settlement against
15
+ * `source.entity.raw[].settlements[]`, exposes the discriminated payload via the inner
16
+ * context, and lets per-kind parts (`Processing` / `Succeeded` / `Failed`) render the matching
17
+ * existing state compound with derived props.
18
+ *
19
+ * Returns `null` when the entity hasn't materialised raw data yet or when the settlement id
20
+ * misses (e.g. it aged out between row render and row tap). The lookup-miss arm silently
21
+ * dispatches `back()` so the next paint shows the list.
22
+ */
23
+ declare function ActivityHistoryDetail({
24
+ children
25
+ }: ActivityHistoryDetailOwnProps): _$react_jsx_runtime0.JSX.Element | null;
26
+ /**
27
+ * Pending-payload branch. Mounts the kit's `<ProcessingStateCompound>` with the resolved
28
+ * settlement details and an `<ActivityHistoryListHeader>` in the header slot so the back
29
+ * chevron + title affordance matches the list view.
30
+ */
31
+ declare function ActivityHistoryDetailProcessing({
32
+ children
33
+ }: {
34
+ children?: ReactNode;
35
+ }): _$react_jsx_runtime0.JSX.Element | null;
36
+ /**
37
+ * Succeeded-payload branch. Mounts `<SuccessStateCompound>` with per-direction headline copy
38
+ * so a withdraw row drilling into detail keeps `Withdrawal successful` (matching the row
39
+ * title vocabulary) instead of falling through to the deposit-only default.
40
+ */
41
+ declare function ActivityHistoryDetailSucceeded({
42
+ children
43
+ }: {
44
+ children?: ReactNode;
45
+ }): _$react_jsx_runtime0.JSX.Element | null;
46
+ /**
47
+ * Failed-payload branch. Mounts `<ErrorStateCompound>` with per-direction failure headline so
48
+ * a withdraw row keeps `Withdrawal failed` (the deposit branch is a no-op explicit set —
49
+ * matches the existing default; symmetric explicit form keeps both branches aligned).
50
+ */
51
+ declare function ActivityHistoryDetailFailed({
52
+ children
53
+ }: {
54
+ children?: ReactNode;
55
+ }): _$react_jsx_runtime0.JSX.Element | null;
56
+ declare namespace ActivityHistoryDetail {
57
+ type Props = ActivityHistoryDetailOwnProps;
58
+ /**
59
+ * Pending-payload branch. Mounts `<ProcessingStateCompound>` with the resolved settlement
60
+ * details. Returns `null` when the resolved payload's kind isn't `"pending"`.
61
+ */
62
+ const Processing: typeof ActivityHistoryDetailProcessing;
63
+ /**
64
+ * Succeeded-payload branch. Mounts `<SuccessStateCompound>` with per-direction headline
65
+ * copy. Returns `null` when the resolved payload's kind isn't `"succeeded"`.
66
+ */
67
+ const Succeeded: typeof ActivityHistoryDetailSucceeded;
68
+ /**
69
+ * Failed-payload branch. Mounts `<ErrorStateCompound>` with per-direction failure headline.
70
+ * Returns `null` when the resolved payload's kind isn't `"failed"`.
71
+ */
72
+ const Failed: typeof ActivityHistoryDetailFailed;
73
+ }
74
+ //#endregion
75
+ export { ActivityHistoryDetail };
@@ -0,0 +1 @@
1
+ "use client";import{useLingui as e}from"../../../i18n/useLingui.js";import"../../../../i18n/index.js";import{useFailureReasonForKind as t}from"../../../orchestrator/failureReason.js";import"../../../orchestrator/index.js";import{ErrorState as n}from"../../error-state/compound/ErrorState.js";import"../../error-state/compound/index.js";import{ProcessingState as r}from"../../processing-state/compound/ProcessingState.js";import"../../processing-state/compound/index.js";import{SuccessState as i}from"../../success-state/compound/SuccessState.js";import"../../success-state/compound/index.js";import{useActivityHistorySource as a}from"./context.js";import{ActivityHistoryListHeader as o}from"./components/HistoryHeader.js";import{toAssetDescriptor as s}from"../../asset-descriptor.js";import{settlementToWidgetProps as c}from"../adapters/settlementToWidgetProps.js";import{createContext as l,use as u,useEffect as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";const h=l(null);h.displayName=`ActivityHistoryDetailContext`;const g=m(f,{children:[p(v,{}),p(y,{}),p(b,{})]});function _({children:t}){let n=a(`ActivityHistoryDetail`),{_:r}=e(),i=n.entity,o=i.status===`ready`||i.status===`stale`,s=o?i.raw:void 0,l=n.settlementId,u=s&&l?c(s,l,n.settlementContext):null,f=o&&l!==void 0&&!u,m=n.back;return d(()=>{f&&m()},[f,m]),u?p(h,{value:{payload:u.payload,direction:u.direction,headerTitle:r({id:`XdtTGf`,message:`Activity details`}),onBack:m},children:t??g}):null}function v({children:e}){let t=u(h);if(!t||t.payload.kind!==`pending`)return null;let{payload:n,headerTitle:i,onBack:a}=t,c=s(n.creditedAsset)??{symbol:n.creditedAsset.symbol},l={...n.sourceWallet.name===void 0?{}:{name:n.sourceWallet.name},address:n.sourceWallet.address.formatted,...n.sourceWallet.explorerUrl?{explorerUrl:n.sourceWallet.explorerUrl}:{}};return m(r,{amount:n.receiveAmount.formatted,creditedAsset:c,creditedTo:n.creditedTo,headerTitle:i,...n.txHash?{sourceTx:{hash:n.txHash.formatted,...n.txExplorerUrl?{explorerUrl:n.txExplorerUrl}:{}}}:{},...l.address?{sourceWallet:l}:{},submittedAt:n.submittedAt.formatted,...n.detectedAt?{detectedAt:n.detectedAt.formatted}:{},children:[p(o,{title:i,onBack:a}),e??m(r.Body,{children:[p(r.Hero,{}),p(r.StatusPill,{}),m(r.Details,{children:[p(r.SourceRow,{}),p(r.SourceTxRow,{}),p(r.SubmittedAtRow,{}),p(r.DetectedAtRow,{})]})]})]})}function y({children:t}){let{_:n}=e(),r=u(h);if(!r||r.payload.kind!==`succeeded`)return null;let{payload:a,direction:c,headerTitle:l,onBack:d}=r,f=s(a.creditedAsset)??{symbol:a.creditedAsset.symbol},g={...a.sourceWallet.name===void 0?{}:{name:a.sourceWallet.name},address:a.sourceWallet.address.formatted,...a.sourceWallet.explorerUrl?{explorerUrl:a.sourceWallet.explorerUrl}:{}},_=a.destination.name??a.creditedAsset.symbol,v=a.aggregatorExplorerUrl?{url:a.aggregatorExplorerUrl}:void 0,y=a.depositTx||a.completionTx||a.submittedAt||a.filledAt,b=n(c===`withdraw`?{id:`_girqu`,message:`Withdrawal successful`}:{id:`--OGth`,message:`Deposit successful`}),x=n(c===`withdraw`?{id:`_QZdX-`,message:`Your withdrawal was completed successfully.`}:{id:`oW1G8i`,message:`Your funds were successfully deposited.`});return m(i,{amount:a.receiveAmount.formatted,creditedAsset:f,creditedTo:_,headerTitle:l,headlineTitle:b,headlineDescription:x,...v?{explorer:v}:{},...a.depositTx?{depositTx:{hash:a.depositTx.hash.formatted,...a.depositTx.explorerUrl?{explorerUrl:a.depositTx.explorerUrl}:{}}}:{},...a.completionTx?{completionTx:{hash:a.completionTx.hash.formatted,...a.completionTx.explorerUrl?{explorerUrl:a.completionTx.explorerUrl}:{}}}:{},submittedAt:a.submittedAt.formatted,filledAt:a.filledAt.formatted,totalTime:a.totalTime.formatted,sourceWallet:g,children:[p(o,{title:l,onBack:d}),t??m(i.Body,{children:[p(i.Headline,{}),m(i.Details,{children:[p(i.FillStatusRow,{}),p(i.TotalTimeRow,{}),p(i.SourceRow,{}),p(i.DestinationRow,{}),p(i.YouReceiveRow,{}),y?m(i.MoreDetails,{children:[p(i.DepositTxRow,{}),p(i.CompletionTxRow,{}),p(i.SubmittedAtRow,{}),p(i.FilledAtRow,{})]}):null]})]})]})}function b({children:r}){let{_:i}=e(),a=t(),c=u(h);if(!c||c.payload.kind!==`failed`)return null;let{payload:l,direction:d,headerTitle:f,onBack:g}=c,_={...l.sourceWallet.name===void 0?{}:{name:l.sourceWallet.name},address:l.sourceWallet.address.formatted,...l.sourceWallet.explorerUrl?{explorerUrl:l.sourceWallet.explorerUrl}:{}},v={...l.destination.name===void 0?{}:{name:l.destination.name},address:l.destination.address.formatted},y=s(l.creditedAsset)??{symbol:l.creditedAsset.symbol},b={hash:l.txHash.formatted,...l.txExplorerUrl?{explorerUrl:l.txExplorerUrl}:{}},x=a(l.failureKind);return m(n,{headline:i(d===`withdraw`?{id:`KTNWsg`,message:`Withdrawal failed`}:{id:`i-4Fbp`,message:`Deposit failed`}),reason:x,headerTitle:f,sourceWallet:_,destination:v,receiveAmount:l.receiveAmount.formatted,receiveAsset:y,depositTx:b,submittedAt:l.submittedAt.formatted,failedAt:l.failedAt.formatted,children:[p(o,{title:f,onBack:g}),r??m(n.Body,{children:[p(n.Hero,{}),m(n.Details,{children:[p(n.FillStatusRow,{}),p(n.SourceRow,{}),p(n.DestinationRow,{}),p(n.YouReceiveRow,{}),m(n.MoreDetails,{children:[p(n.DepositTxRow,{}),p(n.SubmittedAtRow,{}),p(n.FailedAtRow,{})]})]}),p(n.HelpInfo,{})]})]})}(function(e){e.Processing=v,e.Succeeded=y,e.Failed=b})(_||={});export{_ as ActivityHistoryDetail};
@@ -0,0 +1,21 @@
1
+ //#region src/shared/widgets/activity-history/compound/Row.slots.d.ts
2
+ /**
3
+ * Slot vocabulary for `<ActivityHistory.Row>`. Same `data-stridge-slot` convention as the parent
4
+ * compound — see {@link import("./ActivityHistory.slots").ACTIVITY_HISTORY_SLOTS}. Kept in its
5
+ * own file so the Row primitive stays a self-contained unit (matches the
6
+ * `<PrimitiveName>.slots.ts` convention used across `packages/kit/src/shared/ui/`).
7
+ */
8
+ declare const ACTIVITY_HISTORY_ROW_SLOTS: {
9
+ readonly root: "activity-history-row";
10
+ readonly leading: "activity-history-row-leading";
11
+ readonly statusPip: "activity-history-row-status-pip";
12
+ readonly text: "activity-history-row-text";
13
+ readonly title: "activity-history-row-title";
14
+ readonly date: "activity-history-row-date";
15
+ readonly trailing: "activity-history-row-trailing";
16
+ readonly amount: "activity-history-row-amount";
17
+ readonly chevron: "activity-history-row-chevron";
18
+ };
19
+ type ActivityHistoryRowSlot = (typeof ACTIVITY_HISTORY_ROW_SLOTS)[keyof typeof ACTIVITY_HISTORY_ROW_SLOTS];
20
+ //#endregion
21
+ export { ACTIVITY_HISTORY_ROW_SLOTS, ActivityHistoryRowSlot };
@@ -0,0 +1 @@
1
+ const e={root:`activity-history-row`,leading:`activity-history-row-leading`,statusPip:`activity-history-row-status-pip`,text:`activity-history-row-text`,title:`activity-history-row-title`,date:`activity-history-row-date`,trailing:`activity-history-row-trailing`,amount:`activity-history-row-amount`,chevron:`activity-history-row-chevron`};export{e as ACTIVITY_HISTORY_ROW_SLOTS};
@@ -0,0 +1 @@
1
+ const e={rowLayout:{"Row__styles.rowLayout":`Row__styles.rowLayout`,"gap-kOIVth":`x2blr79`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInlineStart-kZCmMZ":`xiplbrm`,"paddingInlineEnd-kwRFfy":`xvkiva6`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:35`},leading:{"Row__styles.leading":`Row__styles.leading`,"position-kVAEAm":`x1n2onr6`,"flexShrink-kmuXW":`x2lah0s`,"width-kzqmXN":`x187nhsf`,"height-kZKoxP":`xn3w4p2`,"overflow-kVQacm":`x1rea2x4`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:44`},statusPip:{"Row__styles.statusPip":`Row__styles.statusPip`,"position-kVAEAm":`x10l6tqk`,"zIndex-kY2c9j":`x1vjfegm`,"bottom-krVfgx":`x1t1qrwb`,"insetInlineEnd-kt4wiu":`x1d0qlrl`,"width-kzqmXN":`x1xp8n7a`,"height-kZKoxP":`xmix8c7`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"borderRadius-kaIpWk":`x1e6avla`,"borderWidth-kMzoRj":`xdh2fpr`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`xv87bwv`,"pointerEvents-kfzvcC":`x47corl`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:59`},statusPipCompleted:{"Row__styles.statusPipCompleted":`Row__styles.statusPipCompleted`,"backgroundColor-kWkggS":`xelfwhf`,"color-kMwMTN":`x1e8cn3g`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:88`},statusPipFailed:{"Row__styles.statusPipFailed":`Row__styles.statusPipFailed`,"backgroundColor-kWkggS":`x1qvyn6m`,"color-kMwMTN":`x18o46el`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:92`},statusPipPending:{"Row__styles.statusPipPending":`Row__styles.statusPipPending`,"backgroundColor-kWkggS":`x1qkydf4`,"color-kMwMTN":`xi96bwj`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:96`},statusPipIcon:{"Row__styles.statusPipIcon":`Row__styles.statusPipIcon`,"width-kzqmXN":`x1fsd2vl`,"height-kZKoxP":`x170jfvy`,"strokeWidth-kfJifR":`x1ip4yf`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:100`},statusPipSpinner:{"Row__styles.statusPipSpinner":`Row__styles.statusPipSpinner`,"width-kzqmXN":`x1fsd2vl`,"height-kZKoxP":`x170jfvy`,"animationName-kKVMdj":`x1aerksh`,"animationDuration-k44tkh":`x1q3qbx4`,"animationTimingFunction-kyAemX":`x1esw782`,"animationIterationCount-ko0y90":`xa4qsjk`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:105`},text:{"Row__styles.text":`Row__styles.text`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1r05nms`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:123`},title:{"Row__styles.title":`Row__styles.title`,"overflow-kVQacm":`xb3r6kr`,"textOverflow-kg5iWk":`xlyipyv`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:132`},date:{"Row__styles.date":`Row__styles.date`,"overflow-kVQacm":`xb3r6kr`,"textOverflow-kg5iWk":`xlyipyv`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:137`},trailing:{"Row__styles.trailing":`Row__styles.trailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:144`},chevron:{"Row__styles.chevron":`Row__styles.chevron`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`xvlca1e`,$$css:`@stridge/kit:src/shared/widgets/activity-history/compound/Row.styles.ts:150`}};export{e as styles};
@@ -0,0 +1,15 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/shared/widgets/activity-history/compound/components/Empty.d.ts
4
+ /**
5
+ * Empty-state body for the activity surface. Reached when the gateway's poll returned an
6
+ * empty UDA list for the connected owner — typically a brand-new wallet that hasn't deposited
7
+ * or withdrawn yet. Renders centered icon + headline + subline; no CTA — the user is already
8
+ * inside an active dialog, so the surrounding flow (deposit method picker, withdraw form) is
9
+ * the implicit next step.
10
+ *
11
+ * @internal
12
+ */
13
+ declare function ActivityHistoryEmpty(): _$react_jsx_runtime0.JSX.Element;
14
+ //#endregion
15
+ export { ActivityHistoryEmpty };
@@ -0,0 +1 @@
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ClockIcon as t}from"../../../../icons/ClockIcon.js";import"../../../../../icons/index.js";import{text as n}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{ACTIVITY_HISTORY_SLOTS as r}from"../ActivityHistory.slots.js";import{styles as i}from"../ActivityHistory.styles.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";import*as s from"@stylexjs/stylex";function c(){let{_:c}=e();return o(`div`,{"data-stridge-slot":r.empty,...s.props(i.empty),children:[a(t,{"aria-hidden":!0,"data-stridge-slot":r.emptyIcon,...s.props(i.emptyIcon)}),a(n.span,{size:`base`,fontWeight:`semibold`,color:`default`,children:c({id:`aXFOuf`,message:`No activity yet`})}),a(n.span,{size:`sm`,fontWeight:`medium`,color:`subdued`,children:c({id:`Xzw7uC`,message:`Your deposits and withdrawals will appear here.`})})]})}export{c as ActivityHistoryEmpty};
@@ -0,0 +1,26 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/shared/widgets/activity-history/compound/components/ErrorView.d.ts
4
+ interface ActivityHistoryErrorViewProps {
5
+ /**
6
+ * Retry handler. Wired by the List to fire a fresh `refresh(signal)` against the source
7
+ * context — the entity transitions back through `loading → ready | error`.
8
+ */
9
+ onRetry: () => void;
10
+ }
11
+ /**
12
+ * Initial-error body for the activity surface. Rendered only when the first fetch failed
13
+ * AND the entity has no prior payload to fall back to (status `error` from `idle | loading`).
14
+ * Refresh failures while a payload is already cached are silent — the entity stays `stale`
15
+ * and the next controller-driven `watchHistory` tick retries; that branch never reaches this
16
+ * component.
17
+ *
18
+ * @internal
19
+ * @see {@link ActivityHistoryList} for the entity-status branching that decides when this
20
+ * renders vs the silent stale-while-revalidate path.
21
+ */
22
+ declare function ActivityHistoryErrorView({
23
+ onRetry
24
+ }: ActivityHistoryErrorViewProps): _$react_jsx_runtime0.JSX.Element;
25
+ //#endregion
26
+ export { ActivityHistoryErrorView };
@@ -0,0 +1 @@
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{AlertIcon as t}from"../../../../icons/AlertIcon.js";import"../../../../../icons/index.js";import{Button as n}from"../../../../ui/Button/Button.js";import"../../../../ui/Button/index.js";import{Alert as r}from"../../../../ui/Alert/Alert.js";import"../../../../ui/Alert/index.js";import{ACTIVITY_HISTORY_SLOTS as i}from"../ActivityHistory.slots.js";import{styles as a}from"../ActivityHistory.styles.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l({onRetry:l}){let{_:u}=e();return s(`div`,{"data-stridge-slot":i.error,...c.props(a.error),children:[o(r,{variant:`danger`,icon:o(t,{}),children:u({id:`B-4zEC`,message:`Couldn't load activity. Please try again.`})}),o(`div`,{...c.props(a.retryRow),children:o(n,{type:`button`,variant:`secondary`,size:`sm`,onClick:l,"data-stridge-slot":i.retry,children:u({id:`KDw4GX`,message:`Try again`})})})]})}export{l as ActivityHistoryErrorView};
@@ -0,0 +1,39 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/shared/widgets/activity-history/compound/components/HistoryHeader.d.ts
4
+ interface Props {
5
+ /**
6
+ * Optional override for the title. Defaults to `t\`Activity\`` for the list view; detail
7
+ * views pass their own (e.g. `t\`Activity details\``).
8
+ */
9
+ title?: string;
10
+ /**
11
+ * Back chevron handler. When set, renders the chevron on the leading edge; when omitted,
12
+ * the title aligns flush with the leading edge. The list view always supplies a handler;
13
+ * detail views always supply one.
14
+ */
15
+ onBack?: () => void;
16
+ }
17
+ /**
18
+ * Shared `Card.Header` for the activity surface. Renders a back chevron (when `onBack` is
19
+ * set) on the leading edge + title + trailing `Dialog.CloseButton`. Mirrors the rhythm of
20
+ * `WithdrawForm.Header` (the kit's other multi-element dialog header) so the header chrome
21
+ * stays consistent across flows.
22
+ *
23
+ * Mounted by both the List view and the Detail view's per-payload compound — the chevron
24
+ * routes `actions.back()` through the source context, which the FSM disambiguates via the
25
+ * active state name (`historyDetail → historyList → source`).
26
+ */
27
+ declare function ActivityHistoryListHeader({
28
+ title,
29
+ onBack
30
+ }: Props): _$react_jsx_runtime0.JSX.Element;
31
+ /**
32
+ * Public `<ActivityHistory.Header>` part — thin wrapper around {@link ActivityHistoryListHeader}
33
+ * that reads `back` from the source context so hosts get a zero-prop part to drop into list
34
+ * compositions. The peer detail compound mounts `<ActivityHistory.ListHeader>` itself with an
35
+ * explicit title and back handler.
36
+ */
37
+ declare function ActivityHistoryHeader(): _$react_jsx_runtime0.JSX.Element;
38
+ //#endregion
39
+ export { ActivityHistoryHeader, ActivityHistoryListHeader };
@@ -0,0 +1 @@
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import"../../../../ui/IconButton/index.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import"../../../../ui/Card/index.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{ACTIVITY_HISTORY_SLOTS as o}from"../ActivityHistory.slots.js";import{styles as s}from"../ActivityHistory.styles.js";import{useActivityHistorySource as c}from"../context.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:c,onBack:f}){let{_:p}=e(),m=c??p({id:`XJOV1Y`,message:`Activity`});return u(i.Header,{"data-stridge-slot":o.header,...d.props(s.header),children:[u(`div`,{...d.props(s.headerLeft),children:[typeof f==`function`?l(n,{"aria-label":p({id:`iH8pgl`,message:`Back`}),onClick:f,children:l(t,{"aria-hidden":!0,...d.props(s.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,style:{margin:0},children:m})]}),l(`div`,{...d.props(s.headerRight),children:l(r.CloseButton,{})})]})}function p(){return l(f,{onBack:c(`ActivityHistory.Header`).back})}export{p as ActivityHistoryHeader,f as ActivityHistoryListHeader};
@@ -0,0 +1,23 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/shared/widgets/activity-history/compound/components/List.d.ts
4
+ /**
5
+ * List body for the activity surface. Reads the `history` entity from
6
+ * {@link useActivityHistorySource} and branches on status:
7
+ *
8
+ * - `idle | loading` (cold path, no prior payload) → skeleton × 4.
9
+ * - `ready | stale` → rows. `stale` keeps the prior list rendered while a refresh is in
10
+ * flight so the user never sees an empty pause. The refresh is silent — no spinner.
11
+ * - `error` (cold path) → {@link ActivityHistoryErrorView} with a retry button.
12
+ * - `ready` with zero rows → {@link ActivityHistoryEmpty}.
13
+ *
14
+ * Recurring updates land via the controller-mounted `watchHistory` watcher (mounted on entry
15
+ * to `historyList` / `historyDetail`, with adaptive cadence — short while any row is
16
+ * `pending`, long once all rows are terminal). The widget itself is a pure reader; the only
17
+ * imperative surface left here is the retry button, which fires `source.refresh(signal)` once.
18
+ *
19
+ * @internal
20
+ */
21
+ declare function ActivityHistoryList(): _$react_jsx_runtime0.JSX.Element;
22
+ //#endregion
23
+ export { ActivityHistoryList };
@@ -0,0 +1 @@
1
+ "use client";import{Card as e}from"../../../../ui/Card/Card.js";import"../../../../ui/Card/index.js";import{Skeleton as t}from"../../../../ui/Skeleton/Skeleton.js";import"../../../../ui/Skeleton/index.js";import{ACTIVITY_HISTORY_SLOTS as n}from"../ActivityHistory.slots.js";import{styles as r}from"../ActivityHistory.styles.js";import{ActivityHistoryEmpty as i}from"./Empty.js";import{ActivityHistoryErrorView as a}from"./ErrorView.js";import{useActivityHistorySource as o}from"../context.js";import{ActivityHistoryRow as s}from"./Row.js";import{useRef as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";const f=[`skeleton-1`,`skeleton-2`,`skeleton-3`,`skeleton-4`];function p(){let t=o(`ActivityHistory.List`),u=c(null),f=c(t.refresh);f.current=t.refresh;let p=t.entity;if(p.status===`error`)return l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body),children:l(a,{onRetry:()=>{u.current?.abort();let e=new AbortController;u.current=e,f.current(e.signal)}})});if(p.status===`idle`||p.status===`loading`)return l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body),"aria-busy":`true`,"aria-live":`polite`,children:l(g,{})});let _=p.payload.rows;return _.length===0?l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body),children:l(i,{})}):l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body,r.bodyEnter),children:l(`ul`,{"data-stridge-slot":n.list,style:m,children:_.map(e=>l(`li`,{style:h,children:l(s,{payload:e,onSelect:t.selectSettlement})},`${e.udaId}:${e.id}`))})})}const m={display:`flex`,flexDirection:`column`,gap:`var(--stridge-kit-space-2)`,listStyle:`none`,marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0},h={listStyle:`none`};function g(){return l(`div`,{"data-stridge-slot":n.skeleton,children:f.map(e=>u(`div`,{"data-stridge-slot":n.skeletonRow,...d.props(r.skeletonRow),children:[l(t,{width:44,height:44,radius:999}),u(`div`,{...d.props(r.skeletonText),children:[l(t,{width:`60%`,height:14}),l(t,{width:`40%`,height:12})]}),l(t,{width:56,height:14})]},e))})}export{p as ActivityHistoryList};
@@ -0,0 +1,54 @@
1
+ import { ActivityHistoryRowPayload } from "../../payloads.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/shared/widgets/activity-history/compound/components/Row.d.ts
5
+ /**
6
+ * Props the row needs to render — pre-formatted by the driver's transformer. The widget
7
+ * never re-formats inputs (`title` / `formattedAmount.formatted` / `formattedDate.formatted`
8
+ * are display strings already). Click fires the row's settlement id back to the source
9
+ * context so the FSM can transition into the detail view.
10
+ */
11
+ interface Props {
12
+ /**
13
+ * Pre-formatted payload from the driver. Carries every visible string (`title`,
14
+ * `formattedAmount`, `formattedDate`, `ariaLabel`) plus the asset / chain identity slots
15
+ * the leading {@link TokenLogo} resolves against.
16
+ */
17
+ payload: ActivityHistoryRowPayload;
18
+ /**
19
+ * Row click handler. Receives the settlement id from the payload; the parent compound
20
+ * forwards it to {@link import("../context").ActivityHistorySourceValue.selectSettlement}.
21
+ */
22
+ onSelect: (settlementId: string) => void;
23
+ }
24
+ /**
25
+ * Public alias for {@link Props}. Preserved as the externally visible name so the
26
+ * compound's `index.ts` and the API-extractor snapshot keep referencing
27
+ * `ActivityHistoryRowProps`.
28
+ */
29
+ type ActivityHistoryRowProps = Props;
30
+ /**
31
+ * One row of the activity surface — leading asset glyph (with corner status pip), title +
32
+ * date stack, trailing amount + chevron. Composes
33
+ * `<SelectableTile shape="card" interactive="navigation">` so the surface treatment (hover
34
+ * wash, focus ring, border palette) matches the kit's asset-picker rows; the `rowLayout`
35
+ * override keeps the row's 68px height byte-identical to the design (44px disc + 12px block
36
+ * padding + 16px inline padding + 12px gap). `aria-label` encodes direction + amount + date
37
+ * because the leading icon doesn't carry direction on its own.
38
+ *
39
+ * Designed against Paper artboard `1HA2-0` (Deposit Tracker — Cards, Dark) — see
40
+ * {@link import("../Row.styles").styles} for the per-property snap rationale.
41
+ *
42
+ * **Asset glyph composition (Paper artboard `1HA2-0`).** The artboard shows the status pip
43
+ * in the bottom-trailing corner of the asset logo AND omits the chain glyph badge entirely.
44
+ * Row density is the optimization target, and the user is already inside the brand's dialog
45
+ * so chain identity carries lower weight than recognising the action+status at a glance.
46
+ * {@link TokenLogo}'s built-in chain badge is therefore disabled via `hideChainBadge` and
47
+ * the {@link StatusPip} renders inside the row's leading slot instead.
48
+ */
49
+ declare function ActivityHistoryRow({
50
+ payload,
51
+ onSelect
52
+ }: Props): _$react_jsx_runtime0.JSX.Element;
53
+ //#endregion
54
+ export { ActivityHistoryRow, ActivityHistoryRowProps };
@@ -0,0 +1 @@
1
+ "use client";import{ChevronRightIcon as e}from"../../../../icons/ChevronRightIcon.js";import"../../../../../icons/index.js";import{SelectableTile as t}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as n}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{TokenLogo as r}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import{ACTIVITY_HISTORY_ROW_SLOTS as i}from"../Row.slots.js";import{styles as a}from"../Row.styles.js";import{StatusPip as o}from"./StatusPip.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({payload:u,onSelect:d}){return c(t,{shape:`card`,interactive:`navigation`,"data-stridge-slot":i.root,"aria-label":u.ariaLabel,onClick:()=>d(u.id),...l.props(a.rowLayout),children:[c(`span`,{"data-stridge-slot":i.leading,...l.props(a.leading),children:[s(r,{symbol:u.assetSymbol,...u.chainId===void 0?{}:{chainId:u.chainId},...u.assetLogoUrl===void 0?{}:{logoUrl:u.assetLogoUrl},...u.chainLogoUrl===void 0?{}:{chainLogoUrl:u.chainLogoUrl},size:44,hideChainBadge:!0}),s(o,{kind:u.status.kind})]}),c(`span`,{"data-stridge-slot":i.text,...l.props(a.text),children:[s(n.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":i.title,...l.props(a.title),children:u.title}),s(n.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,"data-stridge-slot":i.date,...l.props(a.date),children:u.formattedDate.formatted})]}),c(`span`,{"data-stridge-slot":i.trailing,...l.props(a.trailing),children:[s(n.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":i.amount,children:u.formattedAmount.formatted}),s(e,{"aria-hidden":!0,"data-stridge-slot":i.chevron,...l.props(a.chevron)})]})]})}export{u as ActivityHistoryRow};
@@ -0,0 +1 @@
1
+ "use client";import{CheckIcon as e}from"../../../../icons/CheckIcon.js";import{LoaderIcon as t}from"../../../../icons/LoaderIcon.js";import{XIcon as n}from"../../../../icons/XIcon.js";import"../../../../../icons/index.js";import{ACTIVITY_HISTORY_ROW_SLOTS as r}from"../Row.slots.js";import{styles as i}from"../Row.styles.js";import{jsx as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({kind:s}){let c=s===`completed`?i.statusPipCompleted:s===`failed`?i.statusPipFailed:i.statusPipPending;return a(`span`,{"data-stridge-slot":r.statusPip,...o.props(i.statusPip,c),children:s===`completed`?a(e,{"aria-hidden":!0,...o.props(i.statusPipIcon)}):s===`failed`?a(n,{"aria-hidden":!0,...o.props(i.statusPipIcon)}):a(t,{"aria-hidden":!0,...o.props(i.statusPipSpinner)})})}export{s as StatusPip};
@@ -0,0 +1,79 @@
1
+ import { Entity } from "../../../driver/types.js";
2
+ import { ActivityHistoryPayload } from "../payloads.js";
3
+ import { SettlementPayloadContext } from "../../../../flows/deposit/driver/transformers/settlementToPayload.js";
4
+ import * as _$react from "react";
5
+ import { GatewayPollResponse, GatewayUdaDto } from "@stridge/sdk";
6
+
7
+ //#region src/shared/widgets/activity-history/compound/context.d.ts
8
+ /**
9
+ * Source of truth handed to `<ActivityHistory>` and `<ActivityHistoryDetail>` from whichever
10
+ * dialog (deposit / withdraw) mounts them. Each dialog assembles this value once from its own
11
+ * snapshot + actions and wraps the activity-history step body in
12
+ * `<ActivityHistorySourceProvider value={…}>`. The compound stays flow-agnostic — it reads
13
+ * the entity and the imperative actions from this single value.
14
+ *
15
+ * View routing is external: the FSM now exposes `historyList` and `historyDetail` as separate
16
+ * state names; the dialog's step router mounts {@link ActivityHistory} for the list step and
17
+ * {@link ActivityHistoryDetail} for the detail step. Each orchestrated wrapper supplies the
18
+ * source value with the slots its step needs (the list wrapper omits `settlementId`; the
19
+ * detail wrapper sets it).
20
+ *
21
+ * @see {@link ActivityHistorySourceProvider}
22
+ * @see {@link useActivityHistorySource}
23
+ */
24
+ interface ActivityHistorySourceValue {
25
+ /**
26
+ * The driver's `history` entity. Same shape on both flows (`DepositSnapshot["history"]`
27
+ * and `WithdrawSnapshot["history"]` are structurally identical — both back onto the
28
+ * multi-UDA envelope from `GET /gateway/{owner}`). Status discriminator drives the
29
+ * compound's branch (idle / loading → skeleton; ready / stale → rows; error → retry).
30
+ */
31
+ entity: Entity<ActivityHistoryPayload, ReadonlyArray<GatewayUdaDto>, GatewayPollResponse>;
32
+ /**
33
+ * Trigger a fresh one-shot fetch. Wired by each dialog to `driver.refreshHistory(signal)`.
34
+ * The compound calls this from the error-view retry button; each call passes an
35
+ * `AbortSignal` the compound owns so it can cancel mid-fetch on rapid re-clicks. Recurring
36
+ * updates while the list is visible land separately via the controller-mounted
37
+ * `watchHistory` watcher — this callback is not the steady-state polling surface.
38
+ */
39
+ refresh: (signal: AbortSignal) => void;
40
+ /**
41
+ * Dispatch a row selection. Wired to `actions.selectSettlement(id)` — the FSM transitions
42
+ * from `historyList` to `historyDetail` carrying the selected `settlementId`.
43
+ */
44
+ selectSettlement: (settlementId: string) => void;
45
+ /**
46
+ * Back chevron handler. Wired to `actions.back()` — the FSM disambiguates via the current
47
+ * state name (`historyDetail → historyList → source`). The compound renders the chevron in
48
+ * both the list step's header AND inside the detail step's header composition.
49
+ */
50
+ back: () => void;
51
+ /**
52
+ * Selected settlement id when the dialog is mounting the detail step. Carried so the
53
+ * `<ActivityHistoryDetail>` compound can look up the matching `GatewaySettlementDto`
54
+ * inside `entity.raw[].settlements[]` and feed it to {@link
55
+ * import("../adapters").settlementToWidgetProps}. Absent when the list wrapper supplies
56
+ * the source value.
57
+ */
58
+ settlementId?: string;
59
+ /**
60
+ * Context the detail compound's adapter passes to {@link
61
+ * import("#/flows/deposit/driver/transformers").settlementToPayload}. Each dialog
62
+ * assembles this from its own driver snapshot — deposit reads `wallet`, `brand`, the
63
+ * driver's explorers map; withdraw reads its equivalents. Carrying the resolved context
64
+ * here keeps the compound flow-agnostic.
65
+ */
66
+ settlementContext: SettlementPayloadContext;
67
+ }
68
+ /**
69
+ * Provider for {@link ActivityHistorySourceValue}. Each dialog mounts one above its
70
+ * activity-history step body — see `DepositDialog` / `WithdrawDialog`.
71
+ */
72
+ declare const ActivityHistorySourceProvider: _$react.Provider<ActivityHistorySourceValue | null>;
73
+ /**
74
+ * Read the active {@link ActivityHistorySourceValue}. Throws when called outside an
75
+ * `<ActivityHistorySourceProvider>`.
76
+ */
77
+ declare function useActivityHistorySource(consumer: string): ActivityHistorySourceValue;
78
+ //#endregion
79
+ export { ActivityHistorySourceProvider, ActivityHistorySourceValue, useActivityHistorySource };
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`ActivityHistorySourceContext`;const r=n.Provider;function i(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <ActivityHistorySourceProvider>. Mount the provider above <ActivityHistory> with the value derived from the flow's snapshot + actions — see DepositDialog / WithdrawDialog for the canonical wiring.`);return r}export{r as ActivityHistorySourceProvider,i as useActivityHistorySource};
@@ -0,0 +1 @@
1
+ import"./ActivityTrigger.js";
@@ -0,0 +1,81 @@
1
+ import { FormattedField } from "../../format/types.js";
2
+ //#region src/shared/widgets/activity-history/payloads.d.ts
3
+ /**
4
+ * Which flow produced the settlement — `"deposit"` for UDAs whose destination is the connected
5
+ * wallet, `"withdraw"` for UDAs whose source is the brand-currency balance the user is cashing
6
+ * out from. Discriminated by `uda.metadata.kit_flow` when present, with an address-comparison
7
+ * fallback for legacy UDAs that pre-date the metadata convention.
8
+ */
9
+ type ActivityHistoryDirection = "deposit" | "withdraw";
10
+ /**
11
+ * Lifecycle bucket for a single settlement row. Maps onto the kit's existing settlement-status
12
+ * model (`pending → succeeded → failed`) but flattens it to the 3-value set the row renders
13
+ * against — the inline status indicator picks an icon from this discriminator alone.
14
+ */
15
+ type ActivityHistoryStatusType = "pending" | "completed" | "failed";
16
+ /**
17
+ * Wrapper carrying the lifecycle bucket plus room for future status-scoped metadata (e.g. a
18
+ * settlement-level `failureKind` tag the row could surface). Kept separate from
19
+ * {@link ActivityHistoryStatusType} so the discriminator string stays stable as the shape grows.
20
+ */
21
+ interface ActivityHistoryStatus {
22
+ kind: ActivityHistoryStatusType;
23
+ }
24
+ /**
25
+ * One settlement row in the activity history list. Pre-formatted by the driver's transformer —
26
+ * widgets render directly from these fields and never re-format inputs themselves.
27
+ *
28
+ * Detail-view rendering happens off the entity's `raw: ReadonlyArray<GatewayUdaDto>` slot: the
29
+ * row carries `udaId` + `id` so the detail component can locate the matching
30
+ * `GatewaySettlementDto` and feed it back through {@link
31
+ * import("#/flows/deposit/driver/transformers").settlementToPayload} to produce a full
32
+ * `SuccessStateProps` / `ErrorStateProps` / pending payload at display time.
33
+ */
34
+ interface ActivityHistoryRowPayload {
35
+ /** Settlement id — unique within the multi-UDA envelope. The detail lookup keys on this. */
36
+ id: string;
37
+ /** Parent UDA id — settlements nest inside UDAs; the detail walker scans `udas[].settlements[]`. */
38
+ udaId: string;
39
+ /** Flow that produced this settlement. Drives the title prefix and the accessible label. */
40
+ direction: ActivityHistoryDirection;
41
+ /** Lifecycle bucket. Drives the inline status indicator (spinner / red-X / none). */
42
+ status: ActivityHistoryStatus;
43
+ /** Localized action+status string (e.g. `"Deposit completed"`, `"Withdrawal in progress"`). */
44
+ title: string;
45
+ /**
46
+ * USD-formatted amount for this row. For deposits this is the credited receive amount; for
47
+ * withdrawals the source send amount. The widget renders `formatted` verbatim.
48
+ */
49
+ formattedAmount: FormattedField<number>;
50
+ /**
51
+ * Settlement `updated_at` (unix-ms in `value`). `formatted` is the smart-relative form for
52
+ * settlements younger than 7 days, otherwise an absolute date — both follow the active Lingui
53
+ * locale.
54
+ */
55
+ formattedDate: FormattedField<number>;
56
+ /** Destination asset symbol — what the leading {@link import("#/shared/ui").TokenLogo} renders. */
57
+ assetSymbol: string;
58
+ /** Resolved token icon URL, when known. */
59
+ assetLogoUrl?: string;
60
+ /** EIP-155 chain id of the destination chain. */
61
+ chainId?: number;
62
+ /** Human-readable destination network name (e.g. `"Ethereum"`, `"BSC"`). */
63
+ chainName?: string;
64
+ /** Resolved chain glyph URL — overlaid in the corner of the asset logo. */
65
+ chainLogoUrl?: string;
66
+ /**
67
+ * Accessible label rendered as the row's `aria-label`. Encodes direction + amount + date
68
+ * because the leading icon does not carry direction.
69
+ */
70
+ ariaLabel: string;
71
+ }
72
+ /**
73
+ * Entity payload for the owner-scoped activity surface. Backed by the multi-UDA envelope from
74
+ * `GET /gateway/{owner}`; `rows` is sorted newest-first and capped at 20 entries per fetch.
75
+ */
76
+ interface ActivityHistoryPayload {
77
+ /** Newest-first row payloads, capped at 20 per fetch. */
78
+ rows: ReadonlyArray<ActivityHistoryRowPayload>;
79
+ }
80
+ //#endregion
81
+ export { ActivityHistoryDirection, ActivityHistoryPayload, ActivityHistoryRowPayload, ActivityHistoryStatus, ActivityHistoryStatusType };
@@ -0,0 +1 @@
1
+ import{parseIsoMs as e}from"../../../../flows/shared/transformers/parseIsoMs.js";import{formatTimestamp as t}from"../../../format/formatTimestamp.js";import{formatTokenAmount as n}from"../../../format/formatTokenAmount.js";import{formatUsd as r}from"../../../format/formatUsd.js";import{resolveDirection as i}from"./resolveDirection.js";function a(e,t){let n=t.now??Date.now(),r=t.ownerAddress.toLowerCase(),i=[];for(let t of e.udas)for(let e of t.settlements)i.push({settlement:e,uda:t});i.sort((e,t)=>e.settlement.updated_at===t.settlement.updated_at?0:e.settlement.updated_at<t.settlement.updated_at?1:-1);let a=[];for(let{settlement:e,uda:s}of i.slice(0,20))a.push(o(e,s,t,n,r));return{rows:a}}function o(t,n,r,a,o){let u=i(n,o),d=s(t.status),f=c(u,d.kind,r.i18n),p=l(t,n,u,r.i18n),g=e(t.updated_at)??e(t.created_at)??a,_={value:g,formatted:m(g,a,r.i18n)},v=h(u,p.formatted,_.formatted,r.i18n),y=n.destination.eip155_id?Number(n.destination.eip155_id):void 0,b=y===void 0?void 0:r.chainLogoFor?.(y),x=t.to?.logo??void 0;return{id:t.id,udaId:n.uda_id,direction:u,status:d,title:f,formattedAmount:p,formattedDate:_,assetSymbol:n.destination.asset_symbol,...x?{assetLogoUrl:x}:{},...y===void 0?{}:{chainId:y},...n.destination.network_name?{chainName:n.destination.network_name}:{},...b?{chainLogoUrl:b}:{},ariaLabel:v}}function s(e){switch(e){case`created`:case`routing`:return{kind:`pending`};case`completed`:return{kind:`completed`};case`failed`:return{kind:`failed`};default:return{kind:`pending`}}}function c(e,t,n){return e===`deposit`?t===`completed`?n._({id:`Deposit completed`,message:`Deposit completed`}):t===`failed`?n._({id:`Deposit failed`,message:`Deposit failed`}):n._({id:`Deposit in progress`,message:`Deposit in progress`}):t===`completed`?n._({id:`Withdrawal completed`,message:`Withdrawal completed`}):t===`failed`?n._({id:`Withdrawal failed`,message:`Withdrawal failed`}):n._({id:`Withdrawal in progress`,message:`Withdrawal in progress`})}function l(e,t,i,a){let o=i===`deposit`?e.to:e.from,s=o?.amount_usd;if(s){let e=Number.parseFloat(s);if(Number.isFinite(e))return{value:e,formatted:r(e,a)}}let c=t.destination.asset_decimals,l=u(o,c),d=t.destination.asset_symbol;return{value:l,formatted:`${n(l,a,{maxDecimals:c})} ${d}`}}function u(e,t){if(!e)return 0;if(e.amount){let t=Number.parseFloat(e.amount);if(Number.isFinite(t)&&t>=0)return t}if(e.raw_amount){let n=e.raw_amount;try{let e=BigInt(n);if(t===0)return Number(e);let r=10n**BigInt(t),i=e/r,a=(e%r).toString().padStart(t,`0`);return Number(`${i}.${a}`)}catch{return 0}}return 0}const d=6e4,f=36e5,p=864e5;function m(e,n,r){let i=n-e;if(i<d)return r._({id:`Just now`,message:`Just now`});let a=new Intl.RelativeTimeFormat(r.locale,{numeric:`auto`});if(i<f){let e=Math.floor(i/d);return a.format(-e,`minute`)}if(i<p){let e=Math.floor(i/f);return a.format(-e,`hour`)}let o=Math.floor(i/p);return o===1?r._({id:`Yesterday`,message:`Yesterday`}):o<7?a.format(-o,`day`):t(e,r)}function h(e,t,n,r){return e===`deposit`?r._({id:`Deposit of {amount}, {date}`,message:`Deposit of {amount}, {date}`,values:{amount:t,date:n}}):r._({id:`Withdrawal of {amount}, {date}`,message:`Withdrawal of {amount}, {date}`,values:{amount:t,date:n}})}export{a as historyResponseToPayload};
@@ -0,0 +1 @@
1
+ function e(e,t){let n=e.metadata?.kit_flow;return n===`deposit`?`deposit`:n===`withdraw`?`withdraw`:(e.destination.address??``).toLowerCase()===t?`deposit`:`withdraw`}export{e as resolveDirection};
@@ -1 +1 @@
1
- "use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import{Tooltip as n}from"../../../ui/Tooltip/Tooltip.js";import"../../../ui/Tooltip/index.js";import"../../../../ui/index.js";import{Frame as r}from"../../../dialog/Frame.js";import{AMOUNT_ENTRY_SLOTS as i}from"./AmountEntry.slots.js";import{styles as a}from"./AmountEntry.styles.js";import{AmountEntryContext as o}from"./context.js";import{AmountEntryFlow as s}from"./components/Flow.js";import{AmountEntryFooter as c}from"./components/Footer.js";import{AmountEntryHeader as l}from"./components/Header.js";import{AmountEntryHero as u}from"./components/Hero/Hero.js";import"./components/Hero/index.js";import{AmountEntryNotice as d}from"./components/Notice.js";import{AmountEntryPills as f}from"./components/Pills.js";import{useMemo as p}from"react";import{jsx as m}from"react/jsx-runtime";import*as h from"@stylexjs/stylex";const g={useGrouping:!0,maximumFractionDigits:8},_=[];function v(e){let{amount:t,sendToken:s,receiveToken:c,locale:l,format:u,min:d=0,max:f,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w=_,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,notice:A,children:j}=e,M=p(()=>({amount:t,sendToken:s,receiveToken:c,locale:l,format:u??g,min:d,max:f,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,notice:A}),[t,s,c,l,u,d,f,v,y,b,x,S,C,w,T,E,D,O,k,A]);return m(o.Provider,{value:M,children:m(n.Provider,{children:m(r,{"data-stridge-slot":i.root,...h.props(a.root),children:j})})})}function y(e){return m(t.Body,{"data-stridge-slot":i.body,...e})}function b({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return m(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:m(v,{...o,children:a})})}(function(e){e.Header=l,e.Body=y,e.Hero=u,e.Pills=f,e.Flow=s,e.Footer=c,e.Notice=d,e.Dialog=b})(v||={});export{v as AmountEntry};
1
+ "use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import{Tooltip as n}from"../../../ui/Tooltip/Tooltip.js";import"../../../ui/Tooltip/index.js";import"../../../../ui/index.js";import{Frame as r}from"../../../dialog/Frame.js";import{AMOUNT_ENTRY_SLOTS as i}from"./AmountEntry.slots.js";import{styles as a}from"./AmountEntry.styles.js";import{AmountEntryContext as o}from"./context.js";import{AmountEntryFlow as s}from"./components/Flow.js";import{AmountEntryFooter as c}from"./components/Footer.js";import{AmountEntryHeader as l}from"./components/Header.js";import{AmountEntryHero as u}from"./components/Hero/Hero.js";import"./components/Hero/index.js";import{AmountEntryNotice as d}from"./components/Notice.js";import{AmountEntryPills as f}from"./components/Pills.js";import{useMemo as p}from"react";import{jsx as m}from"react/jsx-runtime";import*as h from"@stylexjs/stylex";const g={useGrouping:!0,maximumFractionDigits:8},_=[];function v(e){let{amount:t,sendToken:s,receiveToken:c,locale:l,format:u,min:d=0,max:f,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w=_,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,notice:A,headerTrailing:j,children:M}=e,N=p(()=>({amount:t,sendToken:s,receiveToken:c,locale:l,format:u??g,min:d,max:f,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,notice:A,headerTrailing:j}),[t,s,c,l,u,d,f,v,y,b,x,S,C,w,T,E,D,O,k,A,j]);return m(o.Provider,{value:N,children:m(n.Provider,{children:m(r,{"data-stridge-slot":i.root,...h.props(a.root),children:M})})})}function y(e){return m(t.Body,{"data-stridge-slot":i.body,...e})}function b({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return m(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:m(v,{...o,children:a})})}(function(e){e.Header=l,e.Body=y,e.Hero=u,e.Pills=f,e.Flow=s,e.Footer=c,e.Notice=d,e.Dialog=b})(v||={});export{v as AmountEntry};