diff --git a/docs/errors/RDDT0003.md b/docs/errors/RDDT0003.md new file mode 100644 index 000000000..1c3e93042 --- /dev/null +++ b/docs/errors/RDDT0003.md @@ -0,0 +1,26 @@ +--- +outline: deep +--- + +# RDDT0003: Rolldown Build Process Failed to Start + +## Message + +> Failed to start the Rolldown build process: `{error}` + +## Cause + +The Rolldown DevTools "Run build with devtools" button spawns a `vite build` child process (with Rolldown's `devtools` output forced on) so it can surface the resulting session. This diagnostic is thrown when that child process cannot be spawned — for example, when the `vite` binary cannot be resolved from the project root, or the terminal host fails to launch it. + +## Example + +Clicking "Run build with devtools" in a project where `vite` is not installed, or where the project root cannot run `vite build`. + +## Fix + +1. Ensure `vite` is installed in the project and `vite build` runs from the project root. +2. Run the build once from a terminal to confirm it succeeds, then retry from DevTools. + +## Source + +- [`packages/rolldown/src/node/rolldown/build-runner.ts`](https://github.com/vitejs/devtools/blob/main/packages/rolldown/src/node/rolldown/build-runner.ts) — `startBuild()` throws this when `ctx.terminals.startChildProcess` fails to spawn `vite build`. diff --git a/docs/errors/index.md b/docs/errors/index.md index 1036819da..4786ce663 100644 --- a/docs/errors/index.md +++ b/docs/errors/index.md @@ -45,6 +45,7 @@ Emitted by `@vitejs/devtools-rolldown`. |------|-------|-------| | [RDDT0001](./RDDT0001) | warn | Rolldown Logs Directory Not Found | | [RDDT0002](./RDDT0002) | warn | Rolldown Log Reader Bad Line | +| [RDDT0003](./RDDT0003) | error | Rolldown Build Process Failed to Start | ## Vite DevTools (VDT) diff --git a/packages/rolldown/src/app/components/RunBuildDialog.vue b/packages/rolldown/src/app/components/RunBuildDialog.vue new file mode 100644 index 000000000..2269706ec --- /dev/null +++ b/packages/rolldown/src/app/components/RunBuildDialog.vue @@ -0,0 +1,195 @@ + + + diff --git a/packages/rolldown/src/app/pages/index.vue b/packages/rolldown/src/app/pages/index.vue index 18e08715b..fb8117b09 100644 --- a/packages/rolldown/src/app/pages/index.vue +++ b/packages/rolldown/src/app/pages/index.vue @@ -1,7 +1,8 @@ + + diff --git a/packages/ui/src/components/Action/ActionIconButton.stories.ts b/packages/ui/src/components/Action/ActionIconButton.stories.ts new file mode 100644 index 000000000..d93c142ef --- /dev/null +++ b/packages/ui/src/components/Action/ActionIconButton.stories.ts @@ -0,0 +1,25 @@ +import type { Meta, StoryObj } from '@storybook/vue3-vite' +import ActionIconButton from './ActionIconButton.vue' + +const meta = { + title: 'Action/ActionIconButton', + component: ActionIconButton, + tags: ['autodocs'], + args: { icon: 'i-ph-list-bullets-duotone', tooltip: 'Session list' }, + parameters: { + docs: { description: { component: 'Round icon-only button with a floating-vue `tooltip`, `active` state, `compact` variant, and a `#badge` slot. Font-size drives its size.' } }, + }, +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Default: Story = {} + +export const Active: Story = { + args: { active: true }, +} + +export const Compact: Story = { + args: { compact: true }, +} diff --git a/packages/ui/src/components/Action/ActionIconButton.vue b/packages/ui/src/components/Action/ActionIconButton.vue new file mode 100644 index 000000000..95fe832e4 --- /dev/null +++ b/packages/ui/src/components/Action/ActionIconButton.vue @@ -0,0 +1,65 @@ + + + + diff --git a/packages/ui/src/unocss/shortcuts.ts b/packages/ui/src/unocss/shortcuts.ts index 5f91e2f3f..1626f7787 100644 --- a/packages/ui/src/unocss/shortcuts.ts +++ b/packages/ui/src/unocss/shortcuts.ts @@ -21,6 +21,13 @@ export const shortcuts: UserShortcuts = [ 'btn-action': 'border border-base rounded flex gap-2 items-center px2 py1 op75 hover:op100 hover:bg-active disabled:pointer-events-none disabled:op30!', 'btn-action-sm': 'btn-action text-sm', 'btn-action-active': 'color-active border-active! bg-active op100!', + // Solid, filled primary button (mirrors antfu/design's `btn-primary`). + 'btn-primary': 'px3 py1.5 rounded flex gap-2 items-center bg-primary-500 hover:bg-primary-600 text-white transition disabled:op50 disabled:pointer-events-none outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40', + + // Icon-only buttons. `ActionIconButton` overrides the fixed `w-*`/`h-*` with + // em-based padding so a font-size class resizes the whole control. + 'btn-icon': 'w-8 h-8 rounded-full flex items-center justify-center op75 hover:op100 hover:bg-active transition disabled:pointer-events-none disabled:op30!', + 'btn-icon-compact': 'w-6 h-6 rounded flex items-center justify-center op75 hover:op100 hover:bg-active transition disabled:pointer-events-none disabled:op30!', 'icon-catppuccin': 'light:filter-invert-100 light:filter-hue-rotate-180 light:filter-brightness-80',