tfy-web-components 0.0.26 → 0.0.27

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
@@ -52,17 +52,14 @@ import { ThemeProvider } from 'tfy-web-components/components/theme/useTheme'
52
52
  ### Tailwind v4
53
53
 
54
54
  Import the generated theme stylesheet once in your Tailwind entry CSS — it
55
- declares the palette's `@theme inline` registrations, an `@source`
56
- directive, and Markdown/KaTeX styles used by the Markdown component:
55
+ declares the palette's `@theme inline` registrations plus an `@source`
56
+ directive, so no content-path configuration is needed:
57
57
 
58
58
  ```css
59
59
  @import 'tailwindcss';
60
60
  @import 'tfy-web-components/theme.css';
61
61
  ```
62
62
 
63
- That single `theme.css` import is enough for Markdown styling — do not also
64
- import `tfy-web-components/dist/style.css` for this.
65
-
66
63
  If a host app/SDK already owns its theme state, pass the resolved theme to
67
64
  `ThemeProvider`. It will apply the same value to its context and the document
68
65
  without persisting a separate preference or listening to system-theme changes:
@@ -76,6 +73,30 @@ without persisting a separate preference or listening to system-theme changes:
76
73
  Omit `theme` when tfy-web-components should own the preference through
77
74
  `localStorage` and the system preference.
78
75
 
76
+ ### Markdown styles
77
+
78
+ GitHub Markdown base styles plus `.markdown-body` / `.markdown-table` overrides
79
+ ship in `markdown.css`. Tailwind v4 apps already get them via `theme.css`
80
+ (no extra import). Tailwind v3 apps (or anyone not using `theme.css`) should
81
+ import `markdown.css` directly:
82
+
83
+ ```css
84
+ /* Tailwind v4 — already included when you import theme.css */
85
+ @import 'tfy-web-components/theme.css';
86
+
87
+ /* Tailwind v3 / à-la-carte */
88
+ @import 'tfy-web-components/markdown.css';
89
+ ```
90
+
91
+ KaTeX styles are pulled in by the Markdown component JS import (`katex/dist/katex.min.css`);
92
+ ensure your bundler preserves CSS side effects from that dependency.
93
+
94
+ ```ts
95
+ import Markdown from 'tfy-web-components/components/molecules/Markdown'
96
+ ```
97
+
98
+ The default wrapper class is `markdown-body` (overridable via `bodyClass`).
99
+
79
100
  ### Agent chat components
80
101
 
81
102
  Import agent-chat UI from the barrel or the explicit deep entries only:
@@ -91,7 +112,6 @@ need `UserMessage` or `UserMessageEdit` as standalone entries.
91
112
  ## Package Configuration
92
113
 
93
114
  See [PACKAGE_CHANGES.md](./PACKAGE_CHANGES.md) for details on:
94
-
95
115
  - Why `sideEffects: ["**/*.css"]` is critical for proper tree-shaking
96
116
  - Why the `exports` field has no `"require"` entry
97
117