@kodiak-finance/orderly-react-app 2.9.2-alpha.1 → 2.9.3

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.mjs CHANGED
@@ -2,10 +2,10 @@ import { createContext, useContext, useMemo, useCallback, Component, useEffect,
2
2
  import { useTrack, OrderlyConfigProvider, useAccount, ERROR_MSG_CODES, useLocalStorage, useTrackingInstance, useRestrictedInfo, MarketCategoriesConfigProvider, useEventEmitter, useSymbolsInfo, useOrderlyContext, useAllBrokers, useUpdatedRef, useDebouncedCallback, useStorageChain, useChains, useConfig, useWalletConnector, useKeyStore, useSessionStorage, useWalletSubscription, useSettleSubscription, useWS, useStorageLedgerAddress, formatSymbolWithBroker, parseJSON } from '@kodiak-finance/orderly-hooks';
3
3
  import { OrderlyPluginProvider, LocaleProvider, TooltipProvider, ModalProvider, Toaster, Flex, cn, Text, Button, DARK_THEME_CSS_VARS, OrderlyThemeProvider, useCanLinkDevice, toast, modal, parseNumber } from '@kodiak-finance/orderly-ui';
4
4
  import { AccountStatusEnum, SDKError, ABSTRACT_CHAIN_ID_MAP, ChainNamespace, TrackerEventName, OrderStatus, AlgoOrderRootType } from '@kodiak-finance/orderly-types';
5
- import { useTranslation, i18n, useLocaleCode, LocaleEnum } from '@kodiak-finance/orderly-i18n';
5
+ import { useTranslation, Translation, useLocaleCode, LocaleEnum, i18n } from '@kodiak-finance/orderly-i18n';
6
6
  import { parseChainIdToNumber, windowGuard, praseChainIdToNumber, capitalizeString, getTimestamp } from '@kodiak-finance/orderly-utils';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
- import { zhCN, enUS } from 'date-fns/locale';
8
+ import { zhCN, he, faIR, arSA, enUS } from 'date-fns/locale';
9
9
 
10
10
  // src/provider/orderlyAppProvider.tsx
11
11
  var useBootstrap = () => {
@@ -193,6 +193,9 @@ function useUILocale() {
193
193
  return useMemo(() => {
194
194
  const calendarLocale = {
195
195
  [LocaleEnum.en]: enUS,
196
+ [LocaleEnum.ar]: arSA,
197
+ [LocaleEnum.fa]: faIR,
198
+ [LocaleEnum.he]: he,
196
199
  [LocaleEnum.zh]: zhCN
197
200
  // [LocaleEnum.ja]: ja,
198
201
  // [LocaleEnum.es]: es,
@@ -253,7 +256,7 @@ var useAssetconvertEvent = () => {
253
256
  }
254
257
  );
255
258
  return () => unsubscribe();
256
- }, []);
259
+ }, [t, ws]);
257
260
  };
258
261
  function useCurrentChainId(defaultChain) {
259
262
  const { storageChain, setStorageChain } = useStorageChain();
@@ -990,7 +993,7 @@ var ErrorBoundary = class extends Component {
990
993
  }
991
994
  render() {
992
995
  if (this.state.hasError) {
993
- return /* @__PURE__ */ jsxs(
996
+ return /* @__PURE__ */ jsx(Translation, { children: (t) => /* @__PURE__ */ jsxs(
994
997
  Flex,
995
998
  {
996
999
  direction: "column",
@@ -1010,7 +1013,7 @@ var ErrorBoundary = class extends Component {
1010
1013
  ),
1011
1014
  intensity: 80,
1012
1015
  weight: "bold",
1013
- children: this.props.title || i18n.t("errorBoundary.title")
1016
+ children: this.props.title || t("errorBoundary.title")
1014
1017
  }
1015
1018
  ),
1016
1019
  /* @__PURE__ */ jsx(
@@ -1024,7 +1027,7 @@ var ErrorBoundary = class extends Component {
1024
1027
  ),
1025
1028
  weight: "semibold",
1026
1029
  intensity: 36,
1027
- children: this.props.description || i18n.t("errorBoundary.description")
1030
+ children: this.props.description || t("errorBoundary.description")
1028
1031
  }
1029
1032
  ),
1030
1033
  /* @__PURE__ */ jsxs(
@@ -1041,14 +1044,14 @@ var ErrorBoundary = class extends Component {
1041
1044
  variant: "gradient",
1042
1045
  size: "md",
1043
1046
  children: [
1044
- /* @__PURE__ */ jsx(RefreshIcon, { className: "oui-mr-1" }),
1045
- this.props.refreshButtonText || i18n.t("errorBoundary.refresh")
1047
+ /* @__PURE__ */ jsx(RefreshIcon, { className: "oui-me-1" }),
1048
+ this.props.refreshButtonText || t("errorBoundary.refresh")
1046
1049
  ]
1047
1050
  }
1048
1051
  )
1049
1052
  ]
1050
1053
  }
1051
- );
1054
+ ) });
1052
1055
  }
1053
1056
  return this.props.children;
1054
1057
  }
@@ -1262,21 +1265,49 @@ function useCanTrade() {
1262
1265
  }
1263
1266
 
1264
1267
  // src/constants/changesets.ts
1265
- var SDK_VERSION = "2.9.2-alpha.0";
1268
+ var SDK_VERSION = "2.9.3";
1266
1269
  var CHANGESETS = {
1270
+ "2.9.3": {
1271
+ date: "2026-06-05",
1272
+ title: "Orderly SDK 3.1.0 sync with right-to-left language support",
1273
+ summary: "Aligned the SDK with the Orderly SDK 3.1.0 update, headlined by full right-to-left (RTL) language support so Arabic, Hebrew, and Persian render with correctly mirrored layouts. Also improved max order quantity accuracy using the current order reference price and hardened account registration.",
1274
+ highlights: [
1275
+ "Right-to-left layout support \u2014 UI now mirrors correctly (document direction plus logical spacing/alignment) when the active language is Arabic, Hebrew, or Persian, across trading, charts, affiliate, and markets surfaces",
1276
+ "More accurate max order quantity \u2014 order entry now uses the current order reference price from the best bid/ask, improving max-size calculations for limit orders and isolated margin",
1277
+ "Hardened account registration with a dedicated registration-nonce flow",
1278
+ "Synced internal integrations and app surfaces to the new Orderly SDK 3.1.0 behavior"
1279
+ ],
1280
+ packages: [
1281
+ "kodiak-orderly-i18n",
1282
+ "kodiak-orderly-ui",
1283
+ "kodiak-orderly-hooks",
1284
+ "kodiak-orderly-core",
1285
+ "kodiak-orderly-trading",
1286
+ "kodiak-orderly-chart",
1287
+ "kodiak-orderly-affiliate",
1288
+ "kodiak-orderly-markets",
1289
+ "kodiak-orderly-layout-split",
1290
+ "kodiak-orderly-app"
1291
+ ],
1292
+ type: "improvement"
1293
+ },
1267
1294
  "2.9.2": {
1268
1295
  date: "2026-05-06",
1269
1296
  title: "Orderly SDK 3.0.2 sync",
1270
1297
  summary: "Aligned the SDK with the latest Orderly SDK 3.0.2 update and staged the release as the first alpha prerelease for the next patch version.",
1271
1298
  highlights: [
1272
- "Synced internal integrations and app surfaces to the new Orderly SDK 3.0.2 behavior"
1299
+ "Synced internal integrations and app surfaces to the new Orderly SDK 3.0.2 behavior",
1300
+ "Fixed leverage not updating after switching to isolated margin mode",
1301
+ "Fixed stale order-entry state causing incorrect symbol/margin-mode behavior when switching between cross and isolated margin",
1302
+ "Added support for deposits from exchanges / other wallets via an exclusive deposit flow"
1273
1303
  ],
1274
1304
  packages: [
1275
1305
  "kodiak-orderly-app",
1276
1306
  "kodiak-orderly-core",
1277
1307
  "kodiak-orderly-hooks",
1278
1308
  "kodiak-orderly-types",
1279
- "kodiak-orderly-ui"
1309
+ "kodiak-orderly-ui",
1310
+ "kodiak-orderly-trading"
1280
1311
  ],
1281
1312
  type: "improvement"
1282
1313
  },