@kolkrabbi/kol-shell 0.102.0 → 0.102.1

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.102.0",
3
+ "version": "0.102.1",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -71,7 +71,8 @@ export function CanvasHint({ icon = 'pointer', hint, className = '' }) {
71
71
  * around `children`, the object's label above (`kol-float-label`) and the size cap under it (`kol-float-ruler` on the
72
72
  * `--kol-float-list-r` round). The exploration's `Selection measurement` (kol-float--style 9:8895).
73
73
  *
74
- * @param {number|string} width · {number|string} height the cap's numbers ("754 × 771")
74
+ * @param {number|string} width · {number|string} height the cap's numbers ("754 × 771"); both unset, no cap — the
75
+ * handles alone (the selected brief, kol-float--style 9:14640)
75
76
  * @param {string} label the object's name, above the frame
76
77
  * @param {ReactNode} children the selected thing
77
78
  * @param {string} className
@@ -88,7 +89,7 @@ export function SelectionMeasure({ width, height, label, children, className = '
88
89
  <span className={`${handle} -bottom-1 -right-1`} />
89
90
  </div>
90
91
  {label && <span className="kol-float-label text-oq-64 absolute left-0 bottom-full mb-2 whitespace-nowrap">{label}</span>}
91
- <span className="kol-float-ruler text-emphasis absolute left-1/2 top-full mt-2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-[var(--kol-float-list-r)] bg-oq-08">{width} × {height}</span>
92
+ {(width != null || height != null) && <span className="kol-float-ruler text-emphasis absolute left-1/2 top-full mt-2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-[var(--kol-float-list-r)] bg-oq-08">{width} × {height}</span>}
92
93
  </div>
93
94
  )
94
95
  }
@@ -22,6 +22,7 @@ import RailDisplayControls from './RailDisplayControls.jsx'
22
22
  * @param {string} currentPath · {Function} onNavigate `(path) => void`
23
23
  * @param {string} [title] · {string} [icon] · {Function} [onSwitch] · {Function} [onSearch] the nav Rail's switcher and search
24
24
  * @param {'expanded'|'collapsed'|'hidden'} [rail] the nav Rail's state (controlled); `defaultRail` uncontrolled (default `expanded`) · {Function} [onRailChange]
25
+ * @param {Array} [defaultExpanded] paths of the nav's sections open at mount (NavRail's own; nothing auto-expands)
25
26
  * @param {ReactNode} [railFooter] the expanded Rail's foot (default RailDisplayControls: theme · Collapse · Hide)
26
27
  * @param {string|string[]} [breadcrumb] the words beside RailTrigger while the nav is hidden
27
28
  * @param {Object} [bar] TopControlsBar's props (`document` · `tabs` · `tab` · `onTab` · `onSearch` · `action` · `start` · `center` · `end`); `panels` is the frame's
@@ -34,7 +35,7 @@ import RailDisplayControls from './RailDisplayControls.jsx'
34
35
  */
35
36
  export default function FloatLayout({
36
37
  nav = [], currentPath = '', onNavigate, title, icon, onSwitch, onSearch,
37
- rail, defaultRail = 'expanded', onRailChange, railFooter, breadcrumb,
38
+ rail, defaultRail = 'expanded', onRailChange, defaultExpanded, railFooter, breadcrumb,
38
39
  bar = {}, inspector, inspectorLabel = 'Inspector', inspectorHidden, defaultInspectorHidden = false, onInspectorHiddenChange,
39
40
  surface = 'solid', children, className = '',
40
41
  }) {
@@ -73,7 +74,7 @@ export default function FloatLayout({
73
74
  <NavRail variant="float" items={nav} currentPath={currentPath} onNavigate={onNavigate}
74
75
  collapsed={shown === 'collapsed'} onCollapsedChange={(c) => { setFly(null); setRail(c ? 'collapsed' : 'expanded') }}
75
76
  title={title} icon={icon} onSwitch={onSwitch} onSearch={onSearch} onHide={() => setRail('hidden')}
76
- onItemHover={shown === 'collapsed' ? onItemHover : undefined}
77
+ onItemHover={shown === 'collapsed' ? onItemHover : undefined} defaultExpanded={defaultExpanded}
77
78
  footer={shown === 'expanded' ? (railFooter ?? <RailDisplayControls onCollapse={() => setRail('collapsed')} onHide={() => setRail('hidden')} />) : undefined}
78
79
  className="shrink-0" />
79
80
  )}