Skip to content

Commit 3c72065

Browse files
committed
2 parents d07ed3d + c4b7f55 commit 3c72065

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

packages/tailwind/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @layerstack/tailwind
22

3+
## 0.0.13
4+
5+
### Patch Changes
6+
7+
- fix(createHeadSnippet): Resolve `[svelte] hydration_html_changed` issue. Resolves #25 ([#26](https://github.com/techniq/layerstack/pull/26))
8+
39
## 0.0.12
410

511
### Patch Changes

packages/tailwind/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"author": "Sean Lynch <[email protected]>",
55
"license": "MIT",
66
"repository": "techniq/layerstack",
7-
"version": "0.0.12",
7+
"version": "0.0.13",
88
"scripts": {
99
"dev": "rimraf dist && tsc -p tsconfig.build.json --watch",
1010
"build": "rimraf dist && tsc -p tsconfig.build.json && cp -r ./src/lib/plugin* dist",

packages/tailwind/src/lib/theme.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,10 @@ export function themeStylesString(theme: NestedColors, colorSpace: SupportedColo
261261
* but it's the only way to inject the `darkThemes` array into the function.
262262
**/
263263
export function createHeadSnippet(darkThemes: string[]) {
264-
function _applyInitialStyle(darkThemes: string[]) {
264+
const applyInitialStyle = `
265+
function applyInitialStyle(darkThemes) {
265266
let theme = localStorage.getItem('theme');
266-
// Ignore if no dark things registered (default `dark` removed)
267+
// Ignore if no dark things registered (default 'dark' removed)
267268
if (darkThemes.length > 0) {
268269
if (theme) {
269270
document.documentElement.dataset.theme = theme;
@@ -275,8 +276,9 @@ export function createHeadSnippet(darkThemes: string[]) {
275276
}
276277
}
277278
}
279+
`;
278280

279281
let darkThemeList = darkThemes.map((theme) => `'${theme}'`).join(', ');
280282

281-
return `<script>(${_applyInitialStyle.toString()})([${darkThemeList}])</script>`;
283+
return `<script>${applyInitialStyle}([${darkThemeList}])</script>`;
282284
}

sites/docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @layerstack/docs
22

3+
## 0.0.22
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`ad843a4`](https://github.com/techniq/layerstack/commit/ad843a4502b792acfe037b4ccf39a9a00847335d)]:
8+
- @layerstack/tailwind@0.0.13
9+
310
## 0.0.21
411

512
### Patch Changes

sites/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "MIT",
66
"private": true,
77
"repository": "techniq/layerstack",
8-
"version": "0.0.21",
8+
"version": "0.0.22",
99
"scripts": {
1010
"dev": "vite dev",
1111
"build": "vite build",

0 commit comments

Comments
 (0)