mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-06 12:04:00 +09:00
## Summary Fix MCP component discovery so Content Block template JSX can be passed directly to `insert-fragment`. The catalog previously advertised `<$.block-template />`. The hyphen is invalid in a JSX member name, and the fallback `$` namespace also did not match the canonical `ws:block-template` component. ## Implementation - Advertise Webstudio-owned components through the `ws` JSX binding. - Expose `ws:block-template` as the parser-safe `<ws.blockTemplate />`. - Resolve that alias back to the unchanged canonical component ID at runtime. - Keep catalog formatting and runtime resolution on one shared alias contract. - Add regression coverage for inserting a Content Block, its required template part, nested elements, and authored text. Existing stored component IDs and Builder behavior remain unchanged. ## Todo - [x] Advertise parser-compatible Content Block template JSX - [x] Resolve the JSX alias to `ws:block-template` - [x] Verify nested authored Content Block insertion - [x] Verify other `ws:*` discovery entries use the correct namespace - [x] Review documentation impact — no user-facing documentation changes are required - [x] Run project-build tests, typecheck, lint, formatting, generated-doc checks, and fixtures - [ ] Run the complete agent evaluation suite after explicit approval ## Verification - `pnpm --filter @webstudio-is/project-build test` — 2,090 tests passed - `pnpm --filter @webstudio-is/project-build typecheck` - `pnpm lint` - `pnpm exec oxfmt --check packages/project-build/src/runtime/jsx/bindings.ts packages/project-build/src/mcp.ts packages/project-build/src/runtime/components.test.ts packages/project-build/src/mcp.test.ts` - `pnpm check:generated-docs` - `pnpm fixtures` — completed with no fixture diff Evaluations were not run because repository policy requires separate explicit approval. Closes #6127
31 lines
824 B
JSON
31 lines
824 B
JSON
{
|
|
"name": "@webstudio-is/template",
|
|
"version": "0.0.0-webstudio-version",
|
|
"description": "Webstudio templates based on React",
|
|
"author": "Webstudio <github@webstudio.is>",
|
|
"homepage": "https://webstudio.is",
|
|
"license": "AGPL-3.0-or-later",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
"webstudio": "./src/index.ts"
|
|
},
|
|
"sideEffects": false,
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@webstudio-is/css-data": "workspace:*",
|
|
"@webstudio-is/css-engine": "workspace:*",
|
|
"@webstudio-is/react-sdk": "workspace:*",
|
|
"@webstudio-is/sdk": "workspace:*",
|
|
"change-case": "^5.4.4",
|
|
"react": "18.3.0-canary-14898b6a9-20240318"
|
|
},
|
|
"devDependencies": {
|
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
"vitest": "^3.1.2"
|
|
}
|
|
}
|