@webjsdev/mcp 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webjsdev/mcp",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "type": "module",
5
5
  "description": "The Model Context Protocol server for WebJs, a full-stack JavaScript framework built on web components with server-side rendering and no build step. Gives AI coding agents live app introspection over routes, actions, components, and convention checks, plus a knowledge layer of docs, recipes, and framework source.",
6
6
  "bin": {
@@ -415,8 +415,6 @@ Derive the type at every boundary: a DB row from the schema (`typeof todos.$infe
415
415
 
416
416
  ## Styling: Tailwind-first
417
417
 
418
- `webjs doctor` carries the dark-theme convention as `DARK_THEME_UNREACHABLE` (a warning by default; the scaffold gates it `error` in its `package.json` because the scaffold AGENTS.md mandates the tokens, #1628): an app that defines colour tokens (`--background` / `--foreground` in `app/layout.{js,ts}`, `public/*.css` or `styles/**.css`) should make the dark half reachable with `light-dark()` tokens under `color-scheme: light dark`, an `@media (prefers-color-scheme: dark)` rule, or a root-layout head script that applies the saved theme; otherwise the stylesheet's `.dark` block is dead CSS and the OS dark setting is ignored. Silent when no tokens are defined. It is a design convention, not source correctness, so it is not a `webjs check` rule.
419
-
420
418
  **Tailwind is the strong default for pages AND light-DOM components.** The lit reflex to scope CSS in a shadow root with `static styles` is the habit to resist in light DOM. When a class bundle repeats, extract it into a helper returning an `` html`...` `` fragment (SSR-time), NOT a CSS class (no `@apply`); it lives in `modules/<feature>/utils/ui/` when one feature consumes it and `lib/utils/ui.ts` when the whole app does. Choose between a fragment and a display-only component on STRUCTURE, not bytes: a component is a tag in the DOM, so reach for the fragment where that extra wrapper cannot exist at all (a `<table>` child, which the parser foster-parents out per the HTML spec, and string output such as a `<webjs-stream>` payload) or where it lands wrong (a `<ul>` / `<dl>` / `<select>` child, which breaks `ul > li` and `select > option`, and a grid or flex child, which makes the wrapper the item), and prefer the component everywhere else. On cost they tie under a page (inert page, elided component) and both ship under an island, where the component additionally carries an element class, its registration, a per-instance upgrade, and the display-only components it renders. Reserve raw CSS for what utilities cannot express (design tokens / `@theme`, `@property` + `@keyframes`, scrollbar, `prefers-reduced-motion`, complex `color-mix()` / gradients); in light DOM the tag-prefix invariant (#7) still holds, and shadow-DOM components legitimately use `static styles = css\`\``. **Pin a header with `position: fixed`, never `position: sticky`** (a sticky header flickers on iOS WebKit during a client-router nav, #610, because the preserved header plus the scroll-to-top trips a WebKit sticky-repaint bug that the GPU-promotion hacks do NOT fix, so reserve the header height on the content with a `--header-height` offset). See `references/styling.md`.
421
419
 
422
420
  ---
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@webjsdev/mcp",
3
- "version": "0.1.15",
4
- "sha": "95de393ab820fec44fe80d7888a019ce8ca5df37",
5
- "copiedAt": "2026-10-08T08:13:46.120Z"
3
+ "version": "0.1.17",
4
+ "sha": "790ec039cd43b89c94ec9322a361d3c856641730",
5
+ "copiedAt": "2026-10-08T17:33:42.702Z"
6
6
  }
@@ -298,8 +298,6 @@ Two guarantees worth knowing. A result that could not check (a network or toolch
298
298
 
299
299
  `APP_ICON` warns while the favicon is still the scaffold's placeholder `app/icon.svg` (marked `data-webjs-placeholder`). Replace it with the app's own icon (`references/routing-and-pages.md`, "App icon and manifest").
300
300
 
301
- `DARK_THEME_UNREACHABLE` warns when the app defines colour tokens with a light value only and nothing applies a dark half: no `light-dark()`, no `@media (prefers-color-scheme: dark)` rule, no theme script in the root layout. The scaffold gates it `error` in its `package.json` because its AGENTS.md mandates `light-dark()` tokens; the fix is the token block in `references/styling.md`.
302
-
303
301
  ### Dependency audit allowlist
304
302
 
305
303
  `webjs audit` runs `npm audit` or `bun audit` (by the nearest lockfile, so a workspace member uses the root's) and fails on any advisory at or above `webjs.audit.level` (default `high`) that `webjs.audit.ignore` does not list. The scaffold's `Security: dependency audit` CI step runs it.
@@ -193,7 +193,7 @@ Whichever form you use, a token nothing references is dropped in both, so an unu
193
193
  </style>
194
194
  ```
195
195
 
196
- `light-dark()` is a native CSS function (CSS Color 5, Baseline 2024), not a library, so nothing to import. A single-theme app drops the `[data-theme]` rules and gives each token one colour. `webjs doctor` reports the floor as `DARK_THEME_UNREACHABLE` (the scaffold gates it `error`): an app whose tokens have a light value only, with no `light-dark()`, no `prefers-color-scheme` rule and no theme script in the root layout, because the scaffold stylesheet's `.dark` block would then be dead CSS and the OS dark setting ignored.
196
+ `light-dark()` is a native CSS function (CSS Color 5, Baseline 2024), not a library, so nothing to import. A single-theme app drops the `[data-theme]` rules and gives each token one colour.
197
197
 
198
198
  **A manual theme toggle** writes `data-theme` on `<html>` (`light` / `dark`, or removes it for "follow the OS"). If you use `@webjsdev/ui` components, ALSO keep the `.dark` class in sync (the ui kit keys its own tokens off `.dark`), and apply the saved choice in a tiny inline `<script>` in the layout head so there is no first-paint flash. Verify dark mode in a real browser. Light mode passing proves nothing about dark.
199
199