Pārlūkot izejas kodu

chore: separate type imports from value imports

This PR separates type imports from value imports, in compliance with a newly
enforced eslint rule from the new @cprussin configs.

This rule is important as it helps prevent cases where tree shaking is less
effective due to modules getting included in the runtime build which are in fact
only used for type imports.
Connor Prussin 8 mēneši atpakaļ
vecāks
revīzija
6011903ce8
100 mainītis faili ar 284 papildinājumiem un 391 dzēšanām
  1. 2 7
      apps/api-reference/src/apis/evm/common.ts
  2. 2 1
      apps/api-reference/src/app/price-feeds/[chain]/[method]/page.tsx
  3. 2 1
      apps/api-reference/src/browser-logger.ts
  4. 2 1
      apps/api-reference/src/components/Accordion/index.tsx
  5. 6 7
      apps/api-reference/src/components/Button/index.tsx
  6. 2 2
      apps/api-reference/src/components/Code/index.tsx
  7. 2 5
      apps/api-reference/src/components/Code/shiki.ts
  8. 1 2
      apps/api-reference/src/components/Code/use-highlighted-code.tsx
  9. 11 11
      apps/api-reference/src/components/EvmApi/index.tsx
  10. 4 11
      apps/api-reference/src/components/EvmApi/parameter-input.tsx
  11. 2 1
      apps/api-reference/src/components/EvmApi/run-button.tsx
  12. 2 1
      apps/api-reference/src/components/Header/nav-link.tsx
  13. 3 2
      apps/api-reference/src/components/Input/index.tsx
  14. 1 1
      apps/api-reference/src/components/Markdown/index.tsx
  15. 2 1
      apps/api-reference/src/components/Modal/index.tsx
  16. 2 7
      apps/api-reference/src/components/Select/index.tsx
  17. 2 6
      apps/api-reference/src/components/Sidebar/index.tsx
  18. 2 4
      apps/api-reference/src/components/Tooltip/index.tsx
  19. 2 7
      apps/api-reference/src/use-price-feed-list.tsx
  20. 2 1
      apps/api-reference/src/zod-utils.ts
  21. 2 1
      apps/entropy-debugger/src/components/ui/button.tsx
  22. 2 4
      apps/entropy-debugger/src/lib/revelation.ts
  23. 2 1
      apps/entropy-debugger/src/lib/utils.ts
  24. 2 9
      apps/insights/src/components/ChartCard/index.tsx
  25. 2 1
      apps/insights/src/components/CopyButton/index.tsx
  26. 2 1
      apps/insights/src/components/FeedKey/index.tsx
  27. 4 13
      apps/insights/src/components/LayoutTransition/index.tsx
  28. 2 1
      apps/insights/src/components/LivePrices/index.tsx
  29. 2 1
      apps/insights/src/components/Overview/tab-list.tsx
  30. 2 8
      apps/insights/src/components/PriceComponentDrawer/index.tsx
  31. 8 13
      apps/insights/src/components/PriceComponentsCard/index.tsx
  32. 4 8
      apps/insights/src/components/PriceFeed/chart.tsx
  33. 2 1
      apps/insights/src/components/PriceFeed/price-feed-select.tsx
  34. 2 1
      apps/insights/src/components/PriceFeed/publishers-card.tsx
  35. 2 1
      apps/insights/src/components/PriceFeedChangePercent/index.tsx
  36. 2 1
      apps/insights/src/components/PriceFeedTag/index.tsx
  37. 2 1
      apps/insights/src/components/PriceFeeds/asset-classes-drawer.tsx
  38. 2 4
      apps/insights/src/components/PriceFeeds/index.tsx
  39. 4 4
      apps/insights/src/components/PriceFeeds/price-feeds-card.tsx
  40. 2 5
      apps/insights/src/components/Publisher/get-price-feeds.tsx
  41. 2 1
      apps/insights/src/components/Publisher/performance.tsx
  42. 2 8
      apps/insights/src/components/Publisher/price-feed-drawer-provider.tsx
  43. 2 1
      apps/insights/src/components/Publisher/price-feeds-card.tsx
  44. 2 1
      apps/insights/src/components/Publisher/top-feeds-table.tsx
  45. 6 5
      apps/insights/src/components/Publishers/publishers-card.tsx
  46. 2 4
      apps/insights/src/components/Root/footer.tsx
  47. 2 1
      apps/insights/src/components/Root/mobile-nav-tabs.tsx
  48. 2 1
      apps/insights/src/components/Root/search-button.tsx
  49. 1 2
      apps/insights/src/components/Root/search-dialog.tsx
  50. 2 4
      apps/insights/src/components/Root/support-drawer.tsx
  51. 3 2
      apps/insights/src/components/Root/tabs.tsx
  52. 4 11
      apps/insights/src/components/Root/theme-switch.tsx
  53. 2 1
      apps/insights/src/components/SemicircleMeter/index.tsx
  54. 2 1
      apps/insights/src/components/Tabs/index.tsx
  55. 2 1
      apps/insights/src/components/ZoomLayoutTransition/index.tsx
  56. 2 1
      apps/insights/src/hooks/use-data.ts
  57. 1 1
      apps/insights/src/hooks/use-live-price-data.tsx
  58. 2 1
      apps/insights/src/hooks/use-price-feeds.tsx
  59. 2 1
      apps/insights/src/services/clickhouse.ts
  60. 1 1
      apps/staking/src/api.ts
  61. 4 8
      apps/staking/src/components/AccountSummary/index.tsx
  62. 2 1
      apps/staking/src/components/CopyButton/index.tsx
  63. 4 10
      apps/staking/src/components/Dashboard/index.tsx
  64. 4 2
      apps/staking/src/components/Date/index.tsx
  65. 2 6
      apps/staking/src/components/Faq/index.tsx
  66. 2 1
      apps/staking/src/components/Governance/index.tsx
  67. 8 8
      apps/staking/src/components/Guide/index.tsx
  68. 1 1
      apps/staking/src/components/Header/current-stake-account.tsx
  69. 2 5
      apps/staking/src/components/Home/index.tsx
  70. 4 11
      apps/staking/src/components/NoWalletHome/index.tsx
  71. 9 12
      apps/staking/src/components/OracleIntegrityStaking/index.tsx
  72. 2 1
      apps/staking/src/components/Root/i18n-provider.tsx
  73. 2 1
      apps/staking/src/components/RouterProvider/index.tsx
  74. 2 1
      apps/staking/src/components/Tokens/index.tsx
  75. 2 8
      apps/staking/src/components/TransferButton/index.tsx
  76. 2 1
      apps/staking/src/components/TruncatedKey/index.tsx
  77. 4 12
      apps/staking/src/components/WalletButton/index.tsx
  78. 2 1
      apps/staking/src/components/WalletProvider/index.tsx
  79. 2 1
      apps/staking/src/hooks/use-api.tsx
  80. 2 1
      apps/staking/src/hooks/use-data.ts
  81. 4 2
      apps/staking/src/hooks/use-logger.tsx
  82. 2 7
      apps/staking/src/hooks/use-network.tsx
  83. 4 2
      apps/staking/src/middleware.ts
  84. 3 5
      governance/pyth_staking_sdk/integration-tests/all.test.ts
  85. 10 11
      governance/pyth_staking_sdk/src/pyth-staking-client.ts
  86. 6 6
      governance/pyth_staking_sdk/src/utils/position.ts
  87. 4 8
      lazer/sdk/js/src/client.ts
  88. 2 1
      lazer/sdk/js/src/socket/resilient-websocket.ts
  89. 3 2
      lazer/sdk/js/src/socket/websocket-pool.ts
  90. 2 1
      packages/app-logger/src/provider.tsx
  91. 2 6
      packages/component-library/src/Card/index.tsx
  92. 2 1
      packages/component-library/src/CrossfadeTabPanels/index.tsx
  93. 2 7
      packages/component-library/src/Drawer/index.tsx
  94. 6 8
      packages/component-library/src/MainContent/index.tsx
  95. 2 1
      packages/component-library/src/MainNavTabs/index.tsx
  96. 5 12
      packages/component-library/src/ModalDialog/index.tsx
  97. 4 2
      packages/component-library/src/Paginator/index.tsx
  98. 3 3
      packages/component-library/src/Select/index.tsx
  99. 4 6
      packages/component-library/src/SingleToggleGroup/index.tsx
  100. 2 1
      packages/component-library/src/StatCard/index.tsx

+ 2 - 7
apps/api-reference/src/apis/evm/common.ts

@@ -1,12 +1,7 @@
 import { z } from "zod";
 
-import {
-  type ReadApi,
-  type WriteApi,
-  type NetworkInfo,
-  EvmApiType,
-  Language,
-} from "../../components/EvmApi";
+import type { ReadApi, WriteApi, NetworkInfo } from "../../components/EvmApi";
+import { EvmApiType, Language } from "../../components/EvmApi";
 import { singletonArray, safeFetch } from "../../zod-utils";
 
 export const readApi = <ParameterName extends string>(

+ 2 - 1
apps/api-reference/src/app/price-feeds/[chain]/[method]/page.tsx

@@ -1,7 +1,8 @@
 "use client";
 
 import { notFound } from "next/navigation";
-import { type ComponentProps, use } from "react";
+import type { ComponentProps } from "react";
+import { use } from "react";
 
 import * as apis from "../../../../apis";
 import { EvmApi } from "../../../../components/EvmApi";

+ 2 - 1
apps/api-reference/src/browser-logger.ts

@@ -1,4 +1,5 @@
-import pino, { type Logger } from "pino";
+import type { Logger } from "pino";
+import pino from "pino";
 
 import { IS_PRODUCTION_BUILD } from "./isomorphic-config";
 

+ 2 - 1
apps/api-reference/src/components/Accordion/index.tsx

@@ -1,6 +1,7 @@
 import { Disclosure, DisclosurePanel } from "@headlessui/react";
 import { LazyMotion, AnimatePresence, m, domAnimation } from "framer-motion";
-import { type ComponentProps, type Ref, forwardRef } from "react";
+import type { ComponentProps, Ref } from "react";
+import { forwardRef } from "react";
 
 export { DisclosureButton as AccordionButton } from "@headlessui/react";
 

+ 6 - 7
apps/api-reference/src/components/Button/index.tsx

@@ -1,14 +1,13 @@
 "use client";
 
 import clsx from "clsx";
-import {
-  type ComponentProps,
-  type ElementType,
-  type MouseEvent,
-  type CSSProperties,
-  useState,
-  useCallback,
+import type {
+  ComponentProps,
+  ElementType,
+  MouseEvent,
+  CSSProperties,
 } from "react";
+import { useState, useCallback } from "react";
 
 const DEFAULT_GRADIENT_SIZE = "30rem";
 

+ 2 - 2
apps/api-reference/src/components/Code/index.tsx

@@ -1,8 +1,8 @@
 import { Transition } from "@headlessui/react";
 import { ClipboardDocumentIcon, CheckIcon } from "@heroicons/react/24/outline";
 import clsx from "clsx";
-import { useMemo, useCallback, type HTMLAttributes } from "react";
-import { useEffect, useState } from "react";
+import type { HTMLAttributes } from "react";
+import { useMemo, useCallback, useEffect, useState } from "react";
 import type { OffsetOrPosition } from "shiki";
 
 import style from "./style.module.css";

+ 2 - 5
apps/api-reference/src/components/Code/shiki.ts

@@ -1,8 +1,5 @@
-import {
-  type HighlighterCore,
-  type DecorationItem,
-  getHighlighterCore as shikiGetHighlighterCore,
-} from "shiki/core";
+import type { HighlighterCore, DecorationItem } from "shiki/core";
+import { createHighlighterCore } from "shiki/core";
 import javascript from "shiki/langs/javascript.mjs";
 import json from "shiki/langs/json.mjs";
 import solidity from "shiki/langs/solidity.mjs";

+ 1 - 2
apps/api-reference/src/components/Code/use-highlighted-code.tsx

@@ -1,8 +1,7 @@
 "use client";
 
+import type { ReactNode, RefObject } from "react";
 import {
-  type ReactNode,
-  type RefObject,
   createContext,
   useContext,
   useState,

+ 11 - 11
apps/api-reference/src/components/EvmApi/index.tsx

@@ -13,26 +13,26 @@ import { ArrowPathIcon } from "@heroicons/react/24/outline";
 import PythAbi from "@pythnetwork/pyth-sdk-solidity/abis/IPyth.json";
 import PythErrorsAbi from "@pythnetwork/pyth-sdk-solidity/abis/PythErrors.json";
 import { ChainIcon } from "connectkit";
-import {
-  type Dispatch,
-  type SetStateAction,
-  type ComponentProps,
-  type ElementType,
-  type SVGAttributes,
-  useState,
-  useCallback,
-  useMemo,
+import type {
+  Dispatch,
+  SetStateAction,
+  ComponentProps,
+  ElementType,
+  SVGAttributes,
 } from "react";
+import { useState, useCallback, useMemo } from "react";
 import { useSwitchChain, useChainId, useConfig } from "wagmi";
 import { readContract } from "wagmi/actions";
 
 import type { Parameter } from "./parameter";
 import { ParameterInput } from "./parameter-input";
-import { type EvmApiType, RunButton } from "./run-button";
+import type { EvmApiType } from "./run-button";
+import { RunButton } from "./run-button";
 import { getLogger } from "../../browser-logger";
 import { getContractAddress } from "../../evm-networks";
 import { useIsMounted } from "../../use-is-mounted";
-import { type SupportedLanguage, Code } from "../Code";
+import type { SupportedLanguage } from "../Code";
+import { Code } from "../Code";
 import { ErrorTooltip } from "../ErrorTooltip";
 import { InlineLink } from "../InlineLink";
 import { Markdown } from "../Markdown";

+ 4 - 11
apps/api-reference/src/components/EvmApi/parameter-input.tsx

@@ -8,25 +8,18 @@ import { ArrowPathIcon } from "@heroicons/react/24/outline";
 import base58 from "bs58";
 import clsx from "clsx";
 import Image from "next/image";
-import {
-  type ChangeEvent,
-  type Dispatch,
-  type SetStateAction,
-  useState,
-  useCallback,
-  useMemo,
-  useEffect,
-} from "react";
+import type { ChangeEvent, Dispatch, SetStateAction } from "react";
+import { useState, useCallback, useMemo, useEffect } from "react";
 
+import type { Parameter } from "./parameter";
 import {
-  type Parameter,
   PLACEHOLDERS,
   isValid,
   getValidationError,
   ParameterType,
 } from "./parameter";
+import type { PriceFeed } from "../../use-price-feed-list";
 import {
-  type PriceFeed,
   PriceFeedListContextType,
   usePriceFeedList,
 } from "../../use-price-feed-list";

+ 2 - 1
apps/api-reference/src/components/EvmApi/run-button.tsx

@@ -9,7 +9,8 @@ import { ContractFunctionExecutionError } from "viem";
 import { useAccount, useConfig } from "wagmi";
 import { readContract, simulateContract, writeContract } from "wagmi/actions";
 
-import { type Parameter, TRANSFORMS } from "./parameter";
+import type { Parameter } from "./parameter";
+import { TRANSFORMS } from "./parameter";
 import { getContractAddress } from "../../evm-networks";
 import { useIsMounted } from "../../use-is-mounted";
 import { Button } from "../Button";

+ 2 - 1
apps/api-reference/src/components/Header/nav-link.tsx

@@ -3,7 +3,8 @@
 import clsx from "clsx";
 import Link from "next/link";
 import { useSelectedLayoutSegment } from "next/navigation";
-import { type ComponentProps, useMemo } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 
 const baseClasses = "font-semibold text-sm py-2 px-3";
 

+ 3 - 2
apps/api-reference/src/components/Input/index.tsx

@@ -1,12 +1,13 @@
+import type { InputProps } from "@headlessui/react";
 import {
   Field,
   Label,
   Description,
   Input as HeadlessUiInput,
-  type InputProps,
 } from "@headlessui/react";
 import clsx from "clsx";
-import { type Ref, type ReactNode, forwardRef } from "react";
+import type { Ref, ReactNode } from "react";
+import { forwardRef } from "react";
 
 import { ErrorTooltip } from "../ErrorTooltip";
 

+ 1 - 1
apps/api-reference/src/components/Markdown/index.tsx

@@ -1,4 +1,4 @@
-import { type ComponentProps } from "react";
+import type { ComponentProps } from "react";
 import MarkdownComponent from "react-markdown";
 
 import { MARKDOWN_COMPONENTS } from "../../markdown-components";

+ 2 - 1
apps/api-reference/src/components/Modal/index.tsx

@@ -8,7 +8,8 @@ import {
   CloseButton,
 } from "@headlessui/react";
 import { XMarkIcon } from "@heroicons/react/24/outline";
-import { type ReactNode, Fragment } from "react";
+import type { ReactNode } from "react";
+import { Fragment } from "react";
 
 import { Button } from "../Button";
 

+ 2 - 7
apps/api-reference/src/components/Select/index.tsx

@@ -11,13 +11,8 @@ import {
   ChevronRightIcon,
 } from "@heroicons/react/24/outline";
 import clsx from "clsx";
-import {
-  type ReactNode,
-  type ChangeEvent,
-  useState,
-  useCallback,
-  useMemo,
-} from "react";
+import type { ReactNode, ChangeEvent } from "react";
+import { useState, useCallback, useMemo } from "react";
 
 import { Accordion, AccordionButton, AccordionPanel } from "../Accordion";
 

+ 2 - 6
apps/api-reference/src/components/Sidebar/index.tsx

@@ -4,12 +4,8 @@ import { Field, Label } from "@headlessui/react";
 import clsx from "clsx";
 import Link from "next/link";
 import { useSelectedLayoutSegments } from "next/navigation";
-import {
-  type HTMLAttributes,
-  useState,
-  type ComponentProps,
-  type ElementType,
-} from "react";
+import type { HTMLAttributes, ComponentProps, ElementType } from "react";
+import { useState } from "react";
 
 import * as apis from "../../apis";
 import { Select } from "../Select";

+ 2 - 4
apps/api-reference/src/components/Tooltip/index.tsx

@@ -1,7 +1,7 @@
 "use client";
 
+import type { Placement } from "@floating-ui/react";
 import {
-  type Placement,
   FloatingArrow,
   FloatingPortal,
   useFloating,
@@ -20,10 +20,8 @@ import {
   flip,
   shift,
 } from "@floating-ui/react";
+import type { ComponentProps, ElementType, Ref } from "react";
 import {
-  type ComponentProps,
-  type ElementType,
-  type Ref,
   useState,
   useMemo,
   createContext,

+ 2 - 7
apps/api-reference/src/use-price-feed-list.tsx

@@ -2,13 +2,8 @@
 
 import { PythHttpClient } from "@pythnetwork/client";
 import { Connection, PublicKey } from "@solana/web3.js";
-import {
-  type ComponentProps,
-  createContext,
-  useContext,
-  useState,
-  useEffect,
-} from "react";
+import type { ComponentProps } from "react";
+import { createContext, useContext, useState, useEffect } from "react";
 import { z } from "zod";
 
 const PYTHNET_RPC_URL = "https://api2.pythnet.pyth.network";

+ 2 - 1
apps/api-reference/src/zod-utils.ts

@@ -1,4 +1,5 @@
-import { type ZodSchema, type ZodTypeDef, z } from "zod";
+import type { ZodSchema, ZodTypeDef } from "zod";
+import { z } from "zod";
 
 export const singletonArray = <Output, Def extends ZodTypeDef, Input>(
   schema: ZodSchema<Output, Def, Input>,

+ 2 - 1
apps/entropy-debugger/src/components/ui/button.tsx

@@ -1,5 +1,6 @@
 import { Slot } from "@radix-ui/react-slot";
-import { cva, type VariantProps } from "class-variance-authority";
+import type { VariantProps } from "class-variance-authority";
+import { cva } from "class-variance-authority";
 import type { ComponentProps } from "react";
 
 import { cn } from "../../lib/utils";

+ 2 - 4
apps/entropy-debugger/src/lib/revelation.ts

@@ -2,10 +2,8 @@ import { createPublicClient, http, parseEventLogs, publicActions } from "viem";
 import { z } from "zod";
 
 import { EntropyAbi } from "./entropy-abi";
-import {
-  type EntropyDeployment,
-  EntropyDeployments,
-} from "../store/entropy-deployments";
+import type { EntropyDeployment } from "../store/entropy-deployments";
+import { EntropyDeployments } from "../store/entropy-deployments";
 
 export async function requestCallback(
   txHash: string,

+ 2 - 1
apps/entropy-debugger/src/lib/utils.ts

@@ -1,4 +1,5 @@
-import { clsx, type ClassValue } from "clsx";
+import type { ClassValue } from "clsx";
+import { clsx } from "clsx";
 import { twMerge } from "tailwind-merge";
 
 export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));

+ 2 - 9
apps/insights/src/components/ChartCard/index.tsx

@@ -3,15 +3,8 @@
 import { StatCard } from "@pythnetwork/component-library/StatCard";
 import clsx from "clsx";
 import dynamic from "next/dynamic";
-import {
-  type ElementType,
-  type ComponentProps,
-  type ReactNode,
-  Suspense,
-  useState,
-  useMemo,
-  useCallback,
-} from "react";
+import type { ElementType, ComponentProps, ReactNode } from "react";
+import { Suspense, useState, useMemo, useCallback } from "react";
 import { ResponsiveContainer, Tooltip, Line, XAxis, YAxis } from "recharts";
 import type { CategoricalChartState } from "recharts/types/chart/types";
 

+ 2 - 1
apps/insights/src/components/CopyButton/index.tsx

@@ -5,7 +5,8 @@ import { Copy } from "@phosphor-icons/react/dist/ssr/Copy";
 import { useLogger } from "@pythnetwork/app-logger";
 import { Button } from "@pythnetwork/component-library/unstyled/Button";
 import clsx from "clsx";
-import { type ComponentProps, useCallback, useEffect, useState } from "react";
+import type { ComponentProps } from "react";
+import { useCallback, useEffect, useState } from "react";
 
 import styles from "./index.module.scss";
 

+ 2 - 1
apps/insights/src/components/FeedKey/index.tsx

@@ -1,4 +1,5 @@
-import { useMemo, type ComponentProps } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 
 import { toHex, truncateHex } from "../../hex";
 import { CopyButton } from "../CopyButton";

+ 4 - 13
apps/insights/src/components/LayoutTransition/index.tsx

@@ -1,20 +1,11 @@
 "use client";
 
-import {
-  type TargetAndTransition,
-  type Target,
-  AnimatePresence,
-  motion,
-} from "motion/react";
+import type { TargetAndTransition, Target } from "motion/react";
+import { AnimatePresence, motion } from "motion/react";
 import { LayoutRouterContext } from "next/dist/shared/lib/app-router-context.shared-runtime";
 import { useSelectedLayoutSegment } from "next/navigation";
-import {
-  type ReactNode,
-  type ComponentProps,
-  useContext,
-  useEffect,
-  useRef,
-} from "react";
+import type { ReactNode, ComponentProps } from "react";
+import { useContext, useEffect, useRef } from "react";
 
 type OwnProps = {
   children: ReactNode;

+ 2 - 1
apps/insights/src/components/LivePrices/index.tsx

@@ -3,7 +3,8 @@
 import { PlusMinus } from "@phosphor-icons/react/dist/ssr/PlusMinus";
 import type { PriceData, PriceComponent } from "@pythnetwork/client";
 import { Skeleton } from "@pythnetwork/component-library/Skeleton";
-import { type ReactNode, useMemo } from "react";
+import type { ReactNode } from "react";
+import { useMemo } from "react";
 import { useNumberFormatter, useDateFormatter } from "react-aria";
 
 import styles from "./index.module.scss";

+ 2 - 1
apps/insights/src/components/Overview/tab-list.tsx

@@ -6,7 +6,8 @@ import {
 } from "@pythnetwork/component-library/unstyled/Tabs";
 import clsx from "clsx";
 import { motion } from "motion/react";
-import { type ComponentProps, useId } from "react";
+import type { ComponentProps } from "react";
+import { useId } from "react";
 
 import styles from "./tab-list.module.scss";
 

+ 2 - 8
apps/insights/src/components/PriceComponentDrawer/index.tsx

@@ -10,14 +10,8 @@ import { StatCard } from "@pythnetwork/component-library/StatCard";
 import { Table } from "@pythnetwork/component-library/Table";
 import dynamic from "next/dynamic";
 import { useRouter } from "next/navigation";
-import {
-  type ReactNode,
-  Suspense,
-  useState,
-  useRef,
-  useCallback,
-  useMemo,
-} from "react";
+import type { ReactNode } from "react";
+import { Suspense, useState, useRef, useCallback, useMemo } from "react";
 import {
   RouterProvider,
   useDateFormatter,

+ 8 - 13
apps/insights/src/components/PriceComponentsCard/index.tsx

@@ -8,28 +8,23 @@ import { Paginator } from "@pythnetwork/component-library/Paginator";
 import { SearchInput } from "@pythnetwork/component-library/SearchInput";
 import { Select } from "@pythnetwork/component-library/Select";
 import { SingleToggleGroup } from "@pythnetwork/component-library/SingleToggleGroup";
-import {
-  type RowConfig,
-  type ColumnConfig,
-  type SortDescriptor,
-  Table,
+import type {
+  RowConfig,
+  ColumnConfig,
+  SortDescriptor,
 } from "@pythnetwork/component-library/Table";
+import { Table } from "@pythnetwork/component-library/Table";
 import clsx from "clsx";
 import { useQueryState, parseAsStringEnum, parseAsBoolean } from "nuqs";
-import {
-  type ReactNode,
-  Fragment,
-  Suspense,
-  useMemo,
-  useCallback,
-} from "react";
+import type { ReactNode } from "react";
+import { Fragment, Suspense, useMemo, useCallback } from "react";
 import { useFilter, useCollator } from "react-aria";
 
 import styles from "./index.module.scss";
 import { useQueryParamFilterPagination } from "../../hooks/use-query-param-filter-pagination";
 import { Cluster } from "../../services/pyth";
+import type { StatusName } from "../../status";
 import {
-  type StatusName,
   STATUS_NAMES,
   Status as StatusType,
   statusNameToStatus,

+ 4 - 8
apps/insights/src/components/PriceFeed/chart.tsx

@@ -2,15 +2,11 @@
 
 import { useLogger } from "@pythnetwork/app-logger";
 import { useResizeObserver } from "@react-hookz/web";
-import {
-  type IChartApi,
-  type ISeriesApi,
-  type UTCTimestamp,
-  LineStyle,
-  createChart,
-} from "lightweight-charts";
+import type { IChartApi, ISeriesApi, UTCTimestamp } from "lightweight-charts";
+import { LineSeries, LineStyle, createChart } from "lightweight-charts";
 import { useTheme } from "next-themes";
-import { type RefObject, useEffect, useRef, useCallback } from "react";
+import type { RefObject } from "react";
+import { useEffect, useRef, useCallback } from "react";
 import { z } from "zod";
 
 import theme from "./theme.module.scss";

+ 2 - 1
apps/insights/src/components/PriceFeed/price-feed-select.tsx

@@ -16,7 +16,8 @@ import { SearchField } from "@pythnetwork/component-library/unstyled/SearchField
 import { Select } from "@pythnetwork/component-library/unstyled/Select";
 import { Input } from "@pythnetwork/component-library/unstyled/TextField";
 import clsx from "clsx";
-import { type ReactNode, useMemo, useState } from "react";
+import type { ReactNode } from "react";
+import { useMemo, useState } from "react";
 import { useCollator, useFilter } from "react-aria";
 
 import styles from "./price-feed-select.module.scss";

+ 2 - 1
apps/insights/src/components/PriceFeed/publishers-card.tsx

@@ -3,7 +3,8 @@
 import { useLogger } from "@pythnetwork/app-logger";
 import { Switch } from "@pythnetwork/component-library/Switch";
 import { useQueryState, parseAsString, parseAsBoolean } from "nuqs";
-import { type ComponentProps, Suspense, useCallback, useMemo } from "react";
+import type { ComponentProps } from "react";
+import { Suspense, useCallback, useMemo } from "react";
 
 import { Cluster, ClusterToName } from "../../services/pyth";
 import { PriceComponentDrawer } from "../PriceComponentDrawer";

+ 2 - 1
apps/insights/src/components/PriceFeedChangePercent/index.tsx

@@ -1,6 +1,7 @@
 "use client";
 
-import { type ComponentProps, createContext, use } from "react";
+import type { ComponentProps } from "react";
+import { createContext, use } from "react";
 import { z } from "zod";
 
 import { StateType, useData } from "../../hooks/use-data";

+ 2 - 1
apps/insights/src/components/PriceFeedTag/index.tsx

@@ -2,7 +2,8 @@
 
 import { Skeleton } from "@pythnetwork/component-library/Skeleton";
 import clsx from "clsx";
-import { type ComponentProps, type ReactNode, Fragment } from "react";
+import type { ComponentProps, ReactNode } from "react";
+import { Fragment } from "react";
 
 import styles from "./index.module.scss";
 import { usePriceFeeds } from "../../hooks/use-price-feeds";

+ 2 - 1
apps/insights/src/components/PriceFeeds/asset-classes-drawer.tsx

@@ -15,7 +15,8 @@ import {
   useQueryStates,
   createSerializer,
 } from "nuqs";
-import { type ReactNode, useMemo } from "react";
+import type { ReactNode } from "react";
+import { useMemo } from "react";
 import { useCollator } from "react-aria";
 
 type Props = {

+ 2 - 4
apps/insights/src/components/PriceFeeds/index.tsx

@@ -5,10 +5,8 @@ import { ClockCountdown } from "@phosphor-icons/react/dist/ssr/ClockCountdown";
 import { Star } from "@phosphor-icons/react/dist/ssr/Star";
 import { Badge } from "@pythnetwork/component-library/Badge";
 import { Button } from "@pythnetwork/component-library/Button";
-import {
-  type Props as CardProps,
-  Card,
-} from "@pythnetwork/component-library/Card";
+import type { Props as CardProps } from "@pythnetwork/component-library/Card";
+import { Card } from "@pythnetwork/component-library/Card";
 import { Drawer, DrawerTrigger } from "@pythnetwork/component-library/Drawer";
 import { StatCard } from "@pythnetwork/component-library/StatCard";
 import { TabList } from "@pythnetwork/component-library/TabList";

+ 4 - 4
apps/insights/src/components/PriceFeeds/price-feeds-card.tsx

@@ -7,11 +7,11 @@ import { Card } from "@pythnetwork/component-library/Card";
 import { Paginator } from "@pythnetwork/component-library/Paginator";
 import { SearchInput } from "@pythnetwork/component-library/SearchInput";
 import { Select } from "@pythnetwork/component-library/Select";
-import {
-  type RowConfig,
-  type SortDescriptor,
-  Table,
+import type {
+  RowConfig,
+  SortDescriptor,
 } from "@pythnetwork/component-library/Table";
+import { Table } from "@pythnetwork/component-library/Table";
 import { useQueryState, parseAsString } from "nuqs";
 import { Suspense, useCallback, useMemo } from "react";
 import { useFilter, useCollator } from "react-aria";

+ 2 - 5
apps/insights/src/components/Publisher/get-price-feeds.tsx

@@ -1,9 +1,6 @@
 import { getRankingsByPublisher } from "../../services/clickhouse";
-import {
-  type Cluster,
-  ClusterToName,
-  getFeedsForPublisher,
-} from "../../services/pyth";
+import type { Cluster } from "../../services/pyth";
+import { ClusterToName, getFeedsForPublisher } from "../../services/pyth";
 import { getStatus } from "../../status";
 
 export const getPriceFeeds = async (cluster: Cluster, key: string) => {

+ 2 - 1
apps/insights/src/components/Publisher/performance.tsx

@@ -22,7 +22,8 @@ import {
   ExplainInactive,
   ExplainAverage,
 } from "../Explanations";
-import { type Variant as NoResultsVariant, NoResults } from "../NoResults";
+import type { Variant as NoResultsVariant } from "../NoResults";
+import { NoResults } from "../NoResults";
 import { PriceFeedTag } from "../PriceFeedTag";
 import { PublisherIcon } from "../PublisherIcon";
 import { PublisherTag } from "../PublisherTag";

+ 2 - 8
apps/insights/src/components/Publisher/price-feed-drawer-provider.tsx

@@ -2,14 +2,8 @@
 
 import { useLogger } from "@pythnetwork/app-logger";
 import { parseAsString, useQueryState } from "nuqs";
-import {
-  type ComponentProps,
-  Suspense,
-  createContext,
-  useMemo,
-  useCallback,
-  use,
-} from "react";
+import type { ComponentProps } from "react";
+import { Suspense, createContext, useMemo, useCallback, use } from "react";
 
 import { usePriceFeeds } from "../../hooks/use-price-feeds";
 import type { Cluster } from "../../services/pyth";

+ 2 - 1
apps/insights/src/components/Publisher/price-feeds-card.tsx

@@ -1,6 +1,7 @@
 "use client";
 
-import { type ComponentProps, useCallback } from "react";
+import type { ComponentProps } from "react";
+import { useCallback } from "react";
 
 import { useSelectPriceFeed } from "./price-feed-drawer-provider";
 import { usePriceFeeds } from "../../hooks/use-price-feeds";

+ 2 - 1
apps/insights/src/components/Publisher/top-feeds-table.tsx

@@ -1,6 +1,7 @@
 "use client";
 
-import { type RowConfig, Table } from "@pythnetwork/component-library/Table";
+import type { RowConfig } from "@pythnetwork/component-library/Table";
+import { Table } from "@pythnetwork/component-library/Table";
 import { useMemo } from "react";
 
 import { useSelectPriceFeed } from "./price-feed-drawer-provider";

+ 6 - 5
apps/insights/src/components/Publishers/publishers-card.tsx

@@ -9,14 +9,15 @@ import { Link } from "@pythnetwork/component-library/Link";
 import { Paginator } from "@pythnetwork/component-library/Paginator";
 import { SearchInput } from "@pythnetwork/component-library/SearchInput";
 import { Select } from "@pythnetwork/component-library/Select";
-import {
-  type RowConfig,
-  type SortDescriptor,
-  Table,
+import type {
+  RowConfig,
+  SortDescriptor,
 } from "@pythnetwork/component-library/Table";
+import { Table } from "@pythnetwork/component-library/Table";
 import clsx from "clsx";
 import { useQueryState, parseAsStringEnum } from "nuqs";
-import { type ReactNode, Suspense, useMemo, useCallback } from "react";
+import type { ReactNode } from "react";
+import { Suspense, useMemo, useCallback } from "react";
 import { useFilter, useCollator } from "react-aria";
 
 import styles from "./publishers-card.module.scss";

+ 2 - 4
apps/insights/src/components/Root/footer.tsx

@@ -1,7 +1,5 @@
-import {
-  type Props as ButtonProps,
-  Button,
-} from "@pythnetwork/component-library/Button";
+import type { Props as ButtonProps } from "@pythnetwork/component-library/Button";
+import { Button } from "@pythnetwork/component-library/Button";
 import { DrawerTrigger } from "@pythnetwork/component-library/Drawer";
 import { Link } from "@pythnetwork/component-library/Link";
 import type { ComponentProps, ElementType } from "react";

+ 2 - 1
apps/insights/src/components/Root/mobile-nav-tabs.tsx

@@ -4,7 +4,8 @@ import { Link } from "@pythnetwork/component-library/unstyled/Link";
 import clsx from "clsx";
 import { motion } from "motion/react";
 import { usePathname } from "next/navigation";
-import { type ReactNode, useId, useMemo } from "react";
+import type { ReactNode } from "react";
+import { useId, useMemo } from "react";
 
 import styles from "./mobile-nav-tabs.module.scss";
 

+ 2 - 1
apps/insights/src/components/Root/search-button.tsx

@@ -3,7 +3,8 @@
 import { MagnifyingGlass } from "@phosphor-icons/react/dist/ssr/MagnifyingGlass";
 import { Button } from "@pythnetwork/component-library/Button";
 import { Skeleton } from "@pythnetwork/component-library/Skeleton";
-import { type ComponentProps, useMemo } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 import { useIsSSR } from "react-aria";
 
 import { useToggleSearchDialog } from "./search-dialog";

+ 1 - 2
apps/insights/src/components/Root/search-dialog.tsx

@@ -17,9 +17,8 @@ import {
 } from "@pythnetwork/component-library/unstyled/ListBox";
 import { useMediaQuery } from "@react-hookz/web";
 import { useRouter } from "next/navigation";
+import type { ReactNode, ComponentProps } from "react";
 import {
-  type ReactNode,
-  type ComponentProps,
   useState,
   useCallback,
   useEffect,

+ 2 - 4
apps/insights/src/components/Root/support-drawer.tsx

@@ -5,10 +5,8 @@ import { Coins } from "@phosphor-icons/react/dist/ssr/Coins";
 import { Gavel } from "@phosphor-icons/react/dist/ssr/Gavel";
 import { Plug } from "@phosphor-icons/react/dist/ssr/Plug";
 import { ShieldChevron } from "@phosphor-icons/react/dist/ssr/ShieldChevron";
-import {
-  type Props as CardProps,
-  Card,
-} from "@pythnetwork/component-library/Card";
+import type { Props as CardProps } from "@pythnetwork/component-library/Card";
+import { Card } from "@pythnetwork/component-library/Card";
 import { Drawer } from "@pythnetwork/component-library/Drawer";
 import type { Link as UnstyledLink } from "@pythnetwork/component-library/unstyled/Link";
 import type { ComponentProps, ReactNode } from "react";

+ 3 - 2
apps/insights/src/components/Root/tabs.tsx

@@ -6,9 +6,10 @@ import {
   Tabs,
 } from "@pythnetwork/component-library/unstyled/Tabs";
 import { useSelectedLayoutSegment, usePathname } from "next/navigation";
-import { type ComponentProps } from "react";
+import type { ComponentProps } from "react";
 
-import { type VariantArg, LayoutTransition } from "../LayoutTransition";
+import type { VariantArg } from "../LayoutTransition";
+import { LayoutTransition } from "../LayoutTransition";
 
 export const TabRoot = (
   props: Omit<ComponentProps<typeof Tabs>, "selectedKey">,

+ 4 - 11
apps/insights/src/components/Root/theme-switch.tsx

@@ -4,20 +4,13 @@ import type { IconProps } from "@phosphor-icons/react";
 import { Desktop } from "@phosphor-icons/react/dist/ssr/Desktop";
 import { Moon } from "@phosphor-icons/react/dist/ssr/Moon";
 import { Sun } from "@phosphor-icons/react/dist/ssr/Sun";
-import {
-  type Props as ButtonProps,
-  Button,
-} from "@pythnetwork/component-library/Button";
+import type { Props as ButtonProps } from "@pythnetwork/component-library/Button";
+import { Button } from "@pythnetwork/component-library/Button";
 import clsx from "clsx";
 import { motion } from "motion/react";
 import { useTheme } from "next-themes";
-import {
-  type ReactNode,
-  type ElementType,
-  useCallback,
-  useRef,
-  useMemo,
-} from "react";
+import type { ReactNode, ElementType } from "react";
+import { useCallback, useRef, useMemo } from "react";
 import { useIsSSR } from "react-aria";
 
 import styles from "./theme-switch.module.scss";

+ 2 - 1
apps/insights/src/components/SemicircleMeter/index.tsx

@@ -3,7 +3,8 @@
 import { Meter } from "@pythnetwork/component-library/unstyled/Meter";
 import clsx from "clsx";
 import dynamic from "next/dynamic";
-import { type ComponentProps, type CSSProperties, Suspense } from "react";
+import type { ComponentProps, CSSProperties } from "react";
+import { Suspense } from "react";
 import { PolarAngleAxis, RadialBar } from "recharts";
 
 import styles from "./index.module.scss";

+ 2 - 1
apps/insights/src/components/Tabs/index.tsx

@@ -6,7 +6,8 @@ import {
   Tabs as UnstyledTabs,
 } from "@pythnetwork/component-library/unstyled/Tabs";
 import { useSelectedLayoutSegment, usePathname } from "next/navigation";
-import { useMemo, type ComponentProps } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 
 import { LayoutTransition } from "../LayoutTransition";
 

+ 2 - 1
apps/insights/src/components/ZoomLayoutTransition/index.tsx

@@ -2,7 +2,8 @@
 
 import type { ReactNode } from "react";
 
-import { type VariantArg, LayoutTransition } from "../LayoutTransition";
+import type { VariantArg } from "../LayoutTransition";
+import { LayoutTransition } from "../LayoutTransition";
 
 type Props = {
   children: ReactNode;

+ 2 - 1
apps/insights/src/hooks/use-data.ts

@@ -1,6 +1,7 @@
 import { useLogger } from "@pythnetwork/app-logger";
 import { useCallback } from "react";
-import useSWR, { type KeyedMutator } from "swr";
+import type { KeyedMutator } from "swr";
+import useSWR from "swr";
 
 export const useData = <T>(
   key: Parameters<typeof useSWR<T>>[0],

+ 1 - 1
apps/insights/src/hooks/use-live-price-data.tsx

@@ -4,8 +4,8 @@ import { useLogger } from "@pythnetwork/app-logger";
 import type { PriceData } from "@pythnetwork/client";
 import { useMap } from "@react-hookz/web";
 import { PublicKey } from "@solana/web3.js";
+import type { ComponentProps } from "react";
 import {
-  type ComponentProps,
   use,
   createContext,
   useEffect,

+ 2 - 1
apps/insights/src/hooks/use-price-feeds.tsx

@@ -1,6 +1,7 @@
 "use client";
 
-import { type ReactNode, type ComponentProps, createContext, use } from "react";
+import type { ReactNode, ComponentProps } from "react";
+import { createContext, use } from "react";
 
 import type { Cluster } from "../services/pyth";
 

+ 2 - 1
apps/insights/src/services/clickhouse.ts

@@ -1,7 +1,8 @@
 import "server-only";
 
 import { createClient } from "@clickhouse/client";
-import { z, type ZodSchema, type ZodTypeDef } from "zod";
+import type { ZodSchema, ZodTypeDef } from "zod";
+import { z } from "zod";
 
 import { Cluster, ClusterToName } from "./pyth";
 import { CLICKHOUSE } from "../config/server";

+ 1 - 1
apps/staking/src/api.ts

@@ -1,5 +1,6 @@
 import type { HermesClient, PublisherCaps } from "@pythnetwork/hermes-client";
 import { lookup } from "@pythnetwork/known-publishers";
+import type { StakeAccountPositions } from "@pythnetwork/staking-sdk";
 import {
   epochToDate,
   extractPublisherData,
@@ -8,7 +9,6 @@ import {
   PositionState,
   PythnetClient,
   PythStakingClient,
-  type StakeAccountPositions,
 } from "@pythnetwork/staking-sdk";
 import { PublicKey } from "@solana/web3.js";
 import { z } from "zod";

+ 4 - 8
apps/staking/src/components/AccountSummary/index.tsx

@@ -2,20 +2,16 @@ import { InformationCircleIcon } from "@heroicons/react/24/outline";
 import { epochToDate } from "@pythnetwork/staking-sdk";
 import clsx from "clsx";
 import Image from "next/image";
-import {
-  type ComponentProps,
-  type ReactNode,
-  useCallback,
-  useState,
-  useMemo,
-} from "react";
+import type { ComponentProps, ReactNode } from "react";
+import { useCallback, useState, useMemo } from "react";
 import {
   DialogTrigger,
   Button as ReactAriaButton,
 } from "react-aria-components";
 
 import background from "./background.png";
-import { type States, StateType as ApiStateType } from "../../hooks/use-api";
+import type { States } from "../../hooks/use-api";
+import { StateType as ApiStateType } from "../../hooks/use-api";
 import { StateType, useAsync } from "../../hooks/use-async";
 import { useToast } from "../../hooks/use-toast";
 import { Button } from "../Button";

+ 2 - 1
apps/staking/src/components/CopyButton/index.tsx

@@ -1,6 +1,7 @@
 import { ClipboardDocumentIcon, CheckIcon } from "@heroicons/react/24/outline";
 import clsx from "clsx";
-import { type ComponentProps, useCallback, useEffect, useState } from "react";
+import type { ComponentProps } from "react";
+import { useCallback, useEffect, useState } from "react";
 import { Button } from "react-aria-components";
 
 import { useLogger } from "../../hooks/use-logger";

+ 4 - 10
apps/staking/src/components/Dashboard/index.tsx

@@ -1,15 +1,9 @@
 import { useLocalStorageValue } from "@react-hookz/web";
 import clsx from "clsx";
-import Image, { type StaticImageData } from "next/image";
-import {
-  type ComponentProps,
-  type ReactNode,
-  type FormEvent,
-  useState,
-  useMemo,
-  useEffect,
-  useCallback,
-} from "react";
+import type { StaticImageData } from "next/image";
+import Image from "next/image";
+import type { ComponentProps, ReactNode, FormEvent } from "react";
+import { useState, useMemo, useEffect, useCallback } from "react";
 import { Tabs, TabList, TabPanel, Tab, Form } from "react-aria-components";
 
 import type { States, StateType as ApiStateType } from "../../hooks/use-api";

+ 4 - 2
apps/staking/src/components/Date/index.tsx

@@ -1,5 +1,7 @@
-import { useMemo, type HTMLProps } from "react";
-import { useDateFormatter, type DateFormatterOptions } from "react-aria";
+import type { HTMLProps } from "react";
+import { useMemo } from "react";
+import type { DateFormatterOptions } from "react-aria";
+import { useDateFormatter } from "react-aria";
 
 type Props = Omit<HTMLProps<HTMLSpanElement>, "children"> & {
   children: Date;

+ 2 - 6
apps/staking/src/components/Faq/index.tsx

@@ -1,11 +1,7 @@
 import clsx from "clsx";
 import { LazyMotion, m, domAnimation } from "framer-motion";
-import {
-  type HTMLProps,
-  type ReactNode,
-  type ComponentProps,
-  useState,
-} from "react";
+import type { HTMLProps, ReactNode, ComponentProps } from "react";
+import { useState } from "react";
 import { Button } from "react-aria-components";
 
 type Props = Omit<HTMLProps<HTMLDivElement>, "title"> & {

+ 2 - 1
apps/staking/src/components/Governance/index.tsx

@@ -1,6 +1,7 @@
 import clsx from "clsx";
 
-import { type States, StateType as ApiStateType } from "../../hooks/use-api";
+import type { States } from "../../hooks/use-api";
+import { StateType as ApiStateType } from "../../hooks/use-api";
 import { GovernanceGuide } from "../GovernanceGuide";
 import { ProgramSection } from "../ProgramSection";
 

+ 8 - 8
apps/staking/src/components/Guide/index.tsx

@@ -1,12 +1,12 @@
-import Image, { type StaticImageData } from "next/image";
-import {
-  type ComponentProps,
-  type ComponentType,
-  type ReactNode,
-  type SVGAttributes,
-  useMemo,
-  useRef,
+import type { StaticImageData } from "next/image";
+import Image from "next/image";
+import type {
+  ComponentProps,
+  ComponentType,
+  ReactNode,
+  SVGAttributes,
 } from "react";
+import { useMemo, useRef } from "react";
 import {
   Tabs,
   TabList,

+ 1 - 1
apps/staking/src/components/Header/current-stake-account.tsx

@@ -2,7 +2,7 @@
 
 import clsx from "clsx";
 import { useSelectedLayoutSegment } from "next/navigation";
-import { type HTMLProps } from "react";
+import type { HTMLProps } from "react";
 
 import { VPN_BLOCKED_SEGMENT } from "../../config/isomorphic";
 import { StateType as ApiStateType, useApi } from "../../hooks/use-api";

+ 2 - 5
apps/staking/src/components/Home/index.tsx

@@ -2,11 +2,8 @@
 
 import { useIsSSR } from "react-aria";
 
-import {
-  type States,
-  StateType as ApiStateType,
-  useApi,
-} from "../../hooks/use-api";
+import type { States } from "../../hooks/use-api";
+import { StateType as ApiStateType, useApi } from "../../hooks/use-api";
 import {
   StateType as DashboardDataStateType,
   useData,

+ 4 - 11
apps/staking/src/components/NoWalletHome/index.tsx

@@ -1,17 +1,10 @@
 import { WalletIcon } from "@heroicons/react/24/outline";
 import { useWalletModal } from "@solana/wallet-adapter-react-ui";
 import clsx from "clsx";
-import Image, { type StaticImageData } from "next/image";
-import {
-  type ReactNode,
-  type ComponentType,
-  type SVGProps,
-  type ComponentProps,
-  useCallback,
-  useState,
-  useRef,
-  useEffect,
-} from "react";
+import type { StaticImageData } from "next/image";
+import Image from "next/image";
+import type { ReactNode, ComponentType, SVGProps, ComponentProps } from "react";
+import { useCallback, useState, useRef, useEffect } from "react";
 import { Tabs, TabList, Tab, TabPanel } from "react-aria-components";
 
 import governance from "./governance.png";

+ 9 - 12
apps/staking/src/components/OracleIntegrityStaking/index.tsx

@@ -11,18 +11,14 @@ import type { lookup } from "@pythnetwork/known-publishers";
 import { calculateApy } from "@pythnetwork/staking-sdk";
 import { PublicKey } from "@solana/web3.js";
 import clsx from "clsx";
-import {
-  useMemo,
-  useCallback,
-  useState,
-  useRef,
-  createElement,
-  type ComponentProps,
-  type Dispatch,
-  type SetStateAction,
-  type HTMLAttributes,
-  type FormEvent,
+import type {
+  ComponentProps,
+  Dispatch,
+  SetStateAction,
+  HTMLAttributes,
+  FormEvent,
 } from "react";
+import { useMemo, useCallback, useState, useRef, createElement } from "react";
 import { useFilter, useCollator } from "react-aria";
 import {
   SearchField,
@@ -35,7 +31,8 @@ import {
   MenuTrigger,
 } from "react-aria-components";
 
-import { type States, StateType as ApiStateType } from "../../hooks/use-api";
+import type { States } from "../../hooks/use-api";
+import { StateType as ApiStateType } from "../../hooks/use-api";
 import {
   StateType as UseAsyncStateType,
   useAsync,

+ 2 - 1
apps/staking/src/components/Root/i18n-provider.tsx

@@ -1,7 +1,8 @@
 "use client";
 
 import { parse } from "bcp-47";
-import { useMemo, type ComponentProps } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 import { I18nProvider as I18nProviderBase, useIsSSR } from "react-aria";
 
 const SUPPORTED_LANGUAGES = new Set(["en"]);

+ 2 - 1
apps/staking/src/components/RouterProvider/index.tsx

@@ -1,7 +1,8 @@
 "use client";
 
 import { useRouter } from "next/navigation";
-import { type ComponentProps, useCallback } from "react";
+import type { ComponentProps } from "react";
+import { useCallback } from "react";
 import { RouterProvider as ReactAriaRouterProvider } from "react-aria-components";
 
 export const RouterProvider = (

+ 2 - 1
apps/staking/src/components/Tokens/index.tsx

@@ -2,7 +2,8 @@
 
 import clsx from "clsx";
 import * as dnum from "dnum";
-import { type ComponentProps, useMemo } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 import { Button, TooltipTrigger, useLocale } from "react-aria-components";
 
 import Pyth from "./pyth.svg";

+ 2 - 8
apps/staking/src/components/TransferButton/index.tsx

@@ -1,11 +1,5 @@
-import {
-  type ComponentProps,
-  type ReactNode,
-  type FormEvent,
-  useCallback,
-  useMemo,
-  useState,
-} from "react";
+import type { ComponentProps, ReactNode, FormEvent } from "react";
+import { useCallback, useMemo, useState } from "react";
 import {
   DialogTrigger,
   TextField,

+ 2 - 1
apps/staking/src/components/TruncatedKey/index.tsx

@@ -1,5 +1,6 @@
 import type { PublicKey } from "@solana/web3.js";
-import { useMemo, type HTMLAttributes } from "react";
+import type { HTMLAttributes } from "react";
+import { useMemo } from "react";
 
 type Props = Omit<HTMLAttributes<HTMLElement>, "children"> & {
   children: PublicKey | `0x${string}`;

+ 4 - 12
apps/staking/src/components/WalletButton/index.tsx

@@ -14,13 +14,8 @@ import { useWalletModal } from "@solana/wallet-adapter-react-ui";
 import type { PublicKey } from "@solana/web3.js";
 import clsx from "clsx";
 import { useSelectedLayoutSegment } from "next/navigation";
-import {
-  type ComponentProps,
-  type ReactNode,
-  useCallback,
-  useMemo,
-  type ReactElement,
-} from "react";
+import type { ComponentProps, ReactNode, ReactElement } from "react";
+import { useCallback, useMemo } from "react";
 import {
   MenuTrigger,
   SubmenuTrigger,
@@ -30,11 +25,8 @@ import {
 } from "react-aria-components";
 
 import { VPN_BLOCKED_SEGMENT } from "../../config/isomorphic";
-import {
-  StateType as ApiStateType,
-  type States,
-  useApi,
-} from "../../hooks/use-api";
+import type { States } from "../../hooks/use-api";
+import { StateType as ApiStateType, useApi } from "../../hooks/use-api";
 import { StateType as DataStateType, useData } from "../../hooks/use-data";
 import { useLogger } from "../../hooks/use-logger";
 import { useNetwork } from "../../hooks/use-network";

+ 2 - 1
apps/staking/src/components/WalletProvider/index.tsx

@@ -18,7 +18,8 @@ import {
   WalletConnectWalletAdapter,
 } from "@solana/wallet-adapter-wallets";
 import { clusterApiUrl } from "@solana/web3.js";
-import { type ReactNode, useMemo } from "react";
+import type { ReactNode } from "react";
+import { useMemo } from "react";
 
 import { useNetwork } from "../../hooks/use-network";
 import { metadata } from "../../metadata";

+ 2 - 1
apps/staking/src/hooks/use-api.tsx

@@ -5,7 +5,8 @@ import { PythnetClient, PythStakingClient } from "@pythnetwork/staking-sdk";
 import { useLocalStorageValue } from "@react-hookz/web";
 import { useConnection, useWallet } from "@solana/wallet-adapter-react";
 import { Connection, PublicKey } from "@solana/web3.js";
-import { type ComponentProps, createContext, useContext, useMemo } from "react";
+import type { ComponentProps } from "react";
+import { createContext, useContext, useMemo } from "react";
 import { useSWRConfig } from "swr";
 
 import { StateType as DataStateType, useData } from "./use-data";

+ 2 - 1
apps/staking/src/hooks/use-data.ts

@@ -1,5 +1,6 @@
 import { useCallback } from "react";
-import useSWR, { type KeyedMutator } from "swr";
+import type { KeyedMutator } from "swr";
+import useSWR from "swr";
 
 import { useLogger } from "./use-logger";
 

+ 4 - 2
apps/staking/src/hooks/use-logger.tsx

@@ -1,7 +1,9 @@
 "use client";
 
-import pino, { type Logger } from "pino";
-import { type ComponentProps, createContext, useContext, useMemo } from "react";
+import type { Logger } from "pino";
+import pino from "pino";
+import type { ComponentProps } from "react";
+import { createContext, useContext, useMemo } from "react";
 
 const LoggerContext = createContext<undefined | Logger<string>>(undefined);
 

+ 2 - 7
apps/staking/src/hooks/use-network.tsx

@@ -1,12 +1,7 @@
 "use client";
 
-import {
-  type ComponentProps,
-  createContext,
-  useContext,
-  useState,
-  useCallback,
-} from "react";
+import type { ComponentProps } from "react";
+import { createContext, useContext, useState, useCallback } from "react";
 
 const NetworkContext = createContext<undefined | NetworkContext>(undefined);
 

+ 4 - 2
apps/staking/src/middleware.ts

@@ -1,6 +1,8 @@
-import { type Geo, geolocation, ipAddress } from "@vercel/functions";
+import type { Geo } from "@vercel/functions";
+import { geolocation, ipAddress } from "@vercel/functions";
 import ipRangeCheck from "ip-range-check";
-import { type NextRequest, NextResponse } from "next/server";
+import type { NextRequest } from "next/server";
+import { NextResponse } from "next/server";
 import ProxyCheck from "proxycheck-ts";
 
 import {

+ 3 - 5
governance/pyth_staking_sdk/integration-tests/all.test.ts

@@ -1,17 +1,15 @@
 import { Wallet } from "@coral-xyz/anchor";
+import type { Connection } from "@solana/web3.js";
 import {
   Keypair,
   PublicKey,
   sendAndConfirmTransaction,
   SystemProgram,
   Transaction,
-  type Connection,
 } from "@solana/web3.js";
 
-import {
-  type CustomAbortController,
-  startValidatorRaw,
-} from "./start-validator";
+import type { CustomAbortController } from "./start-validator";
+import { startValidatorRaw } from "./start-validator";
 import { getCurrentEpoch } from "../src";
 import { getConfigAddress } from "../src/pdas";
 import { PythStakingClient } from "../src/pyth-staking-client";

+ 10 - 11
governance/pyth_staking_sdk/src/pyth-staking-client.ts

@@ -6,14 +6,13 @@ import {
   PROGRAM_VERSION_V2,
   withCreateTokenOwnerRecord,
 } from "@solana/spl-governance";
+import type { Account, Mint } from "@solana/spl-token";
 import {
-  type Account,
   createAssociatedTokenAccountInstruction,
   createTransferInstruction,
   getAccount,
   getAssociatedTokenAddressSync,
   getMint,
-  type Mint,
 } from "@solana/spl-token";
 import type { AnchorWallet } from "@solana/wallet-adapter-react";
 import {
@@ -39,16 +38,16 @@ import {
   getStakeAccountMetadataAddress,
   getTargetAccountAddress,
 } from "./pdas";
-import {
-  PositionState,
-  type GlobalConfig,
-  type PoolConfig,
-  type PoolDataAccount,
-  type StakeAccountPositions,
-  type TargetAccount,
-  type VoterWeightAction,
-  type VestingSchedule,
+import type {
+  GlobalConfig,
+  PoolConfig,
+  PoolDataAccount,
+  StakeAccountPositions,
+  TargetAccount,
+  VoterWeightAction,
+  VestingSchedule,
 } from "./types";
+import { PositionState } from "./types";
 import { bigintMax, bigintMin } from "./utils/bigint";
 import { convertBigIntToBN, convertBNToBigInt } from "./utils/bn";
 import { epochToDate, getCurrentEpoch } from "./utils/clock";

+ 6 - 6
governance/pyth_staking_sdk/src/utils/position.ts

@@ -7,13 +7,13 @@ import {
   POSITION_BUFFER_SIZE,
   POSITIONS_ACCOUNT_HEADER_SIZE,
 } from "../constants";
-import {
-  type Position,
-  type PositionAnchor,
-  PositionState,
-  type StakeAccountPositions,
-  type TargetWithParameters,
+import type {
+  Position,
+  PositionAnchor,
+  StakeAccountPositions,
+  TargetWithParameters,
 } from "../types";
+import { PositionState } from "../types";
 
 export const getPositionState = (
   position: Position,

+ 4 - 8
lazer/sdk/js/src/client.ts

@@ -1,13 +1,9 @@
 import WebSocket from "isomorphic-ws";
-import { dummyLogger, type Logger } from "ts-log";
+import type { Logger } from "ts-log";
+import { dummyLogger } from "ts-log";
 
-import {
-  BINARY_UPDATE_FORMAT_MAGIC_LE,
-  FORMAT_MAGICS_LE,
-  type ParsedPayload,
-  type Request,
-  type Response,
-} from "./protocol.js";
+import type { ParsedPayload, Request, Response } from "./protocol.js";
+import { BINARY_UPDATE_FORMAT_MAGIC_LE, FORMAT_MAGICS_LE } from "./protocol.js";
 import { WebSocketPool } from "./socket/websocket-pool.js";
 
 export type BinaryResponse = {

+ 2 - 1
lazer/sdk/js/src/socket/resilient-websocket.ts

@@ -1,6 +1,7 @@
 import type { ClientRequestArgs } from "node:http";
 
-import WebSocket, { type ClientOptions, type ErrorEvent } from "isomorphic-ws";
+import type { ClientOptions, ErrorEvent } from "isomorphic-ws";
+import WebSocket from "isomorphic-ws";
 import type { Logger } from "ts-log";
 
 const HEARTBEAT_TIMEOUT_DURATION = 10_000;

+ 3 - 2
lazer/sdk/js/src/socket/websocket-pool.ts

@@ -1,9 +1,10 @@
 import TTLCache from "@isaacs/ttlcache";
 import WebSocket from "isomorphic-ws";
-import { dummyLogger, type Logger } from "ts-log";
+import type { Logger } from "ts-log";
+import { dummyLogger } from "ts-log";
 
-import { ResilientWebSocket } from "./resilient-websocket.js";
 import type { Request, Response } from "../protocol.js";
+import { ResilientWebSocket } from "./resilient-websocket.js";
 
 const DEFAULT_NUM_CONNECTIONS = 3;
 

+ 2 - 1
packages/app-logger/src/provider.tsx

@@ -1,7 +1,8 @@
 "use client";
 
 import { pino } from "pino";
-import { type ComponentProps, useMemo } from "react";
+import type { ComponentProps } from "react";
+import { useMemo } from "react";
 
 import { LoggerContext } from "./context.js";
 

+ 2 - 6
packages/component-library/src/Card/index.tsx

@@ -1,12 +1,8 @@
 "use client";
 
 import clsx from "clsx";
-import {
-  type ComponentProps,
-  type ElementType,
-  type ReactNode,
-  use,
-} from "react";
+import type { ComponentProps, ElementType, ReactNode } from "react";
+import { use } from "react";
 import { OverlayTriggerStateContext } from "react-aria-components";
 
 import styles from "./index.module.scss";

+ 2 - 1
packages/component-library/src/CrossfadeTabPanels/index.tsx

@@ -1,7 +1,8 @@
 "use client";
 
 import { AnimatePresence, motion } from "motion/react";
-import { type ReactNode, use } from "react";
+import type { ReactNode } from "react";
+import { use } from "react";
 import { TabListStateContext } from "react-aria-components";
 
 import { TabPanel as UnstyledTabPanel } from "../unstyled/Tabs/index.js";

+ 2 - 7
packages/component-library/src/Drawer/index.tsx

@@ -4,13 +4,8 @@ import { XCircle } from "@phosphor-icons/react/dist/ssr/XCircle";
 import { useMediaQuery } from "@react-hookz/web";
 import clsx from "clsx";
 import { animate, useMotionValue, useMotionValueEvent } from "motion/react";
-import {
-  type ComponentProps,
-  type ReactNode,
-  useState,
-  useRef,
-  useEffect,
-} from "react";
+import type { ComponentProps, ReactNode } from "react";
+import { useState, useRef, useEffect } from "react";
 import { Heading } from "react-aria-components";
 
 import styles from "./index.module.scss";

+ 6 - 8
packages/component-library/src/MainContent/index.tsx

@@ -1,15 +1,13 @@
 "use client";
 
 import clsx from "clsx";
-import {
-  type ComponentProps,
-  type CSSProperties,
-  type Dispatch,
-  type SetStateAction,
-  createContext,
-  useState,
-  use,
+import type {
+  ComponentProps,
+  CSSProperties,
+  Dispatch,
+  SetStateAction,
 } from "react";
+import { createContext, useState, use } from "react";
 
 import styles from "./index.module.scss";
 import { OverlayVisibleContext } from "../overlay-visible-context.js";

+ 2 - 1
packages/component-library/src/MainNavTabs/index.tsx

@@ -2,7 +2,8 @@
 
 import clsx from "clsx";
 import { motion } from "motion/react";
-import { type ComponentProps, useId } from "react";
+import type { ComponentProps } from "react";
+import { useId } from "react";
 
 import styles from "./index.module.scss";
 import buttonStyles from "../Button/index.module.scss";

+ 5 - 12
packages/component-library/src/ModalDialog/index.tsx

@@ -1,18 +1,11 @@
 "use client";
 
-import { motion, type PanInfo } from "motion/react";
+import type { PanInfo } from "motion/react";
+import { motion } from "motion/react";
+import type { ComponentProps, Dispatch, SetStateAction } from "react";
+import { createContext, use, useCallback, useState, useEffect } from "react";
+import type { ModalRenderProps } from "react-aria-components";
 import {
-  type ComponentProps,
-  type Dispatch,
-  type SetStateAction,
-  createContext,
-  use,
-  useCallback,
-  useState,
-  useEffect,
-} from "react";
-import {
-  type ModalRenderProps,
   Modal,
   ModalOverlay,
   Dialog,

+ 4 - 2
packages/component-library/src/Paginator/index.tsx

@@ -1,11 +1,13 @@
 import { CaretLeft } from "@phosphor-icons/react/dist/ssr/CaretLeft";
 import { CaretRight } from "@phosphor-icons/react/dist/ssr/CaretRight";
 import clsx from "clsx";
-import { type ComponentProps, useMemo, useCallback } from "react";
+import type { ComponentProps } from "react";
+import { useMemo, useCallback } from "react";
 import type { Link } from "react-aria-components";
 
 import styles from "./index.module.scss";
-import { type Props as ButtonProps, Button } from "../Button/index.js";
+import type { Props as ButtonProps } from "../Button/index.js";
+import { Button } from "../Button/index.js";
 import buttonStyles from "../Button/index.module.scss";
 import { Select } from "../Select/index.js";
 import { Toolbar } from "../unstyled/Toolbar/index.js";

+ 3 - 3
packages/component-library/src/Select/index.tsx

@@ -1,9 +1,8 @@
 import { Check } from "@phosphor-icons/react/dist/ssr/Check";
 import clsx from "clsx";
 import type { ComponentProps, ReactNode } from "react";
+import type { PopoverProps, Button as BaseButton } from "react-aria-components";
 import {
-  type PopoverProps,
-  type Button as BaseButton,
   Label,
   Select as BaseSelect,
   Popover,
@@ -13,7 +12,8 @@ import {
 } from "react-aria-components";
 
 import styles from "./index.module.scss";
-import { type Props as ButtonProps, Button } from "../Button/index.js";
+import type { Props as ButtonProps } from "../Button/index.js";
+import { Button } from "../Button/index.js";
 import { DropdownCaretDown } from "../DropdownCaretDown/index.js";
 import {
   ListBox,

+ 4 - 6
packages/component-library/src/SingleToggleGroup/index.tsx

@@ -2,12 +2,10 @@
 
 import clsx from "clsx";
 import { motion } from "motion/react";
-import { type ComponentProps, useId, useMemo } from "react";
-import {
-  type Key,
-  ToggleButtonGroup,
-  ToggleButton,
-} from "react-aria-components";
+import type { ComponentProps } from "react";
+import { useId, useMemo } from "react";
+import type { Key } from "react-aria-components";
+import { ToggleButtonGroup, ToggleButton } from "react-aria-components";
 
 import styles from "./index.module.scss";
 import buttonStyles from "../Button/index.module.scss";

+ 2 - 1
packages/component-library/src/StatCard/index.tsx

@@ -2,7 +2,8 @@ import clsx from "clsx";
 import type { ReactNode, ElementType } from "react";
 
 import styles from "./index.module.scss";
-import { type Props as CardProps, Card } from "../Card/index.js";
+import type { Props as CardProps } from "../Card/index.js";
+import { Card } from "../Card/index.js";
 
 type OwnPropsSingle = {
   header: ReactNode;

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels