@kolkrabbi/kol-shell 0.99.4 → 0.100.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.99.4",
3
+ "version": "0.100.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.331.0",
15
+ "@kolkrabbi/kol-component": ">=0.333.0",
16
16
  "@kolkrabbi/kol-framework": ">=0.55.0",
17
17
  "@kolkrabbi/kol-icons": ">=0.16.0",
18
18
  "@kolkrabbi/kol-theme": ">=0.207.0",
@@ -21,7 +21,7 @@
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-component": "^0.332.0",
24
+ "@kolkrabbi/kol-component": "^0.333.0",
25
25
  "@kolkrabbi/kol-framework": "^0.69.0",
26
26
  "@kolkrabbi/kol-icons": "^0.60.0",
27
27
  "@kolkrabbi/kol-theme": "^0.210.0"
@@ -38,6 +38,9 @@ import MoreRows, { FloatMenu } from './MoreSheet.jsx'
38
38
  * @param {'fill'|'circle'} active the lit slot's shape (TabsRow `active`); frame E is `circle`
39
39
  * @param {boolean} foldable a sideways swipe folds the pill into a left edge tab; a tap on the tab restores it
40
40
  * @param {boolean} folded · {Function} onFoldChange the folded state, so the app can keep it (else PhoneNav holds it)
41
+ * @param {'left'|'right'|'swipe'} foldSide · {'ground'|'handle'} foldTone TabsRow's, forwarded (FloatFoldBothSidesGrey, kol-fxr
42
+ * 2026-11-03): `swipe` folds to the edge the swipe went toward, `handle` is the grey edge tab.
43
+ * Unset: the nav's left edge (the transport's right) and the pill's ground, as before
41
44
  * @param {boolean} moreKeepsOpen More opens its sheet without collapsing the pill to the ×, and More lights only while
42
45
  * its sheet is open; nothing else closes
43
46
  * An item may carry `onPress` (a panel, not a route — the app owns what it opens and whether a second tap closes it) and
@@ -110,7 +113,7 @@ export default function AppFloatNav(props) {
110
113
  return props.variant === 'transport' ? <Transport {...props} /> : <FloatNav {...props} />
111
114
  }
112
115
 
113
- function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], shape = 'bar', variant, placement: placementProp, border: borderProp, shadow: shadowProp, active: activeProp, foldable: foldableProp, folded, onFoldChange, moreKeepsOpen: keepsOpenProp, moreItems, sheetItems, dock: dockProp, menuBorder = false, surface = 'solid', labels = false }) {
116
+ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], shape = 'bar', variant, placement: placementProp, border: borderProp, shadow: shadowProp, active: activeProp, foldable: foldableProp, folded, onFoldChange, moreKeepsOpen: keepsOpenProp, moreItems, sheetItems, dock: dockProp, menuBorder = false, surface = 'solid', labels = false, foldSide = 'left', foldTone }) {
114
117
  const preset = APP_FLOAT_NAV_VARIANTS[variant] ?? {}
115
118
  const placement = placementProp ?? preset.placement ?? 'bottom'
116
119
  const border = borderProp ?? preset.border ?? true
@@ -257,7 +260,8 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
257
260
  foldable={foldable}
258
261
  folded={folded}
259
262
  onFoldChange={(v) => { if (v) setOpen(false); onFoldChange?.(v) }}
260
- foldSide="left"
263
+ foldSide={foldSide}
264
+ foldTone={foldTone}
261
265
  tabs={tabs}
262
266
  value={value}
263
267
  onChange={press}
@@ -283,7 +287,7 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
283
287
  * @param {boolean} foldable a sideways swipe folds it into the right edge tab
284
288
  * @param {boolean} folded · {Function} onFoldChange the folded state, controlled (else the pill holds it)
285
289
  */
286
- function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable = false, folded, onFoldChange, menuBorder = false, surface = 'solid', labels = false }) {
290
+ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable = false, folded, onFoldChange, menuBorder = false, surface = 'solid', labels = false, foldSide = 'right', foldTone }) {
287
291
  const [sheet, setSheet] = useState(null)
288
292
  useEffect(() => {
289
293
  if (!sheet) return undefined
@@ -339,7 +343,8 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
339
343
  foldable={foldable}
340
344
  folded={folded}
341
345
  onFoldChange={(v) => { if (v) setSheet(null); onFoldChange?.(v) }}
342
- foldSide="right"
346
+ foldSide={foldSide}
347
+ foldTone={foldTone}
343
348
  ariaLabel="Transport"
344
349
  tabs={tabs}
345
350
  onChange={press}
package/src/AppShell.jsx CHANGED
@@ -91,7 +91,10 @@ import { TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESE
91
91
  * More's actions, wherever the app passes them — the page's route, typically. THE ONE RULE:
92
92
  * the More keeps the app's whole nav (`barItems`, else items + bottomItems) — the page's
93
93
  * rows replace the slots, never the way back (a `phoneNav.sheetItems` still wins). Unset,
94
- * the top float is the app's nav and `barActions`, as 0.97.0
94
+ * the top float is the app's nav and `barActions`, as 0.97.0.
95
+ * `floats.fold` (`{ side, tone }`, FloatFoldBothSidesGrey, kol-fxr 2026-11-03) is the top float's
96
+ * and the transport's `foldSide` · `foldTone` (AppFloatNav) — `{ side: 'swipe', tone: 'handle' }`
97
+ * folds either way into the grey handle. Unset, each folds to its own edge on its ground
95
98
  * @param {Array} [props.barActions] `[{ label, icon?, onPress }]` — the page's buttons in the bar's More sheet, under the nav (PhoneNav `actions`)
96
99
  * @param {'mobile'|'panel'|'transport'} [props.navVariant='mobile'] THE PHONE PILL'S PRESET (PhoneNavVariants, kol-fxr 2026-10-28 —
97
100
  * the Home pill kept its hairline while Labs tuned its own by hand): `mobile` (was `nav`) is no hairline,
@@ -424,8 +427,8 @@ export default function AppShell({
424
427
  onClick={() => setDrawerOpen(false)}
425
428
  />
426
429
  )}
427
- {bar && <AppFloatNav items={pageRows ?? appNav} actions={floats && floatsProp?.actions ? floatsProp.actions : barActions} shape={touch === 'bar' ? 'bar' : 'pill'} variant={floats ? 'panel' : navVariant} moreItems={moreItems} {...(pageRows && { sheetItems: appNav })} {...phoneNav} currentPath={currentPath} onNavigate={navigate} />}
428
- {floats && floatsProp?.transport?.items?.length > 0 && <AppFloatNav variant="transport" foldable {...floatsProp.transport} />}
430
+ {bar && <AppFloatNav items={pageRows ?? appNav} actions={floats && floatsProp?.actions ? floatsProp.actions : barActions} shape={touch === 'bar' ? 'bar' : 'pill'} variant={floats ? 'panel' : navVariant} moreItems={moreItems} {...(pageRows && { sheetItems: appNav })} {...phoneNav} {...(floats && floatsProp?.fold && { foldSide: floatsProp.fold.side, foldTone: floatsProp.fold.tone })} currentPath={currentPath} onNavigate={navigate} />}
431
+ {floats && floatsProp?.transport?.items?.length > 0 && <AppFloatNav variant="transport" foldable {...(floatsProp.fold && { foldSide: floatsProp.fold.side, foldTone: floatsProp.fold.tone })} {...floatsProp.transport} />}
429
432
  {!navHidden && !bar && !barAside && (
430
433
  <Rail
431
434
  items={items}