@kolkrabbi/kol-shell 0.122.0 → 0.124.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.122.0",
3
+ "version": "0.124.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -12,18 +12,18 @@
12
12
  "./src/*": "./src/*"
13
13
  },
14
14
  "peerDependencies": {
15
- "@kolkrabbi/kol-component": ">=0.364.0",
15
+ "@kolkrabbi/kol-component": ">=0.366.0",
16
16
  "@kolkrabbi/kol-framework": ">=0.55.0",
17
17
  "@kolkrabbi/kol-icons": ">=0.69.0",
18
- "@kolkrabbi/kol-theme": ">=0.220.0",
18
+ "@kolkrabbi/kol-theme": ">=0.221.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.364.0",
24
+ "@kolkrabbi/kol-component": "^0.366.0",
25
25
  "@kolkrabbi/kol-icons": "^0.70.1",
26
- "@kolkrabbi/kol-theme": "^0.220.0",
26
+ "@kolkrabbi/kol-theme": "^0.221.0",
27
27
  "@kolkrabbi/kol-framework": "^0.74.1"
28
28
  },
29
29
  "files": [
@@ -10,9 +10,9 @@ import RailDisplayControls from './RailDisplayControls.jsx'
10
10
  /**
11
11
  * FloatLayout — The float workspace frame (plan-2026-11-04-float-views W1.1 — kol-float--style 9:15449 "Adaptive
12
12
  * workspace", its rules 9:15179). Assembled from the float chrome, nothing drawn here: the nav Rail (`NavRail
13
- * variant="float"`) in three states — `expanded` 280, `collapsed` 72 (a section's rows open beside a slot on hover,
13
+ * variant="float"`) in three states — `expanded` 264, `collapsed` 72 (a section's rows open beside a slot on hover,
14
14
  * RailFlyout), `hidden` 0 (RailTrigger and the breadcrumb take the corner) — the 64 TopControlsBar, the content slot,
15
- * ONE inspector slot (PropertyRail, 272 on the sheet radius), and a `bottom` Rail under both. 24 round the page and between the Rails, 40 under the bar.
15
+ * ONE inspector slot (PropertyRail, 264 on the sheet radius), and a `bottom` Rail under both. 24 round the page and between the Rails, 40 under the bar.
16
16
  *
17
17
  * Visibility controls space, selection controls content: a hidden Rail is never removed — Panels ▾ (PanelsRestore)
18
18
  * shows in the bar exactly while one is hidden and brings it back as it was (the nav at its last width). Below `md` the
@@ -93,7 +93,7 @@ export default function FloatLayout({
93
93
  setFly(item.sub?.length ? { item, el } : null)
94
94
  }
95
95
 
96
- /* the rail keys (useRailKeys): `\` 280 ↔ 72, `⇧\` hide ↔ show at its last width (`lastShown`) */
96
+ /* the rail keys (useRailKeys): `\` 264 ↔ 72, `⇧\` hide ↔ show at its last width (`lastShown`) */
97
97
  useRailKeys(railKeys, {
98
98
  onCollapse: () => { if (railNow !== 'hidden') { setFly(null); setRail(railNow === 'expanded' ? 'collapsed' : 'expanded') } },
99
99
  onHide: () => setRail(railNow === 'hidden' ? lastShown.current : 'hidden'),
@@ -1,16 +1,17 @@
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
- * PropertyRail — The float inspector (float-everything W5 rows 65 · 66, 2026-11-04): a 272 sheet (`--kol-float-menu-r`,
7
+ * PropertyRail — The float inspector (float-everything W5 rows 65 · 66, 2026-11-04): a 264 sheet (`--kol-float-menu-r`,
9
8
  * 16 in, 18 between) holding its header (the title in `kol-float-panel` and the collapse ⇥), chip tabs (TabsRow float),
10
9
  * the selected object's line (glyph · name · eye) and sections — each a `kol-float-label` head with an optional + and
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 ⇥
@@ -33,8 +34,8 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
33
34
  * @param {Function} onExpand the ↗ in the header — the tool's expanded form (the settings dialog); unset, none
34
35
  * @param {ReactNode} footer the Rail's foot (a status line, the tool's action), after the sections
35
36
  * @param {'solid'|'glass-dark'|'glass-light'} surface what the sheet is made of (default `solid`)
36
- * @param {boolean} wide the wide module (`--kol-float-module-w-wide`, 352): a tool Rail whose rows carry two controls;
37
- * unset, the inspector (`--kol-float-module-w`, 272) — the two module widths of the float spec
37
+ * @param {boolean} wide the wide module (`--kol-float-module-w-wide`, 360): a tool Rail whose rows carry two controls;
38
+ * unset, the inspector (`--kol-float-module-w`, 264) — the two module widths of the float spec
38
39
  * @param {number|string} width an explicit width (a phone's `100%`); unset, the module width
39
40
  * @param {boolean} foldable the fold ⌃ in the header: the Rail folds to its header pill and opens again — every float
40
41
  * panel is a module (the user, 2026-11-12: *"EVERYTHING IS FLOAT everything is MODULES"*)
@@ -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'