@kolkrabbi/kol-component 0.339.0 → 0.339.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-component",
3
- "version": "0.339.0",
3
+ "version": "0.339.1",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,9 +29,9 @@
29
29
  "embla-carousel-react": "^8.6.0",
30
30
  "pdfjs-dist": "^6.3.289",
31
31
  "react-syntax-highlighter": "^16.1.1",
32
- "@kolkrabbi/kol-growth": "^0.5.0",
33
32
  "@kolkrabbi/kol-markdown": "^0.2.0",
34
- "@kolkrabbi/kol-search": "^0.3.0"
33
+ "@kolkrabbi/kol-search": "^0.3.0",
34
+ "@kolkrabbi/kol-growth": "^0.5.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@kolkrabbi/kol-icons": ">=0.61.1",
@@ -104,7 +104,8 @@ import NavRailFloat from './NavRailFloat.jsx'
104
104
  * region between the mark and the pinned bottom rows, so a list longer than the window scrolls
105
105
  * and runs out under the fade instead of being cut by the edge. `false` draws the list plain.
106
106
  * @param {{ current: Function }} [toggleRef] the app and site rails fill it with their expand ↔ collapse toggle — the
107
- * frame's `\` key (useRailKeys, 2026-11-04) presses it
107
+ * frame's `\` key (useRailKeys, 2026-11-04) presses it. The app rail's also carries `open` and `snap(open)`, so AppShell
108
+ * can bring it back from a hide as it was
108
109
  */
109
110
  const RAIL_W = '--kol-shell-rail-width'
110
111
  const CLOSED = 48
@@ -160,7 +161,10 @@ function useRailDrag(railRef, grabRef, onSnap, snapRef, enabled = true) {
160
161
  const report = (w) => { const on = w >= RAIL_LABELS; if (on !== labelled) { labelled = on; onSnap(on) } }
161
162
  const snapTo = (w) => {
162
163
  gsap.to(root, { [RAIL_W]: `${w}px`, ...GRAB.snap, overwrite: 'auto' })
163
- report(w)
164
+ /* a snap always reports — a remount (StrictMode's second effect, AppShell's show-as-it-was) can leave this closure's
165
+ * `labelled` behind the rail's state, and a deduped report then never closed it */
166
+ labelled = w >= RAIL_LABELS
167
+ onSnap(labelled)
164
168
  }
165
169
  /* the ONLY way out of this effect (RailSectionPressOpensRail, kol-fxr
166
170
  * 2026-08-30). `snapTo` closes over the animation and the CLOSED/open
@@ -407,7 +411,7 @@ function AppRail({
407
411
  useGrabEdge(grabRef)
408
412
  useRailDrag(railRef, grabRef, setRailOpen, snapOpenRef, !drawer)
409
413
  /* the frame's `\` key (useRailKeys) — the grab strip's own click: expanded ↔ collapsed */
410
- if (toggleRef) toggleRef.current = () => snapOpenRef.current?.(!railOpen)
414
+ if (toggleRef) toggleRef.current = Object.assign(() => snapOpenRef.current?.(!railOpen), { open: railOpen, snap: (o) => snapOpenRef.current?.(o) })
411
415
  if (hidden) return null
412
416
  const enterMode = (sections === 'fold' ? 'expand' : sections) === 'enter'
413
417
  const enters = (item) => enterMode && !!item.sub?.some((s) => s.sub?.length > 0)