@kolkrabbi/kol-shell 0.95.0 → 0.97.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.95.0",
3
+ "version": "0.97.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -12,19 +12,19 @@
12
12
  "./src/*": "./src/*"
13
13
  },
14
14
  "peerDependencies": {
15
- "@kolkrabbi/kol-component": ">=0.318.0",
15
+ "@kolkrabbi/kol-component": ">=0.323.0",
16
16
  "@kolkrabbi/kol-framework": ">=0.55.0",
17
17
  "@kolkrabbi/kol-icons": ">=0.16.0",
18
- "@kolkrabbi/kol-theme": ">=0.201.0",
18
+ "@kolkrabbi/kol-theme": ">=0.207.0",
19
19
  "gsap": "^3.13.0",
20
20
  "react": "^18.3.0 || ^19.0.0",
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-framework": "^0.66.0",
25
- "@kolkrabbi/kol-component": "^0.322.0",
26
- "@kolkrabbi/kol-icons": "^0.54.0",
27
- "@kolkrabbi/kol-theme": "^0.205.0"
24
+ "@kolkrabbi/kol-theme": "^0.207.0",
25
+ "@kolkrabbi/kol-icons": "^0.55.0",
26
+ "@kolkrabbi/kol-framework": "^0.67.0",
27
+ "@kolkrabbi/kol-component": "^0.323.0"
28
28
  },
29
29
  "files": [
30
30
  "src",
@@ -244,8 +244,6 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
244
244
  tabs={tabs}
245
245
  value={value}
246
246
  onChange={press}
247
- /* the dock's slots light like a menu row (round 4); `!` outranks the slot's inline ground and ink */
248
- className={dock ? '[&_button:not([aria-current]):hover]:bg-[var(--kol-oq-04)]! [&_button:not([aria-current]):hover]:text-[var(--kol-surface-on-primary)]!' : undefined}
249
247
  />
250
248
  </div>
251
249
  </>
package/src/AppHub.jsx CHANGED
@@ -313,7 +313,7 @@ function HubFrame({
313
313
  /* HOME'S BUTTONS ON A PHONE (user 2026-10-23: *"put new and walkthrough in the more button … crowded under the files"*):
314
314
  * with the bar, New and Walkthrough ride the top of its More sheet on Home and the page's foot row goes; with the drawer
315
315
  * (no More), they stay on the page */
316
- const barOn = ['bar', 'pill'].includes(shell?.touch ?? RAIL_PRESETS.app.phone)
316
+ const barOn = ['bar', 'pill', 'floats'].includes(shell?.touch ?? RAIL_PRESETS.app.phone)
317
317
  const onHome = home && currentPath === homePath
318
318
  /* the signed-in account as a row — Home's menu and the phone's More end on it (HomeMenuAccountRow) */
319
319
  const accountAction = signIn?.signedIn && (signIn.user || signIn.account || signIn.onProfile)
package/src/AppShell.jsx CHANGED
@@ -58,7 +58,7 @@ import { TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESE
58
58
  * lands the rail on the new rest. Fixed here, not in a consumer: the route-entry effect
59
59
  * below runs after its children's, so a consumer could only hide the rail a frame late
60
60
  * (fxr's `HomeStage` rAF). The Hub passes it for the signed-out Home
61
- * @param {'shell'|'bare'|'overlay'|'drawer'|'bar'|'pill'} props.touch the touch-primary policy (default 'shell' = the rail regardless):
61
+ * @param {'shell'|'bare'|'overlay'|'drawer'|'bar'|'pill'|'floats'} props.touch the touch-primary policy (default 'shell' = the rail regardless):
62
62
  * 'drawer' takes the rail OFF-CANVAS below `drawerBelow`, hands its width
63
63
  * back to the content, and renders a trigger that brings it in over a scrim.
64
64
  * Tapping a destination closes it. (ShellRailNoDrawerOnMobile, kol-chess
@@ -78,6 +78,13 @@ import { TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESE
78
78
  * description. One app, one header — media-hub wore both. NO DEFAULT (user, 2026-09-29): unset,
79
79
  * every page renders as its own props say, so a consumer's bump moves nothing
80
80
  * (fxr · mirror · monitor are mono by ruling).
81
+ * @param {Object} [props.floats] THE TWO FLOATS (PhoneTwoFloatLayout, kol-fxr 2026-10-31 — fxr's Labs on a phone, frame E):
82
+ * `touch="floats"` puts the nav in an AppFloatNav `panel` overlay pinned at the TOP (the
83
+ * bar's rows and actions), an AppFloatNav `transport` overlay over the foot, and between
84
+ * them the stage (children) and a bottom Rail. `{ transport: { items, sheetFor, … },
85
+ * rail: node, railHeight = '50dvh' }`. The stage starts under the top float and the Rail's
86
+ * rows scroll clear of the transport — both insets are `TABBAR_PILL_INSET + TABBAR_PILL_H +
87
+ * TABBAR_PILL_INSET` plus the safe area; the Rail rises on `--kol-shadow-rail-up`, no rule
81
88
  * @param {Array} [props.barActions] `[{ label, icon?, onPress }]` — the page's buttons in the bar's More sheet, under the nav (PhoneNav `actions`)
82
89
  * @param {'mobile'|'panel'|'transport'} [props.navVariant='mobile'] THE PHONE PILL'S PRESET (PhoneNavVariants, kol-fxr 2026-10-28 —
83
90
  * the Home pill kept its hairline while Labs tuned its own by hand): `mobile` (was `nav`) is no hairline,
@@ -170,6 +177,7 @@ export default function AppShell({
170
177
  drawerOpenOn = NO_PATHS,
171
178
  barItems,
172
179
  barActions,
180
+ floats: floatsProp,
173
181
  navVariant = 'mobile',
174
182
  moreItems,
175
183
  phoneNav,
@@ -198,10 +206,13 @@ export default function AppShell({
198
206
  const drawer = touch === 'drawer' && narrow
199
207
  /* the bar steps aside on a tool's paths — no bar, no bar height; the rail stays off too (a phone has no rail) */
200
208
  /* `pill` is the bar in TabsRow's pill shape (user 2026-10-23) — the same rows, the same More, floated off the edge */
201
- const barLike = touch === 'bar' || touch === 'pill'
209
+ const barLike = touch === 'bar' || touch === 'pill' || touch === 'floats'
202
210
  /* the preset's phone shape when the app did not say (AppHub passes it through) */
203
211
  const barAside = barLike && narrow && barHiddenOn.some((x) => (x === '/' ? currentPath === '/' : currentPath === x || currentPath?.startsWith(`${x}/`)))
204
212
  const bar = barLike && narrow && !barAside
213
+ /* THE TWO FLOATS: the bar is the top float, and the page is a column — the stage, then the Rail */
214
+ const floats = bar && touch === 'floats'
215
+ const floatClear = `${TABBAR_PILL_INSET + TABBAR_PILL_H + TABBAR_PILL_INSET}px`
205
216
  const [drawerOpen, setDrawerOpen] = useState(false)
206
217
  useEffect(() => { if (!drawer) setDrawerOpen(false) }, [drawer])
207
218
  useEffect(() => {
@@ -403,7 +414,8 @@ export default function AppShell({
403
414
  onClick={() => setDrawerOpen(false)}
404
415
  />
405
416
  )}
406
- {bar && <AppFloatNav items={barItems ?? [...(items ?? []), ...(bottomItems ?? [])]} actions={barActions} shape={touch === 'pill' ? 'pill' : 'bar'} variant={navVariant} moreItems={moreItems} {...phoneNav} currentPath={currentPath} onNavigate={navigate} />}
417
+ {bar && <AppFloatNav items={barItems ?? [...(items ?? []), ...(bottomItems ?? [])]} actions={barActions} shape={touch === 'bar' ? 'bar' : 'pill'} variant={floats ? 'panel' : navVariant} moreItems={moreItems} {...phoneNav} currentPath={currentPath} onNavigate={navigate} />}
418
+ {floats && floatsProp?.transport?.items?.length > 0 && <AppFloatNav variant="transport" foldable {...floatsProp.transport} />}
407
419
  {!navHidden && !bar && !barAside && (
408
420
  <Rail
409
421
  items={items}
@@ -425,9 +437,18 @@ export default function AppShell({
425
437
  * through the drag and the snap (RailFlatGrabOpen) */}
426
438
  <div className="bg-surface-primary min-w-0" style={{ marginLeft: `var(--kol-shell-rail-width)`, '--kol-shell-page-wash': pageWash, /* `bar` pads the page by its height; `pill` FLOATS OVER the page (user 2026-10-23: *"why doesn't it overlay the bottom"*) —
427
439
  * no pad, the page runs under it, and `--kol-shell-bar-clear` is what a scroll region's last row and a fixed foot clear */
428
- ...(bar && touch !== 'pill' && { '--kol-shell-bar-h': `calc(${TABBAR_H}px + env(safe-area-inset-bottom, 0px))`, paddingBottom: 'var(--kol-shell-bar-h)' }),
429
- ...(bar && touch === 'pill' && { '--kol-shell-bar-h': '0px', '--kol-shell-bar-clear': `calc(${TABBAR_PILL_H + TABBAR_PILL_INSET}px + env(safe-area-inset-bottom, 0px))` }), ...(barAside && { '--kol-shell-bar-h': '0px' }) }}>
430
- {children}
440
+ ...(bar && touch === 'bar' && { '--kol-shell-bar-h': `calc(${TABBAR_H}px + env(safe-area-inset-bottom, 0px))`, paddingBottom: 'var(--kol-shell-bar-h)' }),
441
+ ...(bar && touch === 'pill' && { '--kol-shell-bar-h': '0px', '--kol-shell-bar-clear': `calc(${TABBAR_PILL_H + TABBAR_PILL_INSET}px + env(safe-area-inset-bottom, 0px))` }), ...(barAside && { '--kol-shell-bar-h': '0px' }), ...(floats && { '--kol-shell-bar-h': '0px' }) }}>
442
+ {floats ? (
443
+ <div className="flex h-dvh flex-col">
444
+ {/* THE STAGE OWNS THE PAGE'S GROUND (PhoneTwoFloatLayout): it paints the wash under the top float too and hands
445
+ * the page `transparent` — PageLayout's rule (kol-components-shell.css), one owner per pixel, no band under the float */}
446
+ <div className="min-h-0 flex-1 overflow-y-auto" style={{ paddingTop: `calc(env(safe-area-inset-top, 0px) + ${floatClear})`, background: pageWash ?? undefined, '--kol-shell-page-wash': pageWash ? 'transparent' : undefined, '--kol-shell-bar-h': floatClear }}>{children}</div>
447
+ {floatsProp?.rail != null && (
448
+ <div className="shrink-0 overflow-y-auto bg-surface-primary shadow-[var(--kol-shadow-rail-up)]" style={{ maxHeight: floatsProp.railHeight ?? '50dvh', paddingBottom: `calc(${floatClear} + env(safe-area-inset-bottom, 0px))` }}>{floatsProp.rail}</div>
449
+ )}
450
+ </div>
451
+ ) : children}
431
452
  </div>
432
453
  </div>
433
454
  </SettingsToggleContext.Provider>