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

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 (225) 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 +9 -2
  104. package/dist/index.js +1 -1
  105. package/dist/package.js +1 -1
  106. package/dist/scope/KitScope.d.ts +9 -0
  107. package/dist/scope/KitScope.js +1 -1
  108. package/dist/scope/context.d.ts +7 -0
  109. package/dist/shared/format/formatSmartRelative.d.ts +25 -0
  110. package/dist/shared/format/formatSmartRelative.js +1 -0
  111. package/dist/shared/format/formatUsd.js +1 -1
  112. package/dist/shared/icons/{HistoryIcon.d.ts → ActivityIcon.d.ts} +4 -4
  113. package/dist/shared/icons/{HistoryIcon.js → ActivityIcon.js} +1 -1
  114. package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
  115. package/dist/shared/orchestrator/createActivityReducers.js +1 -0
  116. package/dist/shared/orchestrator/index.d.ts +2 -0
  117. package/dist/shared/orchestrator/index.js +1 -1
  118. package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
  119. package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
  120. package/dist/shared/presentation/index.js +1 -0
  121. package/dist/shared/presentation/types.d.ts +30 -0
  122. package/dist/shared/presentation/types.js +1 -0
  123. package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
  124. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
  125. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
  126. package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
  127. package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
  128. package/dist/shared/ui/Card/Card.d.ts +12 -9
  129. package/dist/shared/ui/Card/Card.js +1 -1
  130. package/dist/shared/ui/Card/Card.styles.js +1 -1
  131. package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
  132. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  133. package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
  134. package/dist/shared/ui/Drawer/Drawer.js +1 -0
  135. package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
  136. package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
  137. package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
  138. package/dist/shared/ui/Drawer/index.d.ts +2 -0
  139. package/dist/shared/ui/Drawer/index.js +1 -0
  140. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +1 -1
  141. package/dist/shared/ui/surfaceContext.d.ts +9 -0
  142. package/dist/shared/ui/surfaceContext.js +1 -0
  143. package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
  144. package/dist/shared/widgets/{activity-history → activity}/ActivityTrigger.styles.js +1 -1
  145. package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
  146. package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
  147. package/dist/shared/widgets/activity/compound/Activity.js +1 -0
  148. package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
  149. package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
  150. package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
  151. package/dist/shared/widgets/{activity-history/compound/ActivityHistoryDetail.d.ts → activity/compound/ActivityDetail.d.ts} +24 -17
  152. package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
  153. package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
  154. package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
  155. package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
  156. package/dist/shared/widgets/{activity-history/compound/components/HistoryHeader.d.ts → activity/compound/components/ActivityHeader.d.ts} +8 -8
  157. package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
  158. package/dist/shared/widgets/{activity-history → activity}/compound/components/Empty.d.ts +3 -3
  159. package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
  160. package/dist/shared/widgets/{activity-history → activity}/compound/components/ErrorView.d.ts +7 -7
  161. package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
  162. package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
  163. package/dist/shared/widgets/activity/compound/components/List.js +1 -0
  164. package/dist/shared/widgets/{activity-history → activity}/compound/components/Row.d.ts +13 -16
  165. package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
  166. package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
  167. package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
  168. package/dist/shared/widgets/activity/compound/context.js +1 -0
  169. package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
  170. package/dist/shared/widgets/activity/compound/index.js +1 -0
  171. package/dist/shared/widgets/activity/payloads.d.ts +108 -0
  172. package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
  173. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +1 -1
  174. package/dist/shared/widgets/amount-entry/compound/types.d.ts +2 -3
  175. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +1 -1
  176. package/dist/shared/widgets/asset-picker/compound/types.d.ts +2 -2
  177. package/dist/stridge/StridgeProvider.d.ts +10 -6
  178. package/dist/stridge/StridgeProvider.js +1 -1
  179. package/dist/stridge/stubs.js +1 -1
  180. package/dist/styles/index.css +89 -0
  181. package/dist/types.d.ts +2 -1
  182. package/dist/ui/index.d.ts +5 -1
  183. package/dist/ui/index.js +1 -1
  184. package/dist/withdraw/compound/index.d.ts +6 -6
  185. package/dist/withdraw/widgets/index.d.ts +3 -3
  186. package/dist/withdraw/widgets/index.js +1 -1
  187. package/package.json +14 -6
  188. package/dist/activity-history/compound/index.d.ts +0 -9
  189. package/dist/activity-history/compound/index.js +0 -1
  190. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +0 -1
  191. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +0 -38
  192. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +0 -1
  193. package/dist/flows/deposit/widgets/activity-history/index.d.ts +0 -2
  194. package/dist/flows/deposit/widgets/activity-history/index.js +0 -1
  195. package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +0 -1
  196. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +0 -1
  197. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +0 -36
  198. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +0 -1
  199. package/dist/flows/withdraw/widgets/activity-history/index.d.ts +0 -2
  200. package/dist/flows/withdraw/widgets/activity-history/index.js +0 -1
  201. package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +0 -1
  202. package/dist/shared/widgets/activity-history/ActivityTrigger.js +0 -1
  203. package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +0 -1
  204. package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +0 -95
  205. package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +0 -1
  206. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +0 -22
  207. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +0 -1
  208. package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +0 -1
  209. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +0 -1
  210. package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +0 -21
  211. package/dist/shared/widgets/activity-history/compound/Row.slots.js +0 -1
  212. package/dist/shared/widgets/activity-history/compound/Row.styles.js +0 -1
  213. package/dist/shared/widgets/activity-history/compound/components/Empty.js +0 -1
  214. package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +0 -1
  215. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +0 -1
  216. package/dist/shared/widgets/activity-history/compound/components/List.d.ts +0 -23
  217. package/dist/shared/widgets/activity-history/compound/components/List.js +0 -1
  218. package/dist/shared/widgets/activity-history/compound/components/Row.js +0 -1
  219. package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +0 -1
  220. package/dist/shared/widgets/activity-history/compound/context.d.ts +0 -79
  221. package/dist/shared/widgets/activity-history/compound/context.js +0 -1
  222. package/dist/shared/widgets/activity-history/payloads.d.ts +0 -81
  223. package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +0 -1
  224. /package/dist/shared/widgets/{activity-history → activity}/index.js +0 -0
  225. /package/dist/shared/widgets/{activity-history → activity}/transformers/resolveDirection.js +0 -0
@@ -1,95 +0,0 @@
1
- import { ActivityHistoryEmpty } from "./components/Empty.js";
2
- import { ActivityHistoryErrorView } from "./components/ErrorView.js";
3
- import { ActivityHistoryHeader, ActivityHistoryListHeader } from "./components/HistoryHeader.js";
4
- import { ActivityHistoryList } from "./components/List.js";
5
- import { ActivityHistoryRow } from "./components/Row.js";
6
- import { ComponentProps, ReactNode } from "react";
7
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
8
-
9
- //#region src/shared/widgets/activity-history/compound/ActivityHistory.d.ts
10
- interface ActivityHistoryOwnProps {
11
- /**
12
- * Optional custom composition. Defaults to `<Header /> + <List />`. Pass children to
13
- * interleave host-supplied elements between compound parts.
14
- */
15
- children?: ReactNode;
16
- }
17
- /**
18
- * Root of the `<ActivityHistory>` list compound. Flow-agnostic — every flow-specific concern
19
- * (snapshot read, action dispatch, owner address derivation) is encapsulated in the
20
- * `<ActivityHistorySourceProvider>` value the dialog mounts above. The same JSX renders from
21
- * both `<DepositDialog>` and `<WithdrawDialog>` without imports across the flow boundary.
22
- *
23
- * Mounted by the dialog's `historyList` step. The peer compound {@link ActivityHistoryDetail}
24
- * handles the per-settlement detail step; the kit's `Steps` primitive routes between them via
25
- * the FSM state name, so the slide+blur step transition is supplied automatically.
26
- *
27
- * Compound parts:
28
- * - {@link ActivityHistory.Header} — back chevron + title + close X.
29
- * - {@link ActivityHistory.ListHeader} — underlying header primitive that accepts explicit
30
- * `title` + `onBack` props. Public because the detail compound's per-kind parts mount it
31
- * inside their delegated success / error / processing composition.
32
- * - {@link ActivityHistory.List} — list body (skeleton / empty / error / rows). Pure reader
33
- * of the `history` entity; recurring updates land via the controller-mounted `watchHistory`
34
- * watcher with adaptive cadence.
35
- * - {@link ActivityHistory.Row} — single row primitive (button-semantic).
36
- * - {@link ActivityHistory.Empty} — empty-state body.
37
- * - {@link ActivityHistory.ErrorView} — initial-error body with retry.
38
- *
39
- * @example
40
- * ```tsx
41
- * <ActivityHistorySourceProvider value={sourceValue}>
42
- * <ActivityHistory />
43
- * </ActivityHistorySourceProvider>
44
- * ```
45
- *
46
- * @example Custom composition — interleave between parts
47
- * ```tsx
48
- * <ActivityHistorySourceProvider value={sourceValue}>
49
- * <ActivityHistory>
50
- * <ActivityHistory.Header />
51
- * <ActivityHistory.List />
52
- * </ActivityHistory>
53
- * </ActivityHistorySourceProvider>
54
- * ```
55
- */
56
- declare function ActivityHistory({
57
- children,
58
- ...props
59
- }: ComponentProps<"div"> & ActivityHistoryOwnProps): _$react_jsx_runtime0.JSX.Element;
60
- declare namespace ActivityHistory {
61
- type Props = ComponentProps<"div"> & ActivityHistoryOwnProps;
62
- /**
63
- * Card header — back chevron + title + close X. Mounted by the default composition above
64
- * the list body. The peer detail compound supplies its own header inside the
65
- * SuccessState / ErrorState / ProcessingState composition.
66
- */
67
- const Header: typeof ActivityHistoryHeader;
68
- /**
69
- * Underlying list-view header primitive — accepts explicit `title` and `onBack` props
70
- * and renders unconditionally. The detail compound's per-kind parts mount this inside
71
- * their delegated state composition to keep the back chevron + title affordance
72
- * consistent across the surface.
73
- */
74
- const ListHeader: typeof ActivityHistoryListHeader;
75
- /**
76
- * List body — skeleton / empty / error / rows. Pure reader; the controller-mounted
77
- * `watchHistory` watcher drives recurring updates.
78
- */
79
- const List: typeof ActivityHistoryList;
80
- /**
81
- * Single row primitive. Hosts that want a fully-headless surface can mount Row directly
82
- * with their own payload assembly.
83
- */
84
- const Row: typeof ActivityHistoryRow;
85
- /**
86
- * Empty-state body — centered icon + headline + subline.
87
- */
88
- const Empty: typeof ActivityHistoryEmpty;
89
- /**
90
- * Initial-error body — `Alert` + retry button.
91
- */
92
- const ErrorView: typeof ActivityHistoryErrorView;
93
- }
94
- //#endregion
95
- export { ActivityHistory };
@@ -1 +0,0 @@
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};
@@ -1,22 +0,0 @@
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 };
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1,21 +0,0 @@
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 };
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1,23 +0,0 @@
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 };
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1,79 +0,0 @@
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 };
@@ -1 +0,0 @@
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};
@@ -1,81 +0,0 @@
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 };
@@ -1 +0,0 @@
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};