chore(prettier): add prettierrc file and import sorting

Co-authored-by: theborakompanioni <theborakompanioni+github@gmail.com>
This commit is contained in:
Nischal Shetty 2025-06-21 19:37:46 +05:30 committed by theborakompanioni
parent b28173090a
commit e54d0ba40e
No known key found for this signature in database
GPG key ID: E8070AF0053AAC0D
51 changed files with 1893 additions and 2069 deletions

9
.prettierignore Normal file
View file

@ -0,0 +1,9 @@
# Dist folder
dist/
# Generated code
src/lib/jm-api/**
# Other common ignores
node_modules/
.DS_Store

7
.prettierrc.json Normal file
View file

@ -0,0 +1,7 @@
{
"printWidth": 120,
"semi": false,
"singleQuote": true,
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
"importOrder": ["^react$", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"]
}

View file

@ -1,5 +1,5 @@
import '../src/index.css'
import type { Preview } from '@storybook/react-vite'
import '../src/index.css'
const preview: Preview = {
parameters: {

View file

@ -1,14 +1,13 @@
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import storybook from 'eslint-plugin-storybook'
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import storybook from 'eslint-plugin-storybook'
import globals from 'globals'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{ ignores: ['dist'] },
{ ignores: ['dist', 'src/lib/jm-api/**'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],

43
package-lock.json generated
View file

@ -37,6 +37,7 @@
"@storybook/addon-docs": "^9.0.12",
"@storybook/addon-vitest": "^9.0.12",
"@storybook/react-vite": "^9.0.12",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/node": "^22.15.29",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
@ -3043,6 +3044,41 @@
"@testing-library/dom": ">=7.21.4"
}
},
"node_modules/@trivago/prettier-plugin-sort-imports": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-5.2.2.tgz",
"integrity": "sha512-fYDQA9e6yTNmA13TLVSA+WMQRc5Bn/c0EUBditUHNfMMxN7M82c38b1kEggVE3pLpZ0FwkwJkUEKMiOi52JXFA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/generator": "^7.26.5",
"@babel/parser": "^7.26.7",
"@babel/traverse": "^7.26.7",
"@babel/types": "^7.26.7",
"javascript-natural-sort": "^0.7.1",
"lodash": "^4.17.21"
},
"engines": {
"node": ">18.12"
},
"peerDependencies": {
"@vue/compiler-sfc": "3.x",
"prettier": "2.x - 3.x",
"prettier-plugin-svelte": "3.x",
"svelte": "4.x || 5.x"
},
"peerDependenciesMeta": {
"@vue/compiler-sfc": {
"optional": true
},
"prettier-plugin-svelte": {
"optional": true
},
"svelte": {
"optional": true
}
}
},
"node_modules/@types/aria-query": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
@ -5632,6 +5668,13 @@
"@pkgjs/parseargs": "^0.11.0"
}
},
"node_modules/javascript-natural-sort": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz",
"integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==",
"dev": true,
"license": "MIT"
},
"node_modules/jiti": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz",

View file

@ -33,14 +33,6 @@
],
"*.{json,css,md}": "prettier --write"
},
"prettier": {
"printWidth": 120,
"semi": false,
"singleQuote": true,
"plugins": [
"prettier-plugin-tailwindcss"
]
},
"dependencies": {
"@hey-api/client-fetch": "^0.13.1",
"@radix-ui/react-avatar": "^1.1.10",
@ -71,6 +63,7 @@
"@storybook/addon-docs": "^9.0.12",
"@storybook/addon-vitest": "^9.0.12",
"@storybook/react-vite": "^9.0.12",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/node": "^22.15.29",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",

View file

@ -1,19 +1,19 @@
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'
import JamLanding from './components/JamLanding'
import LoginPage from './components/Login'
import CreateWallet from './components/CreateWallet'
import { Layout } from './components/layout/Layout'
import { clearSession, getSession, setSession } from './lib/session'
import { Toaster } from './components/ui/sonner'
import { QueryClientProvider } from '@tanstack/react-query'
import { queryClient } from './lib/queryClient'
import { useApiClient } from './hooks/useApiClient'
import { useEffect } from 'react'
import { JM_API_AUTH_TOKEN_EXPIRY } from './constants/jm'
import { setIntervalDebounced } from './lib/utils'
import { toast } from 'sonner'
import { token } from './lib/jm-api/generated/client'
import { QueryClientProvider } from '@tanstack/react-query'
import { ThemeProvider } from 'next-themes'
import { Navigate, Route, BrowserRouter as Router, Routes } from 'react-router-dom'
import { toast } from 'sonner'
import CreateWallet from '@/components/CreateWallet'
import JamLanding from '@/components/JamLanding'
import LoginPage from '@/components/Login'
import { Layout } from '@/components/layout/Layout'
import { Toaster } from '@/components/ui/sonner'
import { JM_API_AUTH_TOKEN_EXPIRY } from '@/constants/jm'
import { useApiClient } from '@/hooks/useApiClient'
import { token } from '@/lib/jm-api/generated/client'
import { queryClient } from '@/lib/queryClient'
import { clearSession, getSession, setSession } from '@/lib/session'
import { setIntervalDebounced } from '@/lib/utils'
const isAuthenticated = () => {
const session = getSession()

View file

@ -1,15 +1,15 @@
import React, { useState } from 'react'
import { useNavigate, Link } from 'react-router-dom'
import { setSession, clearSession } from '@/lib/session'
import { formatWalletName } from '@/lib/utils'
import { AlertCircle, Eye, EyeOff, Loader2, Lock, Wallet } from 'lucide-react'
import { Link, useNavigate } from 'react-router-dom'
import { toast } from 'sonner'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { AlertCircle, Wallet, Lock, Loader2, Eye, EyeOff } from 'lucide-react'
import { toast } from 'sonner'
import { createwallet, session, type CreateWalletResponse } from '@/lib/jm-api/generated/client'
import { type CreateWalletResponse, createwallet, session } from '@/lib/jm-api/generated/client'
import { clearSession, setSession } from '@/lib/session'
import { formatWalletName } from '@/lib/utils'
const CreateWallet = () => {
const navigate = useNavigate()

View file

@ -1,5 +1,5 @@
import { File } from 'lucide-react'
import { Button } from './ui/button'
import { Button } from '@/components/ui/button'
export function Footer() {
return (

View file

@ -1,10 +1,10 @@
import { Card } from './ui/card'
import { Button } from './ui/button'
import { Jar } from './layout/Jar'
import { Info, RefreshCw, Loader2 } from 'lucide-react'
import { Tooltip, TooltipTrigger, TooltipContent } from './ui/tooltip'
import { Alert, AlertDescription } from './ui/alert'
import { useJamDisplayContext } from './layout/display-mode-context'
import { Info, Loader2, RefreshCw } from 'lucide-react'
import { Jar } from '@/components/layout/Jar'
import { useJamDisplayContext } from '@/components/layout/display-mode-context'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import { Card } from '@/components/ui/card'
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
export default function JamLanding() {
const {

View file

@ -1,20 +1,20 @@
import React, { useEffect, useMemo, useState } from 'react'
import { toast } from 'sonner'
import { useMutation, useQuery } from '@tanstack/react-query'
import { AlertCircle, Eye, EyeOff, Loader2, Lock, RefreshCwIcon, Wallet } from 'lucide-react'
import { useNavigate } from 'react-router-dom'
import { setSession } from '@/lib/session'
import { toast } from 'sonner'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
import { AlertCircle, Wallet, Lock, Loader2, Eye, EyeOff, RefreshCwIcon } from 'lucide-react'
import { formatWalletName } from '@/lib/utils'
import { useMutation, useQuery } from '@tanstack/react-query'
import { listwalletsOptions, unlockwalletMutation } from '@/lib/jm-api/generated/client/@tanstack/react-query.gen'
import { Skeleton } from '@/components/ui/skeleton'
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
import { useApiClient } from '@/hooks/useApiClient'
import { Skeleton } from './ui/skeleton'
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip'
import { listwalletsOptions, unlockwalletMutation } from '@/lib/jm-api/generated/client/@tanstack/react-query.gen'
import { setSession } from '@/lib/session'
import { formatWalletName } from '@/lib/utils'
const LoginFormSkeleton = () => {
return (

View file

@ -1,8 +1,8 @@
import { Wallet, Sun, Moon, Settings, LogOut, Loader2 } from 'lucide-react'
import { Button } from './ui/button'
import { Badge } from './ui/badge'
import { Loader2, LogOut, Moon, Settings, Sun, Wallet } from 'lucide-react'
import type { Jar } from '@/components/layout/display-mode-context'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { clearSession } from '@/lib/session'
import type { Jar } from './layout/display-mode-context'
interface NavbarProps {
theme: string

View file

@ -1,10 +1,10 @@
import { Navbar } from '../Navbar'
import { Footer } from '../Footer'
import { DisplayModeContext } from './display-mode-context'
import { useTheme } from 'next-themes'
import { DisplayLogo } from '@/components/DisplayLogo'
import { Footer } from '@/components/Footer'
import { Navbar } from '@/components/Navbar'
import { useDisplayMode } from '@/hooks/useDisplayMode'
import { useWalletDisplay } from '@/hooks/useWalletDisplay'
import { DisplayLogo } from '../DisplayLogo'
import { DisplayModeContext } from './display-mode-context'
interface LayoutProps {
children: React.ReactNode

View file

@ -1,6 +1,5 @@
import * as React from 'react'
import { cva, type VariantProps } from 'class-variance-authority'
import { type VariantProps, cva } from 'class-variance-authority'
import { cn } from '@/lib/utils'
const alertVariants = cva(

View file

@ -1,6 +1,5 @@
import * as React from 'react'
import * as AvatarPrimitive from '@radix-ui/react-avatar'
import { cn } from '@/lib/utils'
function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {

View file

@ -1,7 +1,6 @@
import * as React from 'react'
import { Slot } from '@radix-ui/react-slot'
import { cva, type VariantProps } from 'class-variance-authority'
import { type VariantProps, cva } from 'class-variance-authority'
import { cn } from '@/lib/utils'
const badgeVariants = cva(

View file

@ -1,7 +1,6 @@
import * as React from 'react'
import { Slot } from '@radix-ui/react-slot'
import { cva, type VariantProps } from 'class-variance-authority'
import { type VariantProps, cva } from 'class-variance-authority'
import { cn } from '@/lib/utils'
const buttonVariants = cva(

View file

@ -1,5 +1,4 @@
import * as React from 'react'
import { cn } from '@/lib/utils'
function Card({ className, ...props }: React.ComponentProps<'div'>) {

View file

@ -1,5 +1,4 @@
import * as React from 'react'
import { cn } from '@/lib/utils'
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {

View file

@ -1,6 +1,5 @@
import * as React from 'react'
import * as LabelPrimitive from '@radix-ui/react-label'
import { cn } from '@/lib/utils'
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {

View file

@ -1,9 +1,6 @@
'use client'
import * as React from 'react'
import * as SelectPrimitive from '@radix-ui/react-select'
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {

View file

@ -1,8 +1,5 @@
'use client'
import * as React from 'react'
import * as SeparatorPrimitive from '@radix-ui/react-separator'
import { cn } from '@/lib/utils'
function Separator({

View file

@ -1,6 +1,5 @@
import * as React from 'react'
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
import { cn } from '@/lib/utils'
function TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {

View file

@ -1,9 +1,9 @@
import { useQuery } from '@tanstack/react-query'
import { listutxosOptions, sessionOptions } from '@/lib/jm-api/generated/client/@tanstack/react-query.gen'
import { useApiClient } from '@/hooks/useApiClient'
import { getSession } from '@/lib/session'
import { jarTemplates } from '@/components/layout/display-mode-context'
import type { Jar, JarColor } from '@/components/layout/display-mode-context'
import { useApiClient } from '@/hooks/useApiClient'
import { listutxosOptions, sessionOptions } from '@/lib/jm-api/generated/client/@tanstack/react-query.gen'
import { getSession } from '@/lib/session'
export interface UseWalletDisplayResult {
jars: Jar[]

View file

@ -1,7 +1,7 @@
import type { Client } from '@hey-api/client-fetch'
import { createClient } from './jm-api'
import type { ClientOptions, UnlockWalletResponse } from './jm-api/generated/client'
import { getSession } from './session'
import { createClient } from '@/lib/jm-api'
import type { ClientOptions, UnlockWalletResponse } from '@/lib/jm-api/generated/client'
import { getSession } from '@/lib/session'
type ApiToken = UnlockWalletResponse['token']

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import type { ClientOptions } from './types.gen'
import {
type Config,
type ClientOptions as DefaultClientOptions,
createClient,
createConfig,
} from '@hey-api/client-fetch'
import type { ClientOptions } from './types.gen';
import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch';
/**
* The `createClientConfig()` function will be called on client initialization
@ -16,12 +11,8 @@ import {
* `setConfig()`. This is useful for example if you're using Next.js
* to ensure your client always has the correct values.
*/
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (
override?: Config<DefaultClientOptions & T>,
) => Config<Required<DefaultClientOptions> & T>
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
export const client = createClient(
createConfig<ClientOptions>({
baseUrl: 'https://none',
}),
)
export const client = createClient(createConfig<ClientOptions>({
baseUrl: 'https://none'
}));

View file

@ -1,3 +1,3 @@
// This file is auto-generated by @hey-api/openapi-ts
export * from './types.gen'
export * from './sdk.gen'
export * from './types.gen';
export * from './sdk.gen';

View file

@ -1,103 +1,22 @@
// This file is auto-generated by @hey-api/openapi-ts
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch'
import type {
TokenData,
TokenResponses,
TokenErrors,
CreatewalletData,
CreatewalletResponses,
CreatewalletErrors,
RecoverwalletData,
RecoverwalletResponses,
RecoverwalletErrors,
UnlockwalletData,
UnlockwalletResponses,
UnlockwalletErrors,
LockwalletData,
LockwalletResponses,
LockwalletErrors,
DisplaywalletData,
DisplaywalletResponses,
DisplaywalletErrors,
SessionData,
SessionResponses,
SessionErrors,
VersionData,
VersionResponses,
ListwalletsData,
ListwalletsResponses,
ListwalletsErrors,
YieldgenreportData,
YieldgenreportResponses,
YieldgenreportErrors,
GetaddressData,
GetaddressResponses,
GetaddressErrors,
RescanblockchainData,
RescanblockchainResponses,
RescanblockchainErrors,
GetrescaninfoData,
GetrescaninfoResponses,
GetrescaninfoErrors,
GettimelockaddressData,
GettimelockaddressResponses,
GettimelockaddressErrors,
ListutxosData,
ListutxosResponses,
ListutxosErrors,
DirectsendData,
DirectsendResponses,
DirectsendErrors,
StartmakerData,
StartmakerResponses,
StartmakerErrors,
StopmakerData,
StopmakerResponses,
StopmakerErrors,
DocoinjoinData,
DocoinjoinResponses,
DocoinjoinErrors,
GetscheduleData,
GetscheduleResponses,
GetscheduleErrors,
RunscheduleData,
RunscheduleResponses,
RunscheduleErrors,
StopcoinjoinData,
StopcoinjoinResponses,
StopcoinjoinErrors,
ConfigsettingData,
ConfigsettingResponses,
ConfigsettingErrors,
ConfiggetData,
ConfiggetResponses,
ConfiggetErrors,
FreezeData,
FreezeResponses,
FreezeErrors,
GetseedData,
GetseedResponses,
GetseedErrors,
} from './types.gen'
import { client as _heyApiClient } from './client.gen'
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
import type { TokenData, TokenResponses, TokenErrors, CreatewalletData, CreatewalletResponses, CreatewalletErrors, RecoverwalletData, RecoverwalletResponses, RecoverwalletErrors, UnlockwalletData, UnlockwalletResponses, UnlockwalletErrors, LockwalletData, LockwalletResponses, LockwalletErrors, DisplaywalletData, DisplaywalletResponses, DisplaywalletErrors, SessionData, SessionResponses, SessionErrors, VersionData, VersionResponses, ListwalletsData, ListwalletsResponses, ListwalletsErrors, YieldgenreportData, YieldgenreportResponses, YieldgenreportErrors, GetaddressData, GetaddressResponses, GetaddressErrors, RescanblockchainData, RescanblockchainResponses, RescanblockchainErrors, GetrescaninfoData, GetrescaninfoResponses, GetrescaninfoErrors, GettimelockaddressData, GettimelockaddressResponses, GettimelockaddressErrors, ListutxosData, ListutxosResponses, ListutxosErrors, DirectsendData, DirectsendResponses, DirectsendErrors, StartmakerData, StartmakerResponses, StartmakerErrors, StopmakerData, StopmakerResponses, StopmakerErrors, DocoinjoinData, DocoinjoinResponses, DocoinjoinErrors, GetscheduleData, GetscheduleResponses, GetscheduleErrors, RunscheduleData, RunscheduleResponses, RunscheduleErrors, StopcoinjoinData, StopcoinjoinResponses, StopcoinjoinErrors, ConfigsettingData, ConfigsettingResponses, ConfigsettingErrors, ConfiggetData, ConfiggetResponses, ConfiggetErrors, FreezeData, FreezeResponses, FreezeErrors, GetseedData, GetseedResponses, GetseedErrors } from './types.gen';
import { client as _heyApiClient } from './client.gen';
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<
TData,
ThrowOnError
> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: Record<string, unknown>
}
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client;
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: Record<string, unknown>;
};
/**
* The token endpoint is used by the client to obtain an access token using a grant such as refresh token
@ -105,468 +24,448 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
*
*/
export const token = <ThrowOnError extends boolean = false>(options?: Options<TokenData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).post<TokenResponses, TokenErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/token',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers,
},
})
}
return (options?.client ?? _heyApiClient).post<TokenResponses, TokenErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/token',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};
/**
* create a new wallet
* Give a filename (.jmdat must be included) and a password, create the wallet and get back the seedphrase for the newly persisted wallet file. The wallettype variable must be one of "sw" - segwit native, "sw-legacy" - segwit legacy or "sw-fb" - segwit native with fidelity bonds supported, the last of which is the default. Note that this operation cannot be performed when a wallet is already loaded (unlocked).
*/
export const createwallet = <ThrowOnError extends boolean = false>(
options?: Options<CreatewalletData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).post<CreatewalletResponses, CreatewalletErrors, ThrowOnError>({
url: '/wallet/create',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers,
},
})
}
export const createwallet = <ThrowOnError extends boolean = false>(options?: Options<CreatewalletData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).post<CreatewalletResponses, CreatewalletErrors, ThrowOnError>({
url: '/wallet/create',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};
/**
* recover a wallet from a seedphrase
* Give a filename (.jmdat must be included), a wallettype, a seedphrase and a password, create the wallet for the newly persisted wallet file. The wallettype variable must be one of "sw" - segwit native, "sw-legacy" - segwit legacy or "sw-fb" - segwit native with fidelity bonds supported, the last of which is the default. The seedphrase must be a single string with words space-separated, and must conform to BIP39 (else 400 is returned). Note that this operation cannot be performed when a wallet is already loaded (unlocked).
*/
export const recoverwallet = <ThrowOnError extends boolean = false>(
options?: Options<RecoverwalletData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).post<RecoverwalletResponses, RecoverwalletErrors, ThrowOnError>({
url: '/wallet/recover',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers,
},
})
}
export const recoverwallet = <ThrowOnError extends boolean = false>(options?: Options<RecoverwalletData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).post<RecoverwalletResponses, RecoverwalletErrors, ThrowOnError>({
url: '/wallet/recover',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};
/**
* decrypt an existing wallet
* Give the password for the specified (existing) wallet file, and it will be decrypted ready for use. Note that this operation cannot be performed when another wallet is already loaded (unlocked).
*/
export const unlockwallet = <ThrowOnError extends boolean = false>(
options: Options<UnlockwalletData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).post<UnlockwalletResponses, UnlockwalletErrors, ThrowOnError>({
url: '/wallet/{walletname}/unlock',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
export const unlockwallet = <ThrowOnError extends boolean = false>(options: Options<UnlockwalletData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<UnlockwalletResponses, UnlockwalletErrors, ThrowOnError>({
url: '/wallet/{walletname}/unlock',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* block access to a currently decrypted wallet
* After this (authenticated) action, the wallet will not be readable or writeable.
*/
export const lockwallet = <ThrowOnError extends boolean = false>(options: Options<LockwalletData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<LockwalletResponses, LockwalletErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/lock',
...options,
})
}
return (options.client ?? _heyApiClient).get<LockwalletResponses, LockwalletErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/lock',
...options
});
};
/**
* get detailed breakdown of wallet contents by account.
* get detailed breakdown of wallet contents by account.
*/
export const displaywallet = <ThrowOnError extends boolean = false>(
options: Options<DisplaywalletData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<DisplaywalletResponses, DisplaywalletErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/display',
...options,
})
}
export const displaywallet = <ThrowOnError extends boolean = false>(options: Options<DisplaywalletData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<DisplaywalletResponses, DisplaywalletErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/display',
...options
});
};
/**
* get current status of backend
* get whether a wallet is loaded and whether coinjoin/maker are happening. if an auth token is provided, which is optional, it will be validated.
*/
export const session = <ThrowOnError extends boolean = false>(options?: Options<SessionData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<SessionResponses, SessionErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/session',
...options,
})
}
return (options?.client ?? _heyApiClient).get<SessionResponses, SessionErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/session',
...options
});
};
/**
* get info on backend
* get information about backend, including the version of Joinmarket running.
*/
export const version = <ThrowOnError extends boolean = false>(options?: Options<VersionData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<VersionResponses, unknown, ThrowOnError>({
url: '/getinfo',
...options,
})
}
return (options?.client ?? _heyApiClient).get<VersionResponses, unknown, ThrowOnError>({
url: '/getinfo',
...options
});
};
/**
* get current available wallets
* get all wallet filenames in standard location as a list
*/
export const listwallets = <ThrowOnError extends boolean = false>(options?: Options<ListwalletsData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<ListwalletsResponses, ListwalletsErrors, ThrowOnError>({
url: '/wallet/all',
...options,
})
}
return (options?.client ?? _heyApiClient).get<ListwalletsResponses, ListwalletsErrors, ThrowOnError>({
url: '/wallet/all',
...options
});
};
/**
* get latest report on yield generating activity
* Get list of coinjoins taken part in as maker (across all wallets). Data returned as list of strings, each one in the same comma separated format as found in yigen-statement.csv. Note that this returns all lines in the file, including the lines that are only present to represent the starting of a bot. Those lines contain the word Connected and can be thus discarded. The header line is also delivered and so can be ignored as per the client requirements.
*
*/
export const yieldgenreport = <ThrowOnError extends boolean = false>(
options?: Options<YieldgenreportData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).get<YieldgenreportResponses, YieldgenreportErrors, ThrowOnError>({
url: '/wallet/yieldgen/report',
...options,
})
}
export const yieldgenreport = <ThrowOnError extends boolean = false>(options?: Options<YieldgenreportData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<YieldgenreportResponses, YieldgenreportErrors, ThrowOnError>({
url: '/wallet/yieldgen/report',
...options
});
};
/**
* get a fresh address in the given account for depositing funds.
* get a fresh address in the given account for depositing funds.
*/
export const getaddress = <ThrowOnError extends boolean = false>(options: Options<GetaddressData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<GetaddressResponses, GetaddressErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/address/new/{mixdepth}',
...options,
})
}
return (options.client ?? _heyApiClient).get<GetaddressResponses, GetaddressErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/address/new/{mixdepth}',
...options
});
};
/**
* Rescan the blockchain from a given blockheight
* Use this operation on recovered wallets to re-sync the wallet
*/
export const rescanblockchain = <ThrowOnError extends boolean = false>(
options: Options<RescanblockchainData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<RescanblockchainResponses, RescanblockchainErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/rescanblockchain/{blockheight}',
...options,
})
}
export const rescanblockchain = <ThrowOnError extends boolean = false>(options: Options<RescanblockchainData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<RescanblockchainResponses, RescanblockchainErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/rescanblockchain/{blockheight}',
...options
});
};
/**
* get the current rescan status
* get the current rescan status
*/
export const getrescaninfo = <ThrowOnError extends boolean = false>(
options: Options<GetrescaninfoData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<GetrescaninfoResponses, GetrescaninfoErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/getrescaninfo',
...options,
})
}
export const getrescaninfo = <ThrowOnError extends boolean = false>(options: Options<GetrescaninfoData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<GetrescaninfoResponses, GetrescaninfoErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/getrescaninfo',
...options
});
};
/**
* get a fresh timelock address
* get a new timelocked address, for depositing funds, to create a fidelity bond, which will automatically be used when the maker is started. specify the date in YYYY-mm as the last path parameter. Note that mixdepth is not specified as timelock addresses are always in mixdepth(account) zero.
*/
export const gettimelockaddress = <ThrowOnError extends boolean = false>(
options: Options<GettimelockaddressData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<GettimelockaddressResponses, GettimelockaddressErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/address/timelock/new/{lockdate}',
...options,
})
}
export const gettimelockaddress = <ThrowOnError extends boolean = false>(options: Options<GettimelockaddressData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<GettimelockaddressResponses, GettimelockaddressErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/address/timelock/new/{lockdate}',
...options
});
};
/**
* list details of all utxos currently in the wallet.
* list details of all utxos currently in the wallet.
*/
export const listutxos = <ThrowOnError extends boolean = false>(options: Options<ListutxosData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<ListutxosResponses, ListutxosErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/utxos',
...options,
})
}
return (options.client ?? _heyApiClient).get<ListutxosResponses, ListutxosErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/utxos',
...options
});
};
/**
* create and broadcast a transaction (without coinjoin)
* create and broadcast a transaction (without coinjoin)
*/
export const directsend = <ThrowOnError extends boolean = false>(options: Options<DirectsendData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<DirectsendResponses, DirectsendErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/taker/direct-send',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
return (options.client ?? _heyApiClient).post<DirectsendResponses, DirectsendErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/taker/direct-send',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* Start the yield generator service.
* Start the yield generator service with the configuration settings specified in the POST request. Note that if fidelity bonds are enabled in the wallet, and a timelock address has been generated, and then funded, the fidelity bond will automatically be advertised without any specific configuration in this request. Note that if the wallet does not have confirmed coins, or another taker or maker coinjoin service is already running, the maker will not start.
*/
export const startmaker = <ThrowOnError extends boolean = false>(options: Options<StartmakerData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<StartmakerResponses, StartmakerErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/maker/start',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
return (options.client ?? _heyApiClient).post<StartmakerResponses, StartmakerErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/maker/start',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* stop the yield generator service
* stop the yield generator service
*/
export const stopmaker = <ThrowOnError extends boolean = false>(options: Options<StopmakerData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<StopmakerResponses, StopmakerErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/maker/stop',
...options,
})
}
return (options.client ?? _heyApiClient).get<StopmakerResponses, StopmakerErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/maker/stop',
...options
});
};
/**
* initiate a coinjoin as taker
* initiate a coinjoin as taker
*/
export const docoinjoin = <ThrowOnError extends boolean = false>(options: Options<DocoinjoinData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<DocoinjoinResponses, DocoinjoinErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/taker/coinjoin',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
return (options.client ?? _heyApiClient).post<DocoinjoinResponses, DocoinjoinErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/taker/coinjoin',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* get the schedule that is currently running
* Get the current transaction schedule if one is running.
*/
export const getschedule = <ThrowOnError extends boolean = false>(options: Options<GetscheduleData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<GetscheduleResponses, GetscheduleErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/taker/schedule',
...options,
})
}
return (options.client ?? _heyApiClient).get<GetscheduleResponses, GetscheduleErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/taker/schedule',
...options
});
};
/**
* create and run a schedule of transactions
* Creates and then starts a schedule of transactions.
*/
export const runschedule = <ThrowOnError extends boolean = false>(options: Options<RunscheduleData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<RunscheduleResponses, RunscheduleErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/taker/schedule',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
return (options.client ?? _heyApiClient).post<RunscheduleResponses, RunscheduleErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/taker/schedule',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* stop a running coinjoin attempt
* stop a running coinjoin attempt
*/
export const stopcoinjoin = <ThrowOnError extends boolean = false>(
options: Options<StopcoinjoinData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<StopcoinjoinResponses, StopcoinjoinErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/taker/stop',
...options,
})
}
export const stopcoinjoin = <ThrowOnError extends boolean = false>(options: Options<StopcoinjoinData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<StopcoinjoinResponses, StopcoinjoinErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/taker/stop',
...options
});
};
/**
* change a config variable
* change a config variable (for the duration of this backend daemon process instance)
*/
export const configsetting = <ThrowOnError extends boolean = false>(
options: Options<ConfigsettingData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).post<ConfigsettingResponses, ConfigsettingErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/configset',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
export const configsetting = <ThrowOnError extends boolean = false>(options: Options<ConfigsettingData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<ConfigsettingResponses, ConfigsettingErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/configset',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* get the value of a specific config setting
* Get the value of a specific config setting. Note values are always returned as string.
*/
export const configget = <ThrowOnError extends boolean = false>(options: Options<ConfiggetData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<ConfiggetResponses, ConfiggetErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/configget',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
return (options.client ?? _heyApiClient).post<ConfiggetResponses, ConfiggetErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/configget',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* freeze or unfreeze an individual utxo for spending
* freeze or unfreeze an individual utxo for spending
*/
export const freeze = <ThrowOnError extends boolean = false>(options: Options<FreezeData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<FreezeResponses, FreezeErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/freeze',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers,
},
})
}
return (options.client ?? _heyApiClient).post<FreezeResponses, FreezeErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/freeze',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
};
/**
* get the mnemonic recovery phrase with the optional passphrase
* Get the mnemonic recovery phrase with the optional passphrase. Not the response is a sentence with few line breaks.
*/
export const getseed = <ThrowOnError extends boolean = false>(options: Options<GetseedData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<GetseedResponses, GetseedErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http',
},
],
url: '/wallet/{walletname}/getseed',
...options,
})
}
return (options.client ?? _heyApiClient).get<GetseedResponses, GetseedErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/wallet/{walletname}/getseed',
...options
});
};

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
import type { ClientOptions } from './generated/client/types.gen'
import { createClient as __createClient, createConfig } from '@hey-api/client-fetch'
import type { ClientOptions } from '@/lib/jm-api/generated/client'
export const createClient = (options: ClientOptions) => __createClient(createConfig<ClientOptions>(options))

View file

@ -1,4 +1,4 @@
import type { UnlockWalletResponse } from './jm-api/generated/client'
import type { UnlockWalletResponse } from '@/lib/jm-api/generated/client'
interface SessionData {
walletFileName: string

View file

@ -1,4 +1,4 @@
import { clsx, type ClassValue } from 'clsx'
import { type ClassValue, clsx } from 'clsx'
import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {

View file

@ -1,7 +1,7 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from '@/App.tsx'
import './index.css'
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>

View file

@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Alert, AlertTitle, AlertDescription } from '../components/ui/alert'
import { AlertCircle, CheckCircle2 } from 'lucide-react'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
const meta: Meta<typeof Alert> = {
title: 'Core/Alert',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Avatar, AvatarImage, AvatarFallback } from '../components/ui/avatar'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
const meta: Meta<typeof Avatar> = {
title: 'Core/Avatar',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Badge } from '../components/ui/badge'
import { Badge } from '@/components/ui/badge'
const meta: Meta<typeof Badge> = {
title: 'Core/Badge',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Button } from '../components/ui/button'
import { Button } from '@/components/ui/button'
const meta: Meta<typeof Button> = {
title: 'Core/Button',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Card, CardHeader, CardTitle, CardDescription } from '../components/ui/card'
import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
const meta: Meta<typeof Card> = {
title: 'Core/Card',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Footer } from '../components/Footer'
import { Footer } from '@/components/Footer'
const meta: Meta<typeof Footer> = {
title: 'Core/Footer',

View file

@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Input } from '../components/ui/input'
import { Label } from '../components/ui/label'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
const meta: Meta<typeof Input> = {
title: 'Core/Input',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Jar } from '../components/layout/Jar'
import { Jar } from '@/components/layout/Jar'
const meta: Meta<typeof Jar> = {
title: 'Core/Jar',

View file

@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Label } from '../components/ui/label'
import { Input } from '../components/ui/input'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
const meta: Meta<typeof Label> = {
title: 'Core/Label',

View file

@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Navbar } from '../components/Navbar'
import { Bitcoin } from 'lucide-react'
import { MemoryRouter } from 'react-router-dom'
import { Navbar } from '@/components/Navbar'
import type { JarColor } from '@/components/layout/display-mode-context'
const meta: Meta<typeof Navbar> = {

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Navigation } from '../components/layout/Navigation'
import { Navigation } from '@/components/layout/Navigation'
const meta: Meta<typeof Navigation> = {
title: 'Core/Navigation',

View file

@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Label } from '@/components/ui/label'
import {
Select,
SelectContent,
@ -8,8 +9,7 @@ import {
SelectSeparator,
SelectTrigger,
SelectValue,
} from '../components/ui/select'
import { Label } from '../components/ui/label'
} from '@/components/ui/select'
const meta: Meta<typeof Select> = {
title: 'Core/Select',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Separator } from '../components/ui/separator'
import { Separator } from '@/components/ui/separator'
const meta: Meta<typeof Separator> = {
title: 'Core/Separator',

View file

@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Toaster } from '../components/ui/sonner'
import { Button } from '../components/ui/button'
import { toast } from 'sonner'
import { Button } from '@/components/ui/button'
import { Toaster } from '@/components/ui/sonner'
const meta: Meta<typeof Toaster> = {
title: 'Core/Sonner',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { useEffect, useState } from 'react'
import type { Meta, StoryObj } from '@storybook/react-vite'
const meta: Meta = {
title: 'Core/ThemeToggle',

View file

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import { Tooltip, TooltipTrigger, TooltipContent } from '../components/ui/tooltip'
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
const meta: Meta<typeof Tooltip> = {
title: 'Core/Tooltip',

View file

@ -1,8 +1,8 @@
import path from 'path'
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import { defineConfig, type ServerOptions, type UserConfig } from 'vite'
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin'
import path from 'path'
import { type ServerOptions, type UserConfig, defineConfig } from 'vite'
const BACKEND_NATIVE = 'native'
const BACKEND_STANDALONE = 'jam-standalone'