@kolkrabbi/kol-shell 0.106.0 → 0.107.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.106.0",
3
+ "version": "0.107.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -21,9 +21,9 @@
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-component": "^0.340.0",
25
- "@kolkrabbi/kol-icons": "^0.64.0",
24
+ "@kolkrabbi/kol-component": "^0.340.1",
26
25
  "@kolkrabbi/kol-framework": "^0.70.0",
26
+ "@kolkrabbi/kol-icons": "^0.64.0",
27
27
  "@kolkrabbi/kol-theme": "^0.211.1"
28
28
  },
29
29
  "files": [
@@ -0,0 +1,36 @@
1
+ import { useState } from 'react'
2
+ import { Button, PopoverPanel, usePopover, floatSurfaceClass } from '@kolkrabbi/kol-component'
3
+ import MoreRows from './MoreSheet.jsx'
4
+
5
+ /* taxonomy-ok: molecule — a round Button that opens the More sheet's rows */
6
+
7
+ /**
8
+ * FloatActionMenu — The masthead's round button and its sheet (FloatActionMenuExport, kol-website 2026-11-04 — lifted as is
9
+ * from HubHome's private `HomeMenu`, which it still is): the inverted round button, × while its sheet is open, the sheet
10
+ * beside it to the LEFT, top edges on one line, 12 off (user 2026-10-23), the phone More's rows. The catalog's
11
+ * VariantsButton shape. FloatLayout draws it at the bar's end from `bar.menu`.
12
+ *
13
+ * @param {Array} actions `[{ label, icon?, onPress }]` — MoreRows' actions
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
+ * @param {string} [className]
18
+ */
19
+ export default function FloatActionMenu({ actions, icon = 'more', variant, surface = 'solid', className = '' }) {
20
+ const [open, setOpen] = useState(false)
21
+ /* 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 × */
22
+ const popover = usePopover({ open, onOpenChange: setOpen, placement: 'left-start', offset: 12 })
23
+ return (
24
+ <div className={className}>
25
+ <span ref={popover.refs.setReference} {...popover.getReferenceProps()} className="inline-flex">
26
+ {/* `icon` — `more` on Home, `plus` signed out (frame B2), the × while its sheet is open */}
27
+ {/* always the inverted round button — `surface` dresses its menu only (HomeDockRound4, kol-fxr 2026-10-31 — user: *"this
28
+ * also changed the action button, but it is not supposed to change"*) */}
29
+ <Button iconOnly={icon === 'more' ? 'more' : open ? 'x' : icon} size="lg" tone="inverted" radius="full" aria-label={open ? 'Close' : 'Actions'} pressed={open} />
30
+ </span>
31
+ <PopoverPanel popover={popover} panel={false} className={`kol-more-sheet${variant === 'float' ? ` kol-more-sheet-float ${floatSurfaceClass(surface, true)}` : ''}`} style={{ minWidth: 220 }}>
32
+ <MoreRows actions={actions} variant={variant} onPick={() => setOpen(false)} />
33
+ </PopoverPanel>
34
+ </div>
35
+ )
36
+ }
@@ -31,7 +31,7 @@ import RailDisplayControls from './RailDisplayControls.jsx'
31
31
  * @param {Array} [defaultExpanded] paths of the nav's sections open at mount (NavRail's own; nothing auto-expands)
32
32
  * @param {ReactNode} [railFooter] the expanded Rail's foot (default RailDisplayControls: theme · Collapse · Hide)
33
33
  * @param {string|string[]} [breadcrumb] the words beside RailTrigger while the nav is hidden
34
- * @param {Object} [bar] TopControlsBar's props (`document` · `tabs` · `tab` · `onTab` · `onSearch` · `action` · `start` · `center` · `end`); `panels` is the frame's
34
+ * @param {Object} [bar] TopControlsBar's props (`document` · `tabs` · `tab` · `onTab` · `onSearch` · `action` · `menu` · `start` · `center` · `end`); `menu` — `[{ label, icon?, onPress }]` — is FloatActionMenu in the top-right corner; `panels` is the frame's
35
35
  * @param {ReactNode} [eyebrow] a line in the 40 under the bar (float-operational W4.2, 9:14340's WORKSPACE / TASKS): 25 under
36
36
  * the bar, taking no height, so the content still starts 40 down. Below `md` it sits in flow
37
37
  * under the bar
package/src/HubHome.jsx CHANGED
@@ -2,7 +2,7 @@ import { cloneElement, isValidElement, useEffect, useState } from 'react'
2
2
  import { Button, PopoverPanel, usePopover, useMediaQuery, usePrefersReducedMotion, VectorLoader, floatSurfaceClass } from '@kolkrabbi/kol-component'
3
3
  import AppFloatNav from './AppFloatNav.jsx'
4
4
  import WalkthroughPanel from './WalkthroughPanel.jsx'
5
- import MoreRows from './MoreSheet.jsx'
5
+ import FloatActionMenu from './FloatActionMenu.jsx'
6
6
  import CatalogPage from './CatalogPage.jsx'
7
7
  import AccountForm from './AccountForm.jsx'
8
8
  import { useTouchPrimary } from './TouchDeviceOverlay.jsx'
@@ -281,7 +281,7 @@ export default function HubHome({
281
281
  const menuActions = typeof menu === 'function' ? menu(menuDefaults) ?? [] : menuDefaults
282
282
  /* with the drawer the button stays on the phone, stepped left of the shell's drawer trigger (fixed top-right, 32 at 12;
283
283
  * the variants gate caught the overlap on editor-hub at 390) */
284
- const headerMenu = menuActions.length ? <HomeMenu actions={menuActions} className={actionsInBar ? 'max-md:hidden' : 'max-md:mr-11'} /> : undefined
284
+ const headerMenu = menuActions.length ? <FloatActionMenu actions={menuActions} className={actionsInBar ? 'max-md:hidden' : 'max-md:mr-11'} /> : undefined
285
285
 
286
286
  /* the quick links — fxr's chromes, a phone's stack above the rows; a desk never sees them. The stack is fxr's EntryScreen
287
287
  * verbatim (kol-fxr src/editor/mobile/MobileView.jsx): `kol-eyebrow text-body`, `gap-2`, `tone="primary" size="lg"`, the icon
@@ -329,7 +329,7 @@ export default function HubHome({
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
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 && <HomeMenu actions={outActions} icon="plus" variant="float" surface={surface} className="absolute z-10 right-4 top-6 md:right-16 md:top-16" />}
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" />}
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 */}
@@ -365,23 +365,3 @@ export default function HubHome({
365
365
  />
366
366
  )
367
367
  }
368
-
369
- /* the masthead's round button and its sheet — the catalog's VariantsButton shape, the phone More's rows */
370
- function HomeMenu({ actions, icon = 'more', variant, surface = 'solid', className = '' }) {
371
- const [open, setOpen] = useState(false)
372
- /* 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 × */
373
- const popover = usePopover({ open, onOpenChange: setOpen, placement: 'left-start', offset: 12 })
374
- return (
375
- <div className={className}>
376
- <span ref={popover.refs.setReference} {...popover.getReferenceProps()} className="inline-flex">
377
- {/* `icon` — `more` on Home, `plus` signed out (frame B2), the × while its sheet is open */}
378
- {/* always the inverted round button — `surface` dresses its menu only (HomeDockRound4, kol-fxr 2026-10-31 — user: *"this
379
- * also changed the action button, but it is not supposed to change"*) */}
380
- <Button iconOnly={icon === 'more' ? 'more' : open ? 'x' : icon} size="lg" tone="inverted" radius="full" aria-label={open ? 'Close' : 'Actions'} pressed={open} />
381
- </span>
382
- <PopoverPanel popover={popover} panel={false} className={`kol-more-sheet${variant === 'float' ? ` kol-more-sheet-float ${floatSurfaceClass(surface, true)}` : ''}`} style={{ minWidth: 220 }}>
383
- <MoreRows actions={actions} variant={variant} onPick={() => setOpen(false)} />
384
- </PopoverPanel>
385
- </div>
386
- )
387
- }
@@ -1,4 +1,5 @@
1
1
  import { useState } from 'react'
2
+ import FloatActionMenu from './FloatActionMenu.jsx'
2
3
  import { Button, TabsRow, usePopover, PopoverPanel, floatSurfaceClass } from '@kolkrabbi/kol-component'
3
4
  import DocumentCapsule from './DocumentCapsule.jsx'
4
5
  import MoreRows, { FloatMenu } from './MoreSheet.jsx'
@@ -47,11 +48,12 @@ export function PanelsRestore({ label = 'Panels', children, items, surface = 'so
47
48
  * @param {Function} onSearch the search glyph's press; unset, no glyph
48
49
  * @param {Object} panels PanelsRestore's props (`items` or `children`); unset, no Panels
49
50
  * @param {Object} action `{ label, icon?, onPress }` — the primary action (New task), the inverted float capsule
51
+ * @param {Array} menu `[{ label, icon?, onPress }]` — FloatActionMenu at the very end, the + and its float sheet (fxr's Home corner)
50
52
  * @param {ReactNode} start · {ReactNode} center · {ReactNode} end the three regions, when the props above are not the bar
51
53
  * @param {'solid'|'glass-dark'|'glass-light'} surface what every float on the bar is made of (default `solid`)
52
54
  * @param {string} className
53
55
  */
54
- export default function TopControlsBar({ document, tabs, tab, onTab, onSearch, panels, action, start, center, end, surface = 'solid', className = '' }) {
56
+ export default function TopControlsBar({ document, tabs, tab, onTab, onSearch, panels, action, menu, start, center, end, surface = 'solid', className = '' }) {
55
57
  return (
56
58
  <div className={`kol-top-controls kol-float-chrome flex items-center gap-4 h-16 ${className}`.trim()}>
57
59
  <div className="flex items-center gap-4">
@@ -70,6 +72,7 @@ export default function TopControlsBar({ document, tabs, tab, onTab, onSearch, p
70
72
  <>
71
73
  {panels && <PanelsRestore {...panels} surface={surface} />}
72
74
  {action && <Button variant="float" tone="inverted" size="lg" iconLeft={action.icon ?? 'plus'} onClick={action.onPress}>{action.label}</Button>}
75
+ {menu?.length > 0 && <FloatActionMenu actions={menu} icon="plus" variant="float" surface={surface} />}
73
76
  </>
74
77
  )}
75
78
  </div>
package/src/index.js CHANGED
@@ -28,6 +28,7 @@ export { ZoomReadout, SceneBreadcrumb, CanvasHint, SelectionMeasure } from './Ca
28
28
  export { default as TopControlsBar, PanelsRestore } from './TopControlsBar.jsx'
29
29
  export { default as ReaderBar, ProgressDock } from './ReaderBar.jsx'
30
30
  export { default as RailTrigger } from './RailTrigger.jsx'
31
+ export { default as FloatActionMenu } from './FloatActionMenu.jsx'
31
32
  export { default as RailFlyout } from './RailFlyout.jsx'
32
33
  export { default as RailDisplayControls } from './RailDisplayControls.jsx'
33
34
  export { AccountFooter, StatusStrip, Breadcrumb, FooterStrip, PeriodNav, DataStatus } from './WorkspaceStrips.jsx'