@skip-go/widget 3.10.3 → 3.10.4

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.
@@ -43209,7 +43209,7 @@ function walletConnect(parameters) {
43209
43209
  const optionalChains = config2.chains.map((x2) => x2.id);
43210
43210
  if (!optionalChains.length)
43211
43211
  return;
43212
- const { EthereumProvider } = await import("./index.es-CPA_Zoq7.js");
43212
+ const { EthereumProvider } = await import("./index.es-DFLgSQWV.js");
43213
43213
  return await EthereumProvider.init({
43214
43214
  ...parameters,
43215
43215
  disableProviderPing: true,
@@ -44481,7 +44481,7 @@ const useIsMobileScreenSize = () => {
44481
44481
  typeof window !== "undefined" && window.innerWidth <= MAX_MOBILE_SCREEN_WIDTH
44482
44482
  );
44483
44483
  useEffect(() => {
44484
- if (window === void 0) return;
44484
+ if (typeof window === "undefined") return;
44485
44485
  const handleResize = () => {
44486
44486
  const isMobileScreenSize2 = (window == null ? void 0 : window.innerWidth) <= MAX_MOBILE_SCREEN_WIDTH;
44487
44487
  setIsMobileScreenSize(isMobileScreenSize2);
@@ -50716,7 +50716,7 @@ const useShowCosmosLedgerWarning = () => {
50716
50716
  };
50717
50717
  const name = "@skip-go/widget";
50718
50718
  const description = "Swap widget";
50719
- const version = "3.10.3";
50719
+ const version = "3.10.4";
50720
50720
  const repository = {
50721
50721
  url: "https://github.com/skip-mev/skip-go",
50722
50722
  directory: "packages/widget"
@@ -52000,14 +52000,31 @@ function formatDistanceStrict(dirtyDate, dirtyBaseDate, options) {
52000
52000
  }
52001
52001
  throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
52002
52002
  }
52003
- const getMobileDateFormat = (date) => {
52004
- const hours = String(date.getHours());
52005
- const minutes = String(date.getMinutes());
52006
- const timeZone = date.toLocaleTimeString("en-US", { timeZoneName: "short" }).split(" ").pop();
52007
- const month = date.getMonth() + 1;
52008
- const day = date.getDate();
52009
- const year = String(date.getFullYear()).slice(-2);
52010
- return `${hours}:${minutes} ${timeZone} ${month}/${day}/${year}`;
52003
+ const getMobileDateFormat = (date, timeZone) => {
52004
+ const options = {
52005
+ timeZone: void 0,
52006
+ // undefined means local time
52007
+ hour: "2-digit",
52008
+ minute: "2-digit",
52009
+ timeZoneName: "short",
52010
+ day: "2-digit",
52011
+ month: "2-digit",
52012
+ year: "2-digit",
52013
+ hour12: false
52014
+ };
52015
+ const formatter = new Intl.DateTimeFormat("en-US", options);
52016
+ const parts = formatter.formatToParts(date);
52017
+ const lookup = (type2) => {
52018
+ var _a;
52019
+ return ((_a = parts.find((p2) => p2.type === type2)) == null ? void 0 : _a.value) ?? "";
52020
+ };
52021
+ const hours = lookup("hour");
52022
+ const minutes = lookup("minute");
52023
+ const tz = lookup("timeZoneName");
52024
+ const day = lookup("day");
52025
+ const month = lookup("month");
52026
+ const year = lookup("year");
52027
+ return `${hours}:${minutes} ${tz} ${month}/${day}/${year}`;
52011
52028
  };
52012
52029
  const useTxHistory = ({
52013
52030
  txHistoryItem,
@@ -1,4 +1,4 @@
1
- import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-CydGcbEG.js";
1
+ import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-xwwhmGkv.js";
2
2
  import qg, { PROPOSAL_EXPIRY_MESSAGE } from "@walletconnect/sign-client";
3
3
  const global = globalThis || void 0 || self;
4
4
  var buffer$1 = {};
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { W, d, l, o, r } from "./index-CydGcbEG.js";
1
+ import { W, d, l, o, r } from "./index-xwwhmGkv.js";
2
2
  export {
3
3
  W as Widget,
4
4
  d as defaultTheme,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skip-go/widget",
3
3
  "description": "Swap widget",
4
- "version": "3.10.3",
4
+ "version": "3.10.4",
5
5
  "repository": {
6
6
  "url": "https://github.com/skip-mev/skip-go",
7
7
  "directory": "packages/widget"
@@ -42,7 +42,7 @@
42
42
  "@penumbra-zone/transport-dom": "^7.5.0",
43
43
  "@r2wc/react-to-web-component": "^2.0.3",
44
44
  "@sentry/react": "^8.46.0",
45
- "@skip-go/client": "1.1.2",
45
+ "@skip-go/client": "1.1.3",
46
46
  "@solana/spl-token": "^0.4.8",
47
47
  "@solana/wallet-adapter-backpack": "^0.1.14",
48
48
  "@solana/wallet-adapter-coinbase": "^0.1.19",