@kolkrabbi/kol-shell 0.130.0 → 0.132.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-shell",
3
- "version": "0.130.0",
3
+ "version": "0.132.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "./src/*": "./src/*"
13
13
  },
14
14
  "peerDependencies": {
15
- "@kolkrabbi/kol-component": ">=0.377.0",
15
+ "@kolkrabbi/kol-component": ">=0.378.0",
16
16
  "@kolkrabbi/kol-framework": ">=0.55.0",
17
17
  "@kolkrabbi/kol-icons": ">=0.69.0",
18
18
  "@kolkrabbi/kol-theme": ">=0.224.0",
@@ -21,9 +21,9 @@
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-component": ">=0.377.0",
25
- "@kolkrabbi/kol-icons": "^0.71.0",
26
- "@kolkrabbi/kol-theme": "^0.225.0",
24
+ "@kolkrabbi/kol-component": "^0.380.0",
25
+ "@kolkrabbi/kol-theme": "^0.227.0",
26
+ "@kolkrabbi/kol-icons": "^0.72.0",
27
27
  "@kolkrabbi/kol-framework": "^0.74.1"
28
28
  },
29
29
  "files": [
@@ -11,8 +11,7 @@ import { Button, Input, floatSurfaceClass } from '@kolkrabbi/kol-component'
11
11
  * Two looks, one form:
12
12
  * - `column` (default) — style A, 360 wide: the desk's sign-in column over Home (HubHome) and the phone column.
13
13
  * - `box` — the floating style, the user's phone sign-in box (round 3, W16 2026-10-31): 340 wide, 28 round, 20 in, 8 between
14
- * rows, on its `surface`; it passes `variant="float"` to its fields and button (capsules at the float height), so the
15
- * consumer never does.
14
+ * rows, on its `surface`.
16
15
  *
17
16
  * @param {string} title the eyebrow ("Sign in", "Create account", "Request an invite")
18
17
  * @param {Array} fields `[{ id, placeholder, type?, autoComplete? }]` — the placeholder is the field's name
@@ -50,7 +49,6 @@ export default function AccountForm({ title, fields = [], okLabel, footer, onSub
50
49
  placeholder={f.placeholder}
51
50
  aria-label={f.placeholder}
52
51
  size="md"
53
- variant={box ? 'float' : undefined}
54
52
  value={vals[f.id]}
55
53
  onChange={(e) => setVals((v) => ({ ...v, [f.id]: e.target.value }))}
56
54
  className="w-full"
@@ -63,7 +61,7 @@ export default function AccountForm({ title, fields = [], okLabel, footer, onSub
63
61
  {footer.text} <a href={footer.href ?? '#'} onClick={(e) => { if (footer.onPress) { e.preventDefault(); footer.onPress() } }} className="text-emphasis underline">{footer.link}</a>
64
62
  </p>
65
63
  )}
66
- <Button type="submit" variant={box ? 'float' : undefined} tone="inverted" size="md" className={`self-start${box ? '' : ' mt-4'}`} disabled={busy || !!done}>{okLabel}</Button>
64
+ <Button type="submit" size="md" className={`self-start${box ? '' : ' mt-4'}`} disabled={busy || !!done}>{okLabel}</Button>
67
65
  </>
68
66
  )
69
67
  return box
@@ -1,8 +1,10 @@
1
- import { useCallback, useEffect, useState } from 'react'
1
+ import { useCallback, useEffect, useRef, useState } from 'react'
2
2
  import { Button, TabsRow, Tooltip, TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, tabbarPillWidth, tabbarPillSlot, floatSurfaceClass, usePopover, PopoverPanel, useMediaQuery } from '@kolkrabbi/kol-component'
3
- import { hasIcon } from '@kolkrabbi/kol-icons'
3
+ import { hasIcon, IconLoader } from '@kolkrabbi/kol-icons'
4
4
  import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
5
5
  import Timecode from './Timecode.jsx'
6
+ import ToolRail, { ToolRailSlot } from './ToolRail.jsx'
7
+ import { Input, Menu } from '@kolkrabbi/kol-component'
6
8
 
7
9
  /* taxonomy-ok: molecule — TabsRow's pill + MenuFloatRows sheets of Buttons */
8
10
 
@@ -81,7 +83,7 @@ import Timecode from './Timecode.jsx'
81
83
  * depth — `sub`, the More's `actions` and the transport's `sheetFor` rows alike (MenuFloat). On the `dock` a
82
84
  * level opens BESIDE its row (the + menu's popover); on every phone variant it REPLACES the card's rows under a Back row. A
83
85
  * leaf runs and closes every level; Escape and an outside press close all; ↑ ↓ move, → / Enter open a level, ← goes back one.
84
- * Its menus are the floating style B (`variant="float"` on the rows, `.kol-more-sheet-float`) — the board's.
86
+ * Its menus are the floating style B — the board's.
85
87
  * @param {boolean} menuBorder the sheets' 1px hairline (`.kol-more-sheet-bordered`) — off by default, the board's menus have none
86
88
  * THE FOUR VARIANTS (user ruling 2026-10-30): `mobile` · `dock` · `panel` · `transport` — nothing else.
87
89
  *
@@ -112,6 +114,8 @@ const activePath = (items, path) => items
112
114
  .sort((a, b) => b.path.length - a.path.length)[0]?.path
113
115
 
114
116
  export default function AppFloatNav(props) {
117
+ if (props.variant === 'folio') return <TransportFolio {...props} />
118
+ if (props.variant === 'kolbox') return props.transport ? <TransportKolbox {...props} /> : <PhoneNavKolbox {...props} />
115
119
  return props.variant === 'transport' ? <Transport {...props} /> : <FloatNav {...props} />
116
120
  }
117
121
 
@@ -217,7 +221,7 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
217
221
  {sub && (
218
222
  <div className={`kol-phone-nav-more ${card}`} role="menu" aria-label={inBar.find((i) => key(i) === sub)?.label} style={overSlot(inBar.findIndex((i) => key(i) === sub))}>
219
223
  <MenuFloat beside={dock} cardClass={card} onLeaf={pickSub} title={inBar.find((i) => key(i) === sub)?.label}>
220
- <MenuFloatRows variant="float" actions={inBar.find((i) => key(i) === sub)?.sub} onPick={pickSub} />
224
+ <MenuFloatRows actions={inBar.find((i) => key(i) === sub)?.sub} onPick={pickSub} />
221
225
  </MenuFloat>
222
226
  </div>
223
227
  )}
@@ -230,16 +234,16 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
230
234
  <div className={`kol-phone-nav-more ${card}`} role="menu" aria-label="More" style={sheetStyle}>
231
235
  {/* the nav, the page's actions, then the pinned foot (frame A2) */}
232
236
  <MenuFloat cardClass={card} onLeaf={pickMoreLeaf} title="More">
233
- <MenuFloatRows variant="float" actions={actions} items={before} itemsFirst active={active} onPick={(x) => { setOpen(false); if (x.onPress && !actions.includes(x)) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />
234
- {after.length > 0 && <MenuFloatRows variant="float" items={after} active={active} onPick={(x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />}
237
+ <MenuFloatRows actions={actions} items={before} itemsFirst active={active} onPick={(x) => { setOpen(false); if (x.onPress && !actions.includes(x)) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />
238
+ {after.length > 0 && <MenuFloatRows items={after} active={active} onPick={(x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />}
235
239
  </MenuFloat>
236
240
  </div>
237
241
  )}
238
242
  {dock && (
239
243
  <PopoverPanel popover={morePop} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
240
244
  <MenuFloat beside cardClass={card} onLeaf={pickMoreLeaf} title="More">
241
- <MenuFloatRows variant="float" actions={actions} items={before} itemsFirst active={active} onPick={(x) => { setOpen(false); if (x.onPress && !actions.includes(x)) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />
242
- {after.length > 0 && <MenuFloatRows variant="float" items={after} active={active} onPick={(x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />}
245
+ <MenuFloatRows actions={actions} items={before} itemsFirst active={active} onPick={(x) => { setOpen(false); if (x.onPress && !actions.includes(x)) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />
246
+ {after.length > 0 && <MenuFloatRows items={after} active={active} onPick={(x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />}
243
247
  </MenuFloat>
244
248
  </PopoverPanel>
245
249
  )}
@@ -286,8 +290,15 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
286
290
  * @param {Object} sheetFor `{ [id]: [{ label, icon?, onPress, checked?, sub? }] }` — rows for a slot that opens a sheet;
287
291
  * `checked` marks the current pick with the 22px check (MenuFloatRows); `sub` opens a level in place
288
292
  * @param {'bottom'|'top'} placement the pill's edge (default bottom)
289
- * @param {boolean} foldable a sideways swipe folds it into the right edge tab
290
- * @param {boolean} folded · {Function} onFoldChange the folded state, controlled (else the pill holds it)
293
+ * @param {boolean} collapsibleH collapse-h (plan-2026-11-12-one-header W11; was `foldable`, aliased): the pill — a sideways swipe
294
+ * folds it into the right edge tab; the inline capsule — it collapses to its LAST item (the
295
+ * play/pause, one button in both states) + the timecode + any item that is lit (Loop on); ONE
296
+ * regular 12 chevron (`--kol-float-chev-sm`, oq-64) directly left of the play/pause, Figma-style:
297
+ * ‹ collapsed, › expanded; the other items open to its left, so the play/pause and the right
298
+ * edge never move. It starts collapsed (`defaultCollapsedH`, default true) and remembers the
299
+ * choice (localStorage `kol-float-transport:collapsed-h`)
300
+ * @param {boolean} collapsedH · {Function} onCollapseH the collapsed state, controlled (else the transport holds it);
301
+ * `folded` · `onFoldChange` are their deprecated aliases
291
302
  * @param {Object|string} timecode THE TIMECODE (float-everything W5 rows 69 · 70, 2026-11-04): `{ current, total? }` (or the
292
303
  * current alone) drawn by `Timecode` INSIDE the pill, after the slots — TabsRow's `trailing`
293
304
  * (kol-component ≥0.335.0); the slots stay where a pill without it puts them. Unset, no readout
@@ -298,8 +309,21 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
298
309
  * 12 above the slot. Below md it is the phone pill as before. Default false — the pill everywhere
299
310
  * @param {string} className the inline capsule's (ignored by the pill)
300
311
  */
301
- function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable = false, folded, onFoldChange, menuBorder = false, surface = 'solid', labels = false, foldSide = 'right', foldTone, timecode, inline = false, className = '' }) {
312
+ const COLLAPSED_H_KEY = 'kol-float-transport:collapsed-h'
313
+
314
+ function Transport({ items = [], sheetFor = {}, placement = 'bottom', collapsibleH, collapsedH, defaultCollapsedH = true, onCollapseH, foldable, folded, onFoldChange, menuBorder = false, surface = 'solid', labels = false, foldSide = 'right', foldTone, timecode, inline = false, className = '' }) {
302
315
  const [sheet, setSheet] = useState(null)
316
+ const canH = collapsibleH ?? foldable ?? false
317
+ const ctlH = collapsedH ?? folded
318
+ const onH = onCollapseH ?? onFoldChange
319
+ const [ownH, setOwnH] = useState(() => { try { const v = localStorage.getItem(COLLAPSED_H_KEY); return v == null ? defaultCollapsedH : v === '1' } catch { return defaultCollapsedH } })
320
+ const isH = canH && (ctlH ?? ownH)
321
+ const toggleH = () => {
322
+ const next = !isH
323
+ if (next) setSheet(null)
324
+ if (ctlH === undefined) { setOwnH(next); try { localStorage.setItem(COLLAPSED_H_KEY, next ? '1' : '0') } catch { /* private window: kept for this visit */ } }
325
+ onH?.(next)
326
+ }
303
327
  useEffect(() => {
304
328
  if (!sheet) return undefined
305
329
  const onKey = (e) => { if (e.key === 'Escape') setSheet(null) }
@@ -336,23 +360,37 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
336
360
  const phone = useMediaQuery('(max-width: 767px)')
337
361
 
338
362
  if (inline && !phone) {
339
- /* the desktop capsule — ToolRail's slots laid in a row; the sheet sits over its slot (6 in + 40 a slot + 18 its centre) */
340
- const capsuleSheet = { position: 'absolute', left: 6 + at * 40 + 18, right: 'auto', transform: 'translateX(-50%)', [top ? 'top' : 'bottom']: 'calc(100% + 12px)', width: 'max-content', minWidth: 160 }
363
+ /* collapse-h: the extras, the chevron, the play/pause (the last item); collapsed, only a lit extra stays */
364
+ const main = canH ? tabs[tabs.length - 1] : null
365
+ const shown = canH ? tabs.slice(0, -1).filter((t) => !isH || t.selected) : tabs
366
+ const slot = (t) => (
367
+ <Tooltip key={t.value} placement={top ? 'bottom' : 'top'} offset={12} label={t.label}>
368
+ <Button tone="ghost" iconOnly={t.icon} aria-label={t.label} pressed={t.selected} onClick={() => press(t.value)} />
369
+ </Tooltip>
370
+ )
371
+ /* the desktop capsule — ToolRail's slots laid in a row; the sheet sits over its slot (6 in + 40 a slot + 18 its centre,
372
+ + the chevron's 16 + 4 for the play/pause) */
373
+ const order = main ? [...shown, main] : shown
374
+ const slotAt = order.findIndex((t) => t.value === sheet)
375
+ const capsuleSheet = { position: 'absolute', left: 6 + slotAt * 40 + 18 + (main && sheet === main.value ? 20 : 0), right: 'auto', transform: 'translateX(-50%)', [top ? 'top' : 'bottom']: 'calc(100% + 12px)', width: 'max-content', minWidth: 160 }
341
376
  return (
342
377
  <div role="toolbar" aria-label="Transport" className={`kol-transport-capsule kol-float-chrome relative inline-flex items-center gap-1 p-1.5 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
343
378
  {sheet && <button type="button" aria-label="Close" className="kol-phone-nav-scrim" onClick={() => setSheet(null)} />}
344
379
  {sheet && (
345
380
  <div className={`kol-phone-nav-more kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}${menuBorder ? ' kol-more-sheet-bordered' : ''}`} role="menu" aria-label={items[at]?.label} style={capsuleSheet}>
346
381
  <MenuFloat onLeaf={() => setSheet(null)} title={items[at]?.label}>
347
- <MenuFloatRows variant="float" actions={sheetFor[sheet]} onPick={() => setSheet(null)} />
382
+ <MenuFloatRows actions={sheetFor[sheet]} onPick={() => setSheet(null)} />
348
383
  </MenuFloat>
349
384
  </div>
350
385
  )}
351
- {tabs.map((t) => (
352
- <Tooltip key={t.value} variant="float" placement={top ? 'bottom' : 'top'} offset={12} label={t.label}>
353
- <Button variant="float" tone="ghost" iconOnly={t.icon} aria-label={t.label} pressed={t.selected} onClick={() => press(t.value)} />
354
- </Tooltip>
355
- ))}
386
+ {shown.map(slot)}
387
+ {main && (
388
+ <button type="button" aria-label={isH ? 'Show transport controls' : 'Hide transport controls'} aria-expanded={!isH} onClick={toggleH} data-collapse-h=""
389
+ className="inline-flex h-9 w-4 shrink-0 items-center justify-center rounded-full text-oq-64 hover:text-oq-96 cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]">
390
+ <IconLoader name={isH ? 'chevron-left' : 'chevron-right'} size="var(--kol-float-chev-sm)" />
391
+ </button>
392
+ )}
393
+ {main && slot(main)}
356
394
  {tc && <Timecode {...tc} className="px-3" />}
357
395
  </div>
358
396
  )
@@ -367,7 +405,7 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
367
405
  {sheet && (
368
406
  <div className={`kol-phone-nav-more kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}${menuBorder ? ' kol-more-sheet-bordered' : ''}`} role="menu" aria-label={items[at]?.label} style={sheetStyle}>
369
407
  <MenuFloat onLeaf={() => setSheet(null)} title={items[at]?.label}>
370
- <MenuFloatRows variant="float" actions={sheetFor[sheet]} onPick={() => setSheet(null)} />
408
+ <MenuFloatRows actions={sheetFor[sheet]} onPick={() => setSheet(null)} />
371
409
  </MenuFloat>
372
410
  </div>
373
411
  )}
@@ -382,9 +420,9 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
382
420
  active={APP_FLOAT_NAV_VARIANTS.transport.active}
383
421
  surface={surface}
384
422
  labels={labels}
385
- foldable={foldable}
386
- folded={folded}
387
- onFoldChange={(v) => { if (v) setSheet(null); onFoldChange?.(v) }}
423
+ foldable={canH}
424
+ folded={ctlH}
425
+ onFoldChange={(v) => { if (v) setSheet(null); onH?.(v) }}
388
426
  foldSide={foldSide}
389
427
  foldTone={foldTone}
390
428
  ariaLabel="Transport"
@@ -395,3 +433,118 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
395
433
  </>
396
434
  )
397
435
  }
436
+
437
+ /* ── kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18) ─────────────────────────────────────────────────
438
+ * `variant="kolbox"`: kolbox's floating nav, both of its members (TransportPill and PhoneNav are this component's
439
+ * aliases, so both kolbox twins land here). `transport` — kolbox's ToolbarTransport; unset — kolbox's RailPhone. */
440
+
441
+ /* THE TRANSPORT (Figma plan 19.1, W15, W20.1), carried from apps/kolbox/src/ui/ToolbarTransport.jsx: on ToolRail kolbox's
442
+ * shell, Play and Pause each a slot with the current state lit, Rewind, Stop and the time; after a rule, Loop and its
443
+ * length ("Loop / 4 s", the length's words as the field's prefix, on one line, the value hugging its text), the
444
+ * Timeline slot (`onTimeline`, lit while `timeline` is up) and `more` (further slots). The length commits on Enter or
445
+ * blur; a unit is part of the value. kolbox's words, no twin in the default transport's props: playing, time, loop,
446
+ * loopLength, timeline, onPlay(on), onRewind, onStop, onLoop(on), onLoopLength(seconds), onTimeline, more. */
447
+ function TransportKolbox({ playing = false, time = 0, loop = false, loopLength = 4, timeline = false, onPlay, onRewind, onStop, onLoop, onLoopLength, onTimeline, more, className = '' }) {
448
+ const length = `${loopLength} s`
449
+ const commit = (e) => {
450
+ const n = parseFloat(e.target.value)
451
+ if (n > 0) onLoopLength?.(n)
452
+ else e.target.value = length
453
+ }
454
+ return (
455
+ <ToolRail
456
+ variant="kolbox"
457
+ className={`kol-transport--kolbox ${className}`.trim()}
458
+ end={
459
+ <>
460
+ <ToolRailSlot icon="repeat" label="Loop" lit={loop} onClick={() => onLoop?.(!loop)} />
461
+ <Input variant="kolbox"
462
+ key={length}
463
+ prefix="Loop /"
464
+ aria-label="Loop length in seconds"
465
+ defaultValue={length}
466
+ onBlur={commit}
467
+ onKeyDown={(e) => e.key === 'Enter' && e.currentTarget.blur()}
468
+ hug
469
+ className="[&>span:first-child]:w-auto [&>span:first-child]:whitespace-nowrap"
470
+ />
471
+ {onTimeline && <ToolRailSlot icon="panel-bottom" label="Timeline" lit={timeline} onClick={onTimeline} />}
472
+ {more}
473
+ </>
474
+ }
475
+ >
476
+ <ToolRailSlot icon="play" label="Play" lit={playing} onClick={() => onPlay?.(true)} />
477
+ <ToolRailSlot icon="pause" label="Pause" lit={!playing} onClick={() => onPlay?.(false)} />
478
+ <ToolRailSlot icon="rewind" label="Rewind" onClick={onRewind} />
479
+ <ToolRailSlot icon="stop" label="Stop" onClick={onStop} />
480
+ <span className="kol-transport-time w-16 px-2 tabular-nums">{time.toFixed(2)} s</span>
481
+ </ToolRail>
482
+ )
483
+ }
484
+
485
+ /* ── folio (Folio migration batch D, 2026-11-22) ──────────────────────────────────────────────────────────────────────
486
+ * `variant="folio" transport`: Folio's ToolTransport, carried from apps/folio's EditorChrome.jsx (Folio has no phone
487
+ * nav, so the transport is the look's one member). Play (Pause while playing, lit), Stop and Loop (lit while on), each a
488
+ * 32 square with a 20 glyph, 4 apart, then the time and its total. Words: `timecode` `{ current, total }` (the default
489
+ * transport's; Folio's `time` and `total`); kolbox's `playing`, `onPlay(on)`, `onStop`, `loop`, `onLoop(on)`. The slots
490
+ * are `Button variant="folio" iconOnly` (Folio's ToolIcon, batch A). */
491
+ function TransportFolio({ playing = false, onPlay, onStop, loop = false, onLoop, timecode, className = '' }) {
492
+ const tc = timecode == null ? {} : typeof timecode === 'string' ? { current: timecode } : timecode
493
+ return (
494
+ <span role="group" aria-label="Transport" className={`kol-transport--folio flex shrink-0 items-center gap-[4px] ${className}`.trim()}>
495
+ <Button variant="folio" iconOnly={playing ? 'pause' : 'play'} aria-label={playing ? 'Pause' : 'Play'} pressed={playing} onClick={() => onPlay?.(!playing)} />
496
+ <Button variant="folio" iconOnly="stop" aria-label="Stop" onClick={onStop} />
497
+ <Button variant="folio" iconOnly="repeat" aria-label="Loop" pressed={loop} onClick={() => onLoop?.(!loop)} />
498
+ <span className="kol-transport-time whitespace-pre px-[8px] tabular-nums">{tc.current}{tc.total != null && <span className="kol-transport-total">{` / ${tc.total}`}</span>}</span>
499
+ </span>
500
+ )
501
+ }
502
+
503
+ /* THE PHONE NAV (round 4, W15), carried from apps/kolbox/src/ui/RailPhone.jsx: the real hub's phone nav in kolbox's
504
+ * look. AppFloatNav's words: `items` [{ path, icon, label, onPress }] in rail order (the app's rows; kolbox's `run` is
505
+ * `onPress`), `currentPath`. More than five, so the first four sit in the pill and the fifth slot is More; More is the
506
+ * whole nav, titled "More", the current page lit; while it is open the pill gives way (its place kept) and More turns to
507
+ * its × ("Close"); a pick or a press off it closes it. The active slot is the current page's (a page reached through More
508
+ * lights More). Geometry: 66 high, 56 slots 4 apart, 28 glyphs, More its own 66 circle 8 off the pill, 16 off the
509
+ * window's foot. */
510
+ const KOLBOX_IN_BAR = 4
511
+ const kolboxAt = (row, path) => path === row.path || path.startsWith(`${row.path}/`)
512
+ const SlotKolbox = ({ icon, label, lit, onClick, round = false, refEl }) => (
513
+ <Tooltip variant="kolbox" label={label}>
514
+ <button
515
+ ref={refEl}
516
+ type="button"
517
+ aria-label={label}
518
+ aria-current={lit || undefined}
519
+ onClick={onClick}
520
+ className={`kol-phone-nav-slot${lit ? ' is-lit' : ''}${round ? ' is-round size-[66px]' : ' size-14'} inline-flex shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-solid focus-visible:outline-1`}
521
+ >
522
+ <IconLoader name={icon} size={28} className="kol-kolbox-icon shrink-0" />
523
+ </button>
524
+ </Tooltip>
525
+ )
526
+
527
+ function PhoneNavKolbox({ items = [], currentPath = '/' }) {
528
+ const [open, setOpen] = useState(false)
529
+ const moreRef = useRef(null)
530
+ const active = items.find((r) => kolboxAt(r, currentPath))
531
+ const inBar = items.slice(0, KOLBOX_IN_BAR)
532
+ const litMore = open || (active && !inBar.includes(active))
533
+ return (
534
+ <nav aria-label="Pages" className="kol-phone-nav--kolbox pointer-events-none fixed inset-x-0 bottom-4 z-40 flex items-center justify-center gap-2 pb-[env(safe-area-inset-bottom)] *:pointer-events-auto" data-rail-phone>
535
+ <div className={`kol-phone-nav-pill flex h-[66px] items-center gap-1 rounded-full p-[5px] ${open ? 'invisible' : ''}`} data-rail-phone-pill>
536
+ {inBar.map((r) => <SlotKolbox key={r.path} icon={r.icon} label={r.label} lit={r === active} onClick={r.onPress} />)}
537
+ </div>
538
+ <SlotKolbox round icon={open ? 'x' : 'more'} label={open ? 'Close' : 'More'} lit={litMore} onClick={() => setOpen((o) => !o)} refEl={moreRef} />
539
+ <Menu variant="kolbox"
540
+ aria-label="More"
541
+ anchor={moreRef}
542
+ open={open}
543
+ placement="left-start"
544
+ onClose={() => setOpen(false)}
545
+ onSelect={(row) => row.run?.()}
546
+ groups={[{ title: 'More', rows: items.map((r) => ({ label: r.label, icon: r.icon, highlighted: r === active, run: r.onPress })) }]}
547
+ />
548
+ </nav>
549
+ )
550
+ }
@@ -20,7 +20,7 @@ import { useCallback, useRef, useState } from 'react'
20
20
  * @param {Function} onColumns `(n) => void` — the measured track count, whenever it changes
21
21
  * @param {ReactNode} children the cards (grid) or rows (list)
22
22
  */
23
- export default function CatalogGrid({ layout = 'grid', minColumn = 160, maxColumns = 6, listColumns = 4, listLayout = 'grid', onColumns, children, className, style }) {
23
+ function CatalogGridDefault({ layout = 'grid', minColumn = 160, maxColumns = 6, listColumns = 4, listLayout = 'grid', onColumns, children, className, style }) {
24
24
  const [cols, setCols] = useState(null)
25
25
  const observer = useRef(null)
26
26
  const report = useRef(onColumns)
@@ -54,3 +54,17 @@ export default function CatalogGrid({ layout = 'grid', minColumn = 160, maxColum
54
54
  </div>
55
55
  )
56
56
  }
57
+
58
+ /* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5): tracks no narrower than 240, gap 32, 34 in from the sides and 22 under the title row, so
59
+ Figma's file browser's 4 cards a row at its width (plan-2026-11-23 W6); one a row on a phone */
60
+ function CatalogGridKolbox({ children, className }) {
61
+ return (
62
+ <div className={`min-h-0 flex-1 overflow-y-auto max-md:flex-none max-md:overflow-visible ${className ?? ''}`.trim()} data-file-grid>
63
+ <div role="list" className="grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-x-8 gap-y-8 px-[34px] pt-[22px] pb-8 max-md:grid-cols-1 max-md:px-4 max-md:pb-28">{children}</div>
64
+ </div>
65
+ )
66
+ }
67
+
68
+ export default function CatalogGrid(props) {
69
+ return props.variant === 'kolbox' ? <CatalogGridKolbox {...props} /> : <CatalogGridDefault {...props} />
70
+ }
@@ -252,7 +252,7 @@ function toSlideCard(c, { layout }) {
252
252
  }
253
253
  }
254
254
 
255
- export default function CatalogPage({
255
+ function CatalogPageDefault({
256
256
  /* FIRST, so every default below can read it */
257
257
  preset = 'catalog',
258
258
  header,
@@ -413,3 +413,20 @@ export default function CatalogPage({
413
413
  </AppItemMenuProvider>
414
414
  )
415
415
  }
416
+
417
+ /* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): kolbox's Browser (Figma `Browser`), carried from
418
+ * apps/kolbox/src/home/Browser.jsx: the whole window with its own top bar, so not in an EditorShell: `sidebar` (the home
419
+ * rail) and the main column (children: the top bar, the title row, the grid or the list, which scroll). The panel fill,
420
+ * the sans 12 / 16 in the ink. Under 768 it stacks and scrolls as one column. */
421
+ function CatalogPageKolbox({ sidebar, children, className = '' }) {
422
+ return (
423
+ <div className={`kol-catalog-page--kolbox flex h-full overflow-hidden max-md:flex-col max-md:overflow-y-auto ${className}`.trim()} data-browser>
424
+ {sidebar}
425
+ <main className="flex min-w-0 flex-1 flex-col max-md:contents" data-browser-main>{children}</main>
426
+ </div>
427
+ )
428
+ }
429
+
430
+ export default function CatalogPage(props) {
431
+ return props.variant === 'kolbox' ? <CatalogPageKolbox {...props} /> : <CatalogPageDefault {...props} />
432
+ }
@@ -21,20 +21,45 @@ import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
21
21
  * @param {'solid'|'glass-dark'|'glass-light'} surface what the capsule (and its menu) is made of (default `solid`)
22
22
  * @param {string} className
23
23
  */
24
- export default function DocumentCapsule({ name, status, statusIcon, onBack, menuItems, onMenu, surface = 'solid', className = '' }) {
24
+ export default function DocumentCapsule({ name, status, statusIcon, onBack, menuItems, onMenu, surface = 'solid', variant, open: kolboxOpen, ref, className = '' }) {
25
+ /* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): the kolbox top rail's DocumentTitle (the file's
26
+ * TopRail 36:9458), carried from apps/kolbox/src/ui/TopRail.jsx: the slash, then the `name` and its 12 chevron, 12
27
+ * apart. `onMenu(event)` the name's press (the host owns the menu, anchored to the name; `ref` reaches the name's
28
+ * button); without it the name is not a button's press and draws no chevron. `open` lights the name while its menu
29
+ * is up. No save state (W19.5: saving raises a toast). */
30
+ if (variant === 'kolbox') {
31
+ return (
32
+ <span className={`kol-document-title--kolbox flex min-w-0 items-center gap-3 ${className}`.trim()} data-document-title>
33
+ <span className="kol-document-title-slash">/</span>
34
+ <button
35
+ ref={ref}
36
+ type="button"
37
+ aria-haspopup={onMenu ? 'menu' : undefined}
38
+ aria-expanded={onMenu ? kolboxOpen : undefined}
39
+ disabled={!onMenu}
40
+ onClick={onMenu}
41
+ data-file-name
42
+ className={`kol-document-title-name${kolboxOpen ? ' is-open' : ''} inline-flex min-w-0 items-center gap-3 outline-none focus-visible:outline-solid focus-visible:outline-1`}
43
+ >
44
+ <span className="truncate">{name}</span>
45
+ {onMenu && <IconLoader name="chevron-down" size={12} className={`kol-kolbox-chevron shrink-0${kolboxOpen ? '' : ' kol-document-title-chevron'}`} />}
46
+ </button>
47
+ </span>
48
+ )
49
+ }
25
50
  const [open, setOpen] = useState(false)
26
51
  const popover = usePopover({ open, onOpenChange: setOpen, placement: 'bottom-start', offset: 8 })
27
52
  const hasMenu = menuItems?.length > 0
28
53
  const card = `kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}`
29
54
  return (
30
55
  <div className={`kol-document-capsule kol-float-chrome inline-flex items-center gap-3 h-12 pl-2 pr-4 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
31
- {onBack && <Button variant="float" tone="ghost" size="sm" iconOnly="arrow-left" aria-label="Back" onClick={onBack} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
56
+ {onBack && <Button tone="ghost" size="sm" iconOnly="arrow-left" aria-label="Back" onClick={onBack} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
32
57
  {hasMenu || onMenu ? (
33
58
  /* the name ▾ is a MenuTrigger float (plan-2026-11-06-buttons-page 2.3 — it was a hand-rolled <button>): clear at
34
59
  * rest on the capsule, lit while its menu is open; the popover holds the span, the pattern TopControlsBar uses */
35
60
  <span ref={hasMenu ? popover.refs.setReference : undefined} {...(hasMenu ? popover.getReferenceProps() : {})} className="inline-flex">
36
61
  {/* inline: the theme's menu-trigger rule sets the well at 3-class weight, a utility class cannot reach it */}
37
- <MenuTrigger variant="float" open={hasMenu && open} iconRight="chevron-down" aria-haspopup="menu" aria-expanded={hasMenu ? open : undefined}
62
+ <MenuTrigger open={hasMenu && open} iconRight="chevron-down" aria-haspopup="menu" aria-expanded={hasMenu ? open : undefined}
38
63
  onClick={hasMenu ? undefined : onMenu}
39
64
  style={{ '--kol-tone-bg': 'transparent', '--kol-float-px-md': 'var(--kol-spacing-2)' }}>
40
65
  {name}
@@ -52,7 +77,7 @@ export default function DocumentCapsule({ name, status, statusIcon, onBack, menu
52
77
  {hasMenu && (
53
78
  <PopoverPanel popover={popover} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
54
79
  <MenuFloat beside cardClass={card} onLeaf={() => setOpen(false)} title={name}>
55
- <MenuFloatRows variant="float" actions={menuItems} onPick={() => setOpen(false)} />
80
+ <MenuFloatRows actions={menuItems} onPick={() => setOpen(false)} />
56
81
  </MenuFloat>
57
82
  </PopoverPanel>
58
83
  )}
@@ -1,6 +1,6 @@
1
1
  import { useState } from 'react'
2
- import { Button, PopoverPanel, usePopover, floatSurfaceClass, floatMotion } from '@kolkrabbi/kol-component'
3
- import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
2
+ import { Button, PopoverPanel, usePopover, floatMotion } from '@kolkrabbi/kol-component'
3
+ import { MenuFloatRows } from '@kolkrabbi/kol-component'
4
4
 
5
5
  /* taxonomy-ok: molecule — a round Button that opens the More sheet's rows */
6
6
 
@@ -12,20 +12,17 @@ import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
12
12
  *
13
13
  * @param {Array} actions `[{ label, icon?, onPress }]` — MenuFloatRows' actions
14
14
  * @param {'more'|'plus'|string} [icon='more'] the button's glyph; anything but `more` turns to × while open
15
- * @param {'float'} [variant] the sheet in the float look (`kol-more-sheet-float` on `surface`); unset, the plain sheet
16
- * @param {'solid'|'glass-dark'|'glass-light'} [surface='solid'] what the float sheet is made of — the button never changes
17
15
  * @param {'rotate'|'swap'} [iconMotion='rotate'] how a glyph that is not `more` becomes the × while open: `rotate` turns
18
16
  * the one glyph 45° (the + into the ×) and back on close; `swap` exchanges the icon
19
17
  * @param {boolean|Object} [motion=true] the button's states, the turn and the sheet's enter and leave: `true` the
20
18
  * `--kol-float-*` tokens · `false` none · `{ duration, ease }` per app (floatMotion)
21
- * @param {string} [title='Actions'] the float sheet's header (MenuFloat's Header) — the button's label
22
19
  * @param {string} [className]
23
20
  *
24
21
  * The button's ladder (FloatActionStatesAndMotion, kol-website 2026-11-04): rest the solid inverted circle with the float
25
22
  * shadow · hover the same fill at `--kol-float-hover-opacity` · pressed `--kol-float-press-scale` · open the × on the same
26
- * fill and shadow (`.kol-float-action`; the shadow with `variant="float"`, so Home's plain masthead button is not lifted).
23
+ * fill and shadow (`.kol-float-action`).
27
24
  */
28
- export default function FloatActionMenu({ actions, icon = 'more', variant, surface = 'solid', iconMotion = 'rotate', motion = true, title = 'Actions', className = '' }) {
25
+ export default function FloatActionMenu({ actions, icon = 'more', iconMotion = 'rotate', motion = true, className = '' }) {
29
26
  const [open, setOpen] = useState(false)
30
27
  /* the sheet opens to the LEFT of the button, top edges on one line (user 2026-10-23) — as the phone's sits beside its × */
31
28
  const popover = usePopover({ open, onOpenChange: setOpen, placement: 'left-start', offset: 12 })
@@ -37,13 +34,11 @@ export default function FloatActionMenu({ actions, icon = 'more', variant, surfa
37
34
  {/* `icon` — `more` on Home, `plus` signed out (frame B2), the × while its sheet is open */}
38
35
  {/* always the inverted round button — `surface` dresses its menu only (HomeDockRound4, kol-fxr 2026-10-31 — user: *"this
39
36
  * also changed the action button, but it is not supposed to change"*) */}
40
- <Button iconOnly={glyph} size="lg" tone="inverted" radius="full" aria-label={open ? 'Close' : 'Actions'} pressed={open}
41
- className={`kol-float-action${variant === 'float' ? ' is-float' : ''}${turn ? ` kol-float-turn${open ? ' is-open' : ''}` : ''}`} />
37
+ <Button iconOnly={glyph} size="lg" radius="full" aria-label={open ? 'Close' : 'Actions'} pressed={open}
38
+ className={`kol-float-action${turn ? ` kol-float-turn${open ? ' is-open' : ''}` : ''}`} />
42
39
  </span>
43
- <PopoverPanel popover={popover} panel={false} motion={motion} className={`kol-more-sheet${variant === 'float' ? ` kol-more-sheet-float ${floatSurfaceClass(surface, true)}` : ''}`} style={{ minWidth: 220 }}>
44
- {variant === 'float'
45
- ? <MenuFloat title={title} onLeaf={() => setOpen(false)}><MenuFloatRows actions={actions} variant="float" onPick={() => setOpen(false)} /></MenuFloat>
46
- : <MenuFloatRows actions={actions} variant={variant} onPick={() => setOpen(false)} />}
40
+ <PopoverPanel popover={popover} panel={false} motion={motion} className="kol-more-sheet" style={{ minWidth: 220 }}>
41
+ <MenuFloatRows actions={actions} onPick={() => setOpen(false)} />
47
42
  </PopoverPanel>
48
43
  </div>
49
44
  )
@@ -18,15 +18,15 @@ import { Avatar, Button } from '@kolkrabbi/kol-component'
18
18
  export default function GlobalActions({ onUndo, onRedo, actionLabel = 'Export', onAction, account, onAccount, className = '' }) {
19
19
  return (
20
20
  <div className={`kol-global-actions kol-float-chrome inline-flex items-center gap-3 ${className}`.trim()}>
21
- {onUndo && <Button variant="float" tone="ghost" size="sm" iconOnly="undo" aria-label="Undo" onClick={onUndo} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
22
- {onRedo && <Button variant="float" tone="ghost" size="sm" iconOnly="redo" aria-label="Redo" onClick={onRedo} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
23
- {onAction && <Button variant="float" tone="inverted" size="md" onClick={onAction}>{actionLabel}</Button>}
21
+ {onUndo && <Button tone="ghost" size="sm" iconOnly="undo" aria-label="Undo" onClick={onUndo} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
22
+ {onRedo && <Button tone="ghost" size="sm" iconOnly="redo" aria-label="Redo" onClick={onRedo} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
23
+ {onAction && <Button size="md" onClick={onAction}>{actionLabel}</Button>}
24
24
  {account?.src || account?.initial ? (
25
25
  <button type="button" aria-label={account.label ?? 'Account'} onClick={onAccount} className="inline-flex rounded-full bg-transparent border-0 p-0 cursor-pointer">
26
26
  <Avatar src={account.src} initial={account.initial} alt="" size="md" />
27
27
  </button>
28
28
  ) : (
29
- <Button variant="float" tone="grey" size="md" iconOnly="user" aria-label={account?.label ?? 'Account'} onClick={onAccount} />
29
+ <Button tone="grey" size="md" iconOnly="user" aria-label={account?.label ?? 'Account'} onClick={onAccount} />
30
30
  )}
31
31
  </div>
32
32
  )
package/src/HubHome.jsx CHANGED
@@ -328,8 +328,8 @@ export default function HubHome({
328
328
  </div>
329
329
  )}
330
330
  {/* the + on the phone too (Round 3: the phone had no way to sign in from Home) — top-right on the mark's line, 16 in
331
- * and 24 down; its menu is the floating style (`variant="float"`, the board's menus), as the dock's sheets are */}
332
- {outActions.length > 0 && <FloatActionMenu actions={outActions} icon="plus" variant="float" surface={surface} className="absolute z-10 right-4 top-6 md:right-16 md:top-16" />}
331
+ * and 24 down; its menu is the floating style, as the dock's sheets are */}
332
+ {outActions.length > 0 && <FloatActionMenu actions={outActions} icon="plus" surface={surface} className="absolute z-10 right-4 top-6 md:right-16 md:top-16" />}
333
333
  {/* over a stage the dock floats: the transport's shadow (HomeDockShadow, kol-fxr 2026-10-31) */}
334
334
  {chromes.length > 0 && <AppFloatNav variant="dock" shape="pill" shadow={stage != null} surface={surface} items={chromes.map((c) => ({ id: c.label, label: c.label, icon: c.icon, onPress: c.onPress, sub: c.sub }))} sheetItems={dockMore} />}
335
335
  {/* the walkthrough over the stage, where the catalog's would sit — on the mark's left line */}