@thespielplatz/tsp-tools-theme 0.1.1 → 0.1.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/README.md +15 -0
- package/package.json +10 -10
- package/plugins/01.tspColorMode.ts +7 -1
package/README.md
CHANGED
|
@@ -203,6 +203,21 @@ npm run build:playground
|
|
|
203
203
|
The `playground/` (global) and `scoped/` demos are direct-child layers that `extends: ['..']`.
|
|
204
204
|
They are excluded from the published package (`files` allowlist).
|
|
205
205
|
|
|
206
|
+
## Release
|
|
207
|
+
|
|
208
|
+
The version bump and the git tag are **not** done by an npm script:
|
|
209
|
+
|
|
210
|
+
1. Bump `package.json` `.version`, commit, and push to `main`.
|
|
211
|
+
2. Publish a GitHub Release for that commit — GitHub creates the `vX.Y.Z` tag on publish.
|
|
212
|
+
3. Ship the package:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
npm run release # lint, then npm publish
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`npm run release` deliberately only lints and publishes. It never bumps the version or tags,
|
|
219
|
+
so it can't drift from the version that was already committed and tagged in steps 1–2.
|
|
220
|
+
|
|
206
221
|
## License
|
|
207
222
|
|
|
208
223
|
MIT © TheSpielplatz
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thespielplatz/tsp-tools-theme",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "tsp.tools design-system theme as a Nuxt layer (Nuxt UI v4 + Tailwind v4): amber-on-anthracite tokens (light + dark), Nunito/Space Grotesk fonts, per-area colour mode, and the shared app shell. Use globally via `extends`, or scoped to a sub-area.",
|
|
5
5
|
"author": "inf0matics",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"dev:scoped": "nuxi dev scoped",
|
|
48
48
|
"build:playground": "nuxi build playground",
|
|
49
49
|
"build:scoped": "nuxi build scoped",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
50
|
+
"typecheck": "nuxi typecheck playground && nuxi typecheck scoped",
|
|
51
|
+
"release": "npm run lint && npm run typecheck && npm publish"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@nuxt/ui": "^4.
|
|
54
|
+
"@nuxt/ui": "^4.10.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@iconify-json/tabler": "^1.2.0",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@iconify-json/tabler": "^1.2.
|
|
67
|
-
"@nuxt/eslint-config": "^1.
|
|
68
|
-
"
|
|
69
|
-
"eslint": "^
|
|
70
|
-
"nuxt": "^4.
|
|
71
|
-
"vue-tsc": "3.
|
|
66
|
+
"@iconify-json/tabler": "^1.2.37",
|
|
67
|
+
"@nuxt/eslint-config": "^1.16.0",
|
|
68
|
+
"@types/node": "^26.1.2",
|
|
69
|
+
"eslint": "^10.8.0",
|
|
70
|
+
"nuxt": "^4.5.1",
|
|
71
|
+
"vue-tsc": "3.3.8"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -35,7 +35,13 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
35
35
|
const apply = (path: string) => {
|
|
36
36
|
const mode = modeForPath(path)
|
|
37
37
|
colorMode.preference = mode
|
|
38
|
-
|
|
38
|
+
// colour-mode v4 types `value` as readonly, but still mutates it internally
|
|
39
|
+
// (it is a plain `reactive`, not a computed). We assign it deliberately: its
|
|
40
|
+
// client plugin derives `value` from `preference` only on the next tick, and
|
|
41
|
+
// its *server* plugin never derives it at all — so without this, `value`
|
|
42
|
+
// would fall back to colour-mode's own cookie during SSR and disagree with
|
|
43
|
+
// the route-derived mode in scoped setups.
|
|
44
|
+
;(colorMode as { value: string }).value = mode
|
|
39
45
|
if (import.meta.client) {
|
|
40
46
|
const el = document.documentElement
|
|
41
47
|
el.classList.remove('dark', 'light')
|