@stridge/kit 0.1.0-alpha.50 → 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.
- package/dist/KitProvider.d.ts +11 -0
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/activity/driver/index.d.ts +3 -0
- package/dist/_internal/activity/driver/index.js +1 -0
- package/dist/_internal/drivers/stridge/index.d.ts +2 -1
- package/dist/_internal/drivers/stridge/index.js +1 -1
- package/dist/_internal/drivers/stridge-mock/index.d.ts +2 -1
- package/dist/_internal/drivers/stridge-mock/index.js +1 -1
- package/dist/activity/compound/index.d.ts +19 -0
- package/dist/activity/compound/index.js +1 -0
- package/dist/activity/dialog/index.d.ts +3 -0
- package/dist/activity/dialog/index.js +1 -0
- package/dist/activity/widgets/index.d.ts +4 -0
- package/dist/activity/widgets/index.js +1 -0
- package/dist/deposit/compound/index.d.ts +9 -9
- package/dist/deposit/widgets/index.d.ts +13 -0
- package/dist/deposit/widgets/index.js +1 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +0 -2
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +1 -2
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
- package/dist/flows/activity/compound/ActivityFlow.js +1 -0
- package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/activity/compound/components/Boundary.js +1 -0
- package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
- package/dist/flows/activity/compound/components/Steps.js +1 -0
- package/dist/flows/activity/dialog/ActivityDialog.d.ts +38 -0
- package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
- package/dist/flows/activity/driver/context.d.ts +38 -0
- package/dist/flows/activity/driver/context.js +1 -0
- package/dist/flows/activity/driver/types.d.ts +58 -0
- package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
- package/dist/flows/activity/orchestrator/controller.js +1 -0
- package/dist/flows/activity/orchestrator/index.d.ts +4 -0
- package/dist/flows/activity/orchestrator/index.js +1 -0
- package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/activity/orchestrator/reducer.js +1 -0
- package/dist/flows/activity/orchestrator/types.d.ts +71 -0
- package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
- package/dist/flows/activity/orchestrator/useActivity.js +1 -0
- package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
- package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
- package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
- package/dist/flows/activity/widgets/ActivityList.js +1 -0
- package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
- package/dist/flows/deposit/driver/types.d.ts +1 -38
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/reducer.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +43 -29
- package/dist/flows/deposit/widgets/{activity-history/DepositHistoryDetail.d.ts → activity/DepositActivityDetail.d.ts} +11 -11
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
- package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/activity/index.js +1 -0
- package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +7 -6
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +4 -3
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/driver/types.d.ts +0 -34
- package/dist/flows/withdraw/orchestrator/controller.js +1 -1
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
- package/dist/flows/withdraw/orchestrator/types.d.ts +44 -30
- package/dist/flows/withdraw/widgets/{activity-history/WithdrawHistoryDetail.d.ts → activity/WithdrawActivityDetail.d.ts} +11 -11
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
- package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
- package/dist/flows/withdraw/widgets/activity/index.js +1 -0
- package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +4 -4
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
- package/dist/format/index.d.ts +2 -1
- package/dist/format/index.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +1 -1
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/dist/shared/format/formatSmartRelative.d.ts +25 -0
- package/dist/shared/format/formatSmartRelative.js +1 -0
- package/dist/shared/format/formatUsd.js +1 -1
- package/dist/shared/icons/{HistoryIcon.d.ts → ActivityIcon.d.ts} +4 -4
- package/dist/shared/icons/{HistoryIcon.js → ActivityIcon.js} +1 -1
- package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
- package/dist/shared/orchestrator/createActivityReducers.js +1 -0
- package/dist/shared/orchestrator/index.d.ts +2 -0
- package/dist/shared/orchestrator/index.js +1 -1
- package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
- package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
- package/dist/shared/ui/Card/Card.d.ts +12 -9
- package/dist/shared/ui/Card/Card.js +1 -1
- package/dist/shared/ui/Card/Card.styles.js +1 -1
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +1 -1
- package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
- package/dist/shared/widgets/{activity-history → activity}/ActivityTrigger.styles.js +1 -1
- package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/Activity.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
- package/dist/shared/widgets/{activity-history/compound/ActivityHistoryDetail.d.ts → activity/compound/ActivityDetail.d.ts} +24 -17
- package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
- package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
- package/dist/shared/widgets/{activity-history/compound/components/HistoryHeader.d.ts → activity/compound/components/ActivityHeader.d.ts} +8 -8
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
- package/dist/shared/widgets/{activity-history → activity}/compound/components/Empty.d.ts +3 -3
- package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/{activity-history → activity}/compound/components/ErrorView.d.ts +7 -7
- package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
- package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
- package/dist/shared/widgets/activity/compound/components/List.js +1 -0
- package/dist/shared/widgets/{activity-history → activity}/compound/components/Row.d.ts +13 -16
- package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
- package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
- package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/context.js +1 -0
- package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
- package/dist/shared/widgets/activity/compound/index.js +1 -0
- package/dist/shared/widgets/activity/payloads.d.ts +108 -0
- package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +2 -3
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +1 -1
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +2 -2
- package/dist/stridge/StridgeProvider.d.ts +10 -6
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +4 -0
- package/dist/withdraw/compound/index.d.ts +6 -6
- package/dist/withdraw/widgets/index.d.ts +7 -0
- package/dist/withdraw/widgets/index.js +1 -0
- package/package.json +22 -6
- package/dist/_internal/deposit/widgets/index.d.ts +0 -13
- package/dist/_internal/deposit/widgets/index.js +0 -1
- package/dist/_internal/withdraw/widgets/index.d.ts +0 -7
- package/dist/_internal/withdraw/widgets/index.js +0 -1
- package/dist/activity-history/compound/index.d.ts +0 -9
- package/dist/activity-history/compound/index.js +0 -1
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +0 -1
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +0 -38
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +0 -1
- package/dist/flows/deposit/widgets/activity-history/index.d.ts +0 -2
- package/dist/flows/deposit/widgets/activity-history/index.js +0 -1
- package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +0 -1
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +0 -1
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +0 -36
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +0 -1
- package/dist/flows/withdraw/widgets/activity-history/index.d.ts +0 -2
- package/dist/flows/withdraw/widgets/activity-history/index.js +0 -1
- package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +0 -1
- package/dist/shared/widgets/activity-history/ActivityTrigger.js +0 -1
- package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +0 -1
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +0 -95
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +0 -1
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +0 -22
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +0 -1
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +0 -1
- package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +0 -1
- package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +0 -21
- package/dist/shared/widgets/activity-history/compound/Row.slots.js +0 -1
- package/dist/shared/widgets/activity-history/compound/Row.styles.js +0 -1
- package/dist/shared/widgets/activity-history/compound/components/Empty.js +0 -1
- package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +0 -1
- package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +0 -1
- package/dist/shared/widgets/activity-history/compound/components/List.d.ts +0 -23
- package/dist/shared/widgets/activity-history/compound/components/List.js +0 -1
- package/dist/shared/widgets/activity-history/compound/components/Row.js +0 -1
- package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +0 -1
- package/dist/shared/widgets/activity-history/compound/context.d.ts +0 -79
- package/dist/shared/widgets/activity-history/compound/context.js +0 -1
- package/dist/shared/widgets/activity-history/payloads.d.ts +0 -81
- package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +0 -1
- /package/dist/shared/widgets/{activity-history → activity}/index.js +0 -0
- /package/dist/shared/widgets/{activity-history → activity}/transformers/resolveDirection.js +0 -0
|
@@ -44,8 +44,7 @@ interface AmountEntryProps {
|
|
|
44
44
|
sendToken: AmountEntryToken;
|
|
45
45
|
/**
|
|
46
46
|
* Destination token rendered on the right side of the FlowPill, and
|
|
47
|
-
* surfaced as the title fallback (`Deposit ${symbol}`
|
|
48
|
-
* when `<KitProvider brandName="…">` is configured).
|
|
47
|
+
* surfaced as the title fallback (`Deposit ${symbol}`).
|
|
49
48
|
*/
|
|
50
49
|
receiveToken: AmountEntryToken;
|
|
51
50
|
/**
|
|
@@ -136,7 +135,7 @@ interface AmountEntryProps {
|
|
|
136
135
|
/**
|
|
137
136
|
* Optional trailing-edge chrome rendered next to the `<Dialog.CloseButton />` inside
|
|
138
137
|
* `AmountEntry.Header`. Use this slot to attach flow-specific affordances such as the
|
|
139
|
-
* activity
|
|
138
|
+
* activity trigger. Per-Header `trailing` overrides this root-level prop; pass
|
|
140
139
|
* `trailing: null` on the Header to force the slot empty.
|
|
141
140
|
*/
|
|
142
141
|
headerTrailing?: ReactNode;
|
|
@@ -12,7 +12,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
12
12
|
* null` to force the chevron hidden even when the root supplies one.
|
|
13
13
|
*
|
|
14
14
|
* Optional `trailing` slot — Renders before the close X (e.g. the
|
|
15
|
-
* activity
|
|
15
|
+
* activity icon). Defaults to the root's `headerTrailing`; pass
|
|
16
16
|
* `trailing: null` to force the slot empty even when the root supplies a node.
|
|
17
17
|
*/
|
|
18
18
|
declare function AssetPickerHeader({
|
|
@@ -5,7 +5,7 @@ import { OnchainBalanceResponse, OnchainTokenDto } from "@stridge/sdk";
|
|
|
5
5
|
//#region src/shared/widgets/asset-picker/compound/types.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Destination token surfaced through context. The Header uses it to generate the default modal title
|
|
8
|
-
* (e.g. `"Deposit USDC"
|
|
8
|
+
* (e.g. `"Deposit USDC"`).
|
|
9
9
|
*/
|
|
10
10
|
interface AssetPickerToken {
|
|
11
11
|
/**
|
|
@@ -147,7 +147,7 @@ interface AssetPickerProps {
|
|
|
147
147
|
/**
|
|
148
148
|
* Optional trailing-edge chrome rendered next to the `<Dialog.CloseButton />` inside
|
|
149
149
|
* `AssetPicker.Header`. Use this slot to attach flow-specific affordances such as the
|
|
150
|
-
* activity
|
|
150
|
+
* activity trigger. Per-Header `trailing` overrides this root-level prop; pass
|
|
151
151
|
* `trailing: null` on the Header to force the slot empty.
|
|
152
152
|
*/
|
|
153
153
|
headerTrailing?: ReactNode;
|
|
@@ -160,12 +160,16 @@ interface StridgeStorageConfig {
|
|
|
160
160
|
namespace?: string;
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
|
-
* Eager-bootstrap opt-in. Set on `<StridgeProvider prefetch={…}>` to fire the driver `arm()`
|
|
164
|
-
* mount instead of waiting for `useDeposit().open()` / `usePrefetchDeposit()`
|
|
165
|
-
* shapes:
|
|
163
|
+
* Eager-bootstrap opt-in. Set on `<StridgeProvider prefetch={…}>` to fire the driver `arm()`
|
|
164
|
+
* at mount instead of waiting for `useDeposit().open()` / `usePrefetchDeposit()` (or the
|
|
165
|
+
* activity equivalents) to do it. Two shapes:
|
|
166
166
|
*
|
|
167
|
-
* - `true` — arm every enabled flow at mount.
|
|
168
|
-
* - `("deposit" | "withdraw")[]` — arm only the listed
|
|
167
|
+
* - `true` — arm every enabled flow at mount, including the activity driver.
|
|
168
|
+
* - `("deposit" | "withdraw" | "activity")[]` — arm only the listed surfaces. Activity may be
|
|
169
|
+
* listed alone (for hosts that mount only `<ActivityDialog>` — a `deposit` or `withdraw` flow
|
|
170
|
+
* is still configured so the activity owner resolves) or paired with a flow. Listing
|
|
171
|
+
* `"deposit"` or `"withdraw"` implicitly arms `"activity"` too — the activity surface is
|
|
172
|
+
* cross-flow content and any per-flow prefetch implies its envelope is wanted.
|
|
169
173
|
*
|
|
170
174
|
* Default is unset (no eager arm). Reach for this only when the host KNOWS the dialog will
|
|
171
175
|
* open (e.g. a checkout page whose entire purpose is the gateway widget). The default trade —
|
|
@@ -173,7 +177,7 @@ interface StridgeStorageConfig {
|
|
|
173
177
|
* other integration; flipping the prop "just to be safe" re-creates the eager-load problem at
|
|
174
178
|
* a different layer.
|
|
175
179
|
*/
|
|
176
|
-
type StridgePrefetchConfig = true | ReadonlyArray<"deposit" | "withdraw">;
|
|
180
|
+
type StridgePrefetchConfig = true | ReadonlyArray<"deposit" | "withdraw" | "activity">;
|
|
177
181
|
declare namespace StridgeProvider {
|
|
178
182
|
interface Props {
|
|
179
183
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{createStridgeCatalog as n}from"../drivers/stridge/catalog.js";import{
|
|
1
|
+
"use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{createStridgeCatalog as n}from"../drivers/stridge/catalog.js";import{createStridgeActivityDriver as r}from"../drivers/stridge/createStridgeActivityDriver.js";import{createStridgeDepositDriver as i}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as a}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{createBus as ee}from"../events/bus/createBus.js";import{createFlowIdRegistry as te}from"../events/bus/flowIdRegistry.js";import{createMetadataStore as o}from"../events/bus/metadata.js";import"../events/bus/index.js";import{KitProvider as s}from"../KitProvider.js";import{resolveMerchantLink as c}from"../shared/merchant-link/resolveMerchantLink.js";import"../shared/merchant-link/index.js";import{useIntercomMerchantContext as l}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as u}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useDeepMemo as d}from"../shared/utils/useDeepMemo.js";import{ConnectWalletContext as f}from"../shared/wallet/ConnectWalletContext.js";import{DepositOwnerContext as p}from"./depositOwner.js";import{useOptionalWagmi as m}from"./optionalWagmi.js";import{createStubDepositDriver as h,createStubWithdrawDriver as g}from"./stubs.js";import{useEffect as _,useMemo as v,useRef as y}from"react";import{jsx as b}from"react/jsx-runtime";function x({gatewayKey:x,environment:S,asset:C,flows:w,appearance:T,i18n:E,storage:D,dev:O,support:k,terms:ne,prefetch:A,connectWallet:j,className:re,children:ie}){if(!w.deposit&&!w.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!C)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:M,address:N}=m(),P=v(()=>t(E??{}),[E?.locale,E?.messages]),F=y(P);F.current=P;let I=d(C),L=d(w.deposit),R=d(w.withdraw),z=I.networkId,B=I.symbol,V=L?.owner?.address??N??O?.userAddressOverride,H=R?.owner.address,U=v(()=>n({projectKey:x,...S?{environment:S}:{}}),[x,S]),W=v(()=>{if(!(!L||!V))return i({userAddress:V,projectKey:x,destination:{network_id:z,asset_symbol:B,to_address:L.destination.address},wagmiConfig:M,catalog:U,getI18n:()=>F.current,...S?{environment:S}:{},...L.minAmountUsd===void 0?{}:{minAmountUsd:L.minAmountUsd},...L.maxAmountUsd===void 0?{}:{maxAmountUsd:L.maxAmountUsd},...L.metadata?{metadata:L.metadata}:{}})},[L,V,x,S,z,B,M,U]),G=v(()=>h(),[]),K=L?W??G:void 0,q=v(()=>{if(!(!R||!H))return a({userAddress:H,projectKey:x,currency:{networkId:z,assetSymbol:B},wagmiConfig:M,catalog:U,getI18n:()=>F.current,...S?{environment:S}:{},...R.minAmountUsd===void 0?{}:{minAmountUsd:R.minAmountUsd},...R.maxAmountUsd===void 0?{}:{maxAmountUsd:R.maxAmountUsd},...R.metadata?{metadata:R.metadata}:{}})},[R,H,x,S,z,B,M,U]),J=v(()=>g(),[]),Y=R?q??J:void 0,X=(L?V:void 0)??(R?H:void 0),Z=v(()=>{if(X)return r({userAddress:X,projectKey:x,catalog:U,...S?{environment:S}:{}})},[X,x,S,U]);_(()=>{if(!A)return;let e=A===!0||A.includes(`deposit`),t=A===!0||A.includes(`withdraw`),n=A===!0||A.includes(`activity`)||e||t;e&&W?.arm(),t&&q?.arm(),n&&Z?.arm()},[A,W,q,Z]);let ae=v(()=>L?{resolved:V!==void 0}:null,[L,V]),oe=v(()=>j?{onClick:j.onClick,...j.label===void 0?{}:{label:j.label}}:null,[j?.onClick,j?.label]),Q=V??H,$=u({gatewayKey:x,environment:S??`production`,assetChain:z,assetSymbol:B,...Q?{userAddress:Q}:{},...W?{depositDriver:W}:{}});return l(c(k?{url:k.url,onSelect:k.onOpen}:void 0).kind===`default`?$:null),b(e,{value:v(()=>({bus:ee(),flowIds:te(),metadata:o()}),[]),children:b(f,{value:oe,children:b(p,{value:ae,children:b(s,{theme:T?.theme,accent:T?.accent,radius:T?.radius,direction:T?.direction,attribution:T?.attribution,i18n:E,storage:D?.driver,storageNamespace:D?.namespace,className:re,support:k,merchantContext:$,terms:ne,...K?{deposit:K}:{},...L?.methods?{depositMethods:L.methods}:{},...Y?{withdraw:Y}:{},...Z?{activity:Z}:{},children:ie})})})})}export{x as StridgeProvider};
|
package/dist/stridge/stubs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e,
|
|
1
|
+
const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e,activity:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e,activity:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),prepareWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};
|
package/dist/styles/index.css
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferToken, ConfirmTransferTransfer } from "../../shared/widgets/confirm-transfer/compound/types.js";
|
|
2
2
|
import { ConfirmTransfer } from "../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";
|
|
3
3
|
import { CONFIRM_TRANSFER_SLOTS, ConfirmTransferSlot } from "../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js";
|
|
4
|
-
import { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken } from "../../shared/widgets/amount-entry/compound/types.js";
|
|
5
|
-
import { AmountEntry } from "../../shared/widgets/amount-entry/compound/AmountEntry.js";
|
|
6
|
-
import { AMOUNT_ENTRY_SLOTS, AmountEntrySlot } from "../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";
|
|
7
|
-
import { AssetOption, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerToken } from "../../shared/widgets/asset-picker/compound/types.js";
|
|
8
|
-
import { AssetPicker } from "../../shared/widgets/asset-picker/compound/AssetPicker.js";
|
|
9
|
-
import { ASSET_PICKER_SLOTS, AssetPickerSlot } from "../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";
|
|
10
4
|
import { ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef } from "../../shared/widgets/error-state/compound/types.js";
|
|
11
5
|
import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
|
|
12
6
|
import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
|
|
@@ -16,6 +10,12 @@ import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widget
|
|
|
16
10
|
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
|
|
17
11
|
import { SuccessState } from "../../shared/widgets/success-state/compound/SuccessState.js";
|
|
18
12
|
import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/success-state/compound/SuccessState.slots.js";
|
|
13
|
+
import { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken } from "../../shared/widgets/amount-entry/compound/types.js";
|
|
14
|
+
import { AmountEntry } from "../../shared/widgets/amount-entry/compound/AmountEntry.js";
|
|
15
|
+
import { AMOUNT_ENTRY_SLOTS, AmountEntrySlot } from "../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";
|
|
16
|
+
import { AssetOption, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerToken } from "../../shared/widgets/asset-picker/compound/types.js";
|
|
17
|
+
import { AssetPicker } from "../../shared/widgets/asset-picker/compound/AssetPicker.js";
|
|
18
|
+
import { ASSET_PICKER_SLOTS, AssetPickerSlot } from "../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";
|
|
19
19
|
import { WithdrawStepsProps } from "../../flows/withdraw/widgets/withdraw/compound/components/Steps.js";
|
|
20
20
|
import { Withdraw } from "../../flows/withdraw/widgets/withdraw/compound/Withdraw.js";
|
|
21
21
|
import { WITHDRAW_SLOTS, WithdrawSlot } from "../../flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WithdrawActivityDetail } from "../../flows/withdraw/widgets/activity/WithdrawActivityDetail.js";
|
|
2
|
+
import { WithdrawActivityList } from "../../flows/withdraw/widgets/activity/WithdrawActivityList.js";
|
|
3
|
+
import { WithdrawError } from "../../flows/withdraw/widgets/withdraw-error/WithdrawError.js";
|
|
4
|
+
import { WithdrawForm } from "../../flows/withdraw/widgets/withdraw-form/WithdrawForm.js";
|
|
5
|
+
import { WithdrawInProgress } from "../../flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js";
|
|
6
|
+
import { WithdrawSuccess } from "../../flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js";
|
|
7
|
+
export { WithdrawActivityDetail, WithdrawActivityList, WithdrawError, WithdrawForm, WithdrawInProgress, WithdrawSuccess };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{WithdrawActivityDetail as e}from"../../flows/withdraw/widgets/activity/WithdrawActivityDetail.js";import{WithdrawActivityList as t}from"../../flows/withdraw/widgets/activity/WithdrawActivityList.js";import"../../flows/withdraw/widgets/activity/index.js";import{WithdrawError as n}from"../../flows/withdraw/widgets/withdraw-error/WithdrawError.js";import"../../flows/withdraw/widgets/withdraw-error/index.js";import{WithdrawForm as r}from"../../flows/withdraw/widgets/withdraw-form/WithdrawForm.js";import"../../flows/withdraw/widgets/withdraw-form/index.js";import{WithdrawInProgress as i}from"../../flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js";import"../../flows/withdraw/widgets/withdraw-in-progress/index.js";import{WithdrawSuccess as a}from"../../flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js";import"../../flows/withdraw/widgets/withdraw-success/index.js";export{e as WithdrawActivityDetail,t as WithdrawActivityList,n as WithdrawError,r as WithdrawForm,i as WithdrawInProgress,a as WithdrawSuccess};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stridge/kit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"types": "./dist/deposit/dialog/index.d.ts",
|
|
27
27
|
"import": "./dist/deposit/dialog/index.js"
|
|
28
28
|
},
|
|
29
|
+
"./deposit/widgets": {
|
|
30
|
+
"types": "./dist/deposit/widgets/index.d.ts",
|
|
31
|
+
"import": "./dist/deposit/widgets/index.js"
|
|
32
|
+
},
|
|
29
33
|
"./withdraw/compound": {
|
|
30
34
|
"types": "./dist/withdraw/compound/index.d.ts",
|
|
31
35
|
"import": "./dist/withdraw/compound/index.js"
|
|
@@ -34,9 +38,21 @@
|
|
|
34
38
|
"types": "./dist/withdraw/dialog/index.d.ts",
|
|
35
39
|
"import": "./dist/withdraw/dialog/index.js"
|
|
36
40
|
},
|
|
37
|
-
"./
|
|
38
|
-
"types": "./dist/
|
|
39
|
-
"import": "./dist/
|
|
41
|
+
"./withdraw/widgets": {
|
|
42
|
+
"types": "./dist/withdraw/widgets/index.d.ts",
|
|
43
|
+
"import": "./dist/withdraw/widgets/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./activity/compound": {
|
|
46
|
+
"types": "./dist/activity/compound/index.d.ts",
|
|
47
|
+
"import": "./dist/activity/compound/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./activity/dialog": {
|
|
50
|
+
"types": "./dist/activity/dialog/index.d.ts",
|
|
51
|
+
"import": "./dist/activity/dialog/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./activity/widgets": {
|
|
54
|
+
"types": "./dist/activity/widgets/index.d.ts",
|
|
55
|
+
"import": "./dist/activity/widgets/index.js"
|
|
40
56
|
},
|
|
41
57
|
"./ui": {
|
|
42
58
|
"types": "./dist/ui/index.d.ts",
|
|
@@ -143,8 +159,8 @@
|
|
|
143
159
|
},
|
|
144
160
|
"scripts": {
|
|
145
161
|
"build": "pnpm run i18n:compile && tsdown",
|
|
146
|
-
"check:api": "api-extractor run && api-extractor run --config api-extractor.i18n.json && api-extractor run --config api-extractor.events.json && api-extractor run --config api-extractor.
|
|
147
|
-
"check:api:update": "api-extractor run --local && api-extractor run --local --config api-extractor.i18n.json && api-extractor run --local --config api-extractor.events.json && api-extractor run --local --config api-extractor.
|
|
162
|
+
"check:api": "api-extractor run && api-extractor run --config api-extractor.i18n.json && api-extractor run --config api-extractor.events.json && api-extractor run --config api-extractor.deposit.widgets.json && api-extractor run --config api-extractor.withdraw.widgets.json && api-extractor run --config api-extractor.activity.compound.json && api-extractor run --config api-extractor.activity.dialog.json && api-extractor run --config api-extractor.activity.widgets.json",
|
|
163
|
+
"check:api:update": "api-extractor run --local && api-extractor run --local --config api-extractor.i18n.json && api-extractor run --local --config api-extractor.events.json && api-extractor run --local --config api-extractor.deposit.widgets.json && api-extractor run --local --config api-extractor.withdraw.widgets.json && api-extractor run --local --config api-extractor.activity.compound.json && api-extractor run --local --config api-extractor.activity.dialog.json && api-extractor run --local --config api-extractor.activity.widgets.json",
|
|
148
164
|
"check:attw": "attw --pack . --profile esm-only --exclude-entrypoints ./styles.css",
|
|
149
165
|
"check:isolation": "depcruise src",
|
|
150
166
|
"check:publint": "publint",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DialogShell, DialogShellControls, DialogShellProps } from "../../../shared/dialog/DialogShell.js";
|
|
2
|
-
import { DepositHistoryDetail } from "../../../flows/deposit/widgets/activity-history/DepositHistoryDetail.js";
|
|
3
|
-
import { DepositHistoryList } from "../../../flows/deposit/widgets/activity-history/DepositHistoryList.js";
|
|
4
|
-
import { AmountEntry } from "../../../flows/deposit/widgets/amount-entry/AmountEntry.js";
|
|
5
|
-
import { AssetPicker } from "../../../flows/deposit/widgets/asset-picker/AssetPicker.js";
|
|
6
|
-
import { ConfirmDeposit } from "../../../flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js";
|
|
7
|
-
import { Deposit } from "../../../flows/deposit/widgets/deposit/Deposit.js";
|
|
8
|
-
import { DepositStatusBanner } from "../../../flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js";
|
|
9
|
-
import { ErrorState } from "../../../flows/deposit/widgets/error-state/ErrorState.js";
|
|
10
|
-
import { ProcessingState } from "../../../flows/deposit/widgets/processing-state/ProcessingState.js";
|
|
11
|
-
import { SuccessState } from "../../../flows/deposit/widgets/success-state/SuccessState.js";
|
|
12
|
-
import { TransferCrypto } from "../../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";
|
|
13
|
-
export { AmountEntry, AssetPicker, ConfirmDeposit, Deposit, DepositHistoryDetail, DepositHistoryList, DepositStatusBanner, DialogShell, type DialogShellControls, type DialogShellProps, ErrorState, ProcessingState, SuccessState, TransferCrypto };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DialogShell as e}from"../../../shared/dialog/DialogShell.js";import{DepositHistoryDetail as t}from"../../../flows/deposit/widgets/activity-history/DepositHistoryDetail.js";import{DepositHistoryList as n}from"../../../flows/deposit/widgets/activity-history/DepositHistoryList.js";import"../../../flows/deposit/widgets/activity-history/index.js";import{AmountEntry as r}from"../../../flows/deposit/widgets/amount-entry/AmountEntry.js";import"../../../flows/deposit/widgets/amount-entry/index.js";import{AssetPicker as i}from"../../../flows/deposit/widgets/asset-picker/AssetPicker.js";import"../../../flows/deposit/widgets/asset-picker/index.js";import{ConfirmDeposit as a}from"../../../flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js";import"../../../flows/deposit/widgets/confirm-deposit/index.js";import{Deposit as o}from"../../../flows/deposit/widgets/deposit/Deposit.js";import"../../../flows/deposit/widgets/deposit/index.js";import{DepositStatusBanner as s}from"../../../flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js";import"../../../flows/deposit/widgets/deposit-status-banner/index.js";import{ErrorState as c}from"../../../flows/deposit/widgets/error-state/ErrorState.js";import"../../../flows/deposit/widgets/error-state/index.js";import{ProcessingState as l}from"../../../flows/deposit/widgets/processing-state/ProcessingState.js";import"../../../flows/deposit/widgets/processing-state/index.js";import{SuccessState as u}from"../../../flows/deposit/widgets/success-state/SuccessState.js";import"../../../flows/deposit/widgets/success-state/index.js";import{TransferCrypto as d}from"../../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";import"../../../flows/deposit/widgets/transfer-crypto/index.js";export{r as AmountEntry,i as AssetPicker,a as ConfirmDeposit,o as Deposit,t as DepositHistoryDetail,n as DepositHistoryList,s as DepositStatusBanner,e as DialogShell,c as ErrorState,l as ProcessingState,u as SuccessState,d as TransferCrypto};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WithdrawHistoryDetail } from "../../../flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js";
|
|
2
|
-
import { WithdrawHistoryList } from "../../../flows/withdraw/widgets/activity-history/WithdrawHistoryList.js";
|
|
3
|
-
import { WithdrawError } from "../../../flows/withdraw/widgets/withdraw-error/WithdrawError.js";
|
|
4
|
-
import { WithdrawForm } from "../../../flows/withdraw/widgets/withdraw-form/WithdrawForm.js";
|
|
5
|
-
import { WithdrawInProgress } from "../../../flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js";
|
|
6
|
-
import { WithdrawSuccess } from "../../../flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js";
|
|
7
|
-
export { WithdrawError, WithdrawForm, WithdrawHistoryDetail, WithdrawHistoryList, WithdrawInProgress, WithdrawSuccess };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{WithdrawHistoryDetail as e}from"../../../flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js";import{WithdrawHistoryList as t}from"../../../flows/withdraw/widgets/activity-history/WithdrawHistoryList.js";import"../../../flows/withdraw/widgets/activity-history/index.js";import{WithdrawError as n}from"../../../flows/withdraw/widgets/withdraw-error/WithdrawError.js";import"../../../flows/withdraw/widgets/withdraw-error/index.js";import{WithdrawForm as r}from"../../../flows/withdraw/widgets/withdraw-form/WithdrawForm.js";import"../../../flows/withdraw/widgets/withdraw-form/index.js";import{WithdrawInProgress as i}from"../../../flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js";import"../../../flows/withdraw/widgets/withdraw-in-progress/index.js";import{WithdrawSuccess as a}from"../../../flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js";import"../../../flows/withdraw/widgets/withdraw-success/index.js";export{n as WithdrawError,r as WithdrawForm,e as WithdrawHistoryDetail,t as WithdrawHistoryList,i as WithdrawInProgress,a as WithdrawSuccess};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActivityHistoryPayload, ActivityHistoryRowPayload } from "../../shared/widgets/activity-history/payloads.js";
|
|
2
|
-
import { ActivityHistoryHeader, ActivityHistoryListHeader } from "../../shared/widgets/activity-history/compound/components/HistoryHeader.js";
|
|
3
|
-
import { ActivityHistoryRowProps } from "../../shared/widgets/activity-history/compound/components/Row.js";
|
|
4
|
-
import { ActivityHistory } from "../../shared/widgets/activity-history/compound/ActivityHistory.js";
|
|
5
|
-
import { ACTIVITY_HISTORY_SLOTS, ActivityHistorySlot } from "../../shared/widgets/activity-history/compound/ActivityHistory.slots.js";
|
|
6
|
-
import { ActivityHistoryDetail } from "../../shared/widgets/activity-history/compound/ActivityHistoryDetail.js";
|
|
7
|
-
import { ActivityHistorySourceProvider, ActivityHistorySourceValue, useActivityHistorySource } from "../../shared/widgets/activity-history/compound/context.js";
|
|
8
|
-
import { ACTIVITY_HISTORY_ROW_SLOTS, ActivityHistoryRowSlot } from "../../shared/widgets/activity-history/compound/Row.slots.js";
|
|
9
|
-
export { ACTIVITY_HISTORY_ROW_SLOTS, ACTIVITY_HISTORY_SLOTS, ActivityHistory, ActivityHistoryDetail, ActivityHistoryHeader, ActivityHistoryListHeader, type ActivityHistoryPayload, type ActivityHistoryRowPayload, type ActivityHistoryRowProps, type ActivityHistoryRowSlot, type ActivityHistorySlot, ActivityHistorySourceProvider, type ActivityHistorySourceValue, useActivityHistorySource };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ACTIVITY_HISTORY_SLOTS as e}from"../../shared/widgets/activity-history/compound/ActivityHistory.slots.js";import{ActivityHistorySourceProvider as t,useActivityHistorySource as n}from"../../shared/widgets/activity-history/compound/context.js";import{ActivityHistoryHeader as r,ActivityHistoryListHeader as i}from"../../shared/widgets/activity-history/compound/components/HistoryHeader.js";import{ACTIVITY_HISTORY_ROW_SLOTS as a}from"../../shared/widgets/activity-history/compound/Row.slots.js";import{ActivityHistory as o}from"../../shared/widgets/activity-history/compound/ActivityHistory.js";import{ActivityHistoryDetail as s}from"../../shared/widgets/activity-history/compound/ActivityHistoryDetail.js";export{a as ACTIVITY_HISTORY_ROW_SLOTS,e as ACTIVITY_HISTORY_SLOTS,o as ActivityHistory,s as ActivityHistoryDetail,r as ActivityHistoryHeader,i as ActivityHistoryListHeader,t as ActivityHistorySourceProvider,n as useActivityHistorySource};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{ActivityHistorySourceProvider as e}from"../../../../shared/widgets/activity-history/compound/context.js";import{ActivityHistoryDetail as t}from"../../../../shared/widgets/activity-history/compound/ActivityHistoryDetail.js";import"../../../../activity-history/compound/index.js";import{useDepositActivityHistorySource as n}from"./useDepositActivityHistorySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i}){let{sourceValue:a,step:o}=n();return o!==`historyDetail`||!a?null:r(e,{value:a,children:r(t,{children:i})})}(function(e){e.Processing=t.Processing,e.Succeeded=t.Succeeded,e.Failed=t.Failed})(i||={});export{i as DepositHistoryDetail};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ActivityHistoryEmpty } from "../../../../shared/widgets/activity-history/compound/components/Empty.js";
|
|
2
|
-
import { ActivityHistoryErrorView } from "../../../../shared/widgets/activity-history/compound/components/ErrorView.js";
|
|
3
|
-
import { ActivityHistoryHeader, ActivityHistoryListHeader } from "../../../../shared/widgets/activity-history/compound/components/HistoryHeader.js";
|
|
4
|
-
import { ActivityHistoryList } from "../../../../shared/widgets/activity-history/compound/components/List.js";
|
|
5
|
-
import { ActivityHistoryRow } from "../../../../shared/widgets/activity-history/compound/components/Row.js";
|
|
6
|
-
import { ComponentProps, ReactNode } from "react";
|
|
7
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
//#region src/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts
|
|
10
|
-
interface DepositHistoryListOwnProps {
|
|
11
|
-
/**
|
|
12
|
-
* Optional custom composition forwarded to the underlying `<ActivityHistory>` compound.
|
|
13
|
-
* Defaults to the compound's `<Header /> + <List />` shape.
|
|
14
|
-
*/
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Orchestrated activity-history list wrapper for the deposit dialog. Bridges the deposit
|
|
19
|
-
* flow's snapshot + actions + FSM state into the cross-flow `<ActivityHistory>` compound's
|
|
20
|
-
* source value. Renders `null` while the FSM is not on `historyList` — the dialog's step
|
|
21
|
-
* router only matches the active step, but the no-op guard keeps the component safe to mount
|
|
22
|
-
* in custom dialog compositions that skip the step router.
|
|
23
|
-
*/
|
|
24
|
-
declare function DepositHistoryList({
|
|
25
|
-
children,
|
|
26
|
-
...props
|
|
27
|
-
}: ComponentProps<"div"> & DepositHistoryListOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
28
|
-
declare namespace DepositHistoryList {
|
|
29
|
-
type Props = ComponentProps<"div"> & DepositHistoryListOwnProps;
|
|
30
|
-
const Header: typeof ActivityHistoryHeader;
|
|
31
|
-
const ListHeader: typeof ActivityHistoryListHeader;
|
|
32
|
-
const List: typeof ActivityHistoryList;
|
|
33
|
-
const Row: typeof ActivityHistoryRow;
|
|
34
|
-
const Empty: typeof ActivityHistoryEmpty;
|
|
35
|
-
const ErrorView: typeof ActivityHistoryErrorView;
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
|
-
export { DepositHistoryList };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{ActivityHistorySourceProvider as e}from"../../../../shared/widgets/activity-history/compound/context.js";import{ActivityHistory as t}from"../../../../shared/widgets/activity-history/compound/ActivityHistory.js";import"../../../../activity-history/compound/index.js";import{useDepositActivityHistorySource as n}from"./useDepositActivityHistorySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i,...a}){let{sourceValue:o,step:s}=n();return s!==`historyList`||!o?null:r(e,{value:o,children:r(t,{...a,children:i})})}(function(e){e.Header=t.Header,e.ListHeader=t.ListHeader,e.List=t.List,e.Row=t.Row,e.Empty=t.Empty,e.ErrorView=t.ErrorView})(i||={});export{i as DepositHistoryList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./DepositHistoryDetail.js";import"./DepositHistoryList.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useDepositDriverInstance as e,useDepositSnapshot as t}from"../../driver/context.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as r,useDepositEffectiveState as i}from"../../orchestrator/controller.js";import{defaultBlockExplorers as a}from"../../../../shared/utils/explorers.js";import{useCallback as o,useMemo as s}from"react";function c(){let c=t(),l=r(),u=e(),d=i(),{i18n:f}=n(),p=o(e=>{u.refreshHistory?.(e)},[u]),m=d.name===`historyList`||d.name===`historyDetail`,h=d.name===`historyDetail`?d.ctx.settlementId:void 0;return{sourceValue:s(()=>{if(!m)return null;let e=c.wallet,t=e.status===`ready`||e.status===`stale`?e.payload.address.value:`0x0000000000000000000000000000000000000000`,n=c.brand,r=n.status===`ready`||n.status===`stale`?n.payload.name:void 0,i={i18n:f,sourceWallet:{name:`Wallet`,address:t},explorers:a(),...r?{brandName:r}:{}};return{entity:c.history,refresh:p,selectSettlement:l.selectSettlement,back:l.back,...h===void 0?{}:{settlementId:h},settlementContext:i}},[c,l,m,h,f,p]),settlementId:h,step:d.name===`historyList`?`historyList`:d.name===`historyDetail`?`historyDetail`:`other`}}export{c as useDepositActivityHistorySource};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{ActivityHistorySourceProvider as e}from"../../../../shared/widgets/activity-history/compound/context.js";import{ActivityHistoryDetail as t}from"../../../../shared/widgets/activity-history/compound/ActivityHistoryDetail.js";import"../../../../activity-history/compound/index.js";import{useWithdrawActivityHistorySource as n}from"./useWithdrawActivityHistorySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i}){let{sourceValue:a,step:o}=n();return o!==`historyDetail`||!a?null:r(e,{value:a,children:r(t,{children:i})})}(function(e){e.Processing=t.Processing,e.Succeeded=t.Succeeded,e.Failed=t.Failed})(i||={});export{i as WithdrawHistoryDetail};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ActivityHistoryEmpty } from "../../../../shared/widgets/activity-history/compound/components/Empty.js";
|
|
2
|
-
import { ActivityHistoryErrorView } from "../../../../shared/widgets/activity-history/compound/components/ErrorView.js";
|
|
3
|
-
import { ActivityHistoryHeader, ActivityHistoryListHeader } from "../../../../shared/widgets/activity-history/compound/components/HistoryHeader.js";
|
|
4
|
-
import { ActivityHistoryList } from "../../../../shared/widgets/activity-history/compound/components/List.js";
|
|
5
|
-
import { ActivityHistoryRow } from "../../../../shared/widgets/activity-history/compound/components/Row.js";
|
|
6
|
-
import { ComponentProps, ReactNode } from "react";
|
|
7
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
//#region src/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts
|
|
10
|
-
interface WithdrawHistoryListOwnProps {
|
|
11
|
-
/**
|
|
12
|
-
* Optional custom composition forwarded to the underlying `<ActivityHistory>` compound.
|
|
13
|
-
* Defaults to the compound's `<Header /> + <List />` shape.
|
|
14
|
-
*/
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Orchestrated activity-history list wrapper for the withdraw dialog. Mirrors
|
|
19
|
-
* {@link import("#/flows/deposit/widgets/activity-history").DepositHistoryList}. Renders
|
|
20
|
-
* `null` while the FSM is not on `historyList`.
|
|
21
|
-
*/
|
|
22
|
-
declare function WithdrawHistoryList({
|
|
23
|
-
children,
|
|
24
|
-
...props
|
|
25
|
-
}: ComponentProps<"div"> & WithdrawHistoryListOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
26
|
-
declare namespace WithdrawHistoryList {
|
|
27
|
-
type Props = ComponentProps<"div"> & WithdrawHistoryListOwnProps;
|
|
28
|
-
const Header: typeof ActivityHistoryHeader;
|
|
29
|
-
const ListHeader: typeof ActivityHistoryListHeader;
|
|
30
|
-
const List: typeof ActivityHistoryList;
|
|
31
|
-
const Row: typeof ActivityHistoryRow;
|
|
32
|
-
const Empty: typeof ActivityHistoryEmpty;
|
|
33
|
-
const ErrorView: typeof ActivityHistoryErrorView;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { WithdrawHistoryList };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{ActivityHistorySourceProvider as e}from"../../../../shared/widgets/activity-history/compound/context.js";import{ActivityHistory as t}from"../../../../shared/widgets/activity-history/compound/ActivityHistory.js";import"../../../../activity-history/compound/index.js";import{useWithdrawActivityHistorySource as n}from"./useWithdrawActivityHistorySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i,...a}){let{sourceValue:o,step:s}=n();return s!==`historyList`||!o?null:r(e,{value:o,children:r(t,{...a,children:i})})}(function(e){e.Header=t.Header,e.ListHeader=t.ListHeader,e.List=t.List,e.Row=t.Row,e.Empty=t.Empty,e.ErrorView=t.ErrorView})(i||={});export{i as WithdrawHistoryList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./WithdrawHistoryDetail.js";import"./WithdrawHistoryList.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawDriverInstance as t,useWithdrawSnapshot as n}from"../../driver/context.js";import{useWithdrawActions as r,useWithdrawEffectiveState as i}from"../../orchestrator/controller.js";import"../../orchestrator/index.js";import{defaultBlockExplorers as a}from"../../../../shared/utils/explorers.js";import{useCallback as o,useMemo as s}from"react";function c(){let c=n(),l=r(),u=t(),d=i(),{i18n:f}=e(),p=o(e=>{u.refreshHistory?.(e)},[u]),m=d.name===`historyList`||d.name===`historyDetail`,h=d.name===`historyDetail`?d.ctx.settlementId:void 0;return{sourceValue:s(()=>{if(!m)return null;let e={i18n:f,sourceWallet:{name:`Wallet`,address:`0x0000000000000000000000000000000000000000`},explorers:a()};return{entity:c.history,refresh:p,selectSettlement:l.selectSettlement,back:l.back,...h===void 0?{}:{settlementId:h},settlementContext:e}},[c,l,m,h,f,p]),settlementId:h,step:d.name===`historyList`?`historyList`:d.name===`historyDetail`?`historyDetail`:`other`}}export{c as useWithdrawActivityHistorySource};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../i18n/useLingui.js";import"../../../i18n/index.js";import{HistoryIcon as t}from"../../icons/HistoryIcon.js";import"../../../icons/index.js";import{IconButton as n}from"../../ui/IconButton/IconButton.js";import"../../../ui/index.js";import{styles as r}from"./ActivityTrigger.styles.js";import{jsx as i}from"react/jsx-runtime";import*as a from"@stylexjs/stylex";function o({onOpen:o}){let{_:s}=e();return i(n,{"aria-label":s({id:`Vj6_6B`,message:`View activity history`}),onClick:o,children:i(t,{"aria-hidden":!0,...a.props(r.icon)})})}export{o as ActivityTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{settlementToPayload as e}from"../../../../flows/deposit/driver/transformers/settlementToPayload.js";import{resolveDirection as t}from"../transformers/resolveDirection.js";function n(n,r,i){let a=i.sourceWallet.address.toLowerCase();for(let o of n)for(let n of o.settlements)if(n.id===r)return{payload:e(n,o,i),uda:o,direction:t(o,a)};return null}export{n as settlementToWidgetProps};
|
|
@@ -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};
|