kerfjs 5.0.0-beta.113 → 5.0.0-beta.115

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/ai/manifest.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
- "kerfjsVersion": "5.0.0-beta.113",
2
+ "kerfjsVersion": "5.0.0-beta.115",
3
3
  "files": [
4
4
  {
5
5
  "name": "skill",
6
6
  "source": "kerf.claude-skill.md",
7
7
  "bundle": "ai/skill.md",
8
8
  "dest": ".claude/skills/kerf-app/SKILL.md",
9
- "version": "1.26.0",
10
- "sha256": "64a86a36399d12e5803a050c116d32d8762608d91ec9222670592ff471bc64b8",
9
+ "version": "1.27.0",
10
+ "sha256": "7e8722c2cf9f66b3aac2e413f8a19d3cc703bf2588cad8bed3b1075e719efc16",
11
11
  "history": {
12
12
  "1.0.0": "bef982cb743fd4c73e666ee5cf774112e57c93ebb13b24bbacbf08577db0930a",
13
13
  "1.1.0": "f2aadb21e33dd389028951ae1ecbd9f8ba68648b3c5beba43fb4dfa2ab29f195",
@@ -41,7 +41,8 @@
41
41
  "1.23.1": "e21d7db1097ad95c11af9248ad17d514716bebc5646becf57d19a7598d6e382c",
42
42
  "1.24.0": "f74616ec20120fa97ec2ff7e92971f5721ee8dcb0b5b7da2dd2604bb87002b69",
43
43
  "1.25.0": "bc2622cb12b382118e44aa50d1afb058252e0caf85b7c0ced4433bc0ca76f7c1",
44
- "1.26.0": "64a86a36399d12e5803a050c116d32d8762608d91ec9222670592ff471bc64b8"
44
+ "1.26.0": "64a86a36399d12e5803a050c116d32d8762608d91ec9222670592ff471bc64b8",
45
+ "1.27.0": "7e8722c2cf9f66b3aac2e413f8a19d3cc703bf2588cad8bed3b1075e719efc16"
45
46
  }
46
47
  },
47
48
  {
package/ai/skill.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: kerf-app
3
3
  description: Build UIs in the kerf reactive framework and its @kerfjs/ui component package (https://github.com/brianwestphal/kerf). Use this skill whenever the user is writing or modifying code that imports `kerfjs` or `@kerfjs/ui`, asks to add a feature to a kerf app, or asks "how do I do X in kerf?". Use it proactively the moment you spot a kerf import in the file you're editing.
4
- kerf-skill-version: 1.26.0
4
+ kerf-skill-version: 1.27.0
5
5
  ---
6
6
 
7
7
  # Building apps with kerf
@@ -14,13 +14,25 @@ kerf is a ~15 KB reactive UI framework (still ~15 KB with `arraySignal`): signal
14
14
 
15
15
  ## Setup
16
16
 
17
+ - In a consuming project, run `npx kerfjs setup` before the first Kerf edit
18
+ (or after a package upgrade). Review its dry-run plan, resolve authored
19
+ conflicts deliberately, then apply with `npx kerfjs setup --write --yes`.
20
+ Select the affected workspace package with `--package` when needed. This
21
+ installs the matching AI skill, Kerf ESLint preset, TypeScript settings,
22
+ and `kerf:check`; UI projects also get catalog and doctor checks. Run
23
+ `npm run kerf:check` in the selected package after UI changes, alongside
24
+ the project's own lint and tests. If setup is intentionally not used,
25
+ install and configure these checks explicitly before coding; a generic
26
+ ESLint preset does not check Kerf contracts.
17
27
  - Install: `npm install kerfjs`
18
28
  - `tsconfig.json`: `"jsx": "react-jsx"`, `"jsxImportSource": "kerfjs"`
19
29
  - Vite / esbuild need no extra config.
20
30
  - **Dev diagnostics are opt-in by import, and only an APP installs them.** kerf does not infer dev mode. In the app entry add `if (import.meta.env.DEV) await import('kerfjs/dev');` (Vite) or `if (process.env.NODE_ENV !== 'production') await import('kerfjs/dev');` (webpack/Node). That enables the read-only store `get()` snapshot, the throwing dangerous-URL screen, and makes the `KERF_DEV_WARN_*` family available; omitting it is production shape and sheds ~4.7 KB min+gzip because the condition folds away and the chunk is never emitted. Put it (and any `enableWarnings()` call) FIRST if relying on the untracked-signal, delegate-in-effect, or rebuilt-listeners warnings — `signal()`, `effect()`, and `mount()` decide those at creation time, so anything created earlier stays uncovered.
21
31
  - **Switch individual warnings on with `enableWarnings()`**, which is the only switch that works in a browser (no `process` object there, and a bundler `define` cannot reach the read): `const dev = await import('kerfjs/dev'); dev.enableWarnings({ staleBinding: true, narrowSet: true, invariants: 'throw' });`. The `KERF_DEV_WARN_*` env vars do the same for Node/SSR/CI; an explicit call wins either way.
22
32
  - **A component package must NEVER import `kerfjs/dev`.** The hooks are process-global, so installing them is the consuming app's decision — a library that does it forces the diagnostics (and the chunk) on every consumer. Put the import in your demo page or test harness instead.
23
- - Recommended companion: `npm install --save-dev eslint-plugin-kerfjs` and add `kerfjs.configs.recommended` to the project's eslint config. Enforces five of the hard rules below (no inline JSX event handlers, require `data-key` in `each()`, capture `delegate()` disposers, no nested `mount()`, prefer module JSX augmentation) at edit time — useful as a self-correction signal when authoring kerf code.
33
+ - For manual setup, install `eslint-plugin-kerfjs` and add
34
+ `kerfjs.configs.recommended` (or `recommended-ui` for `@kerfjs/ui`) to the
35
+ project's ESLint config. This catches Kerf misuse while code is authored.
24
36
 
25
37
  ## Optional first-party UI
26
38
 
@@ -33,6 +45,20 @@ when the complete layer is intentional. Prefer a component before inventing a
33
45
  parallel local primitive, but keep domain state, routing, commands, and tab/menu
34
46
  policy in the app.
35
47
 
48
+ Before building or changing a UI region, read
49
+ `node_modules/@kerfjs/ui/docs/component-selection.md` and the chosen
50
+ component's page under `node_modules/@kerfjs/ui/ai/components/`; use
51
+ `node_modules/@kerfjs/ui/ai/skill.md` for the full AI contract. Match the
52
+ requested behavior, not just the screenshot. Put chrome in a layout
53
+ component's public slots: for a `Workbench`, use `leftRail.toolbar`,
54
+ `rightRail.toolbar`, `mainToolbar`, and the built-in panel `toggle` rather
55
+ than putting a custom header and toggle inside `leftRail.content`.
56
+ Use `Catalog` and `wireCatalog` for a component showcase, `SearchField` for
57
+ structured token search, and `StateBanner` for applicable status messages.
58
+ Keep product-specific data and actions in the app. When a public slot or prop
59
+ cannot express the requested behavior, record a component gap before writing
60
+ a parallel control or CSS skin.
61
+
36
62
  Use ListItem/ListActionRow/ListHeader/TabBarItem `rootAttributes` only for application
37
63
  `data-*` metadata. ListActionRow `trailingActionAttributes` and ListHeader
38
64
  `triggerAttributes` additionally support native popover target/action and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kerfjs",
3
- "version": "5.0.0-beta.113",
3
+ "version": "5.0.0-beta.115",
4
4
  "description": "Tiny reactive UI framework — fine-grained signals + DOM morphing + JSX. Apply the smallest possible cut to update your DOM.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -207,6 +207,7 @@
207
207
  "tsup": "^8.3.0",
208
208
  "typescript": "^6.0.3",
209
209
  "typescript7": "npm:typescript@^7.0.2",
210
+ "vite": "^8.3.4",
210
211
  "vitest": "^4.1.11"
211
212
  },
212
213
  "overrides": {
package/setup/index.mjs CHANGED
@@ -758,7 +758,7 @@ export async function planKerfSetup({
758
758
  nextManifest.scripts,
759
759
  mode === 'ui'
760
760
  ? {
761
- 'kerf:check': 'tsc --noEmit && eslint .',
761
+ 'kerf:check': `tsc --noEmit && eslint . && kerf-component-catalog --check && kerf-ui-doctor --full${workspaceDoctorArgs}`,
762
762
  'kerf:doctor': `kerf-ui-doctor --full${workspaceDoctorArgs}`,
763
763
  'kerf:doctor:changed': `kerf-ui-doctor --changed${workspaceDoctorArgs}`,
764
764
  'catalog:generate': 'kerf-component-catalog --write',