@kolkrabbi/kol-theme 0.37.0 → 0.38.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/README.md CHANGED
@@ -21,6 +21,17 @@ Cascade order is load-bearing — `kol-theme` must come after Tailwind so its co
21
21
 
22
22
  All KOL rule CSS lives in the `components` cascade layer, so your Tailwind utility classes always win over KOL chrome (`<Input className="hidden sm:block">` behaves as written). Your own unlayered CSS wins over everything KOL ships.
23
23
 
24
+ ## The `@source` contract — required for every KOL package that ships JSX
25
+
26
+ Tailwind v4 **does not scan `node_modules`**, so layout utilities emitted inside KOL components never generate unless you point the scanner at each package's source. Without these lines components **silently degrade** — no error, no warning, just missing layout/motion (a frozen ThemeToggle roll, a collapsed AppShell grid). Paste one line per installed KOL package, next to the imports above:
27
+
28
+ ```css
29
+ @source "../node_modules/@kolkrabbi/kol-component/src";
30
+ @source "../node_modules/@kolkrabbi/kol-framework/src";
31
+ ```
32
+
33
+ (Adjust the relative path to your CSS file's location. Component-load-bearing *chrome* lives in this package's CSS and needs no `@source` — the contract covers the remaining per-render utilities.)
34
+
24
35
  ## Fonts
25
36
 
26
37
  The typography CSS references the brand fonts at absolute paths (`/fonts/Right-Grotesk/…`, `/fonts/jetbrains-mono/…`). **The package does not ship the font files** — your app must serve them from `/fonts/` (e.g. drop them in your `public/` dir). The showcase in this repo does exactly that. Without them, type falls back to system fonts.
@@ -1012,3 +1012,26 @@ a.kol-icon-frame {
1012
1012
  border-radius: 0;
1013
1013
  padding: 0;
1014
1014
  }
1015
+
1016
+ /* The ROLL mechanics — .kol-roll (ComponentTailwindSourceTrap, 2026-08-12).
1017
+ * These were Tailwind utilities emitted in ThemeToggle's JSX (overflow-hidden,
1018
+ * transition-transform, duration-500, ease-in-out) — and Tailwind never scans
1019
+ * node_modules, so any consumer without the @source lines got a SILENTLY
1020
+ * static glyph: visible, clickable, no travel, no coin-roll, no error.
1021
+ * A component's own moving parts live HERE, in the CSS it ships — the
1022
+ * consumer's scanner owes it nothing. Widths/transforms stay inline in JSX
1023
+ * (they are per-render geometry, not chrome). */
1024
+ .kol-roll {
1025
+ position: relative;
1026
+ display: inline-block;
1027
+ overflow: hidden;
1028
+ }
1029
+ .kol-roll-strip {
1030
+ display: flex;
1031
+ transition: transform 500ms ease-in-out;
1032
+ }
1033
+ .kol-roll-slot {
1034
+ display: inline-flex;
1035
+ line-height: 0;
1036
+ transition: transform 500ms ease-in-out;
1037
+ }
@@ -499,7 +499,11 @@
499
499
  border: none;
500
500
  cursor: pointer;
501
501
  white-space: nowrap;
502
- color: var(--kol-fg-meta);
502
+ /* OPAQUE rest paint (estate opaque-icons law, 2026-08-12): cells host
503
+ * icon labels, and alpha ink (--kol-fg-meta) compounds where strokes
504
+ * overlap — oq-48 reads identical on the resting surface but stays
505
+ * opaque. Hover/active use fg-emphasis, which is full ink (no alpha). */
506
+ color: var(--kol-oq-48);
503
507
  transition: color var(--kol-transition-base),
504
508
  background-color var(--kol-transition-base);
505
509
  }
@@ -518,10 +522,12 @@
518
522
  outline-offset: -2px;
519
523
  }
520
524
 
521
- /* Filled variant — the segmented state law (2026-08-12): every cell is a
522
- * FILLED TILE (input surface tone) with 1px transparent gaps never an
523
- * outline shell around the group; the outlined treatment marks ONLY the
524
- * selected cell (inset ring). Group radius clips the outer tile corners. */
525
+ /* Filled variant — the CORRECTED segmented state law (2026-08-12, second
526
+ * ruling SegmentedFilledStateFix): the SELECTED cell is the DARK FILLED
527
+ * tile (input surface tone) + bright glyph — the dark state IS the selection
528
+ * marker. Unselected cells are QUIET: transparent, dim, hover brightens.
529
+ * NO outline ring, ever. (The 0.36.0 first reading — always-tiled cells +
530
+ * inset ring on selected — was the inversion this block repeals.) */
525
531
  .kol-seg--filled {
526
532
  border: none;
527
533
  gap: 1px;
@@ -529,22 +535,22 @@
529
535
  }
530
536
 
531
537
  .kol-seg--filled .kol-seg-cell {
532
- background: var(--kol-surface-secondary);
538
+ background: transparent;
539
+ /* the dark tile rounds itself (SegBar reference geometry) */
540
+ border-radius: var(--kol-radius-sm);
533
541
  }
534
542
 
535
543
  .kol-seg--filled .kol-seg-cell + .kol-seg-cell { border-left: none; }
536
544
 
537
545
  .kol-seg--filled .kol-seg-cell.is-active {
538
546
  background: var(--kol-surface-secondary);
539
- box-shadow: inset 0 0 0 1px var(--kol-fg-24);
540
547
  color: var(--kol-fg-emphasis);
541
548
  }
542
549
 
543
- /* Tonal variant (2026-08-12, user ask): filled tiles, but the clicked cell
544
- * marks itself by TONE — surface-tertiary fill, no ring. */
550
+ /* Tonal variant (2026-08-12, user ask): same quiet-unselected law, but the
551
+ * clicked cell marks itself on the tertiary tone. */
545
552
  .kol-seg--tonal .kol-seg-cell.is-active {
546
553
  background: var(--kol-surface-tertiary);
547
- box-shadow: none;
548
554
  color: var(--kol-fg-emphasis);
549
555
  }
550
556
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-theme",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "KOL (Kolkrabbi) design-system tokens + base CSS — brand-neutral. The canonical token/cascade layer every other KOL package and consumer builds on.",
5
5
  "license": "MIT",
6
6
  "type": "module",