@kitn.ai/ui 0.25.0 → 0.25.1

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 +11 -7
  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.
@@ -63,7 +63,7 @@ npm run build # emits dist/kai.es.js
63
63
  </body>
64
64
  ```
65
65
 
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).
66
+ 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
67
 
68
68
  #### Or load from a CDN (no build, no npm)
69
69
 
@@ -78,7 +78,11 @@ The element bundle is a self-contained ES module — load it directly from [jsDe
78
78
  <kai-chat></kai-chat>
79
79
  ```
80
80
 
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`:
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.25.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.
82
+
83
+ > **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.
84
+
85
+ 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
86
 
83
87
  ```html
84
88
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@kitn.ai/ui/theme.css">
@@ -328,7 +332,7 @@ For SolidJS usage, import `@kitn.ai/ui/theme.css` once. For web components the k
328
332
  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
333
 
330
334
  - **[`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.
335
+ - **[`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
336
 
333
337
  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
338
 
@@ -362,7 +366,7 @@ src/
362
366
  primitives/ Headless logic hooks + ChatConfig + on-demand highlighter
363
367
  ui/ Accessible UI primitives (Button, Dropdown, Tooltip, HoverCard, … built in-house, no third-party UI deps)
364
368
  components/ AI feature components (Message, PromptInput, Markdown, Tool, …)
365
- elements/ Web-component facades + defineKitnElement wrapper + Vite lib entry
369
+ elements/ Web-component facades + defineWebComponent wrapper + Vite lib entry
366
370
  stories/ Composed example stories (full chat app, layouts)
367
371
  theme.css Design tokens (--color-*), animations, markdown styles
368
372
  docs/
@@ -414,11 +418,11 @@ cd examples/vue && npm install && npm run dev
414
418
  - `examples/react` — uses the generated React wrappers from `@kitn.ai/ui/react`
415
419
  - `examples/solid` — uses the raw SolidJS component API
416
420
  - `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
421
+ - `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
422
 
419
423
  ### Docs and reference
420
424
 
421
- - **[docs/web-components.md](docs/web-components.md)** — full element API: every property, event, and the `ChatMessage` schema.
425
+ - **[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
426
  - **[llms.txt](llms.txt)** / **[llms-full.txt](llms-full.txt)** — dense machine-readable references for AI coding agents.
423
427
 
424
428
  ## 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.1",
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",
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",