@elia-assistant/chatui 1.0.15 → 1.0.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/README.md CHANGED
@@ -19,7 +19,6 @@ npm install @elia-assistant/chatui
19
19
  // src/main.tsx
20
20
  import { App as ChatWidget } from '@elia-assistant/chatui'
21
21
  import { useSettingsStore } from '@elia-assistant/chatui/store'
22
- import '@elia-assistant/chatui/css'
23
22
 
24
23
  useSettingsStore.getState().setConfig({
25
24
  webhookUrl: 'https://your-n8n.example.com/webhook/abc',
@@ -34,8 +33,6 @@ The host's `vite.config.ts` needs `optimizeDeps.exclude: ['@elia-assistant/chatu
34
33
  ### Plain HTML (CDN, no bundler)
35
34
 
36
35
  ```html
37
- <link rel="stylesheet"
38
- href="https://cdn.jsdelivr.net/npm/@elia-assistant/chatui/dist/chatui.iife.css">
39
36
  <script src="https://cdn.jsdelivr.net/npm/@elia-assistant/chatui/dist/chatui.iife.js"></script>
40
37
  <div id="chat"></div>
41
38
  <script>
@@ -53,7 +50,6 @@ The host's `vite.config.ts` needs `optimizeDeps.exclude: ['@elia-assistant/chatu
53
50
 
54
51
  ```ts
55
52
  import { createChat } from '@elia-assistant/chatui'
56
- import '@elia-assistant/chatui/css'
57
53
 
58
54
  const instance = createChat({
59
55
  target: '#chat',
@@ -304,11 +300,11 @@ npm run pack:dry # preview the npm tarball contents
304
300
  Build output:
305
301
  - `dist/index.js` — ESM, React externalized as peer dep (~325 kB / 75 kB gzipped)
306
302
  - `dist/chatui.iife.js` — single-file IIFE for `<script>` tags, React + ReactDOM bundled in (~485 kB / 144 kB gzipped, production-mode)
307
- - `dist/chatui.css` — pre-compiled stylesheet for ESM consumers
308
- - `dist/chatui.iife.css` — same styles, paired naming for CDN consumers
309
303
  - `dist/**/*.d.ts` — TypeScript declarations
310
304
  - `dist/chunks/translation-*.js` — code-split locale bundles
311
305
 
306
+ CSS is inlined into the JS bundles and injected into a shadow root at mount time — no `.css` file is emitted and host pages don't need to load one.
307
+
312
308
  To smoke-test the IIFE locally without publishing:
313
309
  ```bash
314
310
  npm run build
@@ -325,7 +321,7 @@ See [example.html](./example.html) for the full integration guide and [vanilla-t
325
321
  | Concern | Library |
326
322
  |---|---|
327
323
  | Build | Vite 8 + Rolldown + `@vitejs/plugin-react` |
328
- | Styling (internal) | Tailwind CSS v4 — pre-compiled into `dist/chatui.css`; consumers don't need it |
324
+ | Styling (internal) | Tailwind CSS v4 — inlined into the JS bundle and injected into a shadow root at mount time; consumers don't load any CSS |
329
325
  | State | Zustand 5 with `persist` middleware |
330
326
  | Markdown | `react-markdown` + `remark-gfm` |
331
327
  | i18n | `react-i18next` + `i18next-resources-to-backend` (locales code-split, no HTTP fetch) |