turbo-themes 0.23.2 → 0.23.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +61 -0
- data/lib/turbo-themes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb09195752f8ba9aeeb89a7001a079dfe91241efb62c4da8ec1ab76f735d8396
|
|
4
|
+
data.tar.gz: 3399a7e3204baaed8fe7b74ce8397467609aca6b221639cc5ec3992b6b735836
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d98fb39acef9df244ab37b49e01a2cc9f8c687a053e58ce72a229cc68cc9cb3bae1ed1b69e0a5fe0f52def1a8b54edee79420d60609be59edc03bbbe7c8476c4
|
|
7
|
+
data.tar.gz: 349c2c841894078343ec0981c6cf7a928f0635a60e6b1cac4c3ba535bffa7550ac904dc5d650f94352c3cb83975c88460918b400ae4c6c61c584bc2d4076e5b8
|
data/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@ The format is based on Keep a Changelog and this project adheres to SemVer.
|
|
|
10
10
|
|
|
11
11
|
- TBD
|
|
12
12
|
|
|
13
|
+
## [0.23.4] - 2026-07-17
|
|
14
|
+
|
|
15
|
+
### 🔧 Changed
|
|
16
|
+
|
|
17
|
+
- document consumer theme curation patterns (#565)
|
|
18
|
+
|
|
19
|
+
## [0.23.3] - 2026-07-17
|
|
20
|
+
|
|
21
|
+
### 🔧 Changed
|
|
22
|
+
|
|
23
|
+
- add Content Security Policy guide (#556)
|
|
24
|
+
|
|
13
25
|
## [0.23.2] - 2026-07-17
|
|
14
26
|
|
|
15
27
|
### 🐛 Fixed
|
data/README.md
CHANGED
|
@@ -142,6 +142,67 @@ let mocha = ThemeRegistry.themes[.catppuccinMocha]
|
|
|
142
142
|
| `@lgtm-hq/turbo-themes/tokens` | TypeScript tokens with types |
|
|
143
143
|
| `@lgtm-hq/turbo-themes/css/*` | Pre-built CSS files |
|
|
144
144
|
|
|
145
|
+
## Choosing Themes
|
|
146
|
+
|
|
147
|
+
Turbo Themes ships with 24 curated themes. Use the existing API exports to build a
|
|
148
|
+
catalog that stays in sync with the package automatically.
|
|
149
|
+
|
|
150
|
+
### Utility exports
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
import {
|
|
154
|
+
themeIds, // readonly string[] — all 24 IDs
|
|
155
|
+
flavors, // ThemeFlavor[] — full metadata
|
|
156
|
+
getThemesByVendor, // filter by vendor string
|
|
157
|
+
getThemesByAppearance, // filter by 'dark' | 'light'
|
|
158
|
+
} from '@lgtm-hq/turbo-themes';
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Consumer curation patterns
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
// a) All themes
|
|
165
|
+
const CATALOG = themeIds;
|
|
166
|
+
|
|
167
|
+
// b) Hardcoded minimal set (copy-paste friendly, no build required)
|
|
168
|
+
const CATALOG = [
|
|
169
|
+
'catppuccin-mocha',
|
|
170
|
+
'catppuccin-latte',
|
|
171
|
+
'dracula',
|
|
172
|
+
'github-dark',
|
|
173
|
+
'github-light',
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
// c) Vendor opt-in — stays in sync automatically
|
|
177
|
+
const CATALOG = getThemesByVendor('catppuccin').map((f) => f.id);
|
|
178
|
+
|
|
179
|
+
// d) Appearance filter
|
|
180
|
+
const darkCatalog = getThemesByAppearance('dark').map((f) => f.id); // 15
|
|
181
|
+
const lightCatalog = getThemesByAppearance('light').map((f) => f.id); // 9
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
> **Planned in [#495](https://github.com/lgtm-hq/turbo-themes/issues/495):** A
|
|
185
|
+
> `themeSets` object (named pre-defined subsets) and a `createThemeCatalog()` factory
|
|
186
|
+
> (filter vendor + appearance in one call) will make these patterns even more concise.
|
|
187
|
+
|
|
188
|
+
### FOUC prevention with `generateBlockingScript()`
|
|
189
|
+
|
|
190
|
+
The `@lgtm-hq/turbo-theme-selector` package exports `generateBlockingScript()`, which
|
|
191
|
+
generates a self-contained inline script from your catalog. Inject it into `<head>` at
|
|
192
|
+
build time to apply the user's saved theme before first paint:
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
import { generateBlockingScript } from '@lgtm-hq/turbo-theme-selector';
|
|
196
|
+
|
|
197
|
+
const script = generateBlockingScript({
|
|
198
|
+
validThemes: ['catppuccin-mocha', 'catppuccin-latte', 'dracula'],
|
|
199
|
+
});
|
|
200
|
+
// Inline the returned string in a <script> tag in <head>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
See the [theme switching guide](apps/site/src/content/docs/guides/theme-switching.md)
|
|
204
|
+
for a complete walkthrough.
|
|
205
|
+
|
|
145
206
|
## Examples
|
|
146
207
|
|
|
147
208
|
Complete, working examples demonstrating Turbo Themes integration with various
|
data/lib/turbo-themes/version.rb
CHANGED