ShellRS
ShellRS 是一款免費、開源的 SSH 客戶端,使用 Rust 編寫:主機管理、終端機、WinSCP 風格的 SFTP 與埠轉發,全部於一個 GPU 渲染視窗中,支援 macOS、Windows 與 Linux。
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗The community-supported Storybook framework for Astro. Build, test, and document your Astro components in Storybook's interactive environment.
Website: storybook-astro.org · npm: @storybook-astro/framework · GitHub: storybook-astro
Add Storybook to an existing Astro project.
npm install -D storybook @storybook/builder-vite @storybook-astro/framework
The
@storybook-astro/rendererpackage is installed automatically as a dependency of@storybook-astro/framework— no separate install is needed.
If you'll add framework integrations, install each one's Astro integration and Storybook renderer too. They are optional peer dependencies, so npm doesn't install them for you, and storybook build fails without them. For React:
npm install -D @astrojs/react @storybook/react @vitejs/plugin-react react react-dom
See Installation for the packages each integration needs.
Create .storybook/main.js:
export default {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
framework: {
name: '@storybook-astro/framework',
options: {},
},
};
Create .storybook/preview.js:
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};
export default preview;
Add scripts to package.json:
"scripts": {
"dev": "storybook dev -p 6006",
"build": "storybook build"
}
// Card.stories.jsx
import Card from './Card.astro';
export default {
title: 'Components/Card',
component: Card,
};
export const Default = {
args: {
title: 'My Card Title',
content: 'Card content goes here',
},
};
export const Highlighted = {
args: {
title: 'Featured Card',
content: 'This card is highlighted',
highlight: true,
},
};
npm run dev
Note:
npm create storybook@latestdoes not yet recognize Astro as a framework. Use the manual setup above instead.
All options below are passed under framework.options in .storybook/main.js. See the Configuration Reference for the full list.
To use non-Astro framework components (React, Vue, Svelte, etc.) inside your stories, add integrations:
import { react, vue, svelte, preact, solid, alpinejs } from '@storybook-astro/framework/integrations';
export default {
framework: {
name: '@storybook-astro/framework',
options: {
integrations: [
react({ include: ['**/react/**'] }),
vue(),
svelte(),
preact({ include: ['**/preact/**'] }),
solid({ include: ['**/solid/**'] }),
alpinejs({ entrypoint: './.storybook/alpine-entrypoint.js' }),
],
},
},
};
Note:
includepatterns use recursive globs (**) to match components in nested directories (e.g.solid/Counter/Counter.tsx). A non-recursive glob like**/solid/*would fail to match files in subdirectories.
storybook build supports two Astro render modes:
static (default): pre-renders Astro stories into astro-prerendered-stories.json and serves without a render serverserver: builds storybook-static and a standalone Astro render server in storybook-serverexport default {
framework: {
name: '@storybook-astro/framework',
options: {
renderMode: 'server',
server: {
serverUrl: 'https://storybook-render.example.com',
authToken: process.env.STORYBOOK_ASTRO_SERVER_TOKEN,
authHeader: 'authorization',
},
},
},
};
For token-based auth in server mode, you can also use runtime env/global values: STORYBOOK_ASTRO_SERVER_URL, STORYBOOK_ASTRO_SERVER_TOKEN, and STORYBOOK_ASTRO_SERVER_AUTH_HEADER.
Story args and slots are sanitized before they reach the Astro Container, using conservative HTML defaults. By default only slots are sanitized (slots: ['**']); args are left untouched unless you opt specific paths in.
export default {
framework: {
name: '@storybook-astro/framework',
options: {
sanitization: {
// opt specific arg paths into sanitization
args: ['content', 'items.*.description'],
// sanitize all slots (the default)
slots: ['**'],
},
},
},
};
To turn sanitization off entirely, set sanitization: { enabled: false }. See the Sanitization guide for details.
Per-story rules let you run setup and replace modules for matching stories. For HTTP mocking with MSW, install msw in your project and wire it up inside the rules file:
export default {
framework: {
name: '@storybook-astro/framework',
options: {
storyRules: '.storybook/story-rules.ts',
},
},
};
// .storybook/story-rules.ts
import { HttpResponse, http } from 'msw';
import { setupServer } from 'msw/node';
import { defineStoryRules } from '@storybook-astro/framework/node';
const server = setupServer();
let isListening = false;
function getMswServer() {
if (!isListening) {
server.listen({ onUnhandledRequest: 'bypass' });
isListening = true;
}
return server;
}
export default defineStoryRules({
rules: [
{
match: 'components-profile-card--*',
use: ({ mock }) => {
const server = getMswServer();
server.use(
http.get('/api/user', () => {
return HttpResponse.json({ name: 'Storybook User' });
})
);
mock('~/lib/feature-flags', './mocks/feature-flags.ts');
return () => {
server.resetHandlers();
};
},
},
],
});
composeStories and Vitest setupThis tracks Astro's built-in framework features and their compatibility status.
<style> blocks, compiled and scoped by your installed Astro versionclient:load, client:only, etc. for framework componentsstorybook build with build-time pre-rendering of Astro component storiesastro:assets (Image Optimization) — works in components but requires a fallback approach for stories due to module resolution. Components can accept both ImageMetadata and string URLs to maintain compatibility.astro.config.* are resolved through their providers and loaded as @font-face CSS. The runtime exports (fontData, experimental_getFontFileURL) are still stubs, and preload links and fallback metrics aren't generated. See the roadmap.Any help is highly appreciated! Contributions are welcome. See AGENTS.md for guidance on AI-assisted development and deeper architecture notes.
This repository is a Yarn workspaces monorepo. To develop against it locally:
Clone the repository:
git clone https://github.com/storybook-astro/storybook-astro.git
cd storybook-astro
Install dependencies (requires Node 20.16.0+, 22.19.0+, or 24.0.0+):
yarn install
Run Storybook from an integration example:
yarn workspace @storybook-astro/integration-astro6 dev
Build a static Storybook:
yarn workspace @storybook-astro/integration-astro6 build
Serve the built output:
yarn workspace @storybook-astro/integration-astro6 serve
Run tests (validates component rendering and framework integration health):
yarn test
storybook-astro/
├── packages/
│ └── @storybook-astro/
│ ├── framework/ # Framework package
│ │ ├── src/
│ │ │ ├── integrations/ # Framework integrations
│ │ │ ├── middleware.ts # SSR handler + createAstro compat
│ │ │ ├── preset.ts # Storybook config
│ │ │ ├── portable-stories.ts # composeStories for testing
│ │ │ ├── testing.ts # Testing runtime APIs (composeStories, renderStory)
│ │ │ ├── vitest/ # Vitest config helpers (defineConfig)
│ │ │ ├── vitePluginAstroComponentMarker.ts # Astro component detection (5–7)
│ │ │ ├── vitePluginAstroBuildPrerender.ts # Build-time pre-rendering
│ │ │ ├── vitePluginAstroFonts.ts # Astro Font Provider resolution
│ │ │ ├── viteStorybookAstroMiddlewarePlugin.ts # Render request handling (dev)
│ │ │ └── viteStorybookRendererFallbackPlugin.ts
│ │ └── package.json
│ └── renderer/ # Client renderer
│ ├── src/
│ │ ├── render.tsx # Rendering logic + framework delegation
│ │ └── preset.ts # Preview setup
│ └── package.json
├── lib/
│ └── vitest-setup.ts # Vitest setup file
├── src/
│ └── components/ # Example components
├── vitest.config.ts # Test configuration
├── .storybook/ # Storybook configuration
└── package.json # Root package
The project ships two packages:
@storybook-astro/framework (server)Integrates Astro with Storybook's build system: configures Vite to handle .astro files, sets up an Astro Container that renders components server-side on demand, manages UI framework renderers, and handles module resolution for Astro's runtime.
@storybook-astro/renderer (client)Runs inside Storybook's preview iframe: detects component types, sends render requests to the framework middleware over Vite's HMR channel, injects the returned HTML into the canvas, applies scoped styles, and executes client scripts. For non-Astro framework components it delegates to the framework-specific renderer.
Dev mode (storybook dev): the renderer detects Astro components via the isAstroComponentFactory flag, sends a render request to the dev-server middleware over HMR, and the middleware renders the component with the Container API. The returned HTML is injected into the canvas and client scripts run for hydration. Non-Astro framework components are delegated to their framework renderer before storyFn() is called, which avoids orphaned reactive effects.
Static build (storybook build): because Astro components require server-side rendering, the build pre-renders each story at build time using an internal Vite SSR server with the Container API. The pre-rendered HTML is attached to each story export and the client runtime uses it directly. As a result, changing Astro story args via the Controls panel has no effect in static builds (framework component stories remain fully interactive).
For the detailed compatibility layers and implementation notes, see AGENTS.md.
See the Roadmap guide for a consolidated view of planned features, improvements, and known limitations.
This project is based on storybook-astro by Sławek Kołodziej, which pioneered the approach of using Astro's Container API to render Astro components within Storybook.
MIT