@kolkrabbi/kol-framework 0.18.0 → 0.20.0
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/package.json +4 -3
- package/src/ThemeToggle.jsx +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "KOL app shell — sidenav, layout, theme toggle, footer, heroes + brand color layer. SideNav takes nav data as props so the tree stays app-local.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": "./src/index.js",
|
|
14
|
+
"./src/*": "./src/*",
|
|
14
15
|
"./kol-framework.css": "./kol-framework.css",
|
|
15
16
|
"./kol-brand-color.css": "./kol-brand-color.css"
|
|
16
17
|
},
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
"app-shell"
|
|
28
29
|
],
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@kolkrabbi/kol-component": "^0.
|
|
31
|
-
"@kolkrabbi/kol-icons": "^0.
|
|
31
|
+
"@kolkrabbi/kol-component": "^0.38.0",
|
|
32
|
+
"@kolkrabbi/kol-icons": "^0.16.0"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"react": "^18.3.0 || ^19.0.0",
|
package/src/ThemeToggle.jsx
CHANGED
|
@@ -92,23 +92,28 @@ export default function ThemeToggle({
|
|
|
92
92
|
/* The ROLL — wheel mechanics (2026-07-30, one-glyph ruling): two copies of
|
|
93
93
|
* the split circle; rotation accumulates with the slot (−180° per
|
|
94
94
|
* glyph-width) on the same 500ms/ease clock as the strip's translateX, so
|
|
95
|
-
* light→dark rolls one way and dark→light rolls back.
|
|
95
|
+
* light→dark rolls one way and dark→light rolls back.
|
|
96
|
+
*
|
|
97
|
+
* Chrome classes are kol-roll* from kol-theme (ComponentTailwindSourceTrap,
|
|
98
|
+
* 2026-08-12) — these were Tailwind utilities, which a consumer's scanner
|
|
99
|
+
* never generates from node_modules, so the roll silently froze in any app
|
|
100
|
+
* without the @source lines. Only per-render geometry stays inline. */
|
|
96
101
|
const slot = SLOT[shown]
|
|
97
102
|
const iconSwap = (px) => (
|
|
98
103
|
<span
|
|
99
|
-
className="
|
|
104
|
+
className="kol-roll"
|
|
100
105
|
style={{ width: px, height: px }}
|
|
101
106
|
aria-hidden="true"
|
|
102
107
|
>
|
|
103
108
|
<span
|
|
104
|
-
className="
|
|
109
|
+
className="kol-roll-strip"
|
|
105
110
|
style={{ width: px * 2, transform: `translateX(-${slot * px}px)` }}
|
|
106
111
|
>
|
|
107
112
|
{[0, 1].map((i) => (
|
|
108
113
|
<span
|
|
109
114
|
key={i}
|
|
110
|
-
className="
|
|
111
|
-
style={{ transform: `rotate(${slot * -180}deg)
|
|
115
|
+
className="kol-roll-slot"
|
|
116
|
+
style={{ transform: `rotate(${slot * -180}deg)` }}
|
|
112
117
|
>
|
|
113
118
|
<Icon name="mode-toggle-01" size={px} />
|
|
114
119
|
</span>
|