@orderly.network/ui-scaffold 2.12.4 → 3.0.0-alpha.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.
- package/dist/index.d.mts +90 -41
- package/dist/index.d.ts +90 -41
- package/dist/index.js +5 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -11
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React7, { forwardRef, createContext,
|
|
1
|
+
import React7, { forwardRef, createContext, useRef, useEffect, useMemo, useCallback, useState, cloneElement, useContext, isValidElement } from 'react';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { injectable, tv, Flex, Text, Tooltip, Button, cn, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, DropdownMenuGroup, EVMAvatar, Divider, DropdownMenuItem, ChevronDownIcon, Box, PopoverRoot, PopoverAnchor, PopoverContent, SimpleDialog, Checkbox, useObserverElement, useScreen, modal, SimpleSheet, Logo, toast, VectorIcon, PeopleIcon, SwapHorizIcon, Sheet, SheetContent, ChevronLeftIcon, Dialog, DialogContent, DialogHeader, DialogTitle, DialogBody, Spinner, ChainIcon, ScrollArea, formatAddress, CopyIcon, Popover, Grid, TextField, inputFormatter, EyeIcon, EyeCloseIcon, SimpleDialogFooter, TooltipProvider, TooltipRoot, TooltipTrigger, BellIcon, TooltipContent, PopoverTrigger, PopupUnionIcon, CloseRoundFillIcon, SpotIcon, PerpsIcon, SelectedChoicesFillIcon } from '@orderly.network/ui';
|
|
4
4
|
import { useTranslation, i18n, useLanguageContext, Trans } from '@orderly.network/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { useAccount, useLocalStorage, useConfig, useTrack, WsNetworkStatus, useWalletConnector, useIndexPricesStream, useChains, useWsStatus, useSubAccountQuery, OrderlyContext, useMemoizedFn, useCollateral, usePositionStream, useMarginRatio, useLeverage, useMaintenanceStatus, useEventEmitter } from '@orderly.network/hooks';
|
|
6
6
|
import { useAppContext, useAppConfig } from '@orderly.network/react-app';
|
|
7
7
|
import { AccountStatusEnum, ABSTRACT_CHAIN_ID_MAP, EMPTY_LIST, TrackerEventName, EMPTY_OBJECT } from '@orderly.network/types';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { ChainSelectorDialogId, ChainSelectorWidget, ChainSelectorSheetId } from '@orderly.network/ui-chain-selector';
|
|
9
|
+
import { WalletConnectorModalId, WalletConnectorSheetId } from '@orderly.network/ui-connector';
|
|
10
10
|
import { useAnnouncement, NotificationUI as NotificationUI$1, AnnouncementCenterUI } from '@orderly.network/ui-notification';
|
|
11
11
|
import { Decimal, getTimestamp, windowGuard } from '@orderly.network/utils';
|
|
12
12
|
import jsQR from 'jsqr';
|
|
@@ -971,21 +971,14 @@ var useAccountMenu = () => {
|
|
|
971
971
|
isMobile
|
|
972
972
|
};
|
|
973
973
|
};
|
|
974
|
+
var InjectableAccountMenu = injectable(AccountMenu, "Account.AccountMenu");
|
|
974
975
|
var AccountMenuWidget = () => {
|
|
975
976
|
const state = useAccountMenu();
|
|
976
977
|
return /* @__PURE__ */ jsx(AccountMenu, { ...state });
|
|
977
978
|
};
|
|
978
|
-
installExtension({
|
|
979
|
-
name: "account-menu",
|
|
980
|
-
scope: ["*"],
|
|
981
|
-
positions: [ExtensionPositionEnum.AccountMenu],
|
|
982
|
-
builder: useAccountMenu,
|
|
983
|
-
__isInternal: true
|
|
984
|
-
})((props) => {
|
|
985
|
-
return /* @__PURE__ */ jsx(AccountMenu, { ...props });
|
|
986
|
-
});
|
|
987
979
|
var WalletConnectButtonExtension = () => {
|
|
988
|
-
|
|
980
|
+
const state = useAccountMenu();
|
|
981
|
+
return /* @__PURE__ */ jsx(InjectableAccountMenu, { ...state });
|
|
989
982
|
};
|
|
990
983
|
var useChainMenuScript = () => {
|
|
991
984
|
const [open2, setOpen] = useState(false);
|
|
@@ -5543,16 +5536,9 @@ var MainNavMenus = (props) => {
|
|
|
5543
5536
|
index
|
|
5544
5537
|
)) });
|
|
5545
5538
|
};
|
|
5546
|
-
|
|
5547
|
-
name: "default-main-nav-menus",
|
|
5548
|
-
scope: ["*"],
|
|
5549
|
-
positions: [ExtensionPositionEnum.MainMenus],
|
|
5550
|
-
__isInternal: true
|
|
5551
|
-
})((props) => {
|
|
5552
|
-
return /* @__PURE__ */ jsx(MainNavMenus, { ...props });
|
|
5553
|
-
});
|
|
5539
|
+
var InjectableMainNavMenus = injectable(MainNavMenus, "Layout.MainMenus");
|
|
5554
5540
|
var MainNavMenusExtension = (props) => {
|
|
5555
|
-
return /* @__PURE__ */ jsx(
|
|
5541
|
+
return /* @__PURE__ */ jsx(InjectableMainNavMenus, { ...props });
|
|
5556
5542
|
};
|
|
5557
5543
|
var MainNav = (props) => {
|
|
5558
5544
|
const { className, classNames, campaigns, campaignPosition } = props;
|