diff --git a/.hintrc b/.hintrc new file mode 100644 index 0000000000..f9a7ed6b33 --- /dev/null +++ b/.hintrc @@ -0,0 +1,16 @@ +{ + "extends": [ + "development" + ], + "hints": { + "no-inline-styles": "off" + }, + "browserslist": [ + "defaults", + "not ie 11", + "not chrome <= 109", + "not ios_saf <= 18.3", + "not safari <= 18.3", + "not samsung <= 27" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index fa5387a7c1..7090472209 100644 --- a/package.json +++ b/package.json @@ -374,6 +374,8 @@ "package": "npm-run-all -l -p build:webview build:esbuild check-types lint", "pretest": "npm run compile", "dev": "cd webview-ui && npm run dev", + "dev:code": "code --extensionDevelopmentPath=. --enable-proposed-api=roo-cline", + "dev:insiders": "code-insiders --extensionDevelopmentPath=. --enable-proposed-api=roo-cline", "test": "node scripts/run-tests.js", "test:extension": "jest -w=40%", "test:webview": "cd webview-ui && npm run test", diff --git a/tsconfig.json b/tsconfig.json index 1d70336fc1..6f6fc74f8e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "experimentalDecorators": true, "forceConsistentCasingInFileNames": true, "isolatedModules": true, - "lib": ["es2022", "esnext.disposable", "DOM"], + "lib": ["es2022", "DOM"], "module": "esnext", "moduleResolution": "Bundler", "noFallthroughCasesInSwitch": true, diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx index a49eda9998..7deec1a77b 100644 --- a/webview-ui/src/components/history/HistoryPreview.tsx +++ b/webview-ui/src/components/history/HistoryPreview.tsx @@ -33,7 +33,7 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { )} {tasks.length === 0 && ( <> -

+

pre { background-color: transparent !important; } +/** + * VSCode UI Component Defaults + * Apply consistent styling to VSCode WebUI components + * These effects are for dark mode only + */ + +@media (prefers-color-scheme: dark) { + /* Common styles for VSCode components */ + vscode-button, + vscode-dropdown, + vscode-input, + vscode-progress-ring, + vscode-tag, + vscode-text-area, + vscode-text-field, + vscode-progress, + vscode-divider, + vscode-option, + vscode-data-grid { + border-radius: var(--radius-sm); + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.05)); + border-color: var(--vscode-input-border); + border-width: 0.5px; + } + + /* Specific overrides for certain components */ + vscode-checkbox::part(control), + vscode-radio::part(control), + vscode-switch::part(switch) { + border-radius: var(--radius-sm); + border-color: var(--vscode-input-border); + } + + vscode-progress::part(progress), + vscode-progress::part(bar) { + border-radius: var(--radius-sm); + } + + vscode-dropdown::part(control), + vscode-dropdown::part(listbox) { + border-radius: var(--radius-sm); + border-color: var(--vscode-input-border); + } + + /* Active/focus states */ + vscode-button:focus, + vscode-checkbox:focus, + vscode-dropdown:focus, + vscode-input:focus, + vscode-radio:focus, + vscode-text-field:focus, + vscode-text-area:focus { + outline-color: var(--vscode-focusBorder); + outline-width: 1px; + outline-offset: 1px; + } + + /* Global rounded-sm for buttons, textareas, and textfields */ + button, + vscode-button, + textarea, + input[type="text"] { + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.05)); + border-radius: var(--radius-sm); + border-color: var(--color-gray-500) !important; + border-width: 0.5px !important; + } + + /* Glass/shimmer effect for buttons on hover */ + button:hover, + vscode-button:hover::part(control) { + position: relative; + overflow: hidden; + background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.05)); + } + + button:hover::after, + vscode-button:hover::part(control)::after { + content: ""; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.1) 30%, rgba(0, 0, 0, 0) 75%); + transform: rotate(30deg); + animation: shimmer 1s forwards; + pointer-events: none; + } + + @keyframes shimmer { + 0% { + transform: translateX(-100%) rotate(30deg); + } + 100% { + transform: translateX(100%) rotate(30deg); + } + } + + /* Subtle top-left background light effect */ + body { + background-image: radial-gradient(circle at top left, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%); + } + + /* Light source effect for elements */ + .light-source-effect { + box-shadow: + inset 1px 1px 0 rgba(255, 255, 255, 0.05), + inset -1px -1px 0 rgba(0, 0, 0, 0.05); + } + + /* Apply subtle top-left highlight to cards */ + .card, + [class*="card-"], + .shadow-sm, + .shadow, + .shadow-md { + position: relative; + } + + .card::before, + [class*="card-"]::before, + .shadow-sm::before, + .shadow::before, + .shadow-md::before { + content: ""; + position: absolute; + inset: 0; + background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%); + border-radius: inherit; + pointer-events: none; + } +}