@kitn.ai/ui 0.25.0 → 0.25.2

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.
Files changed (2) hide show
  1. package/README.md +14 -12
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ It can be consumed two ways:
9
9
 
10
10
  ## Highlights
11
11
 
12
- - **~50 composable components** across three layers: headless primitives → accessible UI primitives (built in-house, WCAG 2.1 AA — no third-party UI dependency) → AI feature components.
12
+ - **Composable components** across three layers: headless primitives → accessible UI primitives (built in-house, WCAG 2.1 AA — no third-party UI dependency) → AI feature components. `npm run verify:solid-coverage` prints the current element and component counts.
13
13
  - **Shadow-DOM web components** — zero CSS conflicts in any host. The host's styles can't leak in; the kit's Tailwind can't leak out.
14
14
  - **Load it your way** — register every element in one import, cherry-pick per-element with a bundler, or drop in a CDN autoloader that loads each on demand. Syntax highlighting loads lazily, per language, only when you render code.
15
15
  - **Tailwind v4** design tokens — rebrand by overriding `--color-*` custom properties.
@@ -30,11 +30,7 @@ npm install solid-js
30
30
 
31
31
  ### Option A — Web components (any framework / plain HTML)
32
32
 
33
- Build the bundle, then import it as a side-effect (it registers the custom elements):
34
-
35
- ```bash
36
- npm run build # emits dist/kai.es.js
37
- ```
33
+ `npm install` ships the built bundle, so there is nothing to compile. Import it once as a side effect and every element registers itself:
38
34
 
39
35
  ```html
40
36
  <body style="height: 100vh; margin: 0;">
@@ -63,7 +59,7 @@ npm run build # emits dist/kai.es.js
63
59
  </body>
64
60
  ```
65
61
 
66
- The element bundle is **ES-module only** and loads via `<script type="module">` in every modern browser. See **[docs/web-components.md](docs/web-components.md)** for the full element API (every property, event, and the `ChatMessage` schema).
62
+ The element bundle is **ES-module only** and loads via `<script type="module">` in every modern browser. See **[docs/web-components.md](https://github.com/kitn-ai/ui/blob/main/docs/web-components.md)** for the full element API (every property, event, and the `ChatMessage` schema).
67
63
 
68
64
  #### Or load from a CDN (no build, no npm)
69
65
 
@@ -78,7 +74,13 @@ The element bundle is a self-contained ES module — load it directly from [jsDe
78
74
  <kai-chat></kai-chat>
79
75
  ```
80
76
 
81
- The URLs above track the **latest** release — handy for trying things out. **For production, pin an exact version** (e.g. `@kitn.ai/ui@0.16.0/dist/kai.es.js`): pinned URLs are immutable and cached far more aggressively, and — since this package is pre-1.0 — pinning shields you from breaking changes in a future minor release. SolidJS and the kit's CSS are bundled in, and the lazy code-highlighting chunks load from the same CDN on demand. To override design tokens, also include `theme.css`:
77
+ <!-- x-release-please-start-version -->
78
+ The URLs above track the **latest** release — handy for trying things out. **For production, pin an exact version** (e.g. `@kitn.ai/ui@0.25.2/dist/kai.es.js`): pinned URLs are immutable and cached far more aggressively, and — since this package is pre-1.0 — pinning shields you from breaking changes in a future minor release.
79
+ <!-- x-release-please-end -->
80
+
81
+ > **Pin `0.25.0` or newer.** Every version from `0.14.1` through `0.24.0` is covered by a [critical security advisory](https://github.com/kitn-ai/ui/security/advisories) and is deprecated on npm. `npm install` warns you about a deprecated version; **a CDN fetch does not**, so an old pinned URL in a page keeps serving the vulnerable bundle silently.
82
+
83
+ SolidJS and the kit's CSS are bundled in, and the lazy code-highlighting chunks load from the same CDN on demand. To override design tokens, also include `theme.css`:
82
84
 
83
85
  ```html
84
86
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@kitn.ai/ui/theme.css">
@@ -328,7 +330,7 @@ For SolidJS usage, import `@kitn.ai/ui/theme.css` once. For web components the k
328
330
  The package ships [llmstxt.org](https://llmstxt.org)-style files so coding agents (Claude Code, Copilot, Cursor, Codex) can wire up the components correctly:
329
331
 
330
332
  - **[`llms.txt`](./llms.txt)** — dense orientation: install, the property-vs-attribute rule, the two-layer architecture, theming, and framework wiring.
331
- - **[`llms-full.txt`](./llms-full.txt)** — the above plus a generated props/events reference for every `kitn-*` element, a streaming recipe, and a build runbook.
333
+ - **[`llms-full.txt`](./llms-full.txt)** — the above plus a generated props/events reference for every `kai-*` element, a streaming recipe, and a build runbook.
332
334
 
333
335
  Both are auto-generated from `dist/custom-elements.json` during `npm run build` (so they never drift) and are published in the npm package — find them at `node_modules/@kitn.ai/ui/llms.txt` after install.
334
336
 
@@ -362,7 +364,7 @@ src/
362
364
  primitives/ Headless logic hooks + ChatConfig + on-demand highlighter
363
365
  ui/ Accessible UI primitives (Button, Dropdown, Tooltip, HoverCard, … built in-house, no third-party UI deps)
364
366
  components/ AI feature components (Message, PromptInput, Markdown, Tool, …)
365
- elements/ Web-component facades + defineKitnElement wrapper + Vite lib entry
367
+ elements/ Web-component facades + defineWebComponent wrapper + Vite lib entry
366
368
  stories/ Composed example stories (full chat app, layouts)
367
369
  theme.css Design tokens (--color-*), animations, markdown styles
368
370
  docs/
@@ -414,11 +416,11 @@ cd examples/vue && npm install && npm run dev
414
416
  - `examples/react` — uses the generated React wrappers from `@kitn.ai/ui/react`
415
417
  - `examples/solid` — uses the raw SolidJS component API
416
418
  - `examples/angular` — uses the web components natively via Angular's `[prop]` / `(event)` bindings with `CUSTOM_ELEMENTS_SCHEMA` (no wrappers needed)
417
- - `examples/vue` — uses the web components natively via Vue's `:prop.prop` modifier and `@event` bindings; `isCustomElement` in `vite.config.ts` prevents Vue treating `kitn-*` tags as Vue components
419
+ - `examples/vue` — uses the web components natively via Vue's `:prop.prop` modifier and `@event` bindings; `isCustomElement` in `vite.config.ts` prevents Vue treating `kai-*` tags as Vue components
418
420
 
419
421
  ### Docs and reference
420
422
 
421
- - **[docs/web-components.md](docs/web-components.md)** — full element API: every property, event, and the `ChatMessage` schema.
423
+ - **[docs/web-components.md](https://github.com/kitn-ai/ui/blob/main/docs/web-components.md)** — full element API: every property, event, and the `ChatMessage` schema.
422
424
  - **[llms.txt](llms.txt)** / **[llms-full.txt](llms-full.txt)** — dense machine-readable references for AI coding agents.
423
425
 
424
426
  ## Loading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitn.ai/ui",
3
- "version": "0.25.0",
3
+ "version": "0.25.2",
4
4
  "nx": {
5
5
  "name": "ui",
6
6
  "targets": {
@@ -182,6 +182,8 @@
182
182
  "verify:pack": "node scripts/verify-pack-weight.mjs",
183
183
  "verify:starters": "node scripts/verify-starters.mjs",
184
184
  "lint:attachment-object-urls": "node scripts/lint-attachment-object-urls.mjs --self-test && node scripts/lint-attachment-object-urls.mjs",
185
+ "lint:cdn-pins": "node scripts/lint-cdn-pins.mjs --self-test && node scripts/lint-cdn-pins.mjs --check-release-wiring && node scripts/lint-cdn-pins.mjs",
186
+ "fix:cdn-pins": "node scripts/lint-cdn-pins.mjs --fix",
185
187
  "lint:silent-drops": "node scripts/lint-silent-drops.mjs --self-test && node scripts/lint-silent-drops.mjs",
186
188
  "test": "vitest run",
187
189
  "test:react": "vitest run --config vitest.react.config.ts",