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

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 (200) hide show
  1. package/dist/KitProvider.d.ts +11 -0
  2. package/dist/KitProvider.js +1 -1
  3. package/dist/_internal/activity/driver/index.d.ts +3 -0
  4. package/dist/_internal/activity/driver/index.js +1 -0
  5. package/dist/_internal/drivers/stridge/index.d.ts +2 -1
  6. package/dist/_internal/drivers/stridge/index.js +1 -1
  7. package/dist/_internal/drivers/stridge-mock/index.d.ts +2 -1
  8. package/dist/_internal/drivers/stridge-mock/index.js +1 -1
  9. package/dist/activity/compound/index.d.ts +19 -0
  10. package/dist/activity/compound/index.js +1 -0
  11. package/dist/activity/dialog/index.d.ts +3 -0
  12. package/dist/activity/dialog/index.js +1 -0
  13. package/dist/activity/widgets/index.d.ts +4 -0
  14. package/dist/activity/widgets/index.js +1 -0
  15. package/dist/deposit/compound/index.d.ts +9 -9
  16. package/dist/deposit/widgets/index.d.ts +3 -3
  17. package/dist/deposit/widgets/index.js +1 -1
  18. package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
  19. package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
  20. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  21. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  22. package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
  23. package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
  24. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +0 -2
  25. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  26. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +1 -2
  27. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  28. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  29. package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
  30. package/dist/flows/activity/compound/ActivityFlow.js +1 -0
  31. package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
  32. package/dist/flows/activity/compound/components/Boundary.js +1 -0
  33. package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
  34. package/dist/flows/activity/compound/components/Steps.js +1 -0
  35. package/dist/flows/activity/dialog/ActivityDialog.d.ts +38 -0
  36. package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
  37. package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
  38. package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
  39. package/dist/flows/activity/driver/context.d.ts +38 -0
  40. package/dist/flows/activity/driver/context.js +1 -0
  41. package/dist/flows/activity/driver/types.d.ts +58 -0
  42. package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
  43. package/dist/flows/activity/orchestrator/controller.js +1 -0
  44. package/dist/flows/activity/orchestrator/index.d.ts +4 -0
  45. package/dist/flows/activity/orchestrator/index.js +1 -0
  46. package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
  47. package/dist/flows/activity/orchestrator/reducer.js +1 -0
  48. package/dist/flows/activity/orchestrator/types.d.ts +71 -0
  49. package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
  50. package/dist/flows/activity/orchestrator/useActivity.js +1 -0
  51. package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
  52. package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
  53. package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
  54. package/dist/flows/activity/widgets/ActivityList.js +1 -0
  55. package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
  56. package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
  57. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  58. package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
  59. package/dist/flows/deposit/driver/types.d.ts +1 -38
  60. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  61. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  62. package/dist/flows/deposit/orchestrator/types.d.ts +43 -29
  63. package/dist/flows/deposit/widgets/{activity-history/DepositHistoryDetail.d.ts → activity/DepositActivityDetail.d.ts} +11 -11
  64. package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
  65. package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
  66. package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
  67. package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
  68. package/dist/flows/deposit/widgets/activity/index.js +1 -0
  69. package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
  70. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  71. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
  72. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
  73. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  74. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +7 -6
  75. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
  76. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
  77. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
  78. package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
  79. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +4 -3
  80. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
  81. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  82. package/dist/flows/withdraw/driver/types.d.ts +0 -34
  83. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  84. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  85. package/dist/flows/withdraw/orchestrator/types.d.ts +44 -30
  86. package/dist/flows/withdraw/widgets/{activity-history/WithdrawHistoryDetail.d.ts → activity/WithdrawActivityDetail.d.ts} +11 -11
  87. package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
  88. package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
  89. package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
  90. package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
  91. package/dist/flows/withdraw/widgets/activity/index.js +1 -0
  92. package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
  93. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
  94. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +4 -4
  95. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
  96. package/dist/format/index.d.ts +2 -1
  97. package/dist/format/index.js +1 -1
  98. package/dist/i18n/locales/ar.js +1 -1
  99. package/dist/i18n/locales/es.js +1 -1
  100. package/dist/i18n/locales/source-keys.d.ts +1 -1
  101. package/dist/icons/index.d.ts +2 -2
  102. package/dist/icons/index.js +1 -1
  103. package/dist/index.d.ts +8 -2
  104. package/dist/index.js +1 -1
  105. package/dist/package.js +1 -1
  106. package/dist/shared/format/formatSmartRelative.d.ts +25 -0
  107. package/dist/shared/format/formatSmartRelative.js +1 -0
  108. package/dist/shared/format/formatUsd.js +1 -1
  109. package/dist/shared/icons/{HistoryIcon.d.ts → ActivityIcon.d.ts} +4 -4
  110. package/dist/shared/icons/{HistoryIcon.js → ActivityIcon.js} +1 -1
  111. package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
  112. package/dist/shared/orchestrator/createActivityReducers.js +1 -0
  113. package/dist/shared/orchestrator/index.d.ts +2 -0
  114. package/dist/shared/orchestrator/index.js +1 -1
  115. package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
  116. package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
  117. package/dist/shared/ui/Card/Card.d.ts +12 -9
  118. package/dist/shared/ui/Card/Card.js +1 -1
  119. package/dist/shared/ui/Card/Card.styles.js +1 -1
  120. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +1 -1
  121. package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
  122. package/dist/shared/widgets/{activity-history → activity}/ActivityTrigger.styles.js +1 -1
  123. package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
  124. package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
  125. package/dist/shared/widgets/activity/compound/Activity.js +1 -0
  126. package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
  127. package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
  128. package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
  129. package/dist/shared/widgets/{activity-history/compound/ActivityHistoryDetail.d.ts → activity/compound/ActivityDetail.d.ts} +24 -17
  130. package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
  131. package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
  132. package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
  133. package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
  134. package/dist/shared/widgets/{activity-history/compound/components/HistoryHeader.d.ts → activity/compound/components/ActivityHeader.d.ts} +8 -8
  135. package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
  136. package/dist/shared/widgets/{activity-history → activity}/compound/components/Empty.d.ts +3 -3
  137. package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
  138. package/dist/shared/widgets/{activity-history → activity}/compound/components/ErrorView.d.ts +7 -7
  139. package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
  140. package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
  141. package/dist/shared/widgets/activity/compound/components/List.js +1 -0
  142. package/dist/shared/widgets/{activity-history → activity}/compound/components/Row.d.ts +13 -16
  143. package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
  144. package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
  145. package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
  146. package/dist/shared/widgets/activity/compound/context.js +1 -0
  147. package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
  148. package/dist/shared/widgets/activity/compound/index.js +1 -0
  149. package/dist/shared/widgets/activity/payloads.d.ts +108 -0
  150. package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
  151. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +1 -1
  152. package/dist/shared/widgets/amount-entry/compound/types.d.ts +2 -3
  153. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +1 -1
  154. package/dist/shared/widgets/asset-picker/compound/types.d.ts +2 -2
  155. package/dist/stridge/StridgeProvider.d.ts +10 -6
  156. package/dist/stridge/StridgeProvider.js +1 -1
  157. package/dist/stridge/stubs.js +1 -1
  158. package/dist/styles/index.css +4 -0
  159. package/dist/withdraw/compound/index.d.ts +6 -6
  160. package/dist/withdraw/widgets/index.d.ts +3 -3
  161. package/dist/withdraw/widgets/index.js +1 -1
  162. package/package.json +14 -6
  163. package/dist/activity-history/compound/index.d.ts +0 -9
  164. package/dist/activity-history/compound/index.js +0 -1
  165. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +0 -1
  166. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +0 -38
  167. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +0 -1
  168. package/dist/flows/deposit/widgets/activity-history/index.d.ts +0 -2
  169. package/dist/flows/deposit/widgets/activity-history/index.js +0 -1
  170. package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +0 -1
  171. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +0 -1
  172. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +0 -36
  173. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +0 -1
  174. package/dist/flows/withdraw/widgets/activity-history/index.d.ts +0 -2
  175. package/dist/flows/withdraw/widgets/activity-history/index.js +0 -1
  176. package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +0 -1
  177. package/dist/shared/widgets/activity-history/ActivityTrigger.js +0 -1
  178. package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +0 -1
  179. package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +0 -95
  180. package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +0 -1
  181. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +0 -22
  182. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +0 -1
  183. package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +0 -1
  184. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +0 -1
  185. package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +0 -21
  186. package/dist/shared/widgets/activity-history/compound/Row.slots.js +0 -1
  187. package/dist/shared/widgets/activity-history/compound/Row.styles.js +0 -1
  188. package/dist/shared/widgets/activity-history/compound/components/Empty.js +0 -1
  189. package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +0 -1
  190. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +0 -1
  191. package/dist/shared/widgets/activity-history/compound/components/List.d.ts +0 -23
  192. package/dist/shared/widgets/activity-history/compound/components/List.js +0 -1
  193. package/dist/shared/widgets/activity-history/compound/components/Row.js +0 -1
  194. package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +0 -1
  195. package/dist/shared/widgets/activity-history/compound/context.d.ts +0 -79
  196. package/dist/shared/widgets/activity-history/compound/context.js +0 -1
  197. package/dist/shared/widgets/activity-history/payloads.d.ts +0 -81
  198. package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +0 -1
  199. /package/dist/shared/widgets/{activity-history → activity}/index.js +0 -0
  200. /package/dist/shared/widgets/{activity-history → activity}/transformers/resolveDirection.js +0 -0
@@ -0,0 +1 @@
1
+ const e={root:{"Activity__styles.root":`Activity__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:21`},header:{"Activity__styles.header":`Activity__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:28`},headerLeft:{"Activity__styles.headerLeft":`Activity__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:31`},headerRight:{"Activity__styles.headerRight":`Activity__styles.headerRight`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:37`},backIcon:{"Activity__styles.backIcon":`Activity__styles.backIcon`,"width-kzqmXN":`x1xp8n7a`,"height-kZKoxP":`xmix8c7`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:42`},body:{"Activity__styles.body":`Activity__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/compound/Activity.styles.ts:54`},bodyCap:{"Activity__styles.bodyCap":`Activity__styles.bodyCap`,"maxHeight-kskxy":`x17geuhg`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:70`},skeletonRow:{"Activity__styles.skeletonRow":`Activity__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/compound/Activity.styles.ts:75`},skeletonText:{"Activity__styles.skeletonText":`Activity__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/compound/Activity.styles.ts:83`},empty:{"Activity__styles.empty":`Activity__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/compound/Activity.styles.ts:94`},emptyIcon:{"Activity__styles.emptyIcon":`Activity__styles.emptyIcon`,"width-kzqmXN":`x1td3qas`,"height-kZKoxP":`x10w6t97`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:106`},error:{"Activity__styles.error":`Activity__styles.error`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x2blr79`,"paddingTop-kLKAdn":`x2tg1xt`,"paddingBottom-kGO01o":`x1ww8orz`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:114`},retryRow:{"Activity__styles.retryRow":`Activity__styles.retryRow`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:121`},bodyEnter:{"Activity__styles.bodyEnter":`Activity__styles.bodyEnter`,"animationName-kKVMdj":`xqcmdr3`,"animationDuration-k44tkh":`x19y0sg2`,"animationTimingFunction-kyAemX":`xrkt6z0`,"animationFillMode-kWV6AL":`x1u6ievf`,$$css:`@stridge/kit:src/shared/widgets/activity/compound/Activity.styles.ts:126`}};export{e as styles};
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from "react";
2
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
- //#region src/shared/widgets/activity-history/compound/ActivityHistoryDetail.d.ts
5
- interface ActivityHistoryDetailOwnProps {
4
+ //#region src/shared/widgets/activity/compound/ActivityDetail.d.ts
5
+ interface ActivityDetailOwnProps {
6
6
  /**
7
7
  * Optional custom composition. Defaults to mounting all three per-kind parts — each gates
8
8
  * internally on the resolved payload's `kind`, so only the matching one renders.
@@ -10,25 +10,32 @@ interface ActivityHistoryDetailOwnProps {
10
10
  children?: ReactNode;
11
11
  }
12
12
  /**
13
- * Per-settlement detail compound — peer of {@link ActivityHistory}. Mounted by the dialog's
14
- * `historyDetail` step. Resolves the selected settlement against
13
+ * Per-settlement detail compound — peer of {@link Activity}. Mounted by the dialog's
14
+ * `activityDetail` step. Resolves the selected settlement against
15
15
  * `source.entity.raw[].settlements[]`, exposes the discriminated payload via the inner
16
16
  * context, and lets per-kind parts (`Processing` / `Succeeded` / `Failed`) render the matching
17
17
  * existing state compound with derived props.
18
18
  *
19
+ * The default composition wraps the three per-kind branches in a nested `<Steps>` keyed by
20
+ * `payload.kind` so substate transitions (pending → succeeded / failed) inherit the kit's
21
+ * slide+blur step animation — without it, the inner compound would swap synchronously and
22
+ * the activity surface would feel discontinuous compared to the in-flow deposit dialog where
23
+ * each kind is a top-level `<Step>` and the same transition fires automatically.
24
+ *
19
25
  * Returns `null` when the entity hasn't materialised raw data yet or when the settlement id
20
26
  * 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.
27
+ * dispatches `back()` (in-flow / via-list entries) or the bridge-supplied `onLookupMiss`
28
+ * (standalone direct entries) so the next paint shows the list.
22
29
  */
23
- declare function ActivityHistoryDetail({
30
+ declare function ActivityDetail({
24
31
  children
25
- }: ActivityHistoryDetailOwnProps): _$react_jsx_runtime0.JSX.Element | null;
32
+ }: ActivityDetailOwnProps): _$react_jsx_runtime0.JSX.Element | null;
26
33
  /**
27
34
  * Pending-payload branch. Mounts the kit's `<ProcessingStateCompound>` with the resolved
28
- * settlement details and an `<ActivityHistoryListHeader>` in the header slot so the back
35
+ * settlement details and an `<ActivityListHeader>` in the header slot so the back
29
36
  * chevron + title affordance matches the list view.
30
37
  */
31
- declare function ActivityHistoryDetailProcessing({
38
+ declare function ActivityDetailProcessing({
32
39
  children
33
40
  }: {
34
41
  children?: ReactNode;
@@ -38,7 +45,7 @@ declare function ActivityHistoryDetailProcessing({
38
45
  * so a withdraw row drilling into detail keeps `Withdrawal successful` (matching the row
39
46
  * title vocabulary) instead of falling through to the deposit-only default.
40
47
  */
41
- declare function ActivityHistoryDetailSucceeded({
48
+ declare function ActivityDetailSucceeded({
42
49
  children
43
50
  }: {
44
51
  children?: ReactNode;
@@ -48,28 +55,28 @@ declare function ActivityHistoryDetailSucceeded({
48
55
  * a withdraw row keeps `Withdrawal failed` (the deposit branch is a no-op explicit set —
49
56
  * matches the existing default; symmetric explicit form keeps both branches aligned).
50
57
  */
51
- declare function ActivityHistoryDetailFailed({
58
+ declare function ActivityDetailFailed({
52
59
  children
53
60
  }: {
54
61
  children?: ReactNode;
55
62
  }): _$react_jsx_runtime0.JSX.Element | null;
56
- declare namespace ActivityHistoryDetail {
57
- type Props = ActivityHistoryDetailOwnProps;
63
+ declare namespace ActivityDetail {
64
+ type Props = ActivityDetailOwnProps;
58
65
  /**
59
66
  * Pending-payload branch. Mounts `<ProcessingStateCompound>` with the resolved settlement
60
67
  * details. Returns `null` when the resolved payload's kind isn't `"pending"`.
61
68
  */
62
- const Processing: typeof ActivityHistoryDetailProcessing;
69
+ const Processing: typeof ActivityDetailProcessing;
63
70
  /**
64
71
  * Succeeded-payload branch. Mounts `<SuccessStateCompound>` with per-direction headline
65
72
  * copy. Returns `null` when the resolved payload's kind isn't `"succeeded"`.
66
73
  */
67
- const Succeeded: typeof ActivityHistoryDetailSucceeded;
74
+ const Succeeded: typeof ActivityDetailSucceeded;
68
75
  /**
69
76
  * Failed-payload branch. Mounts `<ErrorStateCompound>` with per-direction failure headline.
70
77
  * Returns `null` when the resolved payload's kind isn't `"failed"`.
71
78
  */
72
- const Failed: typeof ActivityHistoryDetailFailed;
79
+ const Failed: typeof ActivityDetailFailed;
73
80
  }
74
81
  //#endregion
75
- export { ActivityHistoryDetail };
82
+ export { ActivityDetail };
@@ -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{Step as n,Steps as r}from"../../../ui/Steps/Steps.js";import"../../../ui/Steps/index.js";import{ErrorState as i}from"../../error-state/compound/ErrorState.js";import"../../error-state/compound/index.js";import{ProcessingState as a}from"../../processing-state/compound/ProcessingState.js";import"../../processing-state/compound/index.js";import{SuccessState as o}from"../../success-state/compound/SuccessState.js";import"../../success-state/compound/index.js";import{useActivitySource as s}from"./context.js";import{ActivityListHeader as c}from"./components/ActivityHeader.js";import{toAssetDescriptor as l}from"../../asset-descriptor.js";import{settlementToWidgetProps as u}from"../adapters/settlementToWidgetProps.js";import{createContext as d,use as f,useEffect as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g(e,t,n){return t===`withdraw`?n===`pending`?e.withdrawPending:n===`succeeded`?e.withdrawSucceeded:e.withdrawFailed:n===`pending`?e.depositPending:n===`succeeded`?e.depositSucceeded:e.depositFailed}const _=d(null);_.displayName=`ActivityDetailContext`;function v({children:t}){let i=s(`ActivityDetail`),{_:a}=e(),o=i.entity,c=o.status===`ready`||o.status===`stale`,l=c?o.raw:void 0,d=i.settlementId,f=l&&d?u(l,d,i.settlementContext):null,v=c&&d!==void 0&&!f,S=i.back,C=i.onLookupMiss;if(p(()=>{v&&(S??C)?.()},[v,S,C]),!f)return null;let w={depositPending:a({id:`JYp-ic`,message:`Deposit processing`}),depositSucceeded:a({id:`e3xU5E`,message:`Deposit received`}),depositFailed:a({id:`i-4Fbp`,message:`Deposit failed`}),withdrawPending:a({id:`w-2VR9`,message:`Withdrawal in progress…`}),withdrawSucceeded:a({id:`q32Nt8`,message:`Withdrawal complete`}),withdrawFailed:a({id:`KTNWsg`,message:`Withdrawal failed`})},T={payload:f.payload,direction:f.direction,headerTitle:g(w,f.direction,f.payload.kind),...S?{onBack:S}:{}},E=h(r,{activeStep:f.payload.kind,children:[m(n,{name:`pending`,children:m(y,{})}),m(n,{name:`succeeded`,children:m(b,{})}),m(n,{name:`failed`,children:m(x,{})})]});return m(_,{value:T,children:t??E})}function y({children:e}){let t=f(_);if(!t||t.payload.kind!==`pending`)return null;let{payload:n,headerTitle:r,onBack:i}=t,o=l(n.creditedAsset)??{symbol:n.creditedAsset.symbol},s={...n.sourceWallet.name===void 0?{}:{name:n.sourceWallet.name},address:n.sourceWallet.address.formatted,...n.sourceWallet.explorerUrl?{explorerUrl:n.sourceWallet.explorerUrl}:{}},u=n.receiveAmount.value===0;return h(a,{amount:n.receiveAmount.formatted,creditedAsset:o,creditedTo:n.creditedTo,headerTitle:r,...u?{loading:!0}:{},...n.txHash?{sourceTx:{hash:n.txHash.formatted,...n.txExplorerUrl?{explorerUrl:n.txExplorerUrl}:{}}}:{},...s.address?{sourceWallet:s}:{},submittedAt:n.submittedAt.formatted,...n.detectedAt?{detectedAt:n.detectedAt.formatted}:{},children:[m(c,{title:r,onBack:i}),e??h(a.Body,{children:[m(a.Hero,{}),m(a.StatusPill,{}),h(a.Details,{children:[m(a.SourceRow,{}),m(a.SourceTxRow,{}),m(a.SubmittedAtRow,{}),m(a.DetectedAtRow,{})]})]})]})}function b({children:t}){let{_:n}=e(),r=f(_);if(!r||r.payload.kind!==`succeeded`)return null;let{payload:i,direction:a,headerTitle:s,onBack:u}=r,d=l(i.creditedAsset)??{symbol:i.creditedAsset.symbol},p={...i.sourceWallet.name===void 0?{}:{name:i.sourceWallet.name},address:i.sourceWallet.address.formatted,...i.sourceWallet.explorerUrl?{explorerUrl:i.sourceWallet.explorerUrl}:{}},g=i.destination.name??i.creditedAsset.symbol,v=i.aggregatorExplorerUrl?{url:i.aggregatorExplorerUrl}:void 0,y=i.depositTx||i.completionTx||i.submittedAt||i.filledAt,b=n(a===`withdraw`?{id:`_girqu`,message:`Withdrawal successful`}:{id:`--OGth`,message:`Deposit successful`}),x=n(a===`withdraw`?{id:`_QZdX-`,message:`Your withdrawal was completed successfully.`}:{id:`oW1G8i`,message:`Your funds were successfully deposited.`});return h(o,{amount:i.receiveAmount.formatted,creditedAsset:d,creditedTo:g,headerTitle:s,headlineTitle:b,headlineDescription:x,...v?{explorer:v}:{},...i.depositTx?{depositTx:{hash:i.depositTx.hash.formatted,...i.depositTx.explorerUrl?{explorerUrl:i.depositTx.explorerUrl}:{}}}:{},...i.completionTx?{completionTx:{hash:i.completionTx.hash.formatted,...i.completionTx.explorerUrl?{explorerUrl:i.completionTx.explorerUrl}:{}}}:{},submittedAt:i.submittedAt.formatted,filledAt:i.filledAt.formatted,totalTime:i.totalTime.formatted,sourceWallet:p,children:[m(c,{title:s,onBack:u}),t??h(o.Body,{children:[m(o.Headline,{}),h(o.Details,{children:[m(o.FillStatusRow,{}),m(o.TotalTimeRow,{}),m(o.SourceRow,{}),m(o.DestinationRow,{}),m(o.YouReceiveRow,{}),y?h(o.MoreDetails,{children:[m(o.DepositTxRow,{}),m(o.CompletionTxRow,{}),m(o.SubmittedAtRow,{}),m(o.FilledAtRow,{})]}):null]})]})]})}function x({children:n}){let{_:r}=e(),a=t(),o=f(_);if(!o||o.payload.kind!==`failed`)return null;let{payload:s,direction:u,headerTitle:d,onBack:p}=o,g={...s.sourceWallet.name===void 0?{}:{name:s.sourceWallet.name},address:s.sourceWallet.address.formatted,...s.sourceWallet.explorerUrl?{explorerUrl:s.sourceWallet.explorerUrl}:{}},v={...s.destination.name===void 0?{}:{name:s.destination.name},address:s.destination.address.formatted},y=l(s.creditedAsset)??{symbol:s.creditedAsset.symbol},b={hash:s.txHash.formatted,...s.txExplorerUrl?{explorerUrl:s.txExplorerUrl}:{}},x=a(s.failureKind);return h(i,{headline:r(u===`withdraw`?{id:`KTNWsg`,message:`Withdrawal failed`}:{id:`i-4Fbp`,message:`Deposit failed`}),reason:x,headerTitle:d,sourceWallet:g,destination:v,receiveAmount:s.receiveAmount.formatted,receiveAsset:y,depositTx:b,submittedAt:s.submittedAt.formatted,failedAt:s.failedAt.formatted,children:[m(c,{title:d,onBack:p}),n??h(i.Body,{children:[m(i.Hero,{}),h(i.Details,{children:[m(i.FillStatusRow,{}),m(i.SourceRow,{}),m(i.DestinationRow,{}),m(i.YouReceiveRow,{}),h(i.MoreDetails,{children:[m(i.DepositTxRow,{}),m(i.SubmittedAtRow,{}),m(i.FailedAtRow,{})]})]}),m(i.HelpInfo,{})]})]})}(function(e){e.Processing=y,e.Succeeded=b,e.Failed=x})(v||={});export{v as ActivityDetail};
@@ -0,0 +1,21 @@
1
+ //#region src/shared/widgets/activity/compound/Row.slots.d.ts
2
+ /**
3
+ * Slot vocabulary for `<Activity.Row>`. Same `data-stridge-slot` convention as the parent
4
+ * compound — see {@link import("./Activity.slots").ACTIVITY_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_ROW_SLOTS: {
9
+ readonly root: "activity-row";
10
+ readonly leading: "activity-row-leading";
11
+ readonly statusPip: "activity-row-status-pip";
12
+ readonly text: "activity-row-text";
13
+ readonly title: "activity-row-title";
14
+ readonly date: "activity-row-date";
15
+ readonly trailing: "activity-row-trailing";
16
+ readonly amount: "activity-row-amount";
17
+ readonly chevron: "activity-row-chevron";
18
+ };
19
+ type ActivityRowSlot = (typeof ACTIVITY_ROW_SLOTS)[keyof typeof ACTIVITY_ROW_SLOTS];
20
+ //#endregion
21
+ export { ACTIVITY_ROW_SLOTS, ActivityRowSlot };
@@ -0,0 +1 @@
1
+ const e={root:`activity-row`,leading:`activity-row-leading`,statusPip:`activity-row-status-pip`,text:`activity-row-text`,title:`activity-row-title`,date:`activity-row-date`,trailing:`activity-row-trailing`,amount:`activity-row-amount`,chevron:`activity-row-chevron`};export{e as ACTIVITY_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/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/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/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/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/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/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/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/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/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/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/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/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/compound/Row.styles.ts:150`}};export{e as styles};
@@ -1,10 +1,10 @@
1
1
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
- //#region src/shared/widgets/activity-history/compound/components/HistoryHeader.d.ts
3
+ //#region src/shared/widgets/activity/compound/components/ActivityHeader.d.ts
4
4
  interface Props {
5
5
  /**
6
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\``).
7
+ * views pass a per-state title (e.g. `t\`Deposit in progress\``, `t\`Withdrawal failed\``).
8
8
  */
9
9
  title?: string;
10
10
  /**
@@ -22,18 +22,18 @@ interface Props {
22
22
  *
23
23
  * Mounted by both the List view and the Detail view's per-payload compound — the chevron
24
24
  * routes `actions.back()` through the source context, which the FSM disambiguates via the
25
- * active state name (`historyDetailhistoryList → source`).
25
+ * active state name (`activityDetailactivityList → source`).
26
26
  */
27
- declare function ActivityHistoryListHeader({
27
+ declare function ActivityListHeader({
28
28
  title,
29
29
  onBack
30
30
  }: Props): _$react_jsx_runtime0.JSX.Element;
31
31
  /**
32
- * Public `<ActivityHistory.Header>` part — thin wrapper around {@link ActivityHistoryListHeader}
32
+ * Public `<Activity.Header>` part — thin wrapper around {@link ActivityListHeader}
33
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
34
+ * compositions. The peer detail compound mounts `<Activity.ListHeader>` itself with an
35
35
  * explicit title and back handler.
36
36
  */
37
- declare function ActivityHistoryHeader(): _$react_jsx_runtime0.JSX.Element;
37
+ declare function ActivityHeader(): _$react_jsx_runtime0.JSX.Element;
38
38
  //#endregion
39
- export { ActivityHistoryHeader, ActivityHistoryListHeader };
39
+ export { ActivityHeader, ActivityListHeader };
@@ -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_SLOTS as o}from"../Activity.slots.js";import{styles as s}from"../Activity.styles.js";import{useActivitySource 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(`Activity.Header`).back})}export{p as ActivityHeader,f as ActivityListHeader};
@@ -1,6 +1,6 @@
1
1
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
- //#region src/shared/widgets/activity-history/compound/components/Empty.d.ts
3
+ //#region src/shared/widgets/activity/compound/components/Empty.d.ts
4
4
  /**
5
5
  * Empty-state body for the activity surface. Reached when the gateway's poll returned an
6
6
  * empty UDA list for the connected owner — typically a brand-new wallet that hasn't deposited
@@ -10,6 +10,6 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
10
10
  *
11
11
  * @internal
12
12
  */
13
- declare function ActivityHistoryEmpty(): _$react_jsx_runtime0.JSX.Element;
13
+ declare function ActivityEmpty(): _$react_jsx_runtime0.JSX.Element;
14
14
  //#endregion
15
- export { ActivityHistoryEmpty };
15
+ export { ActivityEmpty };
@@ -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_SLOTS as r}from"../Activity.slots.js";import{styles as i}from"../Activity.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 ActivityEmpty};
@@ -1,7 +1,7 @@
1
1
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
- //#region src/shared/widgets/activity-history/compound/components/ErrorView.d.ts
4
- interface ActivityHistoryErrorViewProps {
3
+ //#region src/shared/widgets/activity/compound/components/ErrorView.d.ts
4
+ interface ActivityErrorViewProps {
5
5
  /**
6
6
  * Retry handler. Wired by the List to fire a fresh `refresh(signal)` against the source
7
7
  * context — the entity transitions back through `loading → ready | error`.
@@ -12,15 +12,15 @@ interface ActivityHistoryErrorViewProps {
12
12
  * Initial-error body for the activity surface. Rendered only when the first fetch failed
13
13
  * AND the entity has no prior payload to fall back to (status `error` from `idle | loading`).
14
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
15
+ * and the next controller-driven `watchActivity` tick retries; that branch never reaches this
16
16
  * component.
17
17
  *
18
18
  * @internal
19
- * @see {@link ActivityHistoryList} for the entity-status branching that decides when this
19
+ * @see {@link ActivityList} for the entity-status branching that decides when this
20
20
  * renders vs the silent stale-while-revalidate path.
21
21
  */
22
- declare function ActivityHistoryErrorView({
22
+ declare function ActivityErrorView({
23
23
  onRetry
24
- }: ActivityHistoryErrorViewProps): _$react_jsx_runtime0.JSX.Element;
24
+ }: ActivityErrorViewProps): _$react_jsx_runtime0.JSX.Element;
25
25
  //#endregion
26
- export { ActivityHistoryErrorView };
26
+ export { ActivityErrorView };
@@ -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_SLOTS as i}from"../Activity.slots.js";import{styles as a}from"../Activity.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 ActivityErrorView};
@@ -0,0 +1,23 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/shared/widgets/activity/compound/components/List.d.ts
4
+ /**
5
+ * List body for the activity surface. Reads the `activity` entity from
6
+ * {@link useActivitySource} 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 ActivityErrorView} with a retry button.
12
+ * - `ready` with zero rows → {@link ActivityEmpty}.
13
+ *
14
+ * Recurring updates land via the controller-mounted `watchActivity` watcher (mounted on entry
15
+ * to `activityList` / `activityDetail`, 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 ActivityList(): _$react_jsx_runtime0.JSX.Element;
22
+ //#endregion
23
+ export { ActivityList };
@@ -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_SLOTS as n}from"../Activity.slots.js";import{styles as r}from"../Activity.styles.js";import{useActivitySource as i}from"../context.js";import{ActivityEmpty as a}from"./Empty.js";import{ActivityErrorView as o}from"./ErrorView.js";import{ActivityRow 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=i(`Activity.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(o,{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(a,{})}):l(e.Body,{"data-stridge-slot":n.body,...d.props(r.body,r.bodyCap,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 ActivityList};
@@ -1,32 +1,29 @@
1
- import { ActivityHistoryRowPayload } from "../../payloads.js";
1
+ import { ActivityRowPayload } from "../../payloads.js";
2
2
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
- //#region src/shared/widgets/activity-history/compound/components/Row.d.ts
4
+ //#region src/shared/widgets/activity/compound/components/Row.d.ts
5
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.
6
+ * Props the row needs to render. The payload carries *raw* numeric / identity slots — the row
7
+ * formats every visible string itself via `useLingui()` so locale flips take effect on the
8
+ * same React commit (mirrors deposit's `AmountEntry.tsx` / `ConfirmDeposit.tsx` pattern).
10
9
  */
11
10
  interface Props {
12
11
  /**
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.
12
+ * Raw row payload from the driver's transformer. Carries amount value + kind, asset
13
+ * identity, and updated-at timestamp; the row component formats them inline per render.
16
14
  */
17
- payload: ActivityHistoryRowPayload;
15
+ payload: ActivityRowPayload;
18
16
  /**
19
17
  * Row click handler. Receives the settlement id from the payload; the parent compound
20
- * forwards it to {@link import("../context").ActivityHistorySourceValue.selectSettlement}.
18
+ * forwards it to {@link import("../context").ActivitySourceValue.selectSettlement}.
21
19
  */
22
20
  onSelect: (settlementId: string) => void;
23
21
  }
24
22
  /**
25
23
  * 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`.
24
+ * compound's `index.ts` and the API-extractor snapshot keep referencing `ActivityRowProps`.
28
25
  */
29
- type ActivityHistoryRowProps = Props;
26
+ type ActivityRowProps = Props;
30
27
  /**
31
28
  * One row of the activity surface — leading asset glyph (with corner status pip), title +
32
29
  * date stack, trailing amount + chevron. Composes
@@ -46,9 +43,9 @@ type ActivityHistoryRowProps = Props;
46
43
  * {@link TokenLogo}'s built-in chain badge is therefore disabled via `hideChainBadge` and
47
44
  * the {@link StatusPip} renders inside the row's leading slot instead.
48
45
  */
49
- declare function ActivityHistoryRow({
46
+ declare function ActivityRow({
50
47
  payload,
51
48
  onSelect
52
49
  }: Props): _$react_jsx_runtime0.JSX.Element;
53
50
  //#endregion
54
- export { ActivityHistoryRow, ActivityHistoryRowProps };
51
+ export { ActivityRow, ActivityRowProps };
@@ -0,0 +1 @@
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{formatSmartRelative as t}from"../../../../format/formatSmartRelative.js";import{formatTokenAmount as n}from"../../../../format/formatTokenAmount.js";import{formatUsd as r}from"../../../../format/formatUsd.js";import{ChevronRightIcon as i}from"../../../../icons/ChevronRightIcon.js";import"../../../../../icons/index.js";import{SelectableTile as a}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as o}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{TokenLogo as s}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import{ACTIVITY_ROW_SLOTS as c}from"../Row.slots.js";import{styles as l}from"../Row.styles.js";import{StatusPip as u}from"./StatusPip.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({payload:m,onSelect:g}){let{_,i18n:v}=e(),y={depositCompleted:_({id:`3kg1gB`,message:`Deposit completed`}),depositFailed:_({id:`i-4Fbp`,message:`Deposit failed`}),depositInProgress:_({id:`Cs44l6`,message:`Deposit in progress`}),withdrawalCompleted:_({id:`jKZO-R`,message:`Withdrawal completed`}),withdrawalFailed:_({id:`KTNWsg`,message:`Withdrawal failed`}),withdrawalInProgress:_({id:`6yS5kL`,message:`Withdrawal in progress`})},b=h(m.direction,m.status.kind,y),x=m.amount.kind===`usd`?r(m.amount.value,v):`${n(m.amount.value,v,{maxDecimals:m.assetDecimals})} ${m.assetSymbol}`,S=t(m.updatedAtMs,Date.now(),v),C=m.direction===`deposit`?_({id:`hBIHD-`,message:`Deposit of {amount}, {date}`,values:{amount:x,date:S}}):_({id:`Rm325-`,message:`Withdrawal of {amount}, {date}`,values:{amount:x,date:S}});return f(a,{shape:`card`,interactive:`navigation`,"data-stridge-slot":c.root,"aria-label":C,onClick:()=>g(m.id),...p.props(l.rowLayout),children:[f(`span`,{"data-stridge-slot":c.leading,...p.props(l.leading),children:[d(s,{symbol:m.assetSymbol,...m.chainId===void 0?{}:{chainId:m.chainId},...m.assetLogoUrl===void 0?{}:{logoUrl:m.assetLogoUrl},...m.chainLogoUrl===void 0?{}:{chainLogoUrl:m.chainLogoUrl},size:44,hideChainBadge:!0}),d(u,{kind:m.status.kind})]}),f(`span`,{"data-stridge-slot":c.text,...p.props(l.text),children:[d(o.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":c.title,...p.props(l.title),children:b}),d(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,"data-stridge-slot":c.date,...p.props(l.date),children:S})]}),f(`span`,{"data-stridge-slot":c.trailing,...p.props(l.trailing),children:[d(o.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":c.amount,children:x}),d(i,{"aria-hidden":!0,"data-stridge-slot":c.chevron,...p.props(l.chevron)})]})]})}function h(e,t,n){return e===`deposit`?t===`completed`?n.depositCompleted:t===`failed`?n.depositFailed:n.depositInProgress:t===`completed`?n.withdrawalCompleted:t===`failed`?n.withdrawalFailed:n.withdrawalInProgress}export{m as ActivityRow};
@@ -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_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,95 @@
1
+ import { Entity } from "../../../driver/types.js";
2
+ import { ActivityPayload } 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/compound/context.d.ts
8
+ /**
9
+ * Source of truth handed to `<Activity>` and `<ActivityDetail>` from whichever
10
+ * dialog (deposit / withdraw) mounts them. Each dialog assembles this value once from its own
11
+ * snapshot + actions and wraps the activity step body in
12
+ * `<ActivitySourceProvider 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 `activityList` and `activityDetail` as separate
16
+ * state names; the dialog's step router mounts {@link Activity} for the list step and
17
+ * {@link ActivityDetail} 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 ActivitySourceProvider}
22
+ * @see {@link useActivitySource}
23
+ */
24
+ interface ActivitySourceValue {
25
+ /**
26
+ * The driver's `activity` entity. Same shape on both flows (`DepositSnapshot["activity"]`
27
+ * and `WithdrawSnapshot["activity"]` 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<ActivityPayload, ReadonlyArray<GatewayUdaDto>, GatewayPollResponse>;
32
+ /**
33
+ * Trigger a fresh one-shot fetch. Wired by each dialog to `driver.refreshActivity(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
+ * `watchActivity` 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 `activityList` to `activityDetail` 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 (`activityDetail → activityList → source`). The compound renders the chevron in
48
+ * both the list step's header AND inside the detail step's header composition.
49
+ *
50
+ * Optional. The per-flow source-bridge hook omits `back` when the active state's
51
+ * `backTarget.kind === "closed"` (imperative direct-entry — no source step to restore), so
52
+ * the header renders without a chevron. The user dismisses via the dialog's `X`.
53
+ */
54
+ back?: () => void;
55
+ /**
56
+ * Recovery fallback the detail compound invokes when the selected settlement has aged off
57
+ * the envelope (rare race — host calls `useActivity().open({ settlementId })`, then the
58
+ * background watcher tick lands a fresh response without that row). The compound prefers
59
+ * {@link back} when present; this slot only fires on direct-entry detail where `back` is
60
+ * undefined and the user would otherwise stare at an empty body until they hit `X`.
61
+ *
62
+ * Optional. The deposit / withdraw bridges always supply `back`, so they leave this unset.
63
+ * The standalone activity bridge wires it to a "re-open list" dispatch — `useActivity().open()`
64
+ * with no args — which the standalone reducer re-targets to `activityList` from `activityDetail`.
65
+ */
66
+ onLookupMiss?: () => void;
67
+ /**
68
+ * Selected settlement id when the dialog is mounting the detail step. Carried so the
69
+ * `<ActivityDetail>` compound can look up the matching `GatewaySettlementDto`
70
+ * inside `entity.raw[].settlements[]` and feed it to {@link
71
+ * import("../adapters").settlementToWidgetProps}. Absent when the list wrapper supplies
72
+ * the source value.
73
+ */
74
+ settlementId?: string;
75
+ /**
76
+ * Context the detail compound's adapter passes to {@link
77
+ * import("#/flows/deposit/driver/transformers").settlementToPayload}. Each dialog
78
+ * assembles this from its own driver snapshot — deposit reads `wallet`, `brand`, the
79
+ * driver's explorers map; withdraw reads its equivalents. Carrying the resolved context
80
+ * here keeps the compound flow-agnostic.
81
+ */
82
+ settlementContext: SettlementPayloadContext;
83
+ }
84
+ /**
85
+ * Provider for {@link ActivitySourceValue}. Each dialog mounts one above its
86
+ * activity step body — see `DepositDialog` / `WithdrawDialog`.
87
+ */
88
+ declare const ActivitySourceProvider: _$react.Provider<ActivitySourceValue | null>;
89
+ /**
90
+ * Read the active {@link ActivitySourceValue}. Throws when called outside an
91
+ * `<ActivitySourceProvider>`.
92
+ */
93
+ declare function useActivitySource(consumer: string): ActivitySourceValue;
94
+ //#endregion
95
+ export { ActivitySourceProvider, ActivitySourceValue, useActivitySource };
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`ActivitySourceContext`;const r=n.Provider;function i(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <ActivitySourceProvider>. Mount the provider above <Activity> with the value derived from the flow's snapshot + actions — see DepositDialog / WithdrawDialog for the canonical wiring.`);return r}export{r as ActivitySourceProvider,i as useActivitySource};
@@ -0,0 +1,8 @@
1
+ import { ActivityAmount, ActivityPayload, ActivityRowPayload } from "../payloads.js";
2
+ import { ActivityHeader, ActivityListHeader } from "./components/ActivityHeader.js";
3
+ import { ActivityRowProps } from "./components/Row.js";
4
+ import { Activity } from "./Activity.js";
5
+ import { ACTIVITY_SLOTS, ActivitySlot } from "./Activity.slots.js";
6
+ import { ActivityDetail } from "./ActivityDetail.js";
7
+ import { ActivitySourceProvider, ActivitySourceValue, useActivitySource } from "./context.js";
8
+ import { ACTIVITY_ROW_SLOTS, ActivityRowSlot } from "./Row.slots.js";
@@ -0,0 +1 @@
1
+ import"./Activity.slots.js";import"./context.js";import"./components/ActivityHeader.js";import"./Row.slots.js";import"./Activity.js";import"./ActivityDetail.js";
@@ -0,0 +1,108 @@
1
+ //#region src/shared/widgets/activity/payloads.d.ts
2
+ /**
3
+ * Which flow produced the settlement — `"deposit"` for UDAs whose destination is the connected
4
+ * wallet, `"withdraw"` for UDAs whose source is the brand-currency balance the user is cashing
5
+ * out from. Discriminated by `uda.metadata.kit_flow` when present, with an address-comparison
6
+ * fallback for legacy UDAs that pre-date the metadata convention.
7
+ */
8
+ type ActivityDirection = "deposit" | "withdraw";
9
+ /**
10
+ * Lifecycle bucket for a single settlement row. Maps onto the kit's existing settlement-status
11
+ * model (`pending → succeeded → failed`) but flattens it to the 3-value set the row renders
12
+ * against — the inline status indicator picks an icon from this discriminator alone.
13
+ */
14
+ type ActivityStatusType = "pending" | "completed" | "failed";
15
+ /**
16
+ * Wrapper carrying the lifecycle bucket plus room for future status-scoped metadata (e.g. a
17
+ * settlement-level `failureKind` tag the row could surface). Kept separate from
18
+ * {@link ActivityStatusType} so the discriminator string stays stable as the shape grows.
19
+ */
20
+ interface ActivityStatus {
21
+ kind: ActivityStatusType;
22
+ }
23
+ /**
24
+ * Discriminated row amount. Carries the raw numeric value plus the formatter the component
25
+ * layer should run against it:
26
+ *
27
+ * - `usd` — render via `formatUsd(value, i18n)`.
28
+ * - `token` — render via `formatTokenAmount(value, i18n, { maxDecimals: assetDecimals })` and
29
+ * append the row's `assetSymbol`.
30
+ *
31
+ * Kept raw (not pre-formatted) so the row component re-formats on every render, matching the
32
+ * `t\`…\`` translation cadence used by deposit / withdraw chrome — locale flips and time-based
33
+ * formatters (e.g. `Intl.RelativeTimeFormat`) take effect on the same React commit instead of
34
+ * waiting for the next driver poll.
35
+ */
36
+ type ActivityAmount = {
37
+ value: number;
38
+ kind: "usd";
39
+ } | {
40
+ value: number;
41
+ kind: "token";
42
+ };
43
+ /**
44
+ * One settlement row in the activity list. Pre-shaped — but never pre-formatted — by
45
+ * the driver's transformer. The row component owns string formatting; it calls Lingui's
46
+ * `useLingui()` for the active locale and threads the result through `formatUsd` /
47
+ * `formatTokenAmount` / `formatSmartRelative` / `t\`…\`` per-render. That mirrors the
48
+ * deposit/withdraw widget pattern (see `AmountEntry.tsx`, `ConfirmDeposit.tsx`) and avoids the
49
+ * "row strings stuck in old locale until next fetch" lag that pre-formatted payloads exhibit.
50
+ *
51
+ * Detail-view rendering happens off the entity's `raw: ReadonlyArray<GatewayUdaDto>` slot: the
52
+ * row carries `udaId` + `id` so the detail component can locate the matching
53
+ * `GatewaySettlementDto` and feed it back through {@link
54
+ * import("#/flows/deposit/driver/transformers").settlementToPayload} to produce a full
55
+ * `SuccessStateProps` / `ErrorStateProps` / pending payload at display time.
56
+ */
57
+ interface ActivityRowPayload {
58
+ /** Settlement id — unique within the multi-UDA envelope. The detail lookup keys on this. */
59
+ id: string;
60
+ /** Parent UDA id — settlements nest inside UDAs; the detail walker scans `udas[].settlements[]`. */
61
+ udaId: string;
62
+ /** Flow that produced this settlement. Drives the title prefix and the accessible label. */
63
+ direction: ActivityDirection;
64
+ /** Lifecycle bucket. Drives the inline status indicator (spinner / red-X / none). */
65
+ status: ActivityStatus;
66
+ /**
67
+ * Discriminated amount. For deposits this is the credited receive leg; for withdrawals it
68
+ * is the source send leg. The row component formats this through the active locale.
69
+ */
70
+ amount: ActivityAmount;
71
+ /** Settlement `updated_at` as unix-ms. The row component formats this via smart-relative. */
72
+ updatedAtMs: number;
73
+ /** Destination asset symbol — what the leading {@link import("#/shared/ui").TokenLogo} renders. */
74
+ assetSymbol: string;
75
+ /** Destination asset decimals — caps the token-amount formatter precision when `amount.kind === "token"`. */
76
+ assetDecimals: number;
77
+ /** Resolved token icon URL, when known. */
78
+ assetLogoUrl?: string;
79
+ /** EIP-155 chain id of the destination chain. */
80
+ chainId?: number;
81
+ /** Human-readable destination network name (e.g. `"Ethereum"`, `"BSC"`). */
82
+ chainName?: string;
83
+ /**
84
+ * Resolved chain glyph URL — overlaid in the corner of the asset logo. Resolved at the
85
+ * driver layer from the cached `Gateway.assets()` catalog because the lookup map lives in
86
+ * the driver closure; not locale-dependent, so component-layer re-derivation is unnecessary.
87
+ */
88
+ chainLogoUrl?: string;
89
+ }
90
+ /**
91
+ * Entity payload for the owner-scoped activity surface. Backed by the multi-UDA envelope from
92
+ * `GET /gateway/{owner}`; `rows` is sorted newest-first and capped at 20 entries per fetch.
93
+ */
94
+ interface ActivityPayload {
95
+ /** Newest-first row payloads, capped at 20 per fetch. */
96
+ rows: ReadonlyArray<ActivityRowPayload>;
97
+ /**
98
+ * Merchant brand label echoed back on `uda.metadata.brand_name` (server-injected per-merchant
99
+ * at `gateway/start` time, constant across the merchant's UDAs). Extracted from the first UDA
100
+ * whose metadata carries a non-empty value. Threaded by activity source hooks into
101
+ * `settlementContext.brandName` so deposit detail rows render the merchant brand as the
102
+ * destination label; withdraw detail rows suppress it inside
103
+ * `settlementToWidgetProps` so they keep showing the recipient address.
104
+ */
105
+ brandName?: string;
106
+ }
107
+ //#endregion
108
+ export { ActivityAmount, ActivityDirection, ActivityPayload, ActivityRowPayload, ActivityStatus, ActivityStatusType };
@@ -0,0 +1 @@
1
+ import{parseIsoMs as e}from"../../../../flows/shared/transformers/parseIsoMs.js";import{resolveDirection as t}from"./resolveDirection.js";function n(e,t){let n=t.ownerAddress.toLowerCase(),a=[];for(let t of e.udas)for(let e of t.settlements)a.push({settlement:e,uda:t});a.sort((e,t)=>e.settlement.updated_at===t.settlement.updated_at?0:e.settlement.updated_at<t.settlement.updated_at?1:-1);let o=[];for(let{settlement:e,uda:r}of a.slice(0,20))o.push(i(e,r,t,n));let s=r(e.udas);return{rows:o,...s?{brandName:s}:{}}}function r(e){for(let t of e){let e=t.metadata?.brand_name;if(typeof e!=`string`)continue;let n=e.trim();if(n.length>0)return n}}function i(n,r,i,s){let c=t(r,s),l=a(n.status),u=o(n,r),d=e(n.updated_at)??e(n.created_at)??Date.now(),f=r.destination.eip155_id?Number(r.destination.eip155_id):void 0,p=f===void 0?void 0:i.chainLogoFor?.(f),m=n.to?.logo??void 0;return{id:n.id,udaId:r.uda_id,direction:c,status:l,amount:u,updatedAtMs:d,assetSymbol:r.destination.asset_symbol,assetDecimals:r.destination.asset_decimals,...m?{assetLogoUrl:m}:{},...f===void 0?{}:{chainId:f},...r.destination.network_name?{chainName:r.destination.network_name}:{},...p?{chainLogoUrl:p}:{}}}function a(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 o(e,t){let n=e.to,r=e.from,i=n?.amount_usd??r?.amount_usd;if(i){let e=Number.parseFloat(i);if(Number.isFinite(e))return{value:e,kind:`usd`}}let a=t.destination.asset_decimals;return{value:s(n,a),kind:`token`}}function s(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}export{n as activityResponseToPayload};
@@ -8,7 +8,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
8
8
  * widget is mounted inside `Dialog.Content`.
9
9
  *
10
10
  * Optional `trailing` slot — Renders before the close X (e.g. the
11
- * activity-history icon). Defaults to the root's `headerTrailing`; pass
11
+ * activity icon). Defaults to the root's `headerTrailing`; pass
12
12
  * `trailing: null` to force the slot empty even when the root supplies a node.
13
13
  */
14
14
  declare function AmountEntryHeader({