bklit/bklit-ui

bklit-studio

bklit-ui monorepo contributors only.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/bklit/bklit-ui --skill bklit-studio

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Bklit Studio Skill (chart development)

Monorepo contributors only. Use this skill automatically whenever you build, edit, or prototype a chart — before shipping via bklit-ship.

Studio at `/studio` is the single development surface: full editor shell, component tree, properties, motion, codegen, and registry previews. Do not scaffold apps/web/app/playground/.

When to use (auto-trigger)

  • Build, prototype, or edit a chart (new or existing)
  • Tune props, layers, data, styling, or animation
  • Mentions Studio, /studio, registry preview, or chart controls
  • Work continues from a prior playground task → use Studio instead

Quick start

bash
pnpm dev   # repo root

Open http://localhost:3000/studio (optional query: ?chart=line-chart).

TaskURL
Edit existing chart/studio?chart=<slug> — slugs in packages/studio/src/chart-slugs.ts
Profit/loss line mode/studio?chart=line-chart&lineChartMode=profitLoss

Editor layout

RegionPurpose
LeftChart type (in full Studio), layer list, data controls, animation
CenterCanvas, rulers, resizable frame, replay/scramble
RightProperties for the selected layer

Pane rules: animation → left (motionPanel on chart config); per-layer props → right; visibility → eye icon on layer (uses hiddenComponents in URL state).

Where to implement (existing charts)

Edit the chart in `packages/studio` and `packages/ui` — not apps/web/components/playground/.

ConcernPath
Chart preview + codegenpackages/studio/src/lib/registry.tsx (render, generateCode)
Layer tree (components panel)packages/studio/src/lib/studio-components.ts (resolve*Components)
Control groups (properties)packages/studio/src/lib/registry-control-groups.ts
URL / default statepackages/studio/src/lib/studio-parsers.ts
Chart UIpackages/ui/src/charts/
Slugspackages/studio/src/chart-slugs.ts + studioRegistry in registry.tsx
Studio-only previewspackages/studio/src/components/charts/*-studio-preview.tsx

Patterns in registry.tsx render

Reuse committed helpers (do not reimplement):

  • StudioChartShell + studioCartesianLegendItems — legend grid + showLegend
  • StudioVisibleLayer + componentId — ties render to layer visibility (line.grid, line.series.0, …)
  • getStudioCssRevealPropsForPreview — motion / reveal
  • isStudioComponentVisible(state, componentId) — conditional children
  • seriesStrokePropsFromState, fadeEdgesPropValue, chartTooltipPropsFromState

Reference implementation: lineConfig.render in registry.tsx.

New chart (not in registry yet)

  1. Implement component(s) in packages/ui/src/charts/ (minimal API first).
  2. Add slug to packages/studio/src/chart-slugs.ts.
  3. Add StudioChartConfig to studioRegistry in registry.tsx:
  • render(state, ctx) — preview inside EditorChartFrame via StudioShell
  • resolveComponents in studio-components.ts
  • controlGroups / resolveControlGroups
  • generateCode for the code sheet
  1. Open /studio?chart=<new-slug> and iterate.
  2. When stable, follow bklit-ship for docs, gallery, shadcn registry.

Adding a prop or layer

  1. Add key to StudioUrlState / defaultStudioState in studio-parsers.ts if missing.
  2. Add control(s) on the right layer in registry-control-groups.ts or per-component controlGroups in studio-components.ts.
  3. Wire prop in registry.tsx render (and in packages/ui chart code).
  4. If the prop affects animation → ensure motionPanel: true on chart config.
  5. Verify in Studio: layer list, visibility toggle, properties, replay.

Shipping

When the API is stable, read .agents/skills/bklit-ship/SKILL.md — prototype code should already live in packages/ui + packages/studio; no playground route to migrate.

Deprecated: /playground

The local `/playground` route and `bklit-playground` skill are deprecated. /playground redirects to /studio. Do not copy playground-editor-shell or apps/web/components/playground/ for new work.

File reference

ItemPath
Studio app routeapps/web/app/studio/page.tsx (StudioShell)
Studio packagepackages/studio/
Studio skill.agents/skills/bklit-studio/SKILL.md
Ship checklist.agents/skills/bklit-ship/SKILL.md
Performance audit.agents/skills/bklit-studio-chart-performance/SKILL.md

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills
bklit
コミュニティ

bklit-playground

DEPRECATED — use bklit-studio instead. Local /playground is no longer the chart development workflow for bklit-ui contributors.

導入数
1
GitHub Stars
1790
更新日
10月19日
bklit
コミュニティ

bklit-studio-chart-performance

Reusable Studio chart performance audit and fix workflow. Use when a chart feels sluggish in /studio (pan, slider ticks, legend hover) but siblings like pie-chart feel fine.

導入数
1
GitHub Stars
1790
更新日
10月19日
bklit
コミュニティ

bklit-ui-design

Turns plain-language chart design requests into exact Bklit UI (@bklit shadcn registry) components and props, styled to fit the host app. Use when someone describes how a chart should look rather than naming props, e.g. "diagonal pattern background that fades out", "squircle bars", "3D glass bars", "hatched area", "dot grid", "skeleton loading state", "dashed forecast", "half donut", "make the charts match my brand / dark mode / border radius". Detects the project's Tailwind version, colour form

導入数
1
GitHub Stars
1790
更新日
10月19日
bklit
コミュニティ

turborepo

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

導入数
1
GitHub Stars
1790
更新日
10月19日