@dhedge/trading-widget 3.4.0-canary.8 → 3.4.0

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 (52) hide show
  1. package/README.md +15 -15
  2. package/core-kit/abi/index.d.ts +0 -1
  3. package/core-kit/const/config.d.ts +1 -1
  4. package/core-kit/const/contracts/base.d.ts +0 -1
  5. package/core-kit/const/default-data.d.ts +1 -1
  6. package/core-kit/const/error.d.ts +1 -5
  7. package/core-kit/const/tokens/base.d.ts +0 -1
  8. package/core-kit/types/index.d.ts +0 -1
  9. package/core-kit/types/trading.types.d.ts +4 -1
  10. package/core-kit/utils/error.d.ts +0 -7
  11. package/core-kit/utils/number.d.ts +1 -1
  12. package/core-kit/utils/token.d.ts +5 -1
  13. package/core-kit/utils/transaction.d.ts +3 -3
  14. package/index-6b0d77d6.js +41041 -0
  15. package/index-d9748020.cjs +217 -0
  16. package/index.cjs +1 -1
  17. package/index.d.ts +1 -2
  18. package/index.js +222 -225
  19. package/package.json +1 -1
  20. package/{pyth-adapter-e0c9d117.cjs → pyth-adapter-310b1266.cjs} +1 -1
  21. package/{pyth-adapter-16890d39.js → pyth-adapter-cf357270.js} +1 -1
  22. package/style.css +1 -1
  23. package/core-kit/abi/limit-order.d.ts +0 -736
  24. package/core-kit/types/react-query.types.d.ts +0 -11
  25. package/index-8fe1068f.cjs +0 -217
  26. package/index-fab8a095.js +0 -42741
  27. package/limit-orders/component/common/action-button.d.ts +0 -10
  28. package/limit-orders/component/common/modal-content.d.ts +0 -8
  29. package/limit-orders/component/common/modal-dialog.d.ts +0 -9
  30. package/limit-orders/component/common/price-input.d.ts +0 -20
  31. package/limit-orders/component/input-group/input-group.d.ts +0 -2
  32. package/limit-orders/component/input-group/input-group.hooks.d.ts +0 -15
  33. package/limit-orders/component/limit-order-button/limit-order-button.d.ts +0 -2
  34. package/limit-orders/component/limit-order-button/limit-order-button.hooks.d.ts +0 -9
  35. package/limit-orders/component/limit-order-button/network-check-button.d.ts +0 -2
  36. package/limit-orders/component/limit-order-button/network-check-button.hooks.d.ts +0 -4
  37. package/limit-orders/component/limit-order-modal.d.ts +0 -11
  38. package/limit-orders/component/limit-order-modal.hooks.d.ts +0 -6
  39. package/limit-orders/constants.d.ts +0 -1
  40. package/limit-orders/hooks/state.d.ts +0 -2
  41. package/limit-orders/hooks/use-invalidate-limit-order-query.d.ts +0 -1
  42. package/limit-orders/hooks/use-listen-limit-order-execution.d.ts +0 -1
  43. package/limit-orders/hooks/use-on-limit-order-settled.d.ts +0 -2
  44. package/limit-orders/hooks/use-user-limit-order.d.ts +0 -753
  45. package/limit-orders/index.d.ts +0 -2
  46. package/limit-orders/providers/state-provider/reducer.d.ts +0 -7
  47. package/limit-orders/providers/state-provider/state-provider.d.ts +0 -6
  48. package/limit-orders/providers/state-provider/state-provider.types.d.ts +0 -51
  49. package/limit-orders/providers/theme-provider/index.d.ts +0 -2
  50. package/limit-orders/providers/theme-provider/theme-provider.d.ts +0 -3
  51. package/limit-orders/providers/theme-provider/theme-provider.types.d.ts +0 -132
  52. package/limit-orders/utils.d.ts +0 -23
@@ -1,10 +0,0 @@
1
- import type { FC, PropsWithChildren } from 'react';
2
- export interface ActionButtonProps {
3
- onClick?: () => void;
4
- highlighted?: boolean;
5
- disabled?: boolean;
6
- className?: string;
7
- type?: 'submit' | 'button';
8
- loading?: boolean;
9
- }
10
- export declare const ActionButton: FC<PropsWithChildren<ActionButtonProps>>;
@@ -1,8 +0,0 @@
1
- import type { FC, PropsWithChildren, ReactNode } from 'react';
2
- export interface ModalContentProps {
3
- title?: string;
4
- subtitle?: ReactNode;
5
- className?: string;
6
- titleClassName?: string;
7
- }
8
- export declare const ModalContent: FC<PropsWithChildren<ModalContentProps>>;
@@ -1,9 +0,0 @@
1
- import type { FC, ReactNode } from 'react';
2
- export interface BaseDialogProps {
3
- children: ReactNode;
4
- isOpen: boolean;
5
- onClose: () => void;
6
- ThemeProvider?: FC;
7
- className?: string;
8
- }
9
- export declare const ModalDialog: FC<BaseDialogProps>;
@@ -1,20 +0,0 @@
1
- import type { ChangeEvent, FC } from 'react';
2
- export interface PriceInputProps {
3
- label: string;
4
- inputValue: string;
5
- onInputChange?: (value: string) => void;
6
- autoFocus?: boolean;
7
- disabled?: boolean;
8
- placeholder?: string;
9
- price?: string | null;
10
- percentage?: string;
11
- symbol: string | undefined;
12
- }
13
- export declare const usePriceInput: ({ inputValue, onInputChange, autoFocus, }: PriceInputProps) => {
14
- inputRef: import("react").RefObject<HTMLInputElement>;
15
- value: string;
16
- autoFocus: boolean;
17
- onContainerClick: () => void;
18
- onInputChange: (e: ChangeEvent<HTMLInputElement>) => void;
19
- };
20
- export declare const PriceInput: FC<PriceInputProps>;
@@ -1,2 +0,0 @@
1
- import type { FC } from 'react';
2
- export declare const InputGroup: FC;
@@ -1,15 +0,0 @@
1
- export declare const useInputGroup: () => {
2
- takeProfitPrice: string;
3
- stopLossPrice: string;
4
- setTakeProfitPrice: (payload: string) => void;
5
- setStopLossPrice: (payload: string) => void;
6
- termsAccepted: boolean;
7
- setTermsAccepted: (payload: boolean) => void;
8
- pricingAssetPrice: string | null;
9
- takeProfitPriceDifference: string;
10
- stopLossPriceDifference: string;
11
- pricingAssetSymbol: string;
12
- isReversedOrder: boolean | undefined;
13
- takeProfitInputLabel: string;
14
- stopLossInputLabel: string;
15
- };
@@ -1,2 +0,0 @@
1
- import type { FC } from 'react';
2
- export declare const LimitOrderButton: FC;
@@ -1,9 +0,0 @@
1
- export declare const useLimitOrderButton: () => {
2
- modifyLimitOrder: () => Promise<void>;
3
- disabled: boolean;
4
- error: {
5
- title: string;
6
- hint?: string | undefined;
7
- } | null;
8
- isPending: boolean;
9
- };
@@ -1,2 +0,0 @@
1
- import type { FC, PropsWithChildren } from 'react';
2
- export declare const NetworkCheckButton: FC<PropsWithChildren>;
@@ -1,4 +0,0 @@
1
- export declare const useNetworkCheckButton: () => {
2
- isWrongNetwork: boolean;
3
- handleNetworkSwitch: () => void;
4
- };
@@ -1,11 +0,0 @@
1
- import type { FC, ReactNode } from 'react';
2
- import type { LimitOrderCallbacks, LimitOrderState } from 'limit-orders/providers/state-provider/state-provider.types';
3
- type LimitOrderModalProps = {
4
- children: (args: {
5
- onClick: () => void;
6
- isTransactionPending: boolean;
7
- }) => ReactNode;
8
- actions?: LimitOrderCallbacks;
9
- } & Pick<LimitOrderState, 'vaultAddress' | 'vaultChainId' | 'pricingAsset' | 'isReversedOrder'>;
10
- export declare const LimitOrderModal: FC<LimitOrderModalProps>;
11
- export {};
@@ -1,6 +0,0 @@
1
- export declare const useLimitOrderModal: () => {
2
- isModalOpen: boolean;
3
- onOpen: () => void;
4
- onClose: () => void;
5
- isTransactionPending: boolean;
6
- };
@@ -1 +0,0 @@
1
- export declare const LIMIT_ORDER_READ_FUNCTION_NAME = "limitOrders";
@@ -1,2 +0,0 @@
1
- export declare const useLimitOrderState: () => import("../providers/state-provider/state-provider.types").LimitOrderState;
2
- export declare const useLimitOrderActions: () => import("../providers/state-provider/state-provider.types").LimitOrderActionsState;
@@ -1 +0,0 @@
1
- export declare const useInvalidateLimitOrderQuery: () => () => void;
@@ -1 +0,0 @@
1
- export declare const useListenLimitOrderExecution: () => void;
@@ -1,2 +0,0 @@
1
- import type { Hash } from 'viem';
2
- export declare const useOnLimitOrderSettled: () => (transaction: Hash | undefined) => void;