@alexandregme/zljs 3.23.0 → 3.23.2
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 +15 -1
- package/dist/{chunk-NHCD5NHZ.js → chunk-YFV3N7HI.js} +12 -5
- package/dist/index.js +1 -1
- package/dist/next/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,18 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.23.2] - 2026-11-26
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `Sidebar` and `TopNav`, and so `Navigation`, scrolled away with the page when the page was taller than the screen. They now stay in place, the `Sidebar` at the side and the `TopNav` at the top, while the content scrolls. Nothing to change in the app
|
|
16
|
+
|
|
17
|
+
## [3.23.1] - 2026-11-25
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Choosing the light or the dark theme changed nothing in an app built by Next.js for production: only the theme of the system worked. That build rewrites `light-dark()` into two variables it switches by itself, and the choice only set `color-scheme`. The choice now sets those variables too, so the theme buttons, `useTheme` and `setTheme` work there. Nothing to change in the app: update and build again
|
|
22
|
+
|
|
11
23
|
## [3.23.0] - 2026-11-24
|
|
12
24
|
|
|
13
25
|
### Added
|
|
@@ -662,7 +674,9 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
662
674
|
|
|
663
675
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
664
676
|
|
|
665
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.23.
|
|
677
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.23.2...HEAD
|
|
678
|
+
[3.23.2]: https://github.com/alexandregme/zljs/compare/v3.23.1...v3.23.2
|
|
679
|
+
[3.23.1]: https://github.com/alexandregme/zljs/compare/v3.23.0...v3.23.1
|
|
666
680
|
[3.23.0]: https://github.com/alexandregme/zljs/compare/v3.22.0...v3.23.0
|
|
667
681
|
[3.22.0]: https://github.com/alexandregme/zljs/compare/v3.21.0...v3.22.0
|
|
668
682
|
[3.21.0]: https://github.com/alexandregme/zljs/compare/v3.20.0...v3.21.0
|
|
@@ -463,7 +463,11 @@ import { useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
|
463
463
|
var themes = ["system", "light", "dark"];
|
|
464
464
|
var THEME_STORAGE_KEY = "zljs-theme";
|
|
465
465
|
var THEME_STYLE_ID = "zljs-theme";
|
|
466
|
-
var
|
|
466
|
+
var THEME_RULES = {
|
|
467
|
+
light: ":root:root{color-scheme:light;--lightningcss-light:initial;--lightningcss-dark: }",
|
|
468
|
+
dark: ":root:root{color-scheme:dark;--lightningcss-light: ;--lightningcss-dark:initial}"
|
|
469
|
+
};
|
|
470
|
+
var themeScript = `(function(){try{var r=${JSON.stringify(THEME_RULES)},t=localStorage.getItem("${THEME_STORAGE_KEY}");if(t==="light"||t==="dark"){var s=document.createElement("style");s.id="${THEME_STYLE_ID}";s.textContent=r[t];document.head.appendChild(s)}}catch(e){}})()`;
|
|
467
471
|
|
|
468
472
|
// features/app/hooks/use-theme/use-theme.ts
|
|
469
473
|
var SYSTEM = "system";
|
|
@@ -491,7 +495,7 @@ var applyTheme = (theme) => {
|
|
|
491
495
|
const existing = document.getElementById(THEME_STYLE_ID);
|
|
492
496
|
const style = existing ?? document.createElement("style");
|
|
493
497
|
style.id = THEME_STYLE_ID;
|
|
494
|
-
style.textContent = theme === SYSTEM ? "" :
|
|
498
|
+
style.textContent = theme === SYSTEM ? "" : THEME_RULES[theme];
|
|
495
499
|
if (!existing) {
|
|
496
500
|
document.head.append(style);
|
|
497
501
|
}
|
|
@@ -996,7 +1000,9 @@ var sidebar = tv9({
|
|
|
996
1000
|
// A surface beside the page, with a line between the two: white in the light
|
|
997
1001
|
// theme and dark in the dark one. The line is an inset shadow, which takes no
|
|
998
1002
|
// width: a border would move what is centered in the collapsed sidebar.
|
|
999
|
-
|
|
1003
|
+
// It takes the height of the screen and stays in place while the page beside
|
|
1004
|
+
// it scrolls.
|
|
1005
|
+
base: "sticky top-0 shrink-0 h-dvh shadow-[inset_-1px_0_0_var(--color-zl-border)] bg-zl-surface text-zl-text-soft flex flex-col overflow-hidden transition-[width] duration-200 divide-y divide-zl-border",
|
|
1000
1006
|
variants: {
|
|
1001
1007
|
collapsed: {
|
|
1002
1008
|
true: "w-14",
|
|
@@ -1205,8 +1211,9 @@ import { tv as tv10 } from "tailwind-variants";
|
|
|
1205
1211
|
var topNav = tv10({
|
|
1206
1212
|
slots: {
|
|
1207
1213
|
// The panels hang from it, so it is their anchor. The safe area keeps the
|
|
1208
|
-
// bar under the notch of a phone.
|
|
1209
|
-
|
|
1214
|
+
// bar under the notch of a phone. It stays at the top while the page
|
|
1215
|
+
// scrolls under it, over what the page layers on itself and under a modal.
|
|
1216
|
+
base: "sticky top-0 z-40 shrink-0 border-b border-zl-border bg-zl-surface pt-[env(safe-area-inset-top)] text-zl-text-soft",
|
|
1210
1217
|
bar: "flex h-14 items-center gap-1 px-2",
|
|
1211
1218
|
// As wide as the menu button it stands in for, so the home link stays in
|
|
1212
1219
|
// the middle of the bar.
|
package/dist/index.js
CHANGED
package/dist/next/index.js
CHANGED