@kolkrabbi/kol-shell 0.89.1 → 0.90.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.89.1",
3
+ "version": "0.90.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -21,10 +21,10 @@
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-component": "^0.316.0",
25
- "@kolkrabbi/kol-icons": "^0.52.0",
26
- "@kolkrabbi/kol-theme": "^0.199.0",
27
- "@kolkrabbi/kol-framework": "^0.64.0"
24
+ "@kolkrabbi/kol-framework": "^0.65.0",
25
+ "@kolkrabbi/kol-icons": "^0.53.1",
26
+ "@kolkrabbi/kol-component": "^0.317.1",
27
+ "@kolkrabbi/kol-theme": "^0.200.1"
28
28
  },
29
29
  "files": [
30
30
  "src",
package/src/AppHub.jsx CHANGED
@@ -54,7 +54,9 @@ import { Avatar, CommandOverlay, MediaLibrary, ModalProvider, RAIL_PRESETS, Shor
54
54
  * @param {Object} home HubHome's props — Home's DATA (`files`, `template`, `onOpen`, the verbs, `action`,
55
55
  * `filterGroups`, `views`, …; HubHomeContract 2026-10-23: the Hub draws every card).
56
56
  * OPT-IN (apps review 2026-09-29): no `home`, no Home page — `homePath` renders the
57
- * tool and the mark goes there (media-hub: the column browser IS the app)
57
+ * tool and the mark goes there (media-hub: the column browser IS the app).
58
+ * `home.railHidden` (HubSignedOutGutterAndSeams, 2026-10-29): the rail starts hidden on Home —
59
+ * unset, it does while Home is signed out; `\` brings it back, signing in returns it
58
60
  * @param {Array} walkthrough the steps Home's Walkthrough button opens
59
61
  * @param {Object} settings OPT-IN like AppShell's `bottomItems` (apps review 2026-09-29: *"not sure it makes sense
60
62
  * to neccessarily have settings manditory part of the rail"*) — no `settings`, no rail
@@ -90,7 +92,11 @@ import { Avatar, CommandOverlay, MediaLibrary, ModalProvider, RAIL_PRESETS, Shor
90
92
  * @param {Object} phoneNav `{ more: (defaults) => rows }` — the phone pill's More sheet, edited by the app (HubAppOwnsItsRows).
91
93
  * With `home.menu` · `home.signedOutActions` · `shell.foot`, the four places the Hub draws
92
94
  * rows: each takes a function of its default rows, `{ icon, label, onPress | path, avatar? }`
93
- * @param {Object} signIn `{ signedIn, user?, onProfile?, onPress, account? }` — the user row at the rail's foot. OPT-IN: no
95
+ * @param {Object} signIn `{ signedIn, user?, onProfile?, onPress, account?, page? }` — the user row at the rail's foot. OPT-IN: no
96
+ * `page` (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — user: *"we already choose which sign in to
97
+ * use, we made a artifact!!!"*): a path, or a function — signed out, every Sign in the Hub draws goes
98
+ * there instead of the DS dialog: the rail's foot row, the signed-out + and the phone's More (fxr's
99
+ * `/signin`, frame C). Signed in, nothing changes
94
100
  * `account: { sections, content?, footer? }` (SettingsAccountTab, kol-fxr 2026-10-29 — *"why isnt
95
101
  * account just in settings in account tab?"*): an Account tab, first in the settings rail while
96
102
  * signed in — typed rows (`sections`), a node for what rows cannot say (`content`: the
@@ -208,6 +214,13 @@ function HubFrame({
208
214
  * empty cancels — then `onPress(password)`; signed in, the sign-out confirm, then `onPress(null)` */
209
215
  const askSignIn = async () => {
210
216
  if (!signIn) return
217
+ /* SIGN IN CAN BE A PAGE (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — frame C): every Sign in the Hub draws comes
218
+ * through here — the rail's foot row, the signed-out +, the phone's More — so one seam routes them all */
219
+ if (!signIn.signedIn && signIn.page) {
220
+ if (typeof signIn.page === 'function') signIn.page()
221
+ else onNavigate?.(signIn.page)
222
+ return
223
+ }
211
224
  /* an account: signed in opens the profile; signed out asks email and password */
212
225
  if (signIn.user || signIn.onProfile || signIn.account) {
213
226
  if (signIn.signedIn) {
@@ -303,9 +316,14 @@ function HubFrame({
303
316
  /* SIGNED OUT (HubHomeSignedOut, 2026-10-28): Home is the stage, no files; the desk's round + carries Sign in beside New File
304
317
  * and Walkthrough; on a phone the pill is the app's chromes and More is the rail (frame A2) */
305
318
  const signedOutHome = onHome && (home.signedOut ?? (home.stage != null && !(home.files?.length)))
319
+ /* THE RAIL STARTS HIDDEN WHILE SIGNED OUT (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — user: *"when you are signed out, we
320
+ * should have the rail already hidden"*): `home.railHidden` says it outright; unset, the signed-out Home hides it. `\` still
321
+ * brings it back, and signing in (the stage going) returns it — AppShell's `railHidden`, so no consumer hides it a frame late */
322
+ const { railHidden: railHiddenOpt, ...homeData } = home ?? {}
323
+ const railHidden = !!onHome && (railHiddenOpt ?? signedOutHome)
306
324
  const signInAction = signIn && !signIn.signedIn ? { label: 'Sign in', icon: 'user', onPress: () => askSignIn() } : undefined
307
325
  const page = onHome
308
- ? <HubHome app={app} iconComponent={iconComponent} walkthrough={walkthrough} {...home} touring={touring} onTouringChange={setTouring} actionsInBar={barOn} signInAction={signInAction} accountAction={accountAction} />
326
+ ? <HubHome app={app} iconComponent={iconComponent} walkthrough={walkthrough} {...homeData} touring={touring} onTouringChange={setTouring} actionsInBar={barOn} signInAction={signInAction} accountAction={accountAction} />
309
327
  : settingsPage && currentPath === settingsPath
310
328
  ? <HubSettings app={app} shortcuts={shortcuts} themeToggle={toggle} filters={settingsFilters} {...settingsProps} drawer={settingsProps.drawer ?? true} />
311
329
  : devOn && (currentPath === devPath || currentPath?.startsWith(`${devPath}/`))
@@ -391,6 +409,7 @@ function HubFrame({
391
409
  iconComponent={railIcon}
392
410
  appName={app.name}
393
411
  railToggleKey={'\\'}
412
+ railHidden={railHidden}
394
413
  settingsPath={settingsPage ? settingsPath : undefined}
395
414
  settingsKey={settingsPage ? ',' : undefined}
396
415
  navKeys
package/src/AppShell.jsx CHANGED
@@ -51,6 +51,13 @@ import { TABBAR_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESETS } from '@kol
51
51
  * (`NavRail sections`, 2026-10-06 — labs' catalog)
52
52
  * @param {string} props.railToggleKey a key that toggles the rail (e.g. '\\') — ignored while typing in a field;
53
53
  * the rail comes back on every `currentPath` change (ShellHomeSystem, 2026-08-27)
54
+ * @param {boolean} [props.railHidden=false] THE RAIL'S RESTING STATE (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — user:
55
+ * *"when you are signed out, we should have the rail already hidden"*): `true` starts the
56
+ * rail hidden and keeps it hidden on every route entry, where `false` (the default) brings
57
+ * it back; `railToggleKey` still toggles it either way, and flipping the prop (signing in)
58
+ * lands the rail on the new rest. Fixed here, not in a consumer: the route-entry effect
59
+ * below runs after its children's, so a consumer could only hide the rail a frame late
60
+ * (fxr's `HomeStage` rAF). The Hub passes it for the signed-out Home
54
61
  * @param {'shell'|'bare'|'overlay'|'drawer'|'bar'|'pill'} props.touch the touch-primary policy (default 'shell' = the rail regardless):
55
62
  * 'drawer' takes the rail OFF-CANVAS below `drawerBelow`, hands its width
56
63
  * back to the content, and renders a trigger that brings it in over a scrim.
@@ -152,6 +159,7 @@ export default function AppShell({
152
159
  rail = 'app',
153
160
  railSections,
154
161
  railToggleKey,
162
+ railHidden = false,
155
163
  touch: touchProp,
156
164
  appName,
157
165
  pageWash,
@@ -169,7 +177,8 @@ export default function AppShell({
169
177
  masthead,
170
178
  children,
171
179
  }) {
172
- const [navHidden, setNavHidden] = useState(false)
180
+ /* the rail's rest — hidden on first paint when `railHidden` says so, never a frame late */
181
+ const [navHidden, setNavHidden] = useState(!!railHidden)
173
182
  const coarse = useTouchPrimary()
174
183
 
175
184
  /* DRAWER MODE. A width query, not a pointer one — see `drawerBelow`. */
@@ -277,11 +286,13 @@ export default function AppShell({
277
286
  /* Keyed on the BOOLEAN, not the array: a consumer's inline `['/']` is a new
278
287
  * identity every render too (the showcase set passes one), and the effect
279
288
  * must fire on route entry only — never on a re-render, or it undoes the tap. */
289
+ /* …and the entry lands on the rail's REST, not always on shown (HubSignedOutGutterAndSeams, 2026-10-29): `railHidden`
290
+ * keeps it hidden on entry, and the prop flipping (signing in) moves the rail to the new rest on the spot */
280
291
  const opensHere = opensOn(currentPath)
281
292
  useEffect(() => {
282
293
  if (drawer) setDrawerOpen(opensHere)
283
- else setNavHidden(false)
284
- }, [currentPath, drawer, opensHere])
294
+ else setNavHidden(!!railHidden)
295
+ }, [currentPath, drawer, opensHere, railHidden])
285
296
 
286
297
  /* THE WASH ALSO GOES ON THE ROOT (2026-08-30). It is set on the content
287
298
  * wrapper below, which every page inherits — but a PORTALLED surface does
package/src/AppStudio.jsx CHANGED
@@ -44,6 +44,9 @@ import PageShell from './PageShell.jsx'
44
44
  * @param {Object} [media] AppHub's `media` — the Media row at the rail's foot, the DS modal library over a client
45
45
  * @param {Object} [signIn] AppHub's `signIn` — the user row at the rail's foot; the press is the consumer's
46
46
  * @param {Object} [dev] HubDev's props — AppHub's `dev`: a dev server's `code` page at `/dev`
47
+ * @param {Object} [phoneNav] AppHub's `phoneNav` — `{ more: (defaults) => rows }`, the phone's More sheet as the app edits it.
48
+ * Forwarded since HubSignedOutGutterAndSeams (kol-fxr 2026-10-29): it was not, so a Studio app
49
+ * could not reach the phone's rows at all
47
50
  * @param {'mono'|'display'} [masthead='mono']
48
51
  * @param {Object} [shell] any AppShell prop, spread last. The rail is `NavRail preset="app"` (AppHub's), so an app
49
52
  * passes nothing about it; the Studio adds `barHiddenOn` — Use and every `bar: false` page
@@ -65,6 +68,7 @@ export default function AppStudio({
65
68
  media,
66
69
  signIn,
67
70
  dev,
71
+ phoneNav,
68
72
  walkthrough,
69
73
  shortcuts,
70
74
  themeToggle,
@@ -118,6 +122,7 @@ export default function AppStudio({
118
122
  media={media}
119
123
  signIn={signIn}
120
124
  dev={dev}
125
+ phoneNav={phoneNav}
121
126
  shortcuts={shortcuts}
122
127
  themeToggle={themeToggle}
123
128
  shortcutsKey={shortcutsKey}
package/src/HubHome.jsx CHANGED
@@ -261,16 +261,19 @@ export default function HubHome({
261
261
  return (
262
262
  <div className="relative min-h-dvh overflow-hidden" data-hub-signed-out>
263
263
  {stage && <div className="absolute inset-0" aria-hidden="true">{stage}</div>}
264
+ {/* ONE 64 GUTTER ON A DESK (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — user: *"cavnas 'padding' is a bit off"*): the
265
+ * mark 64 in and 64 down, the + 64 in and 64 down on the mark's line, the dock 64 in and 64 up — the mark sat at 80 and
266
+ * the + at 72. The phone's values are not part of it */}
264
267
  {app.logomark && (
265
- <div className="absolute left-4 top-6 w-12 h-12 md:left-20 md:top-16 md:w-28 md:h-28 text-emphasis">
268
+ <div className="absolute left-4 top-6 w-12 h-12 md:left-16 md:top-16 md:w-28 md:h-28 text-emphasis">
266
269
  <VectorLoader src={app.logomark} size="100%" role="img" aria-label={app.name} />
267
270
  </div>
268
271
  )}
269
- {outActions.length > 0 && <HomeMenu actions={outActions} icon="plus" className="absolute right-16 top-[72px] max-md:hidden" />}
272
+ {outActions.length > 0 && <HomeMenu actions={outActions} icon="plus" className="absolute right-16 top-16 max-md:hidden" />}
270
273
  {chromes.length > 0 && <PhoneNav variant="dock" shape="pill" items={chromes.map((c) => ({ id: c.label, label: c.label, icon: c.icon, onPress: c.onPress }))} />}
271
- {/* the walkthrough over the stage, where the catalog's would sit */}
274
+ {/* the walkthrough over the stage, where the catalog's would sit — on the mark's left line */}
272
275
  {touring && steps.length > 0 && (
273
- <div className="absolute inset-x-4 top-24 md:left-20 md:right-auto md:top-52 md:w-[560px]">
276
+ <div className="absolute inset-x-4 top-24 md:left-16 md:right-auto md:top-52 md:w-[560px]">
274
277
  <WalkthroughPanel steps={steps} iconComponent={iconComponent} onClose={close} />
275
278
  </div>
276
279
  )}
@@ -1,7 +1,7 @@
1
1
  import { useState } from 'react'
2
2
  import ThemeToggle from '@kolkrabbi/kol-framework/src/ThemeToggle.jsx'
3
3
  import { useTheme } from '@kolkrabbi/kol-framework/src/theme.js'
4
- import { Button, LabeledControlSection, SettingsFooter, SettingsPanel, SettingsSections, TabsRow } from '@kolkrabbi/kol-component'
4
+ import { Button, LabeledControlSection, RailFoot, SettingsFooter, SettingsPanel, SettingsSections, TabsRow } from '@kolkrabbi/kol-component'
5
5
  import SettingsLinks, { SettingsColophon } from './SettingsLinks.jsx'
6
6
  import About from './About.jsx'
7
7
 
@@ -19,7 +19,9 @@ import About from './About.jsx'
19
19
  * no named tabs (AppHub's account-only rail)
20
20
  * @param {Object} app `{ name, about, links, docs }` — About draws from `about` + `links`, Docs from `docs`
21
21
  * @param {Array} shortcuts `[{ section, items: [{ id, label, combo }] }]` — the Shortcuts tab
22
- * @param {Object} account `{ content, sections, footer }` — the Account tab, first, while signed in
22
+ * @param {Object} account `{ content, sections, footer }` — the Account tab, first, while signed in; `footer: { label, onPress }`
23
+ * is the rail's foot on that tab — a full-width md Button where the toggle and reset sit on the
24
+ * other tabs (frame D2, HubSignedOutGutterAndSeams 2026-10-29)
23
25
  * @param {string} tab · onTabChange controlled tab (optional — the rail keeps its own otherwise)
24
26
  * @param {Function} onReset the app's reset, after the theme goes back to the system
25
27
  */
@@ -87,8 +89,12 @@ export default function HubSettingsRail({ open, onClose, title = 'Settings', sec
87
89
  variant="rail"
88
90
  title={title}
89
91
  onClose={onClose}
90
- /* the footer on every rail: the toggle, and a live reset */
91
- footer={<SettingsFooter onReset={reset}>{hubThemeToggle}</SettingsFooter>}
92
+ /* the footer on every rail: the toggle, and a live reset — on the Account tab, `account.footer` instead: frame D2's
93
+ full-width md Button in the rail's foot (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — user: *"wrong button for
94
+ sign out, wrong sizes"*; it was an outline sm chip at the end of the tab body) */
95
+ footer={tab === 'account' && account?.footer
96
+ ? <RailFoot><Button size="md" className="w-full" onClick={account.footer.onPress}>{account.footer.label}</Button></RailFoot>
97
+ : <SettingsFooter onReset={reset}>{hubThemeToggle}</SettingsFooter>}
92
98
  >
93
99
  {/* the tab row wraps in the 380 rail — five tabs (Mirror's Performance beside the Hub's three) overran it */}
94
100
  {tabs.length > 1 && <TabsRow look="text" size={12} tracked overflow="wrap" className="gap-x-6" tabs={tabs} value={tab} onChange={setTab} ariaLabel="Settings tabs" />}
@@ -97,7 +103,6 @@ export default function HubSettingsRail({ open, onClose, title = 'Settings', sec
97
103
  <div className="flex flex-col gap-8">
98
104
  {account.content}
99
105
  {account.sections?.length > 0 && <SettingsSections sections={account.sections} divided />}
100
- {account.footer && <Button tone="outline" size="sm" className="self-start" onClick={account.footer.onPress}>{account.footer.label}</Button>}
101
106
  </div>
102
107
  )
103
108
  : tab === 'settings'