@stridge/kit 0.1.0-alpha.31 → 0.1.0-alpha.32

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 (60) hide show
  1. package/dist/deposit/compound/index.d.ts +1 -1
  2. package/dist/events/bus/createBus.d.ts +7 -0
  3. package/dist/events/bus/createBus.js +1 -0
  4. package/dist/events/bus/flowIdRegistry.d.ts +17 -0
  5. package/dist/events/bus/flowIdRegistry.js +1 -0
  6. package/dist/events/bus/index.js +1 -0
  7. package/dist/events/bus/metadata.js +1 -0
  8. package/dist/events/context.js +1 -0
  9. package/dist/events/emit/index.js +1 -0
  10. package/dist/events/emit/mapFailure.js +1 -0
  11. package/dist/events/emit/useDepositEmissions.js +1 -0
  12. package/dist/events/emit/useKitEmitter.js +1 -0
  13. package/dist/events/emit/useWithdrawEmissions.js +1 -0
  14. package/dist/events/hooks/index.d.ts +6 -0
  15. package/dist/events/hooks/index.js +1 -0
  16. package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
  17. package/dist/events/hooks/useCurrentFlowId.js +1 -0
  18. package/dist/events/hooks/useStableHandler.js +1 -0
  19. package/dist/events/hooks/useStridgeEvent.d.ts +8 -0
  20. package/dist/events/hooks/useStridgeEvent.js +1 -0
  21. package/dist/events/hooks/useStridgeEventBus.d.ts +33 -0
  22. package/dist/events/hooks/useStridgeEventBus.js +1 -0
  23. package/dist/events/hooks/useStridgeEvents.d.ts +6 -0
  24. package/dist/events/hooks/useStridgeEvents.js +1 -0
  25. package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
  26. package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
  27. package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
  28. package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
  29. package/dist/events/index.d.ts +14 -0
  30. package/dist/events/index.js +1 -0
  31. package/dist/events/publish.js +1 -0
  32. package/dist/events/types/deposit.d.ts +235 -0
  33. package/dist/events/types/envelope.d.ts +145 -0
  34. package/dist/events/types/index.d.ts +31 -0
  35. package/dist/events/types/kit.d.ts +23 -0
  36. package/dist/events/types/withdraw.d.ts +150 -0
  37. package/dist/flows/deposit/dialog/DepositDialog.d.ts +14 -81
  38. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  39. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  40. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
  41. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
  42. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
  43. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +27 -109
  44. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  45. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  46. package/dist/flows/withdraw/orchestrator/types.d.ts +18 -1
  47. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +5 -13
  48. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
  49. package/dist/i18n/locales/ar.js +1 -1
  50. package/dist/i18n/locales/es.js +1 -1
  51. package/dist/i18n/locales/source-keys.d.ts +1 -1
  52. package/dist/index.d.ts +9 -1
  53. package/dist/index.js +1 -1
  54. package/dist/package.js +1 -1
  55. package/dist/shared/support/SupportLink.js +1 -1
  56. package/dist/shared/terms/TermsLink.js +1 -1
  57. package/dist/stridge/StridgeProvider.js +1 -1
  58. package/package.json +7 -3
  59. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
  60. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/kit",
3
- "version": "0.1.0-alpha.31",
3
+ "version": "0.1.0-alpha.32",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [
@@ -14,6 +14,10 @@
14
14
  "import": "./dist/index.js"
15
15
  },
16
16
  "./styles.css": "./dist/styles/index.css",
17
+ "./events": {
18
+ "types": "./dist/events/index.d.ts",
19
+ "import": "./dist/events/index.js"
20
+ },
17
21
  "./deposit/compound": {
18
22
  "types": "./dist/deposit/compound/index.d.ts",
19
23
  "import": "./dist/deposit/compound/index.js"
@@ -135,8 +139,8 @@
135
139
  },
136
140
  "scripts": {
137
141
  "build": "pnpm run i18n:compile && tsdown",
138
- "check:api": "api-extractor run && api-extractor run --config api-extractor.i18n.json",
139
- "check:api:update": "api-extractor run --local && api-extractor run --local --config api-extractor.i18n.json",
142
+ "check:api": "api-extractor run && api-extractor run --config api-extractor.i18n.json && api-extractor run --config api-extractor.events.json",
143
+ "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",
140
144
  "check:attw": "attw --pack . --profile esm-only --exclude-entrypoints ./styles.css",
141
145
  "check:isolation": "depcruise src",
142
146
  "check:publint": "publint",
@@ -1,36 +0,0 @@
1
- import { ReceiveChainPayload, ReceiveTokenOptionPayload } from "../driver/payloads.js";
2
- import { RequestWithdrawalQuoteInput } from "../driver/types.js";
3
- import { ReactNode } from "react";
4
- //#region src/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts
5
- /**
6
- * Form-level event payload — the parsed amount the user typed, alongside the raw input string.
7
- * `numeric` is `null` when the input is empty or unparseable; the host can treat that as "user
8
- * cleared the amount" rather than re-parse the raw string.
9
- */
10
- interface AmountChangedPayload {
11
- raw: string;
12
- numeric: number | null;
13
- }
14
- /**
15
- * Form-level callbacks reading off `WithdrawForm`'s local state. Optional — hosts wiring
16
- * `<WithdrawDialog>` configure them via the `events` prop, hosts using `<WithdrawForm>` directly
17
- * pass them via the form's `events` prop.
18
- */
19
- interface WithdrawFormEventCallbacks {
20
- /** Fires on every recipient-input change (no debounce). */
21
- onRecipientChanged?: (value: string) => void;
22
- /** Fires on every amount-input change with both the raw string and the parsed numeric value. */
23
- onAmountChanged?: (payload: AmountChangedPayload) => void;
24
- /** Fires when the user picks a different receive token in the form's receive-token dropdown. */
25
- onReceiveTokenChanged?: (token: ReceiveTokenOptionPayload) => void;
26
- /** Fires when the user picks a different receive chain in the form's receive-chain dropdown. */
27
- onReceiveChainChanged?: (chain: ReceiveChainPayload) => void;
28
- /**
29
- * Fires when the form fires a fresh `requestQuote` (after the 400ms debounce). The input
30
- * carries everything the driver received so the host can mirror the request shape into
31
- * analytics or pre-warm host-side caches.
32
- */
33
- onQuoteRequested?: (input: RequestWithdrawalQuoteInput) => void;
34
- }
35
- //#endregion
36
- export { WithdrawFormEventCallbacks };
@@ -1 +0,0 @@
1
- "use client";import{createContext as e,use as t}from"react";import{jsx as n}from"react/jsx-runtime";const r=e({});r.displayName=`WithdrawDialogEventsContext`;function i({events:e,children:t}){return n(r,{value:e,children:t})}function a(){return t(r)}export{i as WithdrawDialogEventsProvider,a as useWithdrawDialogEvents};