mirror of
https://github.com/cline/cline.git
synced 2025-06-03 03:59:07 +00:00
[ENG-514] Introduce UI library (#3222)
* update tailwind * install heroui * Introduce HeroUIProvider and reorganize providers * changeset * use tailwind config * use custom theme * changeset * Delete .changeset/large-boxes-behave.md
This commit is contained in:
parent
e35f7b4e21
commit
65243adb24
5
.changeset/ninety-numbers-decide.md
Normal file
5
.changeset/ninety-numbers-decide.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"claude-dev": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Introduce UI library for future UI development
|
4112
webview-ui/package-lock.json
generated
4112
webview-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,11 +15,13 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@floating-ui/react": "^0.27.4",
|
"@floating-ui/react": "^0.27.4",
|
||||||
|
"@heroui/react": "^2.8.0-beta.2",
|
||||||
"@vscode/webview-ui-toolkit": "^1.4.0",
|
"@vscode/webview-ui-toolkit": "^1.4.0",
|
||||||
"debounce": "^2.1.1",
|
"debounce": "^2.1.1",
|
||||||
"dompurify": "^3.2.4",
|
"dompurify": "^3.2.4",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"firebase": "^11.3.0",
|
"firebase": "^11.3.0",
|
||||||
|
"framer-motion": "^12.7.4",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"fzf": "^0.5.2",
|
"fzf": "^0.5.2",
|
||||||
"mermaid": "^11.4.1",
|
"mermaid": "^11.4.1",
|
||||||
@ -42,7 +44,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.17.0",
|
"@eslint/js": "^9.17.0",
|
||||||
"@tailwindcss/vite": "^4.0.12",
|
"@tailwindcss/vite": "^4.1.4",
|
||||||
"@testing-library/jest-dom": "^6.6.3",
|
"@testing-library/jest-dom": "^6.6.3",
|
||||||
"@testing-library/react": "^16.2.0",
|
"@testing-library/react": "^16.2.0",
|
||||||
"@testing-library/user-event": "^14.6.1",
|
"@testing-library/user-event": "^14.6.1",
|
||||||
@ -60,7 +62,7 @@
|
|||||||
"eslint-plugin-react-refresh": "^0.4.16",
|
"eslint-plugin-react-refresh": "^0.4.16",
|
||||||
"globals": "^15.14.0",
|
"globals": "^15.14.0",
|
||||||
"jsdom": "^26.0.0",
|
"jsdom": "^26.0.0",
|
||||||
"tailwindcss": "^4.0.12",
|
"tailwindcss": "^4.1.4",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
"typescript-eslint": "^8.18.2",
|
"typescript-eslint": "^8.18.2",
|
||||||
"vite": "^6.2.6",
|
"vite": "^6.2.6",
|
||||||
|
@ -6,10 +6,10 @@ import HistoryView from "./components/history/HistoryView"
|
|||||||
import SettingsView from "./components/settings/SettingsView"
|
import SettingsView from "./components/settings/SettingsView"
|
||||||
import WelcomeView from "./components/welcome/WelcomeView"
|
import WelcomeView from "./components/welcome/WelcomeView"
|
||||||
import AccountView from "./components/account/AccountView"
|
import AccountView from "./components/account/AccountView"
|
||||||
import { ExtensionStateContextProvider, useExtensionState } from "./context/ExtensionStateContext"
|
import { useExtensionState } from "./context/ExtensionStateContext"
|
||||||
import { FirebaseAuthProvider } from "./context/FirebaseAuthContext"
|
|
||||||
import { vscode } from "./utils/vscode"
|
import { vscode } from "./utils/vscode"
|
||||||
import McpView from "./components/mcp/configuration/McpConfigurationView"
|
import McpView from "./components/mcp/configuration/McpConfigurationView"
|
||||||
|
import { Providers } from "./Providers"
|
||||||
|
|
||||||
const AppContent = () => {
|
const AppContent = () => {
|
||||||
const { didHydrateState, showWelcome, shouldShowAnnouncement, showMcp, mcpTab } = useExtensionState()
|
const { didHydrateState, showWelcome, shouldShowAnnouncement, showMcp, mcpTab } = useExtensionState()
|
||||||
@ -126,11 +126,9 @@ const AppContent = () => {
|
|||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
return (
|
return (
|
||||||
<ExtensionStateContextProvider>
|
<Providers>
|
||||||
<FirebaseAuthProvider>
|
|
||||||
<AppContent />
|
<AppContent />
|
||||||
</FirebaseAuthProvider>
|
</Providers>
|
||||||
</ExtensionStateContextProvider>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
webview-ui/src/Providers.tsx
Normal file
15
webview-ui/src/Providers.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import type { ReactNode } from "react"
|
||||||
|
|
||||||
|
import { ExtensionStateContextProvider } from "./context/ExtensionStateContext"
|
||||||
|
import { FirebaseAuthProvider } from "./context/FirebaseAuthContext"
|
||||||
|
import { HeroUIProvider } from "@heroui/react"
|
||||||
|
|
||||||
|
export function Providers({ children }: { children: ReactNode }) {
|
||||||
|
return (
|
||||||
|
<ExtensionStateContextProvider>
|
||||||
|
<FirebaseAuthProvider>
|
||||||
|
<HeroUIProvider>{children}</HeroUIProvider>
|
||||||
|
</FirebaseAuthProvider>
|
||||||
|
</ExtensionStateContextProvider>
|
||||||
|
)
|
||||||
|
}
|
@ -4,6 +4,8 @@
|
|||||||
/* @import "tailwindcss/preflight.css" layer(base); */
|
/* @import "tailwindcss/preflight.css" layer(base); */
|
||||||
@import "tailwindcss/utilities.css" layer(utilities);
|
@import "tailwindcss/utilities.css" layer(utilities);
|
||||||
|
|
||||||
|
@config "../tailwind.config.js";
|
||||||
|
|
||||||
textarea:focus {
|
textarea:focus {
|
||||||
outline: 1.5px solid var(--vscode-focusBorder, #007fd4);
|
outline: 1.5px solid var(--vscode-focusBorder, #007fd4);
|
||||||
}
|
}
|
||||||
|
22
webview-ui/tailwind.config.js
Normal file
22
webview-ui/tailwind.config.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
const { heroui } = require("@heroui/react")
|
||||||
|
|
||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
module.exports = {
|
||||||
|
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}", "./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}"],
|
||||||
|
theme: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
darkMode: "class",
|
||||||
|
plugins: [
|
||||||
|
heroui({
|
||||||
|
defaultTheme: "vscode",
|
||||||
|
themes: {
|
||||||
|
vscode: {
|
||||||
|
colors: {
|
||||||
|
background: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user