@orbs-network/spot-react 0.0.4 → 0.0.6
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/ccip-CtSUe45L.js +149 -0
- package/dist/index-vzISTdG1.js +42004 -0
- package/dist/spot-react/package.json.d.ts +63 -0
- package/dist/spot-react/src/chains.d.ts +3 -0
- package/dist/spot-react/src/chains.d.ts.map +1 -0
- package/dist/spot-react/src/components/TokenLogo.d.ts +9 -0
- package/dist/spot-react/src/components/TokenLogo.d.ts.map +1 -0
- package/dist/spot-react/src/components/order-details.d.ts +79 -0
- package/dist/spot-react/src/components/order-details.d.ts.map +1 -0
- package/dist/spot-react/src/consts.d.ts +13 -0
- package/dist/spot-react/src/consts.d.ts.map +1 -0
- package/dist/spot-react/src/context/twap-context.d.ts +6 -0
- package/dist/spot-react/src/context/twap-context.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts +438 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/order-hooks.d.ts +212 -0
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-base-order.d.ts +79 -0
- package/dist/spot-react/src/hooks/use-base-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-build-repermit-order-data-callback.ts.d.ts +37 -0
- package/dist/spot-react/src/hooks/use-build-repermit-order-data-callback.ts.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-current-order.d.ts +74 -0
- package/dist/spot-react/src/hooks/use-current-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-deadline.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-deadline.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-default-values.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-default-values.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts +10 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts +18 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +18 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-history-order.d.ts +99 -0
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-input-errors.d.ts +4 -0
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts +17 -0
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-invert-trade-panel.d.ts +8 -0
- package/dist/spot-react/src/hooks/use-invert-trade-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts +40 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-market-price.d.ts +8 -0
- package/dist/spot-react/src/hooks/use-market-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-src-amount.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-src-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-swap-panel.d.ts +104 -0
- package/dist/spot-react/src/hooks/use-submit-swap-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-toggle-price.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-toggle-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-token-panel.d.ts +27 -0
- package/dist/spot-react/src/hooks/use-token-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trade-price.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-trade-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trades.d.ts +24 -0
- package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-translations.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts +37 -0
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -0
- package/dist/spot-react/src/i18n/en.json.d.ts +94 -0
- package/dist/spot-react/src/index.d.ts +9 -4
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/lib.d.ts +7 -0
- package/dist/spot-react/src/lib.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/orders/order-preview.d.ts +3 -0
- package/dist/spot-react/src/twap/components/orders/order-preview.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/orders/orders-list.d.ts +2 -0
- package/dist/spot-react/src/twap/components/orders/orders-list.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/orders/orders.d.ts +2 -0
- package/dist/spot-react/src/twap/components/orders/orders.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/submit-order-panel.d.ts +10 -0
- package/dist/spot-react/src/twap/components/submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/twap/twap.d.ts +22 -0
- package/dist/spot-react/src/twap/twap.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +418 -0
- package/dist/spot-react/src/types.d.ts.map +1 -0
- package/dist/spot-react/src/useTwapStore.d.ts +11 -0
- package/dist/spot-react/src/useTwapStore.d.ts.map +1 -0
- package/dist/spot-react/src/utils.d.ts +27 -0
- package/dist/spot-react/src/utils.d.ts.map +1 -0
- package/dist/spot-react.js +54 -64
- package/dist/spot-react.umd.cjs +63 -1
- package/package.json +13 -2
- package/dist/spot-react/src/components/SpotEventList.d.ts +0 -7
- package/dist/spot-react/src/components/SpotEventList.d.ts.map +0 -1
- package/dist/spot-react/src/components/SpotTracker.d.ts +0 -9
- package/dist/spot-react/src/components/SpotTracker.d.ts.map +0 -1
- package/dist/spot-react/src/context/SpotContext.d.ts +0 -16
- package/dist/spot-react/src/context/SpotContext.d.ts.map +0 -1
- package/dist/spot-react.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbs-network/spot-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Spot React Components - React components for Spot SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/spot-react.umd.cjs",
|
|
@@ -29,7 +29,18 @@
|
|
|
29
29
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@orbs-network/spot
|
|
32
|
+
"@orbs-network/spot": "^1.9.0",
|
|
33
|
+
"@orbs-network/swap-ui": "^0.0.61",
|
|
34
|
+
"@react-icons/all-files": "^4.1.0",
|
|
35
|
+
"@tanstack/react-query": "^5.90.12",
|
|
36
|
+
"bignumber.js": "^9.3.1",
|
|
37
|
+
"moment": "^2.30.1",
|
|
38
|
+
"react-error-boundary": "^6.0.0",
|
|
39
|
+
"react-number-format": "^5.4.4",
|
|
40
|
+
"react-virtuoso": "^4.17.0",
|
|
41
|
+
"viem": "^2.43.3",
|
|
42
|
+
"zustand": "^5.0.9",
|
|
43
|
+
"@orbs-network/spot-sdk": "0.0.6"
|
|
33
44
|
},
|
|
34
45
|
"devDependencies": {
|
|
35
46
|
"@types/react": "^19.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SpotEventList.d.ts","sourceRoot":"","sources":["../../../../src/components/SpotEventList.tsx"],"names":[],"mappings":"AAGA,OAAO,qBAAqB,CAAA;AAE5B,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAc,EAAE,SAAc,EAAE,EAAE,kBAAkB,2CAwCnF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface SpotTrackerProps {
|
|
3
|
-
eventType?: string;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function SpotTracker({ eventType, children, className, }: SpotTrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=SpotTracker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SpotTracker.d.ts","sourceRoot":"","sources":["../../../../src/components/SpotTracker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,mBAAmB,CAAA;AAE1B,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAmB,EACnB,QAAQ,EACR,SAAc,GACf,EAAE,gBAAgB,2CAkBlB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Spot, SpotConfig, SpotEvent } from '../../../spot-sdk/src/index.ts';
|
|
3
|
-
interface SpotContextValue {
|
|
4
|
-
spot: Spot;
|
|
5
|
-
track: (type: string, payload?: Record<string, unknown>) => SpotEvent;
|
|
6
|
-
getEvents: () => SpotEvent[];
|
|
7
|
-
clearEvents: () => void;
|
|
8
|
-
}
|
|
9
|
-
interface SpotProviderProps {
|
|
10
|
-
config?: SpotConfig;
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}
|
|
13
|
-
export declare function SpotProvider({ config, children }: SpotProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare function useSpot(): SpotContextValue;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=SpotContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SpotContext.d.ts","sourceRoot":"","sources":["../../../../src/context/SpotContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAc,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAE1F,UAAU,gBAAgB;IACxB,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,SAAS,CAAA;IACrE,SAAS,EAAE,MAAM,SAAS,EAAE,CAAA;IAC5B,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB;AAID,UAAU,iBAAiB;IACzB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAanE;AAED,wBAAgB,OAAO,IAAI,gBAAgB,CAM1C"}
|
package/dist/spot-react.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spot-tracker{cursor:pointer;transition:transform .15s ease-out}.spot-tracker--tracked{transform:scale(.98)}.spot-event-list{font-family:system-ui,-apple-system,sans-serif;border:1px solid #e0e0e0;border-radius:8px;padding:16px;background:#fafafa}.spot-event-list__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.spot-event-list__header h3{margin:0;font-size:14px;font-weight:600;color:#333}.spot-event-list__clear{padding:4px 12px;font-size:12px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer;transition:background .15s}.spot-event-list__clear:hover{background:#f0f0f0}.spot-event-list__empty{color:#888;font-size:13px;text-align:center;padding:20px;margin:0}.spot-event-list__items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.spot-event-list__item{background:#fff;border:1px solid #eee;border-radius:6px;padding:10px}.spot-event-list__type{font-weight:600;color:#2563eb;font-size:13px}.spot-event-list__time{font-size:11px;color:#888;margin-left:8px}.spot-event-list__payload{margin:6px 0 0;font-size:11px;background:#f5f5f5;padding:6px;border-radius:4px;overflow-x:auto;color:#555}
|