@fezchat/tailwind-preset 0.1.0 → 0.1.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 +37 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @fezchat/tailwind-preset
2
+
3
+ A [Tailwind CSS](https://tailwindcss.com) preset whose `fez-*` color utilities resolve to the live [fez](https://fez.chat) theme tokens.
4
+
5
+ `bg-fez-surface` is `background-color: var(--bg1)`; when the user's theme rewrites `--bg1`, the utility repaints. Theming is automatic, and the frozen-theme class of bug is structurally impossible — every color utility is a `var()` reference, never a baked-in hex.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install -D @fezchat/tailwind-preset
11
+ ```
12
+
13
+ Dev-only: this preset gives an extension author IntelliSense, autocomplete, and typo-checking against exactly the utilities the fez host ships at runtime. The compiled CSS itself comes from the host, so your extension bundle carries no CSS framework.
14
+
15
+ ## Usage
16
+
17
+ ```js
18
+ // tailwind.config.js
19
+ import fezPreset from "@fezchat/tailwind-preset";
20
+
21
+ export default {
22
+ presets: [fezPreset],
23
+ content: ["./src/**/*.{ts,tsx}"],
24
+ };
25
+ ```
26
+
27
+ Then write theme-aware utilities:
28
+
29
+ ```tsx
30
+ <div className="bg-fez-surface text-fez-fg border border-fez-hairline hover:bg-fez-elevated rounded-md p-4">
31
+ ```
32
+
33
+ ## The palette
34
+
35
+ Each utility maps to a theme token: `fez-fg`, `fez-dim`, `fez-surface` (`--bg1`), `fez-elevated` (`--bg2`), `fez-base` (`--bg0`), `fez-mine`, `fez-rail`, `fez-accent`, `fez-brand`, `fez-green`, `fez-red`, `fez-yellow`, `fez-hairline`, `fez-field` — usable as `bg-`, `text-`, and `border-`.
36
+
37
+ Pairs with [`@fezchat/ui`](https://www.npmjs.com/package/@fezchat/ui) for on-brand components. `fez create <name> --gui` scaffolds an extension wired to both.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fezchat/tailwind-preset",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A Tailwind preset whose fez-* color utilities resolve to the live fez theme tokens. Dev-only for extension authors: IntelliSense + typo-checking against the utilities the fez host ships at runtime.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",