@kolkrabbi/kol-shell 0.121.0 → 0.123.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.121.0",
3
+ "version": "0.123.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.363.0",
15
+ "@kolkrabbi/kol-component": ">=0.365.0",
16
16
  "@kolkrabbi/kol-framework": ">=0.55.0",
17
17
  "@kolkrabbi/kol-icons": ">=0.69.0",
18
- "@kolkrabbi/kol-theme": ">=0.219.0",
18
+ "@kolkrabbi/kol-theme": ">=0.220.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-component": "^0.365.0",
24
25
  "@kolkrabbi/kol-icons": "^0.70.1",
25
26
  "@kolkrabbi/kol-framework": "^0.74.1",
26
- "@kolkrabbi/kol-component": "^0.363.0",
27
- "@kolkrabbi/kol-theme": "^0.219.0"
27
+ "@kolkrabbi/kol-theme": "^0.220.0"
28
28
  },
29
29
  "files": [
30
30
  "src",
@@ -17,7 +17,7 @@ export function ZoomReadout({ value, onMenu, onFit, className = '' }) {
17
17
  <div className={`kol-zoom-readout inline-flex items-center gap-3 ${className}`.trim()}>
18
18
  <button type="button" onClick={onMenu} aria-haspopup={onMenu ? 'menu' : undefined} className="kol-float-timecode text-oq-64 hover:text-oq-96 inline-flex items-center gap-3 bg-transparent border-0 p-0 cursor-pointer">
19
19
  {value}
20
- {onMenu && <IconLoader name="chevron-down" size={16} className="text-oq-64" />}
20
+ {onMenu && <IconLoader name="chevron-down" size="var(--kol-float-chev-sm)" className="text-oq-64" />}
21
21
  </button>
22
22
  {onFit && (
23
23
  <button type="button" onClick={onFit} aria-label="Fit" className="inline-flex text-oq-64 hover:text-oq-96 bg-transparent border-0 p-0 cursor-pointer">
package/src/MenuBar.jsx CHANGED
@@ -19,7 +19,7 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
19
19
  * @param {Array} end the same, at the bar's far end (Help)
20
20
  * @param {'bar'|'capsule'} variant `capsule` (plan-2026-11-05-float-editor W2b; his phone frame 06, 19:9544 — the Section 4
21
21
  * menu capsule 19:10617): the menus on a float sheet (the secondary surface, the window round,
22
- * 20 in), each trigger the float label role in caps at fg-48 with a 10 chevron, 12 apart,
22
+ * 20 in), each trigger the float label role in caps at fg-48 with the spec chevron (`--kol-float-chev-sm`), 12 apart,
23
23
  * lit fg-96 while open. The same menus, lists and keys as the bar.
24
24
  * @param {string} className
25
25
  *
@@ -102,7 +102,7 @@ export default function MenuBar({ app, menus = [], end = [], variant = 'bar', cl
102
102
  onPointerEnter={() => { if (open != null && open !== i) setOpen(i) }}
103
103
  className={capsule ? CAPSULE_TRIGGER : `${TRIGGER} ${m.app ? 'font-bold' : 'font-medium'}`}>
104
104
  {m.label}
105
- {capsule && <IconLoader name="chevron-down" size={10} className="text-oq-48" />}
105
+ {capsule && <IconLoader name="chevron-down" size="var(--kol-float-chev-sm)" className="text-oq-48" />}
106
106
  </button>
107
107
  )}
108
108
  >
@@ -1,8 +1,7 @@
1
- import { useState } from 'react'
2
- import { Button, Input, Dropdown, LabeledControl, Slider, ToggleSwitch, TabsRow, floatSurfaceClass } from '@kolkrabbi/kol-component'
1
+ import { Button, Input, Dropdown, FloatModule, LabeledControl, Slider, ToggleSwitch, TabsRow } from '@kolkrabbi/kol-component'
3
2
  import { IconLoader } from '@kolkrabbi/kol-icons'
4
3
 
5
- /* taxonomy-ok: organism — a float sheet of kol-component fields (Input · Dropdown · Slider · ToggleSwitch · TabsRow) */
4
+ /* taxonomy-ok: organism — kol-component's FloatModule holding kol-component fields (Input · Dropdown · Slider · ToggleSwitch · TabsRow) */
6
5
 
7
6
  /**
8
7
  * PropertyRail — The float inspector (float-everything W5 rows 65 · 66, 2026-11-04): a 272 sheet (`--kol-float-menu-r`,
@@ -11,6 +10,8 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
11
10
  * rows that kol-component draws: `fields` two-up Inputs float, `select` a Dropdown, `slider` a Slider float with its
12
11
  * readout, `switch` a ToggleSwitch float, or `render`. Every labelled row is `LabeledControl variant="float"`. Nothing is forked: the sheet is the only new chrome. The
13
12
  * exploration's `Floating properties inspector` (kol-float--style 9:9273); the section hairlines stay out (no-borders law).
13
+ * Since 0.123.0 the sheet, header, fold and folded pill are kol-component's `FloatModule` (plan-2026-11-12-float-system
14
+ * W4.1) — the one shell NavRail float and ReadingContents draw on too; the body scrolls under the header.
14
15
  *
15
16
  * @param {string} title the header (Properties)
16
17
  * @param {Function} onCollapse the ⇥'s press; unset, no ⇥
@@ -46,20 +47,14 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
46
47
  */
47
48
  export default function PropertyRail({ title, onCollapse, onExpand, density = 'regular', tabs, tab, onTab, selected, sections = [], footer, surface = 'solid', wide = false, width, foldable = false, folded, defaultFolded = false, onFold, children, className = '' }) {
48
49
  const compact = density === 'compact'
49
- const [ownFolded, setOwnFolded] = useState(defaultFolded)
50
- const isFolded = foldable && (folded ?? ownFolded)
51
- const fold = () => { const next = !isFolded; if (folded === undefined) setOwnFolded(next); onFold?.(next) }
50
+ const actions = (onExpand || onCollapse) && <>
51
+ {onExpand && <Button variant="float" tone="ghost" size="sm" iconOnly="arrow-upright" aria-label="Expand" onClick={onExpand} />}
52
+ {onCollapse && <Button variant="float" tone="ghost" size="sm" iconOnly="panel-right" aria-label="Collapse" onClick={onCollapse} />}
53
+ </>
52
54
  return (
53
- <div className={`kol-property-rail kol-float-chrome flex flex-col ${compact ? 'gap-2' : 'gap-[var(--kol-float-module-gap)]'} p-4 rounded-[var(--kol-float-menu-r)] ${floatSurfaceClass(surface, true)} ${className}`.trim()} style={{ width: width ?? `var(--kol-float-module-w${wide ? '-wide' : ''})` }}>
54
- <div className="flex items-center justify-between">
55
- <span className="kol-float-panel text-emphasis">{title}</span>
56
- <span className="flex items-center gap-1">
57
- {foldable && <Button variant="float" tone="ghost" size="sm" iconOnly={isFolded ? 'chevron-down' : 'chevron-up'} aria-label={isFolded ? 'Open' : 'Fold'} aria-expanded={!isFolded} onClick={fold} />}
58
- {onExpand && <Button variant="float" tone="ghost" size="sm" iconOnly="arrow-upright" aria-label="Expand" onClick={onExpand} />}
59
- {onCollapse && <Button variant="float" tone="ghost" size="sm" iconOnly="panel-right" aria-label="Collapse" onClick={onCollapse} />}
60
- </span>
61
- </div>
62
- {!isFolded && <>
55
+ <FloatModule title={title} actions={actions} foldable={foldable} folded={folded} defaultFolded={defaultFolded} onFold={onFold}
56
+ compact={compact} wide={wide} width={width} surface={surface} className={`kol-property-rail ${className}`.trim()}
57
+ footer={footer && <div className={compact ? 'pt-4' : undefined}>{footer}</div>}>
63
58
  {tabs?.length > 0 && <TabsRow variant="float" size="xs" tabs={tabs} value={tab} onChange={onTab} ariaLabel={`${title} tabs`} />}
64
59
  {selected && (
65
60
  <div className="flex items-center gap-2">
@@ -90,9 +85,7 @@ export default function PropertyRail({ title, onCollapse, onExpand, density = 'r
90
85
  </section>
91
86
  ))}
92
87
  {children}
93
- {footer && <div className={compact ? 'pt-4' : undefined}>{footer}</div>}
94
- </>}
95
- </div>
88
+ </FloatModule>
96
89
  )
97
90
  }
98
91
 
package/src/index.js CHANGED
@@ -22,6 +22,7 @@ export { default as Timecode } from './Timecode.jsx'
22
22
  // workspace's chrome on the float tokens, every boxed part on its `surface`. Composed from kol-component's float controls.
23
23
  export { default as ToolRail } from './ToolRail.jsx'
24
24
  export { default as PropertyRail } from './PropertyRail.jsx'
25
+ export { FloatModule } from '@kolkrabbi/kol-component' // the float Rail shell lives in kol-component (NavRail float draws on it)
25
26
  export { default as DocumentCapsule } from './DocumentCapsule.jsx'
26
27
  export { default as GlobalActions } from './GlobalActions.jsx'
27
28
  export { ZoomReadout, SceneBreadcrumb, CanvasHint, SelectionMeasure } from './CanvasReadouts.jsx'