Commit 5bf34683 by t0ng7u

chore: run `bun format` to automatically format the frontend code

parent e514db20
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
### 技术栈 ### 技术栈
| 类别 | 技术 | | 类别 | 技术 |
|----------|------| | ---------- | ----------------------------------------------------------------- |
| 包管理 | Bun | | 包管理 | Bun |
| 框架 | React 19、TypeScript | | 框架 | React 19、TypeScript |
| 数据与请求 | @tanstack/react-query、axios、Zustand | | 数据与请求 | @tanstack/react-query、axios、Zustand |
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
| UI 与样式 | Base UI、Hugeicons、Tailwind CSS、clsx / class-variance-authority | | UI 与样式 | Base UI、Hugeicons、Tailwind CSS、clsx / class-variance-authority |
| 表单 | React Hook Form、Zod | | 表单 | React Hook Form、Zod |
| 图表 | @visactor/vchart、@visactor/react-vchart | | 图表 | @visactor/vchart、@visactor/react-vchart |
| 工具 | qrcode.react、oxfmt、oxlint、vitest(可选)| | 工具 | qrcode.react、oxfmt、oxlint、vitest(可选) |
优先选用成熟、维护良好的开源库;仅在现有库无法满足或需特殊适配时自行实现,并评估可维护性与通用性。 优先选用成熟、维护良好的开源库;仅在现有库无法满足或需特殊适配时自行实现,并评估可维护性与通用性。
......
import type { KnipConfig } from 'knip'; import type { KnipConfig } from 'knip'
const config: KnipConfig = { const config: KnipConfig = {
ignore: ['src/components/ui/**', 'src/routeTree.gen.ts'], ignore: ['src/components/ui/**', 'src/routeTree.gen.ts'],
ignoreDependencies: ["tailwindcss", "tw-animate-css"] ignoreDependencies: ['tailwindcss', 'tw-animate-css'],
}; }
export default config; export default config
\ No newline at end of file
[[redirects]] [[redirects]]
from = "/*" from = "/*"
to = "/index.html" to = "/index.html"
status = 200 status = 200
\ No newline at end of file
...@@ -138,7 +138,14 @@ function countLeafKeys(obj) { ...@@ -138,7 +138,14 @@ function countLeafKeys(obj) {
return count return count
} }
function reorderLikeBase(base, target, fill, extras, missing, currentPath = []) { function reorderLikeBase(
base,
target,
fill,
extras,
missing,
currentPath = []
) {
// If base is an object, we keep base's key order and recurse. // If base is an object, we keep base's key order and recurse.
if (isPlainObject(base)) { if (isPlainObject(base)) {
const out = {} const out = {}
...@@ -148,10 +155,24 @@ function reorderLikeBase(base, target, fill, extras, missing, currentPath = []) ...@@ -148,10 +155,24 @@ function reorderLikeBase(base, target, fill, extras, missing, currentPath = [])
for (const key of Object.keys(base)) { for (const key of Object.keys(base)) {
const nextPath = [...currentPath, key] const nextPath = [...currentPath, key]
if (Object.prototype.hasOwnProperty.call(t, key)) { if (Object.prototype.hasOwnProperty.call(t, key)) {
out[key] = reorderLikeBase(base[key], t[key], f[key], extras, missing, nextPath) out[key] = reorderLikeBase(
base[key],
t[key],
f[key],
extras,
missing,
nextPath
)
} else { } else {
missing.push(nextPath.join('.')) missing.push(nextPath.join('.'))
out[key] = reorderLikeBase(base[key], undefined, f[key], extras, missing, nextPath) out[key] = reorderLikeBase(
base[key],
undefined,
f[key],
extras,
missing,
nextPath
)
} }
} }
...@@ -208,7 +229,8 @@ function isLikelyUntranslated({ locale, baseValue, value }) { ...@@ -208,7 +229,8 @@ function isLikelyUntranslated({ locale, baseValue, value }) {
if (locale === 'ru') return true if (locale === 'ru') return true
// For fr/vi: still useful but noisier; keep it conservative. // For fr/vi: still useful but noisier; keep it conservative.
if (locale === 'fr' || locale === 'vi') return /\b(the|and|or|to|with|please)\b/i.test(s) if (locale === 'fr' || locale === 'vi')
return /\b(the|and|or|to|with|please)\b/i.test(s)
return false return false
} }
...@@ -234,7 +256,9 @@ async function main() { ...@@ -234,7 +256,9 @@ async function main() {
const trans = json?.translation ?? {} const trans = json?.translation ?? {}
return { locale, score: countLeafKeys(trans) } return { locale, score: countLeafKeys(trans) }
}) })
.sort((a, b) => b.score - a.score || a.locale.localeCompare(b.locale))[0]?.locale .sort(
(a, b) => b.score - a.score || a.locale.localeCompare(b.locale)
)[0]?.locale
if (!baseLocale) throw new Error('No locale files found.') if (!baseLocale) throw new Error('No locale files found.')
...@@ -289,31 +313,44 @@ async function main() { ...@@ -289,31 +313,44 @@ async function main() {
} }
if (Object.keys(extras).length > 0) { if (Object.keys(extras).length > 0) {
await fs.writeFile(path.join(extrasDir, `${locale}.extras.json`), stableStringify(extras), 'utf8') await fs.writeFile(
path.join(extrasDir, `${locale}.extras.json`),
stableStringify(extras),
'utf8'
)
} else { } else {
await fs.rm(path.join(extrasDir, `${locale}.extras.json`), { force: true }) await fs.rm(path.join(extrasDir, `${locale}.extras.json`), {
force: true,
})
} }
if (Object.keys(untranslated).length > 0) { if (Object.keys(untranslated).length > 0) {
await fs.writeFile( await fs.writeFile(
path.join(reportsDir, `${locale}.untranslated.json`), path.join(reportsDir, `${locale}.untranslated.json`),
stableStringify(untranslated), stableStringify(untranslated),
'utf8', 'utf8'
) )
} else { } else {
await fs.rm(path.join(reportsDir, `${locale}.untranslated.json`), { force: true }) await fs.rm(path.join(reportsDir, `${locale}.untranslated.json`), {
force: true,
})
} }
// Rewrite locale file in base order (even for en to normalize formatting) // Rewrite locale file in base order (even for en to normalize formatting)
await fs.writeFile(full, stableStringify(fixed), 'utf8') await fs.writeFile(full, stableStringify(fixed), 'utf8')
} }
await fs.writeFile(path.join(reportsDir, '_sync-report.json'), stableStringify(report), 'utf8') await fs.writeFile(
path.join(reportsDir, '_sync-report.json'),
stableStringify(report),
'utf8'
)
console.log(`i18n sync done. Report: ${path.join(reportsDir, '_sync-report.json')}`) console.log(
`i18n sync done. Report: ${path.join(reportsDir, '_sync-report.json')}`
)
} }
main().catch((err) => { main().catch((err) => {
console.error(err) console.error(err)
process.exitCode = 1 process.exitCode = 1
}) })
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconDiscord({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconDiscord({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconDocker({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconDocker({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconFacebook({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconFacebook({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconFigma({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconFigma({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconGithub({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconGithub({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconGitlab({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconGitlab({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconGmail({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconGmail({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconLinuxDo({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconLinuxDo({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconMedium({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconMedium({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconNotion({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconNotion({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconSkype({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconSkype({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconSlack({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconSlack({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconStripe({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconStripe({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconTelegram({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconTelegram({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconTrello({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconTrello({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconWeChat({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconWeChat({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconWhatsapp({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconWhatsapp({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconZoom({ className, ...props }: SVGProps<SVGSVGElement>) { export function IconZoom({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function ClerkLogo({ className, ...props }: SVGProps<SVGSVGElement>) { export function ClerkLogo({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -17,8 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,8 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils'
import { type Direction } from '@/context/direction-provider' import { type Direction } from '@/context/direction-provider'
import { cn } from '@/lib/utils'
type IconDirProps = SVGProps<SVGSVGElement> & { type IconDirProps = SVGProps<SVGSVGElement> & {
dir: Direction dir: Direction
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function IconThemeSystem({ export function IconThemeSystem({
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react' import { type SVGProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export function Logo({ className, ...props }: SVGProps<SVGSVGElement>) { export function Logo({ className, ...props }: SVGProps<SVGSVGElement>) {
......
...@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
'use client' 'use client'
import type { ComponentProps } from 'react' import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Tooltip, Tooltip,
...@@ -27,6 +27,7 @@ import { ...@@ -27,6 +27,7 @@ import {
TooltipProvider, TooltipProvider,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
export type ActionsProps = ComponentProps<'div'> export type ActionsProps = ComponentProps<'div'>
......
...@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import type { ComponentProps, HTMLAttributes } from 'react'
import { type LucideIcon, XIcon } from 'lucide-react' import { type LucideIcon, XIcon } from 'lucide-react'
import type { ComponentProps, HTMLAttributes } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Tooltip, Tooltip,
...@@ -29,6 +29,7 @@ import { ...@@ -29,6 +29,7 @@ import {
TooltipProvider, TooltipProvider,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
export type ArtifactProps = HTMLAttributes<HTMLDivElement> export type ArtifactProps = HTMLAttributes<HTMLDivElement>
......
...@@ -18,6 +18,8 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,6 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import type { UIMessage } from 'ai'
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'
import { import {
type ComponentProps, type ComponentProps,
createContext, createContext,
...@@ -28,11 +30,10 @@ import { ...@@ -28,11 +30,10 @@ import {
useMemo, useMemo,
useState, useState,
} from 'react' } from 'react'
import type { UIMessage } from 'ai'
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
type BranchContextType = { type BranchContextType = {
currentBranch: number currentBranch: number
......
...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import { Background, ReactFlow, type ReactFlowProps } from '@xyflow/react' import { Background, ReactFlow, type ReactFlowProps } from '@xyflow/react'
import type { ReactNode } from 'react'
import '@xyflow/react/dist/style.css' import '@xyflow/react/dist/style.css'
import { Controls } from './controls' import { Controls } from './controls'
......
...@@ -19,26 +19,27 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -19,26 +19,27 @@ For commercial licensing, please contact support@quantumnous.com
'use client' 'use client'
import { import {
BrainIcon,
ChevronDownIcon,
DotIcon,
type LucideIcon,
} from 'lucide-react'
import {
type ComponentProps, type ComponentProps,
createContext, createContext,
memo, memo,
useContext, useContext,
useMemo, useMemo,
} from 'react' } from 'react'
import {
BrainIcon,
ChevronDownIcon,
DotIcon,
type LucideIcon,
} from 'lucide-react'
import { useControllableState } from '@/lib/use-controllable-state'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge' import { Badge } from '@/components/ui/badge'
import { import {
Collapsible, Collapsible,
CollapsibleContent, CollapsibleContent,
CollapsibleTrigger, CollapsibleTrigger,
} from '@/components/ui/collapsible' } from '@/components/ui/collapsible'
import { useControllableState } from '@/lib/use-controllable-state'
import { cn } from '@/lib/utils'
type ChainOfThoughtContextValue = { type ChainOfThoughtContextValue = {
isOpen: boolean isOpen: boolean
......
...@@ -18,16 +18,17 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,16 +18,17 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import type { ToolUIPart } from 'ai'
import { import {
type ComponentProps, type ComponentProps,
createContext, createContext,
type ReactNode, type ReactNode,
useContext, useContext,
} from 'react' } from 'react'
import type { ToolUIPart } from 'ai'
import { cn } from '@/lib/utils'
import { Alert, AlertDescription } from '@/components/ui/alert' import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
// Workaround for missing types in 'ai' package // Workaround for missing types in 'ai' package
type ExtendedToolState = type ExtendedToolState =
......
...@@ -18,11 +18,11 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,11 +18,11 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import { type ComponentProps, createContext, useContext } from 'react'
import type { LanguageModelUsage } from 'ai' import type { LanguageModelUsage } from 'ai'
import { type ComponentProps, createContext, useContext } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { getUsage } from 'tokenlens' import { getUsage } from 'tokenlens'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
HoverCard, HoverCard,
...@@ -30,6 +30,7 @@ import { ...@@ -30,6 +30,7 @@ import {
HoverCardTrigger, HoverCardTrigger,
} from '@/components/ui/hover-card' } from '@/components/ui/hover-card'
import { Progress } from '@/components/ui/progress' import { Progress } from '@/components/ui/progress'
import { cn } from '@/lib/utils'
const PERCENT_MAX = 100 const PERCENT_MAX = 100
const ICON_RADIUS = 10 const ICON_RADIUS = 10
......
...@@ -18,8 +18,9 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,8 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import type { ComponentProps } from 'react'
import { Controls as ControlsPrimitive } from '@xyflow/react' import { Controls as ControlsPrimitive } from '@xyflow/react'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export type ControlsProps = ComponentProps<typeof ControlsPrimitive> export type ControlsProps = ComponentProps<typeof ControlsPrimitive>
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { Experimental_GeneratedImage } from 'ai' import type { Experimental_GeneratedImage } from 'ai'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export type ImageProps = Experimental_GeneratedImage & { export type ImageProps = Experimental_GeneratedImage & {
......
...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react'
import { import {
type ComponentProps, type ComponentProps,
createContext, createContext,
...@@ -26,9 +27,8 @@ import { ...@@ -26,9 +27,8 @@ import {
useEffect, useEffect,
useState, useState,
} from 'react' } from 'react'
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge' import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
...@@ -42,6 +42,7 @@ import { ...@@ -42,6 +42,7 @@ import {
HoverCardContent, HoverCardContent,
HoverCardTrigger, HoverCardTrigger,
} from '@/components/ui/hover-card' } from '@/components/ui/hover-card'
import { cn } from '@/lib/utils'
export type InlineCitationProps = ComponentProps<'span'> export type InlineCitationProps = ComponentProps<'span'>
......
...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
import type { HTMLAttributes } from 'react' import type { HTMLAttributes } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
type LoaderIconProps = { type LoaderIconProps = {
......
...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ComponentProps, HTMLAttributes } from 'react'
import type { UIMessage } from 'ai' import type { UIMessage } from 'ai'
import { cva, type VariantProps } from 'class-variance-authority' import { cva, type VariantProps } from 'class-variance-authority'
import { cn } from '@/lib/utils' import type { ComponentProps, HTMLAttributes } from 'react'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { cn } from '@/lib/utils'
export type MessageProps = HTMLAttributes<HTMLDivElement> & { export type MessageProps = HTMLAttributes<HTMLDivElement> & {
from: UIMessage['role'] from: UIMessage['role']
......
...@@ -16,9 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,9 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ComponentProps } from 'react'
import { Handle, Position } from '@xyflow/react' import { Handle, Position } from '@xyflow/react'
import { cn } from '@/lib/utils' import type { ComponentProps } from 'react'
import { import {
Card, Card,
CardAction, CardAction,
...@@ -28,6 +28,7 @@ import { ...@@ -28,6 +28,7 @@ import {
CardHeader, CardHeader,
CardTitle, CardTitle,
} from '@/components/ui/card' } from '@/components/ui/card'
import { cn } from '@/lib/utils'
export type NodeProps = ComponentProps<typeof Card> & { export type NodeProps = ComponentProps<typeof Card> & {
handles: { handles: {
......
...@@ -16,14 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,14 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type ComponentProps, createContext, useContext } from 'react'
import { import {
ChevronDownIcon, ChevronDownIcon,
ExternalLinkIcon, ExternalLinkIcon,
MessageCircleIcon, MessageCircleIcon,
} from 'lucide-react' } from 'lucide-react'
import { type ComponentProps, createContext, useContext } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
DropdownMenu, DropdownMenu,
...@@ -33,6 +33,7 @@ import { ...@@ -33,6 +33,7 @@ import {
DropdownMenuSeparator, DropdownMenuSeparator,
DropdownMenuTrigger, DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu' } from '@/components/ui/dropdown-menu'
import { cn } from '@/lib/utils'
const providers = { const providers = {
github: { github: {
......
...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ComponentProps } from 'react'
import { Panel as PanelPrimitive } from '@xyflow/react' import { Panel as PanelPrimitive } from '@xyflow/react'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
type PanelProps = ComponentProps<typeof PanelPrimitive> type PanelProps = ComponentProps<typeof PanelPrimitive>
......
...@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import { type ComponentProps, createContext, useContext } from 'react'
import { ChevronsUpDownIcon } from 'lucide-react' import { ChevronsUpDownIcon } from 'lucide-react'
import { type ComponentProps, createContext, useContext } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Card, Card,
...@@ -37,6 +37,8 @@ import { ...@@ -37,6 +37,8 @@ import {
CollapsibleContent, CollapsibleContent,
CollapsibleTrigger, CollapsibleTrigger,
} from '@/components/ui/collapsible' } from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
import { Shimmer } from './shimmer' import { Shimmer } from './shimmer'
type PlanContextValue = { type PlanContextValue = {
......
...@@ -19,6 +19,18 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -19,6 +19,18 @@ For commercial licensing, please contact support@quantumnous.com
/* eslint-disable react-refresh/only-export-components */ /* eslint-disable react-refresh/only-export-components */
'use client' 'use client'
import type { ChatStatus, FileUIPart } from 'ai'
import {
ImageIcon,
Loader2Icon,
MicIcon,
PaperclipIcon,
PlusIcon,
SendIcon,
SquareIcon,
XIcon,
} from 'lucide-react'
import { nanoid } from 'nanoid'
import { import {
type ChangeEvent, type ChangeEvent,
type ChangeEventHandler, type ChangeEventHandler,
...@@ -41,20 +53,8 @@ import { ...@@ -41,20 +53,8 @@ import {
useRef, useRef,
useState, useState,
} from 'react' } from 'react'
import type { ChatStatus, FileUIPart } from 'ai'
import {
ImageIcon,
Loader2Icon,
MicIcon,
PaperclipIcon,
PlusIcon,
SendIcon,
SquareIcon,
XIcon,
} from 'lucide-react'
import { nanoid } from 'nanoid'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Command, Command,
...@@ -89,6 +89,7 @@ import { ...@@ -89,6 +89,7 @@ import {
SelectTrigger, SelectTrigger,
SelectValue, SelectValue,
} from '@/components/ui/select' } from '@/components/ui/select'
import { cn } from '@/lib/utils'
// ============================================================================ // ============================================================================
// Provider Context & Types // Provider Context & Types
......
...@@ -18,9 +18,9 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,9 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import type { ComponentProps } from 'react'
import { ChevronDownIcon, PaperclipIcon } from 'lucide-react' import { ChevronDownIcon, PaperclipIcon } from 'lucide-react'
import { cn } from '@/lib/utils' import type { ComponentProps } from 'react'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Collapsible, Collapsible,
...@@ -28,6 +28,7 @@ import { ...@@ -28,6 +28,7 @@ import {
CollapsibleTrigger, CollapsibleTrigger,
} from '@/components/ui/collapsible' } from '@/components/ui/collapsible'
import { ScrollArea } from '@/components/ui/scroll-area' import { ScrollArea } from '@/components/ui/scroll-area'
import { cn } from '@/lib/utils'
export type QueueMessagePart = { export type QueueMessagePart = {
type: string type: string
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import { t } from 'i18next' import { t } from 'i18next'
import type { ReactNode } from 'react'
import type { BlockquoteNode, ParsedNode } from 'stream-markdown-parser' import type { BlockquoteNode, ParsedNode } from 'stream-markdown-parser'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import { t } from 'i18next' import { t } from 'i18next'
import type { ReactNode } from 'react'
import type { HtmlBlockNode, ParsedNode } from 'stream-markdown-parser' import type { HtmlBlockNode, ParsedNode } from 'stream-markdown-parser'
import { hasParsedChildren, isHtmlBlockNode } from './response-node-guards' import { hasParsedChildren, isHtmlBlockNode } from './response-node-guards'
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import { t } from 'i18next' import { t } from 'i18next'
import type { ReactNode } from 'react'
import type { FootnoteNode } from 'stream-markdown-parser' import type { FootnoteNode } from 'stream-markdown-parser'
import type { BlockRendererOptions } from './response-types' import type { BlockRendererOptions } from './response-types'
......
...@@ -18,8 +18,9 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,8 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import { type CSSProperties, type ElementType, memo, useMemo } from 'react'
import { motion } from 'motion/react' import { motion } from 'motion/react'
import { type CSSProperties, type ElementType, memo, useMemo } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export type TextShimmerProps = { export type TextShimmerProps = {
......
...@@ -19,9 +19,10 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -19,9 +19,10 @@ For commercial licensing, please contact support@quantumnous.com
'use client' 'use client'
import type { ComponentProps } from 'react' import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area' import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'
import { cn } from '@/lib/utils'
export type SuggestionsProps = ComponentProps<typeof ScrollArea> export type SuggestionsProps = ComponentProps<typeof ScrollArea>
......
...@@ -18,14 +18,15 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,14 +18,15 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import type { ComponentProps } from 'react'
import { ChevronDownIcon, SearchIcon } from 'lucide-react' import { ChevronDownIcon, SearchIcon } from 'lucide-react'
import { cn } from '@/lib/utils' import type { ComponentProps } from 'react'
import { import {
Collapsible, Collapsible,
CollapsibleContent, CollapsibleContent,
CollapsibleTrigger, CollapsibleTrigger,
} from '@/components/ui/collapsible' } from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
export type TaskItemFileProps = ComponentProps<'div'> export type TaskItemFileProps = ComponentProps<'div'>
......
...@@ -18,7 +18,6 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,7 +18,6 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import { type ComponentProps, isValidElement, type ReactNode } from 'react'
import type { ToolUIPart } from 'ai' import type { ToolUIPart } from 'ai'
import { import {
CheckCircleIcon, CheckCircleIcon,
...@@ -28,14 +27,17 @@ import { ...@@ -28,14 +27,17 @@ import {
WrenchIcon, WrenchIcon,
XCircleIcon, XCircleIcon,
} from 'lucide-react' } from 'lucide-react'
import { type ComponentProps, isValidElement, type ReactNode } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge' import { Badge } from '@/components/ui/badge'
import { import {
Collapsible, Collapsible,
CollapsibleContent, CollapsibleContent,
CollapsibleTrigger, CollapsibleTrigger,
} from '@/components/ui/collapsible' } from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
import { CodeBlock } from './code-block' import { CodeBlock } from './code-block'
// Workaround for missing types in 'ai' package // Workaround for missing types in 'ai' package
......
...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ComponentProps } from 'react'
import { NodeToolbar, Position } from '@xyflow/react' import { NodeToolbar, Position } from '@xyflow/react'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
type ToolbarProps = ComponentProps<typeof NodeToolbar> type ToolbarProps = ComponentProps<typeof NodeToolbar>
......
...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
'use client' 'use client'
import { ChevronDownIcon } from 'lucide-react'
import { import {
type ComponentProps, type ComponentProps,
createContext, createContext,
...@@ -26,10 +27,8 @@ import { ...@@ -26,10 +27,8 @@ import {
useEffect, useEffect,
useState, useState,
} from 'react' } from 'react'
import { ChevronDownIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import dayjs from '@/lib/dayjs'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Collapsible, Collapsible,
...@@ -43,6 +42,8 @@ import { ...@@ -43,6 +42,8 @@ import {
TooltipProvider, TooltipProvider,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import dayjs from '@/lib/dayjs'
import { cn } from '@/lib/utils'
export type WebPreviewContextValue = { export type WebPreviewContextValue = {
url: string url: string
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useRef, useEffect, type ReactNode } from 'react' import { useRef, useEffect, type ReactNode } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
interface AnimateInViewProps { interface AnimateInViewProps {
......
...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import type { UseQueryResult } from '@tanstack/react-query' import type { UseQueryResult } from '@tanstack/react-query'
import { AutoSkeleton } from 'auto-skeleton-react' import { AutoSkeleton } from 'auto-skeleton-react'
import { useThemeRadiusPx } from '@/lib/theme-radius' import type { ReactNode } from 'react'
import { ErrorState } from '@/components/error-state' import { ErrorState } from '@/components/error-state'
import { useThemeRadiusPx } from '@/lib/theme-radius'
interface ContentSkeletonProps { interface ContentSkeletonProps {
loading: boolean loading: boolean
......
...@@ -16,13 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,13 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import React from 'react'
import { useLocation, useNavigate } from '@tanstack/react-router' import { useLocation, useNavigate } from '@tanstack/react-router'
import { ArrowRight, ChevronRight, Laptop, Moon, Sun } from 'lucide-react' import { ArrowRight, ChevronRight, Laptop, Moon, Sun } from 'lucide-react'
import React from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { useSearch } from '@/context/search-provider'
import { useTheme } from '@/context/theme-provider'
import { useSidebarData } from '@/hooks/use-sidebar-data'
import { import {
Command, Command,
CommandDialog, CommandDialog,
...@@ -33,6 +31,10 @@ import { ...@@ -33,6 +31,10 @@ import {
CommandList, CommandList,
CommandSeparator, CommandSeparator,
} from '@/components/ui/command' } from '@/components/ui/command'
import { useSearch } from '@/context/search-provider'
import { useTheme } from '@/context/theme-provider'
import { useSidebarData } from '@/hooks/use-sidebar-data'
import { getNavGroupsForPath } from './layout/lib/sidebar-view-registry' import { getNavGroupsForPath } from './layout/lib/sidebar-view-registry'
import { ScrollArea } from './ui/scroll-area' import { ScrollArea } from './ui/scroll-area'
......
...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type SVGProps } from 'react'
import { Radio as RadioPrimitive } from '@base-ui/react/radio' import { Radio as RadioPrimitive } from '@base-ui/react/radio'
import { RadioGroup as Radio } from '@base-ui/react/radio-group' import { RadioGroup as Radio } from '@base-ui/react/radio-group'
import { CircleCheck, Palette, RotateCcw } from 'lucide-react' import { CircleCheck, Palette, RotateCcw } from 'lucide-react'
import { type SVGProps } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { IconDir } from '@/assets/custom/icon-dir' import { IconDir } from '@/assets/custom/icon-dir'
import { IconLayoutCompact } from '@/assets/custom/icon-layout-compact' import { IconLayoutCompact } from '@/assets/custom/icon-layout-compact'
import { IconLayoutDefault } from '@/assets/custom/icon-layout-default' import { IconLayoutDefault } from '@/assets/custom/icon-layout-default'
...@@ -32,18 +33,11 @@ import { IconThemeDark } from '@/assets/custom/icon-theme-dark' ...@@ -32,18 +33,11 @@ import { IconThemeDark } from '@/assets/custom/icon-theme-dark'
import { IconThemeLight } from '@/assets/custom/icon-theme-light' import { IconThemeLight } from '@/assets/custom/icon-theme-light'
import { IconThemeSystem } from '@/assets/custom/icon-theme-system' import { IconThemeSystem } from '@/assets/custom/icon-theme-system'
import { import {
type ContentLayout, sideDrawerContentClassName,
THEME_PRESETS, sideDrawerFooterClassName,
type ThemeFont, sideDrawerFormClassName,
type ThemePreset, sideDrawerHeaderClassName,
type ThemeRadius, } from '@/components/drawer-layout'
type ThemeScale,
} from '@/lib/theme-customization'
import { cn } from '@/lib/utils'
import { useDirection } from '@/context/direction-provider'
import { type Collapsible, useLayout } from '@/context/layout-provider'
import { useThemeCustomization } from '@/context/theme-customization-provider'
import { useTheme } from '@/context/theme-provider'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Sheet, Sheet,
...@@ -54,12 +48,20 @@ import { ...@@ -54,12 +48,20 @@ import {
SheetTitle, SheetTitle,
SheetTrigger, SheetTrigger,
} from '@/components/ui/sheet' } from '@/components/ui/sheet'
import { useDirection } from '@/context/direction-provider'
import { type Collapsible, useLayout } from '@/context/layout-provider'
import { useThemeCustomization } from '@/context/theme-customization-provider'
import { useTheme } from '@/context/theme-provider'
import { import {
sideDrawerContentClassName, type ContentLayout,
sideDrawerFooterClassName, THEME_PRESETS,
sideDrawerFormClassName, type ThemeFont,
sideDrawerHeaderClassName, type ThemePreset,
} from '@/components/drawer-layout' type ThemeRadius,
type ThemeScale,
} from '@/lib/theme-customization'
import { cn } from '@/lib/utils'
import { useSidebar } from './ui/sidebar' import { useSidebar } from './ui/sidebar'
const Item = RadioPrimitive.Root const Item = RadioPrimitive.Root
......
...@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { import {
AlertDialog, AlertDialog,
AlertDialogCancel, AlertDialogCancel,
...@@ -28,6 +28,7 @@ import { ...@@ -28,6 +28,7 @@ import {
AlertDialogTitle, AlertDialogTitle,
} from '@/components/ui/alert-dialog' } from '@/components/ui/alert-dialog'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
type ConfirmDialogProps = { type ConfirmDialogProps = {
open: boolean open: boolean
......
...@@ -16,17 +16,18 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,17 +16,18 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { type ReactNode } from 'react'
import { Check, Copy } from 'lucide-react' import { Check, Copy } from 'lucide-react'
import { type ReactNode } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Tooltip, Tooltip,
TooltipContent, TooltipContent,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard'
import { cn } from '@/lib/utils'
interface CopyButtonProps { interface CopyButtonProps {
value: string value: string
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react' import * as React from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
type BadgeCellProps = React.HTMLAttributes<HTMLDivElement> type BadgeCellProps = React.HTMLAttributes<HTMLDivElement>
......
...@@ -17,13 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,13 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react' import * as React from 'react'
import { StatusBadgeList } from '@/components/status-badge'
import { import {
Tooltip, Tooltip,
TooltipContent, TooltipContent,
TooltipProvider, TooltipProvider,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { StatusBadgeList } from '@/components/status-badge'
interface BadgeListCellProps { interface BadgeListCellProps {
items: React.ReactNode[] items: React.ReactNode[]
......
...@@ -24,7 +24,7 @@ import { ...@@ -24,7 +24,7 @@ import {
EyeOff as EyeNoneIcon, EyeOff as EyeNoneIcon,
} from 'lucide-react' } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
DropdownMenu, DropdownMenu,
...@@ -33,6 +33,7 @@ import { ...@@ -33,6 +33,7 @@ import {
DropdownMenuSeparator, DropdownMenuSeparator,
DropdownMenuTrigger, DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu' } from '@/components/ui/dropdown-menu'
import { cn } from '@/lib/utils'
type DataTableColumnHeaderProps<TData, TValue> = type DataTableColumnHeaderProps<TData, TValue> =
React.HTMLAttributes<HTMLDivElement> & { React.HTMLAttributes<HTMLDivElement> & {
......
...@@ -21,7 +21,9 @@ import { ...@@ -21,7 +21,9 @@ import {
type Header, type Header,
type Table as TanstackTable, type Table as TanstackTable,
} from '@tanstack/react-table' } from '@tanstack/react-table'
import { TableHead, TableHeader, TableRow } from '@/components/ui/table' import { TableHead, TableHeader, TableRow } from '@/components/ui/table'
import { DataTableColumnHeader } from './column-header' import { DataTableColumnHeader } from './column-header'
import { isContentSizedColumn } from './content-sized-columns' import { isContentSizedColumn } from './content-sized-columns'
import type { DataTableColumnClassName } from './types' import type { DataTableColumnClassName } from './types'
......
...@@ -16,15 +16,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,15 +16,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { import {
flexRender, flexRender,
type Cell, type Cell,
type Row, type Row,
type Table as TanstackTable, type Table as TanstackTable,
} from '@tanstack/react-table' } from '@tanstack/react-table'
import { cn } from '@/lib/utils' import * as React from 'react'
import { TableCell, TableRow } from '@/components/ui/table' import { TableCell, TableRow } from '@/components/ui/table'
import { cn } from '@/lib/utils'
import { TruncatedCell } from './truncated-cell' import { TruncatedCell } from './truncated-cell'
import type { DataTableColumnClassName } from './types' import type { DataTableColumnClassName } from './types'
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import type { Row, Table as TanstackTable } from '@tanstack/react-table' import type { Row, Table as TanstackTable } from '@tanstack/react-table'
import * as React from 'react'
import { Table, TableBody, TableCell, TableRow } from '@/components/ui/table' import { Table, TableBody, TableCell, TableRow } from '@/components/ui/table'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
......
...@@ -24,7 +24,7 @@ import { ...@@ -24,7 +24,7 @@ import {
ChevronsRight as DoubleArrowRightIcon, ChevronsRight as DoubleArrowRightIcon,
} from 'lucide-react' } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn, getPageNumbers } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Select, Select,
...@@ -34,6 +34,7 @@ import { ...@@ -34,6 +34,7 @@ import {
SelectTrigger, SelectTrigger,
SelectValue, SelectValue,
} from '@/components/ui/select' } from '@/components/ui/select'
import { cn, getPageNumbers } from '@/lib/utils'
type DataTablePaginationProps<TData> = { type DataTablePaginationProps<TData> = {
table: Table<TData> table: Table<TData>
......
...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { MoreHorizontal } from 'lucide-react' import { MoreHorizontal } from 'lucide-react'
import * as React from 'react'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
DropdownMenu, DropdownMenu,
......
...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
import { Database } from 'lucide-react' import { Database } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { import {
Empty, Empty,
EmptyDescription, EmptyDescription,
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type * as React from 'react'
import type { Table as TanstackTable } from '@tanstack/react-table' import type { Table as TanstackTable } from '@tanstack/react-table'
import type * as React from 'react'
import { isContentSizedColumn } from './content-sized-columns' import { isContentSizedColumn } from './content-sized-columns'
......
...@@ -17,9 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,9 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { Table } from '@tanstack/react-table' import type { Table } from '@tanstack/react-table'
import { cn } from '@/lib/utils'
import { Skeleton } from '@/components/ui/skeleton' import { Skeleton } from '@/components/ui/skeleton'
import { TableRow, TableCell } from '@/components/ui/table' import { TableRow, TableCell } from '@/components/ui/table'
import { cn } from '@/lib/utils'
const SKELETON_WIDTHS = [ const SKELETON_WIDTHS = [
'75%', '75%',
......
...@@ -17,12 +17,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,12 +17,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react' import * as React from 'react'
import { cn } from '@/lib/utils'
import { import {
Tooltip, Tooltip,
TooltipContent, TooltipContent,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
type TruncatedCellProps = { type TruncatedCellProps = {
children: React.ReactNode children: React.ReactNode
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type * as React from 'react'
import type { Row, Table as TanstackTable } from '@tanstack/react-table' import type { Row, Table as TanstackTable } from '@tanstack/react-table'
import type * as React from 'react'
export type DataTableColumnClassName = ( export type DataTableColumnClassName = (
columnId: string, columnId: string,
......
...@@ -16,7 +16,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,7 +16,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { import {
type ColumnDef, type ColumnDef,
type ColumnFiltersState, type ColumnFiltersState,
...@@ -37,6 +36,7 @@ import { ...@@ -37,6 +36,7 @@ import {
getSortedRowModel, getSortedRowModel,
useReactTable, useReactTable,
} from '@tanstack/react-table' } from '@tanstack/react-table'
import * as React from 'react'
type DataTableFeatureOptions<TData> = Pick< type DataTableFeatureOptions<TData> = Pick<
TableOptions<TData>, TableOptions<TData>,
......
...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import type { ColumnFiltersState, OnChangeFn } from '@tanstack/react-table' import type { ColumnFiltersState, OnChangeFn } from '@tanstack/react-table'
import * as React from 'react'
import { useDebounce } from '@/hooks/use-debounce' import { useDebounce } from '@/hooks/use-debounce'
type UseDebouncedColumnFilterOptions = { type UseDebouncedColumnFilterOptions = {
......
...@@ -16,9 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,9 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import type { Row } from '@tanstack/react-table' import type { Row } from '@tanstack/react-table'
import * as React from 'react'
import { StatusBadgeTypeContext } from '@/components/status-badge' import { StatusBadgeTypeContext } from '@/components/status-badge'
import { getCellLabel, renderCellContent } from './card-cell-utils' import { getCellLabel, renderCellContent } from './card-cell-utils'
/** /**
......
...@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react' import * as React from 'react'
import { cn } from '@/lib/utils'
import { import {
Table, Table,
TableBody, TableBody,
...@@ -26,6 +26,8 @@ import { ...@@ -26,6 +26,8 @@ import {
TableHeader, TableHeader,
TableRow, TableRow,
} from '@/components/ui/table' } from '@/components/ui/table'
import { cn } from '@/lib/utils'
import { TruncatedCell } from '../core/truncated-cell' import { TruncatedCell } from '../core/truncated-cell'
import { staticDataTableClassNames } from './static-data-table-classnames' import { staticDataTableClassNames } from './static-data-table-classnames'
......
...@@ -17,11 +17,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,11 +17,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { Pencil, Trash2 } from 'lucide-react' import { Pencil, Trash2 } from 'lucide-react'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
DropdownMenuItem, DropdownMenuItem,
DropdownMenuShortcut, DropdownMenuShortcut,
} from '@/components/ui/dropdown-menu' } from '@/components/ui/dropdown-menu'
import { DataTableRowActionMenu } from '../core/row-action-menu' import { DataTableRowActionMenu } from '../core/row-action-menu'
type StaticRowActionsProps = { type StaticRowActionsProps = {
......
...@@ -16,11 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,11 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useState, useEffect, useLayoutEffect, useRef } from 'react'
import { type Table } from '@tanstack/react-table' import { type Table } from '@tanstack/react-table'
import { X } from 'lucide-react' import { X } from 'lucide-react'
import { useState, useEffect, useLayoutEffect, useRef } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge' import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Separator } from '@/components/ui/separator' import { Separator } from '@/components/ui/separator'
...@@ -29,6 +29,7 @@ import { ...@@ -29,6 +29,7 @@ import {
TooltipContent, TooltipContent,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
type DataTableBulkActionsProps<TData> = { type DataTableBulkActionsProps<TData> = {
table: Table<TData> table: Table<TData>
......
...@@ -16,11 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,11 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { type Column } from '@tanstack/react-table' import { type Column } from '@tanstack/react-table'
import { Check as CheckIcon, PlusCircle as PlusCircledIcon } from 'lucide-react' import { Check as CheckIcon, PlusCircle as PlusCircledIcon } from 'lucide-react'
import * as React from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge' import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
...@@ -38,6 +38,7 @@ import { ...@@ -38,6 +38,7 @@ import {
PopoverTrigger, PopoverTrigger,
} from '@/components/ui/popover' } from '@/components/ui/popover'
import { Separator } from '@/components/ui/separator' import { Separator } from '@/components/ui/separator'
import { cn } from '@/lib/utils'
type DataTableFacetedFilterProps<TData, TValue> = { type DataTableFacetedFilterProps<TData, TValue> = {
column?: Column<TData, TValue> column?: Column<TData, TValue>
......
...@@ -16,15 +16,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,15 +16,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { useState, type ReactNode } from 'react'
import type { Table } from '@tanstack/react-table' import type { Table } from '@tanstack/react-table'
import { useDebounce } from '@/hooks'
import { ChevronDown, Loader2, X as Cross2Icon } from 'lucide-react' import { ChevronDown, Loader2, X as Cross2Icon } from 'lucide-react'
import * as React from 'react'
import { useState, type ReactNode } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
import { useDebounce } from '@/hooks'
import { cn } from '@/lib/utils'
import { DataTableFacetedFilter } from './faceted-filter' import { DataTableFacetedFilter } from './faceted-filter'
import { DataTableViewOptions } from './view-options' import { DataTableViewOptions } from './view-options'
......
...@@ -18,12 +18,14 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -18,12 +18,14 @@ For commercial licensing, please contact support@quantumnous.com
*/ */
import { Grid2X2, Table2 } from 'lucide-react' import { Grid2X2, Table2 } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { import {
Tooltip, Tooltip,
TooltipContent, TooltipContent,
TooltipTrigger, TooltipTrigger,
} from '@/components/ui/tooltip' } from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
import { import {
DATA_TABLE_VIEW_MODES, DATA_TABLE_VIEW_MODES,
type DataTableViewMode, type DataTableViewMode,
......
...@@ -16,9 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,9 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { type Table } from '@tanstack/react-table' import { type Table } from '@tanstack/react-table'
import * as React from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
DropdownMenu, DropdownMenu,
......
...@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com ...@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
import { Calendar as CalendarIcon } from 'lucide-react' import { Calendar as CalendarIcon } from 'lucide-react'
import { enUS, fr, ja, ru, vi, zhCN } from 'react-day-picker/locale' import { enUS, fr, ja, ru, vi, zhCN } from 'react-day-picker/locale'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import dayjs from '@/lib/dayjs'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Calendar } from '@/components/ui/calendar' import { Calendar } from '@/components/ui/calendar'
import { import {
...@@ -27,6 +27,7 @@ import { ...@@ -27,6 +27,7 @@ import {
PopoverContent, PopoverContent,
PopoverTrigger, PopoverTrigger,
} from '@/components/ui/popover' } from '@/components/ui/popover'
import dayjs from '@/lib/dayjs'
const calendarLocales = { const calendarLocales = {
en: enUS, en: enUS,
......
...@@ -16,12 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,12 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react'
import { ChevronDownIcon } from 'lucide-react' import { ChevronDownIcon } from 'lucide-react'
import * as React from 'react'
import { enUS, fr, ja, ru, vi, zhCN } from 'react-day-picker/locale' import { enUS, fr, ja, ru, vi, zhCN } from 'react-day-picker/locale'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import dayjs from '@/lib/dayjs'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Calendar } from '@/components/ui/calendar' import { Calendar } from '@/components/ui/calendar'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
...@@ -30,6 +29,8 @@ import { ...@@ -30,6 +29,8 @@ import {
PopoverContent, PopoverContent,
PopoverTrigger, PopoverTrigger,
} from '@/components/ui/popover' } from '@/components/ui/popover'
import dayjs from '@/lib/dayjs'
import { cn } from '@/lib/utils'
const calendarLocales = { const calendarLocales = {
en: enUS, en: enUS,
......
...@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import * as React from 'react' import * as React from 'react'
import { cn } from '@/lib/utils'
import { import {
Dialog as DialogRoot, Dialog as DialogRoot,
DialogContent, DialogContent,
...@@ -27,6 +27,7 @@ import { ...@@ -27,6 +27,7 @@ import {
DialogTitle, DialogTitle,
DialogTrigger, DialogTrigger,
} from '@/components/ui/dialog' } from '@/components/ui/dialog'
import { cn } from '@/lib/utils'
type DialogProps = React.ComponentProps<typeof DialogRoot> & { type DialogProps = React.ComponentProps<typeof DialogRoot> & {
title: React.ReactNode title: React.ReactNode
......
...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { createElement, type ReactNode } from 'react' import { createElement, type ReactNode } from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
export const sideDrawerContentClassName = (className?: string) => export const sideDrawerContentClassName = (className?: string) =>
......
...@@ -16,10 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,10 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import { Database, type LucideIcon } from 'lucide-react' import { Database, type LucideIcon } from 'lucide-react'
import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { FadeIn } from '@/components/page-transition'
import { import {
Empty, Empty,
EmptyContent, EmptyContent,
...@@ -28,7 +29,7 @@ import { ...@@ -28,7 +29,7 @@ import {
EmptyMedia, EmptyMedia,
EmptyTitle, EmptyTitle,
} from '@/components/ui/empty' } from '@/components/ui/empty'
import { FadeIn } from '@/components/page-transition' import { cn } from '@/lib/utils'
interface EmptyStateProps { interface EmptyStateProps {
icon?: LucideIcon icon?: LucideIcon
......
...@@ -16,10 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,10 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import type { ReactNode } from 'react'
import { AlertTriangle, type LucideIcon } from 'lucide-react' import { AlertTriangle, type LucideIcon } from 'lucide-react'
import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { FadeIn } from '@/components/page-transition'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
Empty, Empty,
...@@ -29,7 +30,7 @@ import { ...@@ -29,7 +30,7 @@ import {
EmptyMedia, EmptyMedia,
EmptyTitle, EmptyTitle,
} from '@/components/ui/empty' } from '@/components/ui/empty'
import { FadeIn } from '@/components/page-transition' import { cn } from '@/lib/utils'
interface ErrorStateProps { interface ErrorStateProps {
icon?: LucideIcon icon?: LucideIcon
......
...@@ -17,7 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,7 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { StatusBadge, type StatusBadgeProps } from './status-badge' import { StatusBadge, type StatusBadgeProps } from './status-badge'
type GroupBadgeProps = Omit< type GroupBadgeProps = Omit<
......
...@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { AlertCircle, Braces, CheckCircle2, Code2 } from 'lucide-react'
import { import {
useMemo, useMemo,
useRef, useRef,
...@@ -23,11 +24,11 @@ import { ...@@ -23,11 +24,11 @@ import {
type ComponentProps, type ComponentProps,
type KeyboardEvent, type KeyboardEvent,
} from 'react' } from 'react'
import { AlertCircle, Braces, CheckCircle2, Code2 } from 'lucide-react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Textarea } from '@/components/ui/textarea' import { Textarea } from '@/components/ui/textarea'
import { cn } from '@/lib/utils'
export type JsonCodeEditorProps = Omit<ComponentProps<'div'>, 'onChange'> & { export type JsonCodeEditorProps = Omit<ComponentProps<'div'>, 'onChange'> & {
value: string value: string
......
...@@ -16,13 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,13 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useState, useEffect } from 'react'
import { Code, Table, Plus, Trash2 } from 'lucide-react' import { Code, Table, Plus, Trash2 } from 'lucide-react'
import { useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
import { Textarea } from '@/components/ui/textarea' import { Textarea } from '@/components/ui/textarea'
import { cn } from '@/lib/utils'
type JsonEditorProps = { type JsonEditorProps = {
value: string value: string
......
...@@ -16,16 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,16 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useCallback } from 'react'
import {
INTERFACE_LANGUAGE_OPTIONS,
normalizeInterfaceLanguage,
} from '@/i18n/languages'
import { Languages, Check } from 'lucide-react' import { Languages, Check } from 'lucide-react'
import { useCallback } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { useAuthStore } from '@/stores/auth-store'
import { api } from '@/lib/api'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { import {
DropdownMenu, DropdownMenu,
...@@ -33,6 +27,13 @@ import { ...@@ -33,6 +27,13 @@ import {
DropdownMenuItem, DropdownMenuItem,
DropdownMenuTrigger, DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu' } from '@/components/ui/dropdown-menu'
import {
INTERFACE_LANGUAGE_OPTIONS,
normalizeInterfaceLanguage,
} from '@/i18n/languages'
import { api } from '@/lib/api'
import { cn } from '@/lib/utils'
import { useAuthStore } from '@/stores/auth-store'
export function LanguageSwitcher() { export function LanguageSwitcher() {
const { i18n, t } = useTranslation() const { i18n, t } = useTranslation()
......
...@@ -16,13 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,13 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useNotifications } from '@/hooks/use-notifications'
import { useTopNavLinks } from '@/hooks/use-top-nav-links'
import { ConfigDrawer } from '@/components/config-drawer' import { ConfigDrawer } from '@/components/config-drawer'
import { LanguageSwitcher } from '@/components/language-switcher' import { LanguageSwitcher } from '@/components/language-switcher'
import { NotificationPopover } from '@/components/notification-popover' import { NotificationPopover } from '@/components/notification-popover'
import { ProfileDropdown } from '@/components/profile-dropdown' import { ProfileDropdown } from '@/components/profile-dropdown'
import { Search } from '@/components/search' import { Search } from '@/components/search'
import { useNotifications } from '@/hooks/use-notifications'
import { useTopNavLinks } from '@/hooks/use-top-nav-links'
import { defaultTopNavLinks } from '../config/top-nav.config' import { defaultTopNavLinks } from '../config/top-nav.config'
import { type TopNavLink } from '../types' import { type TopNavLink } from '../types'
import { Header } from './header' import { Header } from './header'
......
...@@ -17,10 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,10 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { AnimatePresence, motion, useReducedMotion } from 'motion/react' import { AnimatePresence, motion, useReducedMotion } from 'motion/react'
import { MOTION_TRANSITION, MOTION_VARIANTS } from '@/lib/motion'
import { Sidebar, SidebarContent, SidebarRail } from '@/components/ui/sidebar'
import { useLayout } from '@/context/layout-provider' import { useLayout } from '@/context/layout-provider'
import { useSidebarView } from '@/hooks/use-sidebar-view' import { useSidebarView } from '@/hooks/use-sidebar-view'
import { Sidebar, SidebarContent, SidebarRail } from '@/components/ui/sidebar' import { MOTION_TRANSITION, MOTION_VARIANTS } from '@/lib/motion'
import { NavGroup } from './nav-group' import { NavGroup } from './nav-group'
import { SidebarViewHeader } from './sidebar-view-header' import { SidebarViewHeader } from './sidebar-view-header'
......
...@@ -16,13 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,13 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { getCookie } from '@/lib/cookies'
import { cn } from '@/lib/utils'
import { LayoutProvider } from '@/context/layout-provider'
import { SearchProvider } from '@/context/search-provider'
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar'
import { AnimatedOutlet } from '@/components/page-transition' import { AnimatedOutlet } from '@/components/page-transition'
import { SkipToMain } from '@/components/skip-to-main' import { SkipToMain } from '@/components/skip-to-main'
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar'
import { LayoutProvider } from '@/context/layout-provider'
import { SearchProvider } from '@/context/search-provider'
import { getCookie } from '@/lib/cookies'
import { cn } from '@/lib/utils'
import { AppHeader } from './app-header' import { AppHeader } from './app-header'
import { AppSidebar } from './app-sidebar' import { AppSidebar } from './app-sidebar'
......
...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { useMemo, useCallback, useRef, useState } from 'react'
import { Link, useLocation } from '@tanstack/react-router' import { Link, useLocation } from '@tanstack/react-router'
import { ExternalLink, Loader2, ChevronRight } from 'lucide-react' import { ExternalLink, Loader2, ChevronRight } from 'lucide-react'
import { useMemo, useCallback, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { toast } from 'sonner' import { toast } from 'sonner'
import { import {
Collapsible, Collapsible,
CollapsibleContent, CollapsibleContent,
...@@ -47,6 +48,7 @@ import { ...@@ -47,6 +48,7 @@ import {
resolveChatUrl, resolveChatUrl,
type ChatPreset, type ChatPreset,
} from '@/features/chat/lib/chat-links' } from '@/features/chat/lib/chat-links'
import { normalizeHref } from '../lib/url-utils' import { normalizeHref } from '../lib/url-utils'
import type { NavChatPresets } from '../types' import type { NavChatPresets } from '../types'
......
...@@ -16,12 +16,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,12 +16,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { Fragment, useMemo } from 'react'
import { Link } from '@tanstack/react-router' import { Link } from '@tanstack/react-router'
import { Fragment, useMemo } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { useStatus } from '@/hooks/use-status' import { useStatus } from '@/hooks/use-status'
import { useSystemConfig } from '@/hooks/use-system-config' import { useSystemConfig } from '@/hooks/use-system-config'
import { cn } from '@/lib/utils'
interface FooterLink { interface FooterLink {
text: string text: string
......
...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import React from 'react'
import { cva, type VariantProps } from 'class-variance-authority' import { cva, type VariantProps } from 'class-variance-authority'
import React from 'react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
const glowVariants = cva('absolute w-full', { const glowVariants = cva('absolute w-full', {
......
...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import { cn } from '@/lib/utils'
import { SidebarTrigger } from '@/components/ui/sidebar' import { SidebarTrigger } from '@/components/ui/sidebar'
import { cn } from '@/lib/utils'
type HeaderProps = React.HTMLAttributes<HTMLElement> type HeaderProps = React.HTMLAttributes<HTMLElement>
......
...@@ -17,8 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -17,8 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com For commercial licensing, please contact support@quantumnous.com
*/ */
import React from 'react' import React from 'react'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge' import { Badge } from '@/components/ui/badge'
import { cn } from '@/lib/utils'
export interface LogoProps extends React.HTMLAttributes<HTMLDivElement> { export interface LogoProps extends React.HTMLAttributes<HTMLDivElement> {
image: React.ComponentType<React.SVGProps<SVGSVGElement>> image: React.ComponentType<React.SVGProps<SVGSVGElement>>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment