@codefast/theme 0.8.1 → 0.8.3
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/CHANGELOG.md +24 -0
- package/LICENSE +1 -1
- package/README.md +110 -34
- package/dist/appearance-context.d.ts +1 -2
- package/dist/appearance-context.js +1 -2
- package/dist/appearance-provider.d.ts +1 -2
- package/dist/appearance-provider.js +1 -2
- package/dist/appearance-script.d.ts +1 -2
- package/dist/appearance-script.js +1 -2
- package/dist/appearance.d.ts +2 -3
- package/dist/appearance.js +2 -3
- package/dist/color-scheme.d.ts +1 -2
- package/dist/color-scheme.js +1 -2
- package/dist/constants.d.ts +1 -2
- package/dist/constants.js +1 -2
- package/dist/dom.d.ts +1 -2
- package/dist/dom.js +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/use-appearance.d.ts +1 -2
- package/dist/use-appearance.js +1 -2
- package/package.json +3 -53
- package/dist/appearance-context.d.ts.map +0 -1
- package/dist/appearance-context.js.map +0 -1
- package/dist/appearance-provider.d.ts.map +0 -1
- package/dist/appearance-provider.js.map +0 -1
- package/dist/appearance-script.d.ts.map +0 -1
- package/dist/appearance-script.js.map +0 -1
- package/dist/appearance.d.ts.map +0 -1
- package/dist/appearance.js.map +0 -1
- package/dist/color-scheme.d.ts.map +0 -1
- package/dist/color-scheme.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/dom.d.ts.map +0 -1
- package/dist/dom.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/use-appearance.d.ts.map +0 -1
- package/dist/use-appearance.js.map +0 -1
- package/src/appearance-context.ts +0 -21
- package/src/appearance-provider.tsx +0 -368
- package/src/appearance-script.tsx +0 -87
- package/src/appearance.ts +0 -70
- package/src/color-scheme.ts +0 -40
- package/src/constants.ts +0 -49
- package/src/dom.ts +0 -85
- package/src/index.ts +0 -32
- package/src/use-appearance.ts +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @codefast/theme
|
|
2
2
|
|
|
3
|
+
## 0.8.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#850](https://github.com/codefastlabs/codefast/pull/850) [`db17956`](https://github.com/codefastlabs/codefast/commit/db17956ca01e5f9c4cca545e194804e8d1591f09) Thanks [@thevuong](https://github.com/thevuong)! - Import Zod as a namespace (`import * as z from "zod"`) so bundlers can tree-shake it. The named `import { z }` kept
|
|
8
|
+
Zod's full locale set in the bundle; the appearance provider's browser bundle now drops roughly 80% (~91 KB → ~18 KB
|
|
9
|
+
gzip).
|
|
10
|
+
|
|
11
|
+
## 0.8.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#812](https://github.com/codefastlabs/codefast/pull/812) [`f051471`](https://github.com/codefastlabs/codefast/commit/f051471eeb33b59dcb73f977b679ba27384e3a17) Thanks [@thevuong](https://github.com/thevuong)! - Raise the published dependency floors: `zod` to 4.5.4 (`@codefast/cli`, `@codefast/theme`), `lucide-react` to 1.41.0 and
|
|
16
|
+
`react-hook-form` to 7.87.0 (`@codefast/ui`).
|
|
17
|
+
|
|
18
|
+
- [#791](https://github.com/codefastlabs/codefast/pull/791) [`37a212b`](https://github.com/codefastlabs/codefast/commit/37a212b4d805588413159e11e872b98db82326bf) Thanks [@thevuong](https://github.com/thevuong)! - Point the README's license badge and "License" section at the package's own `LICENSE` file instead of the monorepo root.
|
|
19
|
+
|
|
20
|
+
- [#796](https://github.com/codefastlabs/codefast/pull/796) [`ba04d27`](https://github.com/codefastlabs/codefast/commit/ba04d2703c59a1677f52e6a9fffd0ec202328218) Thanks [@thevuong](https://github.com/thevuong)! - Rewrite the README around one structure — what the package is, installation and requirements, a complete quick start,
|
|
21
|
+
the concepts in learning order, then the documents and the license — with every API claim checked against the current
|
|
22
|
+
code and no figures that go stale.
|
|
23
|
+
|
|
24
|
+
- [#784](https://github.com/codefastlabs/codefast/pull/784) [`ad2f93a`](https://github.com/codefastlabs/codefast/commit/ad2f93a688e99c3ed8be6ceeae9d6cdd6be861bc) Thanks [@thevuong](https://github.com/thevuong)! - Ship the MIT `LICENSE` file in the published package. `files` already listed it, but the file was missing from the
|
|
25
|
+
package directory, so the tarball had none.
|
|
26
|
+
|
|
3
27
|
## 0.8.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
# @codefast/theme
|
|
2
2
|
|
|
3
|
-
Appearance management for React 19 — optimistic updates, cross-tab sync,
|
|
4
|
-
|
|
3
|
+
Appearance management for React 19 apps — a light / dark / automatic preference with optimistic updates, cross-tab sync,
|
|
4
|
+
and a FOUC-free server render.
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@codefast/theme)
|
|
7
|
-
[](
|
|
7
|
+
[](./LICENSE)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
`@codefast/theme` manages a light / dark / automatic appearance preference for React 19 apps. You wrap your app in a
|
|
12
|
+
provider, then read and set the preference from any component. The resolved color scheme lands on `<html>` — with
|
|
13
|
+
optimistic updates, cross-tab sync, and no flash on first paint.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| `Appearance` | `"light" \| "dark" \| "automatic"` | The user's preference — think macOS System Settings: Light / Dark / Auto. |
|
|
14
|
-
| `ColorScheme` | `"light" \| "dark"` | The resolved value actually applied to the page, after `automatic` is resolved. |
|
|
15
|
+
The preference lives in `localStorage`, so it works on statically prerendered, CDN-served pages — no cookies, loaders,
|
|
16
|
+
or server functions.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
- **Two words, kept apart.** The vocabulary follows Apple's Human Interface Guidelines: the _appearance_ is what the
|
|
19
|
+
user chose, the _color scheme_ is what the page shows.
|
|
20
|
+
- **Client-only persistence.** The preference lives in `localStorage` — no cookies, loaders, or server functions — so it
|
|
21
|
+
works on statically prerendered, CDN-served pages.
|
|
22
|
+
- **No flash on first paint.** `<AppearanceScript>` applies the stored preference from `<head>` before the browser
|
|
23
|
+
paints.
|
|
24
|
+
- **React 19 primitives.** Built on `useOptimistic`, `useSyncExternalStore`, and `useEffectEvent`; the setter is
|
|
25
|
+
optimistic, and every tab follows along.
|
|
26
|
+
- **Tailwind-ready.** The resolved color scheme lands on `<html>` as a `light` / `dark` class, plus the CSS
|
|
27
|
+
`color-scheme` property, so `dark:` variants and native controls both follow.
|
|
18
28
|
|
|
19
29
|
## Installation
|
|
20
30
|
|
|
@@ -24,10 +34,11 @@ pnpm add @codefast/theme
|
|
|
24
34
|
# yarn add @codefast/theme
|
|
25
35
|
```
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
track
|
|
37
|
+
`react` and `react-dom` 19 or later are peer dependencies, and `@codefast/theme` requires Node.js 24 or later. The
|
|
38
|
+
package is published on 0.x and versioned on its own track: breaking changes ship as minor versions, so pin the minor
|
|
39
|
+
version when you need stability.
|
|
29
40
|
|
|
30
|
-
## Quick
|
|
41
|
+
## Quick start
|
|
31
42
|
|
|
32
43
|
Wrap your app in the provider, then read and set the appearance from any component:
|
|
33
44
|
|
|
@@ -53,14 +64,26 @@ function Page() {
|
|
|
53
64
|
}
|
|
54
65
|
```
|
|
55
66
|
|
|
56
|
-
`setAppearance` updates the UI immediately
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
`setAppearance` updates the UI immediately, persists the value to `localStorage`, and broadcasts it to other tabs.
|
|
68
|
+
`isPending` is `true` while the persist is in flight.
|
|
69
|
+
|
|
70
|
+
## Appearance and color scheme
|
|
71
|
+
|
|
72
|
+
Two words, two meanings, kept apart throughout the API:
|
|
73
|
+
|
|
74
|
+
| Term | Type | Meaning |
|
|
75
|
+
| ------------- | ---------------------------------- | ------------------------------------------------------------------------- |
|
|
76
|
+
| `Appearance` | `"light" \| "dark" \| "automatic"` | The user's preference — think macOS System Settings: Light / Dark / Auto. |
|
|
77
|
+
| `ColorScheme` | `"light" \| "dark"` | The value actually applied to the page, after `automatic` is resolved. |
|
|
59
78
|
|
|
60
|
-
|
|
79
|
+
`automatic` resolves against the OS preference (`prefers-color-scheme`) and re-resolves when the OS switches. Where
|
|
80
|
+
`matchMedia` is unavailable — on the server — it resolves to `DEFAULT_COLOR_SCHEME`.
|
|
81
|
+
|
|
82
|
+
A three-state selector needs no hard-coded list, because `appearances` is `["light", "dark", "automatic"]`:
|
|
61
83
|
|
|
62
84
|
```tsx
|
|
63
85
|
import { appearances, useAppearance } from "@codefast/theme";
|
|
86
|
+
import type { Appearance } from "@codefast/theme";
|
|
64
87
|
|
|
65
88
|
function AppearanceSelect() {
|
|
66
89
|
const { appearance, setAppearance, isPending } = useAppearance();
|
|
@@ -69,7 +92,7 @@ function AppearanceSelect() {
|
|
|
69
92
|
<select
|
|
70
93
|
disabled={isPending}
|
|
71
94
|
value={appearance}
|
|
72
|
-
onChange={(event) => setAppearance(event.target.value as
|
|
95
|
+
onChange={(event) => setAppearance(event.target.value as Appearance)}
|
|
73
96
|
>
|
|
74
97
|
{appearances.map((value) => (
|
|
75
98
|
<option key={value} value={value}>
|
|
@@ -83,12 +106,12 @@ function AppearanceSelect() {
|
|
|
83
106
|
|
|
84
107
|
## FOUC-free SSR
|
|
85
108
|
|
|
86
|
-
React hydrates after first paint, so server-rendered HTML alone would flash the wrong colors for returning
|
|
87
|
-
`<AppearanceScript>`
|
|
88
|
-
`matchMedia`, and
|
|
89
|
-
|
|
109
|
+
React hydrates after first paint, so server-rendered HTML alone would flash the wrong colors for a returning visitor.
|
|
110
|
+
`<AppearanceScript>` is a small inline script for `<head>`: it reads `localStorage`, resolves `automatic` through
|
|
111
|
+
`matchMedia`, and sets the class, the `color-scheme` style, and a `data-appearance` attribute on `<html>` before
|
|
112
|
+
anything paints.
|
|
90
113
|
|
|
91
|
-
A TanStack Start root shell (
|
|
114
|
+
A TanStack Start root shell (the same shape works in any framework that lets you render into the document head):
|
|
92
115
|
|
|
93
116
|
```tsx
|
|
94
117
|
import { AppearanceProvider, AppearanceScript, DEFAULT_APPEARANCE, DEFAULT_COLOR_SCHEME } from "@codefast/theme";
|
|
@@ -122,8 +145,12 @@ function RootDocument({ children }: { children: ReactNode }) {
|
|
|
122
145
|
```
|
|
123
146
|
|
|
124
147
|
The server renders the defaults; the script corrects `<html>` before first paint and `suppressHydrationWarning` absorbs
|
|
125
|
-
the mismatch.
|
|
126
|
-
|
|
148
|
+
the mismatch. On the client, the provider reads `localStorage` in its first render, so it starts from the same value the
|
|
149
|
+
script applied. Components that render preference-dependent markup still hydrate against the server's default once; gate
|
|
150
|
+
them behind a mounted flag if that matters.
|
|
151
|
+
|
|
152
|
+
The `data-appearance` attribute mirrors the preference (not the resolved value), so preference-aware UI can render
|
|
153
|
+
correctly from CSS on the very first frame:
|
|
127
154
|
|
|
128
155
|
```css
|
|
129
156
|
/* highlight the "Auto" option when the stored preference is automatic */
|
|
@@ -135,12 +162,51 @@ html[data-appearance="automatic"] .option-auto {
|
|
|
135
162
|
If your Content Security Policy requires nonces for inline scripts, pass one: `<AppearanceScript nonce={cspNonce} />`.
|
|
136
163
|
The same prop exists on `<AppearanceProvider>` for the temporary inline style used by `disableTransition`.
|
|
137
164
|
|
|
165
|
+
### AppearanceScript props
|
|
166
|
+
|
|
167
|
+
| Prop | Default | Description |
|
|
168
|
+
| ------------ | ----------------- | -------------------------------------------------------------------------------- |
|
|
169
|
+
| `appearance` | `"automatic"` | Fallback preference when the storage entry is absent or unrecognised. |
|
|
170
|
+
| `storageKey` | `"ui-appearance"` | `localStorage` key the script reads — must match the one passed to the provider. |
|
|
171
|
+
| `nonce` | — | CSP nonce applied to the inline script element. |
|
|
172
|
+
|
|
138
173
|
## Cross-tab sync
|
|
139
174
|
|
|
140
|
-
|
|
141
|
-
`storage` event where the channel is unavailable. Incoming
|
|
142
|
-
tab
|
|
143
|
-
default `localStorage` persistence.
|
|
175
|
+
An appearance change propagates to every open tab. The provider posts the new value over a `BroadcastChannel` and also
|
|
176
|
+
listens for the `storage` event, so tabs stay in sync where the channel is unavailable. Incoming values are validated
|
|
177
|
+
against the appearance schema before they are applied, and each tab resolves `automatic` against its own OS preference.
|
|
178
|
+
Nothing to configure — it works with the default `localStorage` persistence.
|
|
179
|
+
|
|
180
|
+
## Custom persistence
|
|
181
|
+
|
|
182
|
+
Pass `persistAppearance` to store the preference somewhere other than `localStorage` — a user profile, for example. The
|
|
183
|
+
UI switches optimistically while the promise is pending; if it rejects, the UI reverts to the committed appearance and
|
|
184
|
+
`onPersistError` receives the error and the value that was attempted:
|
|
185
|
+
|
|
186
|
+
```tsx
|
|
187
|
+
import { AppearanceProvider } from "@codefast/theme";
|
|
188
|
+
import type { Appearance } from "@codefast/theme";
|
|
189
|
+
|
|
190
|
+
async function saveAppearance(value: Appearance): Promise<void> {
|
|
191
|
+
const response = await fetch("/api/preferences", {
|
|
192
|
+
method: "PUT",
|
|
193
|
+
headers: { "content-type": "application/json" },
|
|
194
|
+
body: JSON.stringify({ appearance: value }),
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
if (!response.ok) {
|
|
198
|
+
throw new Error(`Failed to save appearance: ${response.status}`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
<AppearanceProvider persistAppearance={saveAppearance} onPersistError={(error) => console.error(error)}>
|
|
203
|
+
{children}
|
|
204
|
+
</AppearanceProvider>;
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
When several calls overlap, only the latest one commits. A custom `persistAppearance` replaces the `localStorage` write
|
|
208
|
+
entirely, so `<AppearanceScript>` has nothing to read on the next visit — keep the default persistence if the pre-paint
|
|
209
|
+
script matters to you.
|
|
144
210
|
|
|
145
211
|
## API
|
|
146
212
|
|
|
@@ -154,8 +220,8 @@ Everything below ships from the root entry unless a subpath is noted.
|
|
|
154
220
|
| `resolveColorScheme(appearance)` | function | Resolves an `Appearance` to a `ColorScheme`; `automatic` uses `matchMedia` on the client. |
|
|
155
221
|
| `appearances` | constant | `["light", "dark", "automatic"]` — handy for rendering selectors. |
|
|
156
222
|
| `appearanceSchema` | schema | Zod enum validating appearance values. |
|
|
157
|
-
| `DEFAULT_APPEARANCE` | constant | `"automatic"` — fallback preference.
|
|
158
|
-
| `DEFAULT_COLOR_SCHEME` | constant | `"dark"` — fallback when `matchMedia` is unavailable (SSR).
|
|
223
|
+
| `DEFAULT_APPEARANCE` | constant | `"automatic"` — the fallback preference. |
|
|
224
|
+
| `DEFAULT_COLOR_SCHEME` | constant | `"dark"` — the fallback when `matchMedia` is unavailable (SSR). |
|
|
159
225
|
| `Appearance`, `ColorScheme` | types | The preference and resolved-value unions. |
|
|
160
226
|
| `AppearanceProviderProps`, `AppearanceScriptProps`, `AppearanceContextValue` | types | Prop and context shapes. |
|
|
161
227
|
| `STORAGE_KEY` (`@codefast/theme/constants`) | constant | `"ui-appearance"` — the default `localStorage` key. |
|
|
@@ -163,8 +229,8 @@ Everything below ships from the root entry unless a subpath is noted.
|
|
|
163
229
|
| `applyColorScheme()`, `suppressTransitions()` (`@codefast/theme/dom`) | functions | DOM helpers for custom integrations. |
|
|
164
230
|
| `AppearanceContext` (`@codefast/theme/appearance-context`) | context | Raw context for custom providers. |
|
|
165
231
|
|
|
166
|
-
Granular subpaths
|
|
167
|
-
|
|
232
|
+
Granular subpaths mirror the source modules for bundler-aware imports: `./appearance`, `./appearance-context`,
|
|
233
|
+
`./appearance-provider`, `./appearance-script`, `./color-scheme`, `./constants`, `./dom`, and `./use-appearance`.
|
|
168
234
|
|
|
169
235
|
### AppearanceProvider props
|
|
170
236
|
|
|
@@ -177,6 +243,16 @@ bundler-aware imports — see the `exports` field in `package.json` for the full
|
|
|
177
243
|
| `disableTransition` | `false` | Suppress CSS transitions while the color scheme swaps; respects `prefers-reduced-motion`. |
|
|
178
244
|
| `nonce` | — | CSP nonce for the inline style injected by `disableTransition`. |
|
|
179
245
|
|
|
246
|
+
## Documentation
|
|
247
|
+
|
|
248
|
+
- [Rendered docs on codefastlabs.com](https://codefastlabs.com/docs/theme)
|
|
249
|
+
- [CHANGELOG.md](./CHANGELOG.md) — release history
|
|
250
|
+
|
|
251
|
+
## Contributing
|
|
252
|
+
|
|
253
|
+
Issues and pull requests are welcome. Start with the repository's [contributing guide](../../CONTRIBUTING.md); it covers
|
|
254
|
+
the toolchain, the test layout, and the release flow.
|
|
255
|
+
|
|
180
256
|
## License
|
|
181
257
|
|
|
182
|
-
[MIT](
|
|
258
|
+
Released under the [MIT License](./LICENSE).
|
|
@@ -11,5 +11,4 @@ import type { AppearanceContextValue } from "#/appearance";
|
|
|
11
11
|
*
|
|
12
12
|
* @since 0.5.0-canary.2
|
|
13
13
|
*/
|
|
14
|
-
export declare const AppearanceContext: Context<null | AppearanceContextValue>;
|
|
15
|
-
//# sourceMappingURL=appearance-context.d.ts.map
|
|
14
|
+
export declare const AppearanceContext: Context<null | AppearanceContextValue>;
|
|
@@ -61,5 +61,4 @@ export type AppearanceProviderProps = {
|
|
|
61
61
|
*
|
|
62
62
|
* @since 0.5.0-canary.2
|
|
63
63
|
*/
|
|
64
|
-
export declare function AppearanceProvider({ children, disableTransition, nonce, onPersistError, persistAppearance, storageKey, appearance: initialAppearance, }: AppearanceProviderProps): JSX.Element;
|
|
65
|
-
//# sourceMappingURL=appearance-provider.d.ts.map
|
|
64
|
+
export declare function AppearanceProvider({ children, disableTransition, nonce, onPersistError, persistAppearance, storageKey, appearance: initialAppearance, }: AppearanceProviderProps): JSX.Element;
|
|
@@ -240,5 +240,4 @@ export function AppearanceProvider({ children, disableTransition = false, nonce,
|
|
|
240
240
|
appearance: optimisticAppearance,
|
|
241
241
|
}), [optimisticAppearance, colorScheme, setAppearance, isPending]);
|
|
242
242
|
return _jsx(AppearanceContext, { value: value, children: children });
|
|
243
|
-
}
|
|
244
|
-
//# sourceMappingURL=appearance-provider.js.map
|
|
243
|
+
}
|
|
@@ -50,5 +50,4 @@ export type AppearanceScriptProps = {
|
|
|
50
50
|
*
|
|
51
51
|
* @since 0.5.0-canary.2
|
|
52
52
|
*/
|
|
53
|
-
export declare function AppearanceScript({ nonce, storageKey, appearance, }: AppearanceScriptProps): JSX.Element;
|
|
54
|
-
//# sourceMappingURL=appearance-script.d.ts.map
|
|
53
|
+
export declare function AppearanceScript({ nonce, storageKey, appearance, }: AppearanceScriptProps): JSX.Element;
|
|
@@ -47,5 +47,4 @@ export function AppearanceScript({ nonce, storageKey = STORAGE_KEY, appearance =
|
|
|
47
47
|
const appearanceScript = `(function(){try{var sk=${toScriptSafe(storageKey)},fb=${toScriptSafe(safeAppearance)},s=localStorage.getItem(sk),appearance=(${APPEARANCE_VALID_CHECK})?s:fb,colorScheme=appearance;"automatic"===appearance&&(colorScheme=window.matchMedia(${toScriptSafe(MEDIA)}).matches?"dark":"light"),document.documentElement.classList.remove(${APPEARANCE_REMOVE_ARGS}),document.documentElement.classList.add(colorScheme),document.documentElement.style.colorScheme=colorScheme,document.documentElement.dataset.appearance=appearance}catch(e){}})()`;
|
|
48
48
|
const nonceProps = nonce === undefined ? {} : { nonce };
|
|
49
49
|
return _jsx("script", { dangerouslySetInnerHTML: { __html: appearanceScript }, suppressHydrationWarning: true, ...nonceProps });
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=appearance-script.js.map
|
|
50
|
+
}
|
package/dist/appearance.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
/**
|
|
3
3
|
* Zod schema for appearance validation.
|
|
4
4
|
*
|
|
@@ -53,5 +53,4 @@ export type AppearanceContextValue = {
|
|
|
53
53
|
readonly colorScheme: ColorScheme;
|
|
54
54
|
readonly setAppearance: (value: Appearance) => Promise<void>;
|
|
55
55
|
readonly appearance: Appearance;
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=appearance.d.ts.map
|
|
56
|
+
};
|
package/dist/appearance.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
/* -----------------------------------------------------------------------------
|
|
3
3
|
* Schema & Types
|
|
4
4
|
*
|
|
@@ -27,5 +27,4 @@ export const appearanceSchema = z.enum([
|
|
|
27
27
|
*
|
|
28
28
|
* @since 0.5.0-canary.2
|
|
29
29
|
*/
|
|
30
|
-
export const appearances = appearanceSchema.options;
|
|
31
|
-
//# sourceMappingURL=appearance.js.map
|
|
30
|
+
export const appearances = appearanceSchema.options;
|
package/dist/color-scheme.d.ts
CHANGED
|
@@ -20,5 +20,4 @@ export declare function getSystemColorScheme(): ColorScheme;
|
|
|
20
20
|
*
|
|
21
21
|
* @since 0.3.16-canary.0
|
|
22
22
|
*/
|
|
23
|
-
export declare function resolveColorScheme(appearance: Appearance): ColorScheme;
|
|
24
|
-
//# sourceMappingURL=color-scheme.d.ts.map
|
|
23
|
+
export declare function resolveColorScheme(appearance: Appearance): ColorScheme;
|
package/dist/color-scheme.js
CHANGED
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/dom.d.ts
CHANGED
|
@@ -27,5 +27,4 @@ export declare function applyColorScheme(colorScheme: ColorScheme): void;
|
|
|
27
27
|
*
|
|
28
28
|
* @since 0.3.16-canary.0
|
|
29
29
|
*/
|
|
30
|
-
export declare function suppressTransitions(nonce?: string): () => void;
|
|
31
|
-
//# sourceMappingURL=dom.d.ts.map
|
|
30
|
+
export declare function suppressTransitions(nonce?: string): () => void;
|
package/dist/dom.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -19,5 +19,4 @@ export type { AppearanceProviderProps } from "#/appearance-provider";
|
|
|
19
19
|
export { useAppearance } from "#/use-appearance";
|
|
20
20
|
export { AppearanceScript } from "#/appearance-script";
|
|
21
21
|
export type { AppearanceScriptProps } from "#/appearance-script";
|
|
22
|
-
export { resolveColorScheme } from "#/color-scheme";
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
22
|
+
export { resolveColorScheme } from "#/color-scheme";
|
package/dist/index.js
CHANGED
|
@@ -20,5 +20,4 @@ export { useAppearance } from "#/use-appearance";
|
|
|
20
20
|
// Script (FOUC prevention)
|
|
21
21
|
export { AppearanceScript } from "#/appearance-script";
|
|
22
22
|
// Resolution: `getSystemColorScheme` lives under `@codefast/theme/color-scheme`
|
|
23
|
-
export { resolveColorScheme } from "#/color-scheme";
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
23
|
+
export { resolveColorScheme } from "#/color-scheme";
|
package/dist/use-appearance.d.ts
CHANGED
|
@@ -27,5 +27,4 @@ import type { AppearanceContextValue } from "#/appearance";
|
|
|
27
27
|
*
|
|
28
28
|
* @since 0.5.0-canary.2
|
|
29
29
|
*/
|
|
30
|
-
export declare function useAppearance(): AppearanceContextValue;
|
|
31
|
-
//# sourceMappingURL=use-appearance.d.ts.map
|
|
30
|
+
export declare function useAppearance(): AppearanceContextValue;
|
package/dist/use-appearance.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/theme",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Appearance management for React 19 with HIG-inspired vocabulary - optimistic updates, cross-tab sync, and FOUC-free SSR",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dark-mode",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"url": "https://github.com/codefastlabs/codefast/issues"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"author": "Vuong Phan <mr.thevuong@gmail.com>",
|
|
19
|
+
"author": "Vuong Phan <mr.thevuong@gmail.com> (https://github.com/thevuong)",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "git+https://github.com/codefastlabs/codefast.git",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
|
-
"src",
|
|
28
27
|
"CHANGELOG.md",
|
|
29
28
|
"README.md",
|
|
30
29
|
"LICENSE"
|
|
@@ -35,68 +34,45 @@
|
|
|
35
34
|
"module": "./dist/index.js",
|
|
36
35
|
"types": "./dist/index.d.ts",
|
|
37
36
|
"imports": {
|
|
38
|
-
"#/tests/*": [
|
|
39
|
-
"./tests/*",
|
|
40
|
-
"./tests/*.ts",
|
|
41
|
-
"./tests/*.tsx",
|
|
42
|
-
"./tests/*/index.ts",
|
|
43
|
-
"./tests/*/index.tsx"
|
|
44
|
-
],
|
|
45
37
|
"#/*": {
|
|
46
|
-
"source": [
|
|
47
|
-
"./src/*",
|
|
48
|
-
"./src/*.ts",
|
|
49
|
-
"./src/*.tsx",
|
|
50
|
-
"./src/*/index.ts",
|
|
51
|
-
"./src/*/index.tsx"
|
|
52
|
-
],
|
|
53
38
|
"types": "./dist/*.d.ts",
|
|
54
39
|
"default": "./dist/*.js"
|
|
55
40
|
}
|
|
56
41
|
},
|
|
57
42
|
"exports": {
|
|
58
43
|
".": {
|
|
59
|
-
"source": "./src/index.ts",
|
|
60
44
|
"types": "./dist/index.d.ts",
|
|
61
45
|
"import": "./dist/index.js"
|
|
62
46
|
},
|
|
63
47
|
"./appearance": {
|
|
64
|
-
"source": "./src/appearance.ts",
|
|
65
48
|
"types": "./dist/appearance.d.ts",
|
|
66
49
|
"import": "./dist/appearance.js"
|
|
67
50
|
},
|
|
68
51
|
"./appearance-context": {
|
|
69
|
-
"source": "./src/appearance-context.ts",
|
|
70
52
|
"types": "./dist/appearance-context.d.ts",
|
|
71
53
|
"import": "./dist/appearance-context.js"
|
|
72
54
|
},
|
|
73
55
|
"./appearance-provider": {
|
|
74
|
-
"source": "./src/appearance-provider.tsx",
|
|
75
56
|
"types": "./dist/appearance-provider.d.ts",
|
|
76
57
|
"import": "./dist/appearance-provider.js"
|
|
77
58
|
},
|
|
78
59
|
"./appearance-script": {
|
|
79
|
-
"source": "./src/appearance-script.tsx",
|
|
80
60
|
"types": "./dist/appearance-script.d.ts",
|
|
81
61
|
"import": "./dist/appearance-script.js"
|
|
82
62
|
},
|
|
83
63
|
"./color-scheme": {
|
|
84
|
-
"source": "./src/color-scheme.ts",
|
|
85
64
|
"types": "./dist/color-scheme.d.ts",
|
|
86
65
|
"import": "./dist/color-scheme.js"
|
|
87
66
|
},
|
|
88
67
|
"./constants": {
|
|
89
|
-
"source": "./src/constants.ts",
|
|
90
68
|
"types": "./dist/constants.d.ts",
|
|
91
69
|
"import": "./dist/constants.js"
|
|
92
70
|
},
|
|
93
71
|
"./dom": {
|
|
94
|
-
"source": "./src/dom.ts",
|
|
95
72
|
"types": "./dist/dom.d.ts",
|
|
96
73
|
"import": "./dist/dom.js"
|
|
97
74
|
},
|
|
98
75
|
"./use-appearance": {
|
|
99
|
-
"source": "./src/use-appearance.ts",
|
|
100
76
|
"types": "./dist/use-appearance.d.ts",
|
|
101
77
|
"import": "./dist/use-appearance.js"
|
|
102
78
|
},
|
|
@@ -106,21 +82,7 @@
|
|
|
106
82
|
"access": "public"
|
|
107
83
|
},
|
|
108
84
|
"dependencies": {
|
|
109
|
-
"zod": "^4.4
|
|
110
|
-
},
|
|
111
|
-
"devDependencies": {
|
|
112
|
-
"@testing-library/dom": "^10.4.1",
|
|
113
|
-
"@testing-library/jest-dom": "^7.0.1",
|
|
114
|
-
"@testing-library/react": "^16.3.2",
|
|
115
|
-
"@testing-library/user-event": "^14.6.6",
|
|
116
|
-
"@types/node": "^26.2.0",
|
|
117
|
-
"@vitejs/plugin-react": "^6.1.0",
|
|
118
|
-
"@vitest/coverage-v8": "^4.1.11",
|
|
119
|
-
"jsdom": "^30.0.1",
|
|
120
|
-
"typescript": "^7.0.2",
|
|
121
|
-
"vite": "^8.2.2",
|
|
122
|
-
"vitest": "^4.1.11",
|
|
123
|
-
"@codefast/typescript-config": "0.8.0"
|
|
85
|
+
"zod": "^4.5.4"
|
|
124
86
|
},
|
|
125
87
|
"peerDependencies": {
|
|
126
88
|
"@types/react": ">=19.0.0",
|
|
@@ -138,17 +100,5 @@
|
|
|
138
100
|
},
|
|
139
101
|
"engines": {
|
|
140
102
|
"node": ">=24.0.0"
|
|
141
|
-
},
|
|
142
|
-
"scripts": {
|
|
143
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
144
|
-
"check-types": "tsc --noEmit",
|
|
145
|
-
"clean": "rm -rf dist",
|
|
146
|
-
"test": "vitest run",
|
|
147
|
-
"test:coverage": "vitest run --coverage",
|
|
148
|
-
"test:e2e": "vitest run tests/e2e",
|
|
149
|
-
"test:integration": "vitest run tests/integration",
|
|
150
|
-
"test:type": "vitest run tests/types",
|
|
151
|
-
"test:unit": "vitest run tests/unit",
|
|
152
|
-
"test:watch": "vitest"
|
|
153
103
|
}
|
|
154
104
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-context.d.ts","sourceRoot":"","sources":["../src/appearance-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAI3D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAEpE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-context.js","sourceRoot":"","sources":["../src/appearance-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,wHAAwH;AAExH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA2C,aAAa,CACpF,IAAI,CACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-provider.d.ts","sourceRoot":"","sources":["../src/appearance-provider.tsx"],"names":[],"mappings":"A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B,CAAC;AACzE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-script.d.ts","sourceRoot":"","sources":["../src/appearance-script.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe/C;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,UAAwB,EACxB,UAA+B,GAChC,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAWrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-script.js","sourceRoot":"","sources":["../src/appearance-script.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAErE;mFACmF;AACnF,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAChH,CAAC;AAED,yFAAyF;AACzF,MAAM,sBAAsB,GAAG,WAAW,CAAC,GAAG,CAAC,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CAAC,CAAC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,WAAW,CAAA;CAAE,CAI/F,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,UAAU,CAA4B,CAAC;AAE/E;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC,CAAC"}
|
package/dist/appearance.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appearance.js","sourceRoot":"","sources":["../src/appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;gFAOgF;AAEhF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAwE,CAAC,CAAC,IAAI,CAAC;IAC1G,OAAO;IACP,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAsBH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAA8B,gBAAgB,CAAC,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-scheme.d.ts","sourceRoot":"","sources":["../src/color-scheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK5D;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,CAMlD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,WAAW,CAMtE"}
|
package/dist/color-scheme.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-scheme.js","sourceRoot":"","sources":["../src/color-scheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE1D,wHAAwH;AAExH;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,OAAO,UAAU,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QAC7C,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,OAAO,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAsB;IACvD,IAAI,UAAU,KAAK,WAAW,EAAE,CAAC;QAC/B,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC"}
|
package/dist/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI5D;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAAwB,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAoB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAI3C;;;;;GAKG;AACH,eAAO,MAAM,KAAK,iCAAiC,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,oBAAoB,CAAC"}
|
package/dist/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,wHAAwH;AAExH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAe,WAAW,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB,MAAM,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C,wHAAwH;AAExH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,8BAA8B,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC"}
|