@kolkrabbi/kol-shell 0.99.4 → 0.101.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 +6 -6
- package/src/AppFloatNav.jsx +26 -4
- package/src/AppShell.jsx +16 -3
- package/src/CanvasReadouts.jsx +94 -0
- package/src/DocumentCapsule.jsx +55 -0
- package/src/GlobalActions.jsx +33 -0
- package/src/PropertyRail.jsx +95 -0
- package/src/RailDisplayControls.jsx +27 -0
- package/src/RailFlyout.jsx +41 -0
- package/src/RailTrigger.jsx +47 -0
- package/src/ReaderBar.jsx +72 -0
- package/src/Timecode.jsx +20 -0
- package/src/ToolRail.jsx +26 -0
- package/src/TopControlsBar.jsx +78 -0
- package/src/WorkspaceStrips.jsx +122 -0
- package/src/index.js +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.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.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.333.0",
|
|
16
16
|
"@kolkrabbi/kol-framework": ">=0.55.0",
|
|
17
17
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
18
|
-
"@kolkrabbi/kol-theme": ">=0.
|
|
18
|
+
"@kolkrabbi/kol-theme": ">=0.211.1",
|
|
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-
|
|
24
|
+
"@kolkrabbi/kol-theme": "^0.211.1",
|
|
25
|
+
"@kolkrabbi/kol-icons": "^0.61.0",
|
|
25
26
|
"@kolkrabbi/kol-framework": "^0.69.0",
|
|
26
|
-
"@kolkrabbi/kol-
|
|
27
|
-
"@kolkrabbi/kol-theme": "^0.210.0"
|
|
27
|
+
"@kolkrabbi/kol-component": "^0.334.0"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"src",
|
package/src/AppFloatNav.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react'
|
|
2
2
|
import { TabsRow, TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, tabbarPillWidth, tabbarPillSlot, floatSurfaceClass, usePopover, PopoverPanel } from '@kolkrabbi/kol-component'
|
|
3
3
|
import MoreRows, { FloatMenu } from './MoreSheet.jsx'
|
|
4
|
+
import Timecode from './Timecode.jsx'
|
|
4
5
|
|
|
5
6
|
/* taxonomy-ok: molecule — TabsRow's pill + MoreRows sheets of Buttons */
|
|
6
7
|
|
|
@@ -38,6 +39,9 @@ import MoreRows, { FloatMenu } from './MoreSheet.jsx'
|
|
|
38
39
|
* @param {'fill'|'circle'} active the lit slot's shape (TabsRow `active`); frame E is `circle`
|
|
39
40
|
* @param {boolean} foldable a sideways swipe folds the pill into a left edge tab; a tap on the tab restores it
|
|
40
41
|
* @param {boolean} folded · {Function} onFoldChange the folded state, so the app can keep it (else PhoneNav holds it)
|
|
42
|
+
* @param {'left'|'right'|'swipe'} foldSide · {'ground'|'handle'} foldTone TabsRow's, forwarded (FloatFoldBothSidesGrey, kol-fxr
|
|
43
|
+
* 2026-11-03): `swipe` folds to the edge the swipe went toward, `handle` is the grey edge tab.
|
|
44
|
+
* Unset: the nav's left edge (the transport's right) and the pill's ground, as before
|
|
41
45
|
* @param {boolean} moreKeepsOpen More opens its sheet without collapsing the pill to the ×, and More lights only while
|
|
42
46
|
* its sheet is open; nothing else closes
|
|
43
47
|
* An item may carry `onPress` (a panel, not a route — the app owns what it opens and whether a second tap closes it) and
|
|
@@ -110,7 +114,7 @@ export default function AppFloatNav(props) {
|
|
|
110
114
|
return props.variant === 'transport' ? <Transport {...props} /> : <FloatNav {...props} />
|
|
111
115
|
}
|
|
112
116
|
|
|
113
|
-
function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], shape = 'bar', variant, placement: placementProp, border: borderProp, shadow: shadowProp, active: activeProp, foldable: foldableProp, folded, onFoldChange, moreKeepsOpen: keepsOpenProp, moreItems, sheetItems, dock: dockProp, menuBorder = false, surface = 'solid', labels = false }) {
|
|
117
|
+
function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], shape = 'bar', variant, placement: placementProp, border: borderProp, shadow: shadowProp, active: activeProp, foldable: foldableProp, folded, onFoldChange, moreKeepsOpen: keepsOpenProp, moreItems, sheetItems, dock: dockProp, menuBorder = false, surface = 'solid', labels = false, foldSide = 'left', foldTone }) {
|
|
114
118
|
const preset = APP_FLOAT_NAV_VARIANTS[variant] ?? {}
|
|
115
119
|
const placement = placementProp ?? preset.placement ?? 'bottom'
|
|
116
120
|
const border = borderProp ?? preset.border ?? true
|
|
@@ -257,7 +261,8 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
|
|
|
257
261
|
foldable={foldable}
|
|
258
262
|
folded={folded}
|
|
259
263
|
onFoldChange={(v) => { if (v) setOpen(false); onFoldChange?.(v) }}
|
|
260
|
-
foldSide=
|
|
264
|
+
foldSide={foldSide}
|
|
265
|
+
foldTone={foldTone}
|
|
261
266
|
tabs={tabs}
|
|
262
267
|
value={value}
|
|
263
268
|
onChange={press}
|
|
@@ -282,8 +287,11 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
|
|
|
282
287
|
* @param {'bottom'|'top'} placement the pill's edge (default bottom)
|
|
283
288
|
* @param {boolean} foldable a sideways swipe folds it into the right edge tab
|
|
284
289
|
* @param {boolean} folded · {Function} onFoldChange the folded state, controlled (else the pill holds it)
|
|
290
|
+
* @param {Object|string} timecode THE TIMECODE (float-everything W5 rows 69 · 70, 2026-11-04): `{ current, total? }` (or the
|
|
291
|
+
* current alone) drawn by `Timecode` in a capsule of the pill's height and surface, 8 off its
|
|
292
|
+
* right end — the way ··· stands apart from the nav's bar (round 3). Unset, no readout
|
|
285
293
|
*/
|
|
286
|
-
function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable = false, folded, onFoldChange, menuBorder = false, surface = 'solid', labels = false }) {
|
|
294
|
+
function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable = false, folded, onFoldChange, menuBorder = false, surface = 'solid', labels = false, foldSide = 'right', foldTone, timecode }) {
|
|
287
295
|
const [sheet, setSheet] = useState(null)
|
|
288
296
|
useEffect(() => {
|
|
289
297
|
if (!sheet) return undefined
|
|
@@ -311,9 +319,22 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
|
|
|
311
319
|
...(top ? { bottom: 'auto' } : {}),
|
|
312
320
|
width: 'max-content', minWidth: 160,
|
|
313
321
|
}
|
|
322
|
+
/* the timecode capsule: the pill's height, its right end 8 off the pill's, bottom edges on one line
|
|
323
|
+
* ponytail: beside the pill, not inside it — inside needs a trailing slot on TabsRow's pill (kol-component) */
|
|
324
|
+
const tc = timecode == null ? null : typeof timecode === 'string' ? { current: timecode } : timecode
|
|
325
|
+
const tcStyle = {
|
|
326
|
+
left: `calc(50% + ${W / 2}px + 8px)`,
|
|
327
|
+
[top ? 'top' : 'bottom']: `calc(env(safe-area-inset-${top ? 'top' : 'bottom'}, 0px) + ${TABBAR_PILL_INSET}px)`,
|
|
328
|
+
height: TABBAR_PILL_H,
|
|
329
|
+
}
|
|
314
330
|
|
|
315
331
|
return (
|
|
316
332
|
<>
|
|
333
|
+
{tc && !folded && (
|
|
334
|
+
<div className={`kol-transport-timecode fixed z-[var(--kol-z-sticky)] inline-flex items-center px-5 rounded-full ${floatSurfaceClass(surface)}`} style={tcStyle}>
|
|
335
|
+
<Timecode {...tc} />
|
|
336
|
+
</div>
|
|
337
|
+
)}
|
|
317
338
|
{sheet && (
|
|
318
339
|
/* a clear BUTTON scrim — the panel under it stays in view, a tap off the sheet closes it */
|
|
319
340
|
<button type="button" aria-label="Close" className="kol-phone-nav-scrim" onClick={() => setSheet(null)} />
|
|
@@ -339,7 +360,8 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', foldable =
|
|
|
339
360
|
foldable={foldable}
|
|
340
361
|
folded={folded}
|
|
341
362
|
onFoldChange={(v) => { if (v) setSheet(null); onFoldChange?.(v) }}
|
|
342
|
-
foldSide=
|
|
363
|
+
foldSide={foldSide}
|
|
364
|
+
foldTone={foldTone}
|
|
343
365
|
ariaLabel="Transport"
|
|
344
366
|
tabs={tabs}
|
|
345
367
|
onChange={press}
|
package/src/AppShell.jsx
CHANGED
|
@@ -5,6 +5,7 @@ import { NavHiddenContext } from './navHidden.js'
|
|
|
5
5
|
import { SettingsToggleContext } from './settingsToggle.js'
|
|
6
6
|
import TouchDeviceOverlay, { useTouchPrimary } from './TouchDeviceOverlay.jsx'
|
|
7
7
|
import AppFloatNav from './AppFloatNav.jsx'
|
|
8
|
+
import RailTrigger from './RailTrigger.jsx'
|
|
8
9
|
import { TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESETS } from '@kolkrabbi/kol-component'
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -51,6 +52,11 @@ import { TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESE
|
|
|
51
52
|
* (`NavRail sections`, 2026-10-06 — labs' catalog)
|
|
52
53
|
* @param {string} props.railToggleKey a key that toggles the rail (e.g. '\\') — ignored while typing in a field;
|
|
53
54
|
* the rail comes back on every `currentPath` change (ShellHomeSystem, 2026-08-27)
|
|
55
|
+
* @param {Object|boolean} [props.railTrigger] THE HIDDEN RAIL'S TRIGGER (float-everything W9 row 129, 2026-11-04): while the rail is
|
|
56
|
+
* hidden, `RailTrigger` at the page's top-left corner (24 in) — the 44 float button and a
|
|
57
|
+
* breadcrumb, a press opens the whole nav as a float card. `true`, or RailTrigger's props
|
|
58
|
+
* (`title`, `breadcrumb`, `surface`); the rows are the app's nav. Unset, a hidden rail has no
|
|
59
|
+
* trigger, as before
|
|
54
60
|
* @param {boolean} [props.railHidden=false] THE RAIL'S RESTING STATE (HubSignedOutGutterAndSeams, kol-fxr 2026-10-29 — user:
|
|
55
61
|
* *"when you are signed out, we should have the rail already hidden"*): `true` starts the
|
|
56
62
|
* rail hidden and keeps it hidden on every route entry, where `false` (the default) brings
|
|
@@ -91,7 +97,10 @@ import { TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, MastheadContext, RAIL_PRESE
|
|
|
91
97
|
* More's actions, wherever the app passes them — the page's route, typically. THE ONE RULE:
|
|
92
98
|
* the More keeps the app's whole nav (`barItems`, else items + bottomItems) — the page's
|
|
93
99
|
* rows replace the slots, never the way back (a `phoneNav.sheetItems` still wins). Unset,
|
|
94
|
-
* the top float is the app's nav and `barActions`, as 0.97.0
|
|
100
|
+
* the top float is the app's nav and `barActions`, as 0.97.0.
|
|
101
|
+
* `floats.fold` (`{ side, tone }`, FloatFoldBothSidesGrey, kol-fxr 2026-11-03) is the top float's
|
|
102
|
+
* and the transport's `foldSide` · `foldTone` (AppFloatNav) — `{ side: 'swipe', tone: 'handle' }`
|
|
103
|
+
* folds either way into the grey handle. Unset, each folds to its own edge on its ground
|
|
95
104
|
* @param {Array} [props.barActions] `[{ label, icon?, onPress }]` — the page's buttons in the bar's More sheet, under the nav (PhoneNav `actions`)
|
|
96
105
|
* @param {'mobile'|'panel'|'transport'} [props.navVariant='mobile'] THE PHONE PILL'S PRESET (PhoneNavVariants, kol-fxr 2026-10-28 —
|
|
97
106
|
* the Home pill kept its hairline while Labs tuned its own by hand): `mobile` (was `nav`) is no hairline,
|
|
@@ -174,6 +183,7 @@ export default function AppShell({
|
|
|
174
183
|
railSections,
|
|
175
184
|
railToggleKey,
|
|
176
185
|
railHidden = false,
|
|
186
|
+
railTrigger,
|
|
177
187
|
touch: touchProp,
|
|
178
188
|
appName,
|
|
179
189
|
pageWash,
|
|
@@ -424,8 +434,11 @@ export default function AppShell({
|
|
|
424
434
|
onClick={() => setDrawerOpen(false)}
|
|
425
435
|
/>
|
|
426
436
|
)}
|
|
427
|
-
{bar && <AppFloatNav items={pageRows ?? appNav} actions={floats && floatsProp?.actions ? floatsProp.actions : barActions} shape={touch === 'bar' ? 'bar' : 'pill'} variant={floats ? 'panel' : navVariant} moreItems={moreItems} {...(pageRows && { sheetItems: appNav })} {...phoneNav} currentPath={currentPath} onNavigate={navigate} />}
|
|
428
|
-
{floats && floatsProp?.transport?.items?.length > 0 && <AppFloatNav variant="transport" foldable {...floatsProp.transport} />}
|
|
437
|
+
{bar && <AppFloatNav items={pageRows ?? appNav} actions={floats && floatsProp?.actions ? floatsProp.actions : barActions} shape={touch === 'bar' ? 'bar' : 'pill'} variant={floats ? 'panel' : navVariant} moreItems={moreItems} {...(pageRows && { sheetItems: appNav })} {...phoneNav} {...(floats && floatsProp?.fold && { foldSide: floatsProp.fold.side, foldTone: floatsProp.fold.tone })} currentPath={currentPath} onNavigate={navigate} />}
|
|
438
|
+
{floats && floatsProp?.transport?.items?.length > 0 && <AppFloatNav variant="transport" foldable {...(floatsProp.fold && { foldSide: floatsProp.fold.side, foldTone: floatsProp.fold.tone })} {...floatsProp.transport} />}
|
|
439
|
+
{navHidden && railTrigger && !bar && !barAside && (
|
|
440
|
+
<RailTrigger items={appNav} currentPath={currentPath} onNavigate={navigate} className="fixed left-6 top-6 z-[var(--kol-z-sticky)]" {...(railTrigger === true ? {} : railTrigger)} />
|
|
441
|
+
)}
|
|
429
442
|
{!navHidden && !bar && !barAside && (
|
|
430
443
|
<Rail
|
|
431
444
|
items={items}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: atom — readout lines on the canvas: a glyph and a float type role, no box */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ZoomReadout — The canvas zoom on the float chrome (float-everything W5 row 73, 2026-11-04): the value in
|
|
7
|
+
* `kol-float-timecode` (oq-64) with a ▾ that opens the zoom menu, and ⤢ that fits the canvas. The exploration's
|
|
8
|
+
* `Canvas zoom` (kol-float--style 9:8979).
|
|
9
|
+
*
|
|
10
|
+
* @param {string} value the zoom, formatted ("58.3%")
|
|
11
|
+
* @param {Function} onMenu the ▾ press (the consumer owns the menu)
|
|
12
|
+
* @param {Function} onFit the ⤢ press
|
|
13
|
+
* @param {string} className
|
|
14
|
+
*/
|
|
15
|
+
export function ZoomReadout({ value, onMenu, onFit, className = '' }) {
|
|
16
|
+
return (
|
|
17
|
+
<div className={`kol-zoom-readout inline-flex items-center gap-3 ${className}`.trim()}>
|
|
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
|
+
{value}
|
|
20
|
+
{onMenu && <Icon name="chevron-down" size={16} className="text-oq-64" />}
|
|
21
|
+
</button>
|
|
22
|
+
{onFit && (
|
|
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">
|
|
24
|
+
<Icon name="maximize" size={16} />
|
|
25
|
+
</button>
|
|
26
|
+
)}
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* SceneBreadcrumb — The scene's line on the canvas (float-everything W5 row 74, 2026-11-04): the scene glyph, its name
|
|
33
|
+
* (`kol-float-label`, oq-64), a slash and the technical meta in `kol-float-ruler` (oq-48). The exploration's
|
|
34
|
+
* `Scene breadcrumb` (kol-float--style 9:8983).
|
|
35
|
+
*
|
|
36
|
+
* @param {string} icon the glyph (default `video`)
|
|
37
|
+
* @param {string} name the scene ("Scene 01")
|
|
38
|
+
* @param {string} meta the readout ("1920 × 1080 · 30 fps · 12 s")
|
|
39
|
+
* @param {string} className
|
|
40
|
+
*/
|
|
41
|
+
export function SceneBreadcrumb({ icon = 'video', name, meta, className = '' }) {
|
|
42
|
+
return (
|
|
43
|
+
<div className={`kol-scene-breadcrumb inline-flex items-center gap-3 ${className}`.trim()}>
|
|
44
|
+
<Icon name={icon} size={16} className="text-oq-64" />
|
|
45
|
+
<span className="kol-float-label text-oq-64">{name}</span>
|
|
46
|
+
{meta && <span className="kol-float-label text-oq-48">/</span>}
|
|
47
|
+
{meta && <span className="kol-float-ruler text-oq-48">{meta}</span>}
|
|
48
|
+
</div>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* CanvasHint — The hint line under the canvas (float-everything W5 row 75, 2026-11-04): the pointer glyph and the
|
|
54
|
+
* gestures in `kol-float-ruler` (oq-48), ` · ` between. The exploration's `Canvas footer` (kol-float--style 9:8806).
|
|
55
|
+
*
|
|
56
|
+
* @param {string} icon the glyph (default `pointer`)
|
|
57
|
+
* @param {string|string[]} hint the line, or its parts joined by ` · `
|
|
58
|
+
* @param {string} className
|
|
59
|
+
*/
|
|
60
|
+
export function CanvasHint({ icon = 'pointer', hint, className = '' }) {
|
|
61
|
+
return (
|
|
62
|
+
<div className={`kol-canvas-hint inline-flex items-center gap-3 ${className}`.trim()}>
|
|
63
|
+
<Icon name={icon} size={14} className="text-oq-48" />
|
|
64
|
+
<span className="kol-float-ruler text-oq-48">{Array.isArray(hint) ? hint.join(' · ') : hint}</span>
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* SelectionMeasure — The selection's frame on the canvas (float-everything W5 row 76, 2026-11-04): four corner handles
|
|
71
|
+
* around `children`, the object's label above (`kol-float-label`) and the size cap under it (`kol-float-ruler` on the
|
|
72
|
+
* `--kol-float-list-r` round). The exploration's `Selection measurement` (kol-float--style 9:8895).
|
|
73
|
+
*
|
|
74
|
+
* @param {number|string} width · {number|string} height the cap's numbers ("754 × 771")
|
|
75
|
+
* @param {string} label the object's name, above the frame
|
|
76
|
+
* @param {ReactNode} children the selected thing
|
|
77
|
+
* @param {string} className
|
|
78
|
+
*/
|
|
79
|
+
export function SelectionMeasure({ width, height, label, children, className = '' }) {
|
|
80
|
+
const handle = 'absolute size-2 bg-[var(--kol-surface-on-primary)]'
|
|
81
|
+
return (
|
|
82
|
+
<div className={`kol-selection-measure relative inline-block ${className}`.trim()}>
|
|
83
|
+
{children}
|
|
84
|
+
<div aria-hidden="true" className="pointer-events-none absolute inset-0">
|
|
85
|
+
<span className={`${handle} -top-1 -left-1`} />
|
|
86
|
+
<span className={`${handle} -top-1 -right-1`} />
|
|
87
|
+
<span className={`${handle} -bottom-1 -left-1`} />
|
|
88
|
+
<span className={`${handle} -bottom-1 -right-1`} />
|
|
89
|
+
</div>
|
|
90
|
+
{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
|
+
</div>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { Button, usePopover, PopoverPanel, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
3
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
4
|
+
import MoreRows, { FloatMenu } from './MoreSheet.jsx'
|
|
5
|
+
|
|
6
|
+
/* taxonomy-ok: molecule — a float Button, the name, the More sheet's rows */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* DocumentCapsule — The open document's capsule (float-everything W5 row 71, 2026-11-04): 48 tall, the way back, the
|
|
10
|
+
* name (`kol-float-panel`) with a ▾ that opens its rows (the float menu), and the save state (`kol-float-label`,
|
|
11
|
+
* oq-64). The exploration's `Document pill` (kol-float--style 9:9358).
|
|
12
|
+
*
|
|
13
|
+
* @param {string} name the document
|
|
14
|
+
* @param {string} status the save state, verbatim ("✓ Saved")
|
|
15
|
+
* @param {Function} onBack the ← press; unset, no ←
|
|
16
|
+
* @param {Array} menuItems `[{ label, icon?, onPress, sub? }]` — the ▾ menu's rows (MoreRows float); unset with `onMenu`, the ▾ runs it
|
|
17
|
+
* @param {Function} onMenu `() => void` — the ▾ press when the consumer owns the menu
|
|
18
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the capsule (and its menu) is made of (default `solid`)
|
|
19
|
+
* @param {string} className
|
|
20
|
+
*/
|
|
21
|
+
export default function DocumentCapsule({ name, status, onBack, menuItems, onMenu, surface = 'solid', className = '' }) {
|
|
22
|
+
const [open, setOpen] = useState(false)
|
|
23
|
+
const popover = usePopover({ open, onOpenChange: setOpen, placement: 'bottom-start', offset: 8 })
|
|
24
|
+
const hasMenu = menuItems?.length > 0
|
|
25
|
+
const card = `kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}`
|
|
26
|
+
return (
|
|
27
|
+
<div className={`kol-document-capsule kol-float-chrome inline-flex items-center gap-3 h-12 pl-2 pr-4 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
|
|
28
|
+
{onBack && <Button variant="float" tone="ghost" size="sm" iconOnly="arrow-left" aria-label="Back" onClick={onBack} />}
|
|
29
|
+
{hasMenu || onMenu ? (
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
ref={hasMenu ? popover.refs.setReference : undefined}
|
|
33
|
+
{...(hasMenu ? popover.getReferenceProps() : {})}
|
|
34
|
+
onClick={hasMenu ? undefined : onMenu}
|
|
35
|
+
aria-haspopup="menu"
|
|
36
|
+
aria-expanded={hasMenu ? open : undefined}
|
|
37
|
+
className="kol-float-panel text-emphasis inline-flex items-center gap-3 h-9 rounded-full bg-transparent border-0 p-0 cursor-pointer"
|
|
38
|
+
>
|
|
39
|
+
{name}
|
|
40
|
+
<Icon name="chevron-down" size={16} className="text-oq-64" />
|
|
41
|
+
</button>
|
|
42
|
+
) : (
|
|
43
|
+
<span className="kol-float-panel text-emphasis">{name}</span>
|
|
44
|
+
)}
|
|
45
|
+
{status && <span className="kol-float-label text-oq-64">{status}</span>}
|
|
46
|
+
{hasMenu && (
|
|
47
|
+
<PopoverPanel popover={popover} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
|
|
48
|
+
<FloatMenu beside cardClass={card} onLeaf={() => setOpen(false)}>
|
|
49
|
+
<MoreRows variant="float" actions={menuItems} onPick={() => setOpen(false)} />
|
|
50
|
+
</FloatMenu>
|
|
51
|
+
</PopoverPanel>
|
|
52
|
+
)}
|
|
53
|
+
</div>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Avatar, Button } from '@kolkrabbi/kol-component'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: molecule — a row of float Buttons and an Avatar */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* GlobalActions — The app's top-right actions (float-everything W5 row 72, 2026-11-04): undo · redo as quiet float
|
|
7
|
+
* glyphs, the primary action as the inverted float capsule (Export), and the account as a round grey slot — the
|
|
8
|
+
* avatar when there is one, the user glyph when not. No box: it sits on the canvas, 12 between. The exploration's
|
|
9
|
+
* `Global actions` (kol-float--style 9:8988).
|
|
10
|
+
*
|
|
11
|
+
* @param {Function} onUndo · {Function} onRedo the history pair; unset, the glyph is left out
|
|
12
|
+
* @param {string} actionLabel the primary action's label (default "Export")
|
|
13
|
+
* @param {Function} onAction the primary action's press
|
|
14
|
+
* @param {Object} account `{ src?, initial?, label? }` — the account slot's picture or initial; unset, the user glyph
|
|
15
|
+
* @param {Function} onAccount the account slot's press
|
|
16
|
+
* @param {string} className
|
|
17
|
+
*/
|
|
18
|
+
export default function GlobalActions({ onUndo, onRedo, actionLabel = 'Export', onAction, account, onAccount, className = '' }) {
|
|
19
|
+
return (
|
|
20
|
+
<div className={`kol-global-actions kol-float-chrome inline-flex items-center gap-3 ${className}`.trim()}>
|
|
21
|
+
{onUndo && <Button variant="float" tone="ghost" size="sm" iconOnly="undo" aria-label="Undo" onClick={onUndo} />}
|
|
22
|
+
{onRedo && <Button variant="float" tone="ghost" size="sm" iconOnly="rotate-right" aria-label="Redo" onClick={onRedo} />}
|
|
23
|
+
{onAction && <Button variant="float" tone="inverted" size="md" onClick={onAction}>{actionLabel}</Button>}
|
|
24
|
+
{account?.src || account?.initial ? (
|
|
25
|
+
<button type="button" aria-label={account.label ?? 'Account'} onClick={onAccount} className="inline-flex rounded-full bg-transparent border-0 p-0 cursor-pointer">
|
|
26
|
+
<Avatar src={account.src} initial={account.initial} alt="" size="md" />
|
|
27
|
+
</button>
|
|
28
|
+
) : (
|
|
29
|
+
<Button variant="float" tone="grey" size="md" iconOnly="user" aria-label={account?.label ?? 'Account'} onClick={onAccount} />
|
|
30
|
+
)}
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Button, Input, Dropdown, Slider, ToggleSwitch, TabsRow, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
|
+
|
|
4
|
+
/* taxonomy-ok: organism — a float sheet of kol-component fields (Input · Dropdown · Slider · ToggleSwitch · TabsRow) */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* PropertyRail — The float inspector (float-everything W5 rows 65 · 66, 2026-11-04): a 272 sheet (`--kol-float-menu-r`,
|
|
8
|
+
* 16 in, 18 between) holding its header (the title in `kol-float-panel` and the collapse ⇥), chip tabs (TabsRow float),
|
|
9
|
+
* the selected object's line (glyph · name · eye) and sections — each a `kol-float-label` head with an optional + and
|
|
10
|
+
* rows that kol-component draws: `fields` two-up Inputs float, `select` a Dropdown, `slider` a Slider float with its
|
|
11
|
+
* readout, `switch` a ToggleSwitch float, or `render`. Nothing is forked: the sheet is the only new chrome. The
|
|
12
|
+
* exploration's `Floating properties inspector` (kol-float--style 9:9273); the section hairlines stay out (no-borders law).
|
|
13
|
+
*
|
|
14
|
+
* @param {string} title the header (Properties)
|
|
15
|
+
* @param {Function} onCollapse the ⇥'s press; unset, no ⇥
|
|
16
|
+
* @param {Array} tabs TabsRow tabs `[{ value, label }]`; `tab` the current value · `onTab` `(value) => void`
|
|
17
|
+
* @param {Object} selected `{ icon, name, visible?, onVisible? }` — the object line; unset, none
|
|
18
|
+
* @param {Array} sections `[{ id?, label, onAdd?, meta?, rows }]` — a row is one of:
|
|
19
|
+
* `{ type: 'fields', fields: [{ id, prefix?, unit?, value, onChange }] }` (two-up, Input float, `prefix` the X · Y · W · H letter) ·
|
|
20
|
+
* `{ type: 'select', id?, label?, options, value, onChange }` (Dropdown) ·
|
|
21
|
+
* `{ type: 'slider', id?, label, value, onChange, min?, max?, step?, formatValue? }` (Slider float) ·
|
|
22
|
+
* `{ type: 'switch', id?, label, icon?, on, onChange }` (ToggleSwitch float) ·
|
|
23
|
+
* `{ id?, render }` — anything else
|
|
24
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the sheet is made of (default `solid`)
|
|
25
|
+
* @param {number} width the sheet's width (default 272)
|
|
26
|
+
* @param {string} className
|
|
27
|
+
*/
|
|
28
|
+
export default function PropertyRail({ title, onCollapse, tabs, tab, onTab, selected, sections = [], surface = 'solid', width = 272, className = '' }) {
|
|
29
|
+
return (
|
|
30
|
+
<div className={`kol-property-rail kol-float-chrome flex flex-col gap-[18px] p-4 rounded-[var(--kol-float-menu-r)] ${floatSurfaceClass(surface, true)} ${className}`.trim()} style={{ width }}>
|
|
31
|
+
<div className="flex items-center justify-between">
|
|
32
|
+
<span className="kol-float-panel text-emphasis">{title}</span>
|
|
33
|
+
{onCollapse && <Button variant="float" tone="ghost" size="sm" iconOnly="skip-end" aria-label="Collapse" onClick={onCollapse} />}
|
|
34
|
+
</div>
|
|
35
|
+
{tabs?.length > 0 && <TabsRow variant="float" tabs={tabs} value={tab} onChange={onTab} />}
|
|
36
|
+
{selected && (
|
|
37
|
+
<div className="flex items-center gap-2">
|
|
38
|
+
{selected.icon && <Icon name={selected.icon} size={18} className="text-oq-64" />}
|
|
39
|
+
<span className="kol-float-panel text-emphasis flex-1 min-w-0 truncate">{selected.name}</span>
|
|
40
|
+
{selected.onVisible && (
|
|
41
|
+
<Button variant="float" tone="ghost" size="sm" iconOnly={selected.visible === false ? 'eye-off' : 'eye-on'} aria-label={selected.visible === false ? 'Show' : 'Hide'} aria-pressed={selected.visible !== false} onClick={() => selected.onVisible(selected.visible === false)} />
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
{sections.map((s, i) => (
|
|
46
|
+
<section key={s.id ?? s.label ?? i} className="flex flex-col gap-[18px]">
|
|
47
|
+
{(s.label || s.onAdd || s.meta) && (
|
|
48
|
+
<div className="flex items-center justify-between">
|
|
49
|
+
<span className="kol-float-label text-oq-64">{s.label}</span>
|
|
50
|
+
{s.onAdd && <Button variant="float" tone="ghost" size="sm" iconOnly="plus" aria-label={`Add to ${s.label}`} onClick={s.onAdd} />}
|
|
51
|
+
{s.meta && <span className="kol-float-timecode text-emphasis">{s.meta}</span>}
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
{(s.rows ?? []).map((r, j) => <Row key={r.id ?? j} row={r} />)}
|
|
55
|
+
</section>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function Row({ row: r }) {
|
|
62
|
+
if (r.render) return r.render()
|
|
63
|
+
if (r.type === 'fields') {
|
|
64
|
+
return (
|
|
65
|
+
<div className="flex gap-2">
|
|
66
|
+
{r.fields.map((f) => (
|
|
67
|
+
<Input key={f.id} variant="float" size="md" prefix={f.prefix} suffix={f.unit} value={f.value} onChange={(e) => f.onChange?.(e.target.value)} aria-label={f.label ?? f.prefix ?? f.id} className="flex-1 min-w-0" />
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
if (r.type === 'select') {
|
|
73
|
+
return (
|
|
74
|
+
<div className="flex flex-col gap-[7px]">
|
|
75
|
+
{r.label && <span className="kol-float-hint text-oq-64">{r.label}</span>}
|
|
76
|
+
<Dropdown variant="float" size="md" options={r.options} value={r.value} onChange={r.onChange} aria-label={r.label} className="w-full" />
|
|
77
|
+
</div>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
if (r.type === 'slider') {
|
|
81
|
+
return <Slider variant="float" readout="value" label={r.label} value={r.value} onChange={r.onChange} min={r.min} max={r.max} step={r.step} formatValue={r.formatValue} className="w-full" />
|
|
82
|
+
}
|
|
83
|
+
if (r.type === 'switch') {
|
|
84
|
+
return (
|
|
85
|
+
<div className="flex items-center justify-between gap-2">
|
|
86
|
+
<span className="kol-float-panel text-emphasis inline-flex items-center gap-1.5">
|
|
87
|
+
{r.icon && <Icon name={r.icon} size={16} className="text-oq-96" />}
|
|
88
|
+
{r.label}
|
|
89
|
+
</span>
|
|
90
|
+
<ToggleSwitch variant="float" checked={!!r.on} onChange={r.onChange} aria-label={r.label} />
|
|
91
|
+
</div>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
return null
|
|
95
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Button } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { ThemeToggle } from '@kolkrabbi/kol-framework'
|
|
3
|
+
|
|
4
|
+
/* taxonomy-ok: molecule — kol-framework's ThemeToggle over a row of float Buttons */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* RailDisplayControls — The rail's foot (float-everything W9 row 134, 2026-11-04): the theme row (kol-framework's
|
|
8
|
+
* ThemeToggle, which names what the next click does) over a well on the `--kol-float-list-r` round holding Collapse
|
|
9
|
+
* and Hide as two quiet float buttons with their glyphs (`kol-float-label`). The exploration's `Sidebar display
|
|
10
|
+
* controls` (kol-float--style 9:14611).
|
|
11
|
+
*
|
|
12
|
+
* @param {Function} onCollapse · {Function} onHide the two presses
|
|
13
|
+
* @param {boolean} theme the theme row above the well (default true)
|
|
14
|
+
* @param {string} collapseLabel · {string} hideLabel the words (default "Collapse" · "Hide")
|
|
15
|
+
* @param {string} className
|
|
16
|
+
*/
|
|
17
|
+
export default function RailDisplayControls({ onCollapse, onHide, theme = true, collapseLabel = 'Collapse', hideLabel = 'Hide', className = '' }) {
|
|
18
|
+
return (
|
|
19
|
+
<div className={`kol-rail-display kol-float-chrome flex flex-col gap-2 ${className}`.trim()}>
|
|
20
|
+
{theme && <ThemeToggle size="sm" fill="none" className="kol-float-label self-start" />}
|
|
21
|
+
<div className="flex items-center gap-1 p-1 rounded-[var(--kol-float-list-r)] bg-[var(--kol-float-well)]">
|
|
22
|
+
<Button variant="float" tone="ghost" size="md" iconLeft="panel-left" iconGap={10} className="flex-1 justify-start kol-float-label" onClick={onCollapse}>{collapseLabel}</Button>
|
|
23
|
+
<Button variant="float" tone="ghost" size="md" iconLeft="hamburger" iconGap={10} className="flex-1 justify-start kol-float-label" onClick={onHide}>{hideLabel}</Button>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Button, usePopover, PopoverPanel, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
|
+
|
|
4
|
+
/* taxonomy-ok: molecule — a float card of nav Buttons with counts */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* RailFlyout — A section's children beside the rail (float-everything W9 row 130, 2026-11-04): the hover card a 72
|
|
8
|
+
* rail opens for a row that holds pages — the section's glyph and name (`kol-float-body`), then its rows 34 tall on
|
|
9
|
+
* the `--kol-float-list-r` round (a 16 glyph, the label in `kol-float-hint`, a count in `kol-float-ruler` at the end),
|
|
10
|
+
* the current one lit. With `anchor` it hangs right of that element (the popover); without, it is the card alone.
|
|
11
|
+
* The exploration's `Dashboard rail flyout` (kol-float--style 9:14981).
|
|
12
|
+
*
|
|
13
|
+
* @param {string} icon · {string} title the section
|
|
14
|
+
* @param {Array} items `[{ path, label, icon?, count? }]`
|
|
15
|
+
* @param {string} active the current path
|
|
16
|
+
* @param {Function} onPick `(item) => void`
|
|
17
|
+
* @param {Element} anchor the rail row the card hangs off; `open` shows it, `onOpenChange` hears it close
|
|
18
|
+
* @param {boolean} open · {Function} onOpenChange
|
|
19
|
+
* @param {number} width the card's width (default 302)
|
|
20
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the card is made of (default `solid`)
|
|
21
|
+
* @param {string} className
|
|
22
|
+
*/
|
|
23
|
+
export default function RailFlyout({ icon, title, items = [], active, onPick, anchor, open = true, onOpenChange, width = 302, surface = 'solid', className = '' }) {
|
|
24
|
+
const popover = usePopover({ open: !!anchor && open, onOpenChange, placement: 'right-start', offset: 8, click: false, referenceElement: anchor ?? null, role: 'menu' })
|
|
25
|
+
const card = (
|
|
26
|
+
<div role="menu" aria-label={title} className={`kol-rail-flyout kol-float-chrome flex flex-col gap-0.5 p-2 rounded-[var(--kol-float-menu-r)] ${floatSurfaceClass(surface, true)} ${anchor ? '' : className}`.trim()} style={{ width }}>
|
|
27
|
+
<div className="flex items-center gap-3 px-2 pt-2 pb-3">
|
|
28
|
+
{icon && <Icon name={icon} size={18} className="text-oq-96" />}
|
|
29
|
+
<span className="kol-float-body text-emphasis">{title}</span>
|
|
30
|
+
</div>
|
|
31
|
+
{items.map((i) => (
|
|
32
|
+
<Button key={i.path ?? i.label} variant="nav" size="lg" iconLeft={i.icon} iconSize={16} aria-current={i.path != null && i.path === active ? 'page' : undefined} className="kol-btn-float w-full justify-start" onClick={() => onPick?.(i)}>
|
|
33
|
+
<span className="flex-1 text-left">{i.label}</span>
|
|
34
|
+
{i.count != null && <span className="kol-float-ruler text-oq-64">{i.count}</span>}
|
|
35
|
+
</Button>
|
|
36
|
+
))}
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
if (!anchor) return card
|
|
40
|
+
return <PopoverPanel popover={popover} panel={false} focus={false} className={className}>{card}</PopoverPanel>
|
|
41
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { Button, usePopover, PopoverPanel, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
3
|
+
import MoreRows, { FloatMenu } from './MoreSheet.jsx'
|
|
4
|
+
|
|
5
|
+
/* taxonomy-ok: molecule — a float Button that opens the More sheet's rows */
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* RailTrigger — The rail's hidden state (float-everything W9 row 129, 2026-11-04): no rail space is reserved — one 44
|
|
9
|
+
* float button at the page's corner, the breadcrumb beside it (`kol-float-hint`, oq-64), and a press opens the whole
|
|
10
|
+
* nav as a float card over the page (the title with its ×, then the rail's rows as the float menu — a row with `sub`
|
|
11
|
+
* opens its level in place). Escape and an outside press close it; a pick routes and closes. `AppShell railTrigger`
|
|
12
|
+
* draws it while the rail is hidden. The exploration's `Hidden navigation · Closed` + `Temporary navigation overlay`
|
|
13
|
+
* (kol-float--style 9:15047 · 9:15071).
|
|
14
|
+
*
|
|
15
|
+
* @param {Array} items `[{ path, label, icon?, sub? }]` — the nav, in rail order
|
|
16
|
+
* @param {string} currentPath the current route, lit in the card
|
|
17
|
+
* @param {Function} onNavigate `(path) => void`
|
|
18
|
+
* @param {string} title the card's head (the app's name)
|
|
19
|
+
* @param {string|string[]} breadcrumb the words beside the button, or crumbs joined by ` / `
|
|
20
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the button and the card are made of (default `solid`)
|
|
21
|
+
* @param {string} className
|
|
22
|
+
*/
|
|
23
|
+
export default function RailTrigger({ items = [], currentPath = '/', onNavigate, title, breadcrumb, surface = 'solid', className = '' }) {
|
|
24
|
+
const [open, setOpen] = useState(false)
|
|
25
|
+
const popover = usePopover({ open, onOpenChange: setOpen, placement: 'bottom-start', offset: 8, dismiss: { outsidePress: (e) => !e.target?.closest?.('.kol-float-level') } })
|
|
26
|
+
const card = `kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}`
|
|
27
|
+
const pick = (x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }
|
|
28
|
+
return (
|
|
29
|
+
<div className={`kol-rail-trigger kol-float-chrome inline-flex items-center gap-4 ${className}`.trim()}>
|
|
30
|
+
<span ref={popover.refs.setReference} {...popover.getReferenceProps()} className="inline-flex">
|
|
31
|
+
<Button variant="float" size="lg" iconOnly="hamburger" aria-label="Open navigation" aria-haspopup="menu" aria-expanded={open} className={floatSurfaceClass(surface)} />
|
|
32
|
+
</span>
|
|
33
|
+
{breadcrumb && <span className="kol-float-hint text-oq-64">{Array.isArray(breadcrumb) ? breadcrumb.join(' / ') : breadcrumb}</span>}
|
|
34
|
+
<PopoverPanel popover={popover} panel={false} focus={false} className={`${card} w-[280px]`} style={{ maxWidth: 'calc(100vw - 24px)' }}>
|
|
35
|
+
{title && (
|
|
36
|
+
<div className="flex items-center justify-between pl-3 pr-1 pt-1 pb-2">
|
|
37
|
+
<span className="kol-float-body text-emphasis">{title}</span>
|
|
38
|
+
<Button variant="float" tone="ghost" size="sm" iconOnly="x" aria-label="Close" onClick={() => setOpen(false)} />
|
|
39
|
+
</div>
|
|
40
|
+
)}
|
|
41
|
+
<FloatMenu cardClass={card} onLeaf={pick}>
|
|
42
|
+
<MoreRows variant="float" items={items} active={currentPath} onPick={pick} />
|
|
43
|
+
</FloatMenu>
|
|
44
|
+
</PopoverPanel>
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Button, Slider, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
|
+
|
|
4
|
+
/* taxonomy-ok: molecule — float Buttons and a Slider float on the float surface */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* ReaderBar — The reader's top controls (float-everything W5 row 80, 2026-11-04): the way back with the path
|
|
8
|
+
* ("My library / The Waves") as one 44 capsule at the start; Contents, search, bookmark and the `Aa` reading tools
|
|
9
|
+
* capsule at the end — each its own float, 12 apart. The exploration's `Floating reader controls` (kol-float--style
|
|
10
|
+
* 9:16150).
|
|
11
|
+
*
|
|
12
|
+
* @param {string|string[]} path the capsule's words, or its crumbs joined by ` / `
|
|
13
|
+
* @param {Function} onBack the capsule's press
|
|
14
|
+
* @param {Function} onContents the Contents press; unset, no Contents
|
|
15
|
+
* @param {Function} onSearch · {Function} onBookmark the glyphs' presses; unset, left out
|
|
16
|
+
* @param {boolean} bookmarked the bookmark lit
|
|
17
|
+
* @param {Function} onTools the `Aa` capsule's press; unset, no capsule
|
|
18
|
+
* @param {string} toolsLabel the capsule's words (default "Reading tools")
|
|
19
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what every float on the bar is made of (default `solid`)
|
|
20
|
+
* @param {string} className
|
|
21
|
+
*/
|
|
22
|
+
export default function ReaderBar({ path, onBack, onContents, onSearch, onBookmark, bookmarked = false, onTools, toolsLabel = 'Reading tools', surface = 'solid', className = '' }) {
|
|
23
|
+
const surf = floatSurfaceClass(surface)
|
|
24
|
+
return (
|
|
25
|
+
<div className={`kol-reader-bar kol-float-chrome flex items-center justify-between gap-4 ${className}`.trim()}>
|
|
26
|
+
<Button variant="float" size="lg" iconLeft="arrow-left" iconGap={12} onClick={onBack} className={`${surf} pr-5`}>
|
|
27
|
+
{Array.isArray(path) ? path.join(' / ') : path}
|
|
28
|
+
</Button>
|
|
29
|
+
<div className="flex items-center gap-3">
|
|
30
|
+
{onContents && <Button variant="float" size="lg" iconLeft="list-bullet" onClick={onContents} className={surf}>Contents</Button>}
|
|
31
|
+
{onSearch && <Button variant="float" size="lg" iconOnly="search" aria-label="Search" onClick={onSearch} className={surf} />}
|
|
32
|
+
{onBookmark && <Button variant="float" size="lg" iconOnly="bookmark" aria-label="Bookmark" pressed={bookmarked} onClick={onBookmark} className={surf} />}
|
|
33
|
+
{onTools && (
|
|
34
|
+
<Button variant="float" size="lg" iconRight="chevron-down" onClick={onTools} className={`${surf} pl-4`}>
|
|
35
|
+
<span className="kol-float-body-lg text-emphasis">Aa</span>
|
|
36
|
+
<span>{toolsLabel}</span>
|
|
37
|
+
</Button>
|
|
38
|
+
)}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ProgressDock — The reading position (float-everything W5 row 81, 2026-11-04): a 64 capsule — ‹ and › as 44 float
|
|
46
|
+
* slots, between them the page line (`kol-float-hint`) with the share in `kol-float-timecode` (oq-64), and the Slider
|
|
47
|
+
* float's 3px track under them. The exploration's `Reading progress dock` (kol-float--style 9:16203).
|
|
48
|
+
*
|
|
49
|
+
* @param {number} page · {number} pages where the reader is, of how many
|
|
50
|
+
* @param {Function} onPrev · {Function} onNext the slots' presses
|
|
51
|
+
* @param {Function} onSeek `(page) => void` — the track's drag
|
|
52
|
+
* @param {Function} formatPage `(page, pages) => string` (default "Page 125 of 297")
|
|
53
|
+
* @param {number} width the dock's width (default 620)
|
|
54
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the dock is made of (default `solid`)
|
|
55
|
+
* @param {string} className
|
|
56
|
+
*/
|
|
57
|
+
export function ProgressDock({ page = 1, pages = 1, onPrev, onNext, onSeek, formatPage = (p, n) => `Page ${p} of ${n}`, width = 620, surface = 'solid', className = '' }) {
|
|
58
|
+
const pct = pages > 1 ? Math.round(((page - 1) / (pages - 1)) * 100) : 100
|
|
59
|
+
return (
|
|
60
|
+
<div className={`kol-progress-dock kol-float-chrome flex items-center gap-4 h-16 px-2.5 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()} style={{ width }}>
|
|
61
|
+
<Button variant="float" tone="ghost" size="lg" iconOnly="chevron-left" aria-label="Previous page" onClick={onPrev} disabled={page <= 1} />
|
|
62
|
+
<div className="flex-1 min-w-0 flex flex-col gap-1">
|
|
63
|
+
<div className="flex items-center justify-between">
|
|
64
|
+
<span className="kol-float-hint text-emphasis">{formatPage(page, pages)}</span>
|
|
65
|
+
<span className="kol-float-timecode text-oq-64">{pct}%</span>
|
|
66
|
+
</div>
|
|
67
|
+
<Slider variant="float" readout="none" aria-label="Reading position" min={1} max={pages} step={1} value={page} onChange={onSeek} className="w-full" />
|
|
68
|
+
</div>
|
|
69
|
+
<Button variant="float" tone="ghost" size="lg" iconOnly="chevron-right" aria-label="Next page" onClick={onNext} disabled={page >= pages} />
|
|
70
|
+
</div>
|
|
71
|
+
)
|
|
72
|
+
}
|
package/src/Timecode.jsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* taxonomy-ok: atom — one line of the float's mono role */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Timecode — The transport's readout (float-everything W5 row 70, 2026-11-04): the current position in
|
|
5
|
+
* `kol-float-timecode` (the emphasis ink) and, 12 after it, `/ total` in the same role at oq-48. The transport draws it
|
|
6
|
+
* in its own capsule (`AppFloatNav variant="transport" timecode`); alone, it is the line. The exploration's `Timecode`
|
|
7
|
+
* (kol-float--style 9:9350).
|
|
8
|
+
*
|
|
9
|
+
* @param {string} current the position ("00:04:12")
|
|
10
|
+
* @param {string} total the length ("00:12:00"); unset, the position alone
|
|
11
|
+
* @param {string} className
|
|
12
|
+
*/
|
|
13
|
+
export default function Timecode({ current, total, className = '' }) {
|
|
14
|
+
return (
|
|
15
|
+
<span className={`kol-timecode kol-float-timecode inline-flex items-center gap-3 tabular-nums ${className}`.trim()}>
|
|
16
|
+
<span className="text-emphasis">{current}</span>
|
|
17
|
+
{total && <span className="text-oq-48">/ {total}</span>}
|
|
18
|
+
</span>
|
|
19
|
+
)
|
|
20
|
+
}
|
package/src/ToolRail.jsx
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Button, Tooltip, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: molecule — a column of float Buttons, each named by the float Tooltip */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ToolRail — The editor's tool column as a float (float-everything W5 row 63, 2026-11-04). A 52 capsule, 6 in, 40 slots
|
|
7
|
+
* (`--kol-float-row`) 4 apart; the armed tool is lit (`--kol-fg-16`, the float selection); every slot is named beside
|
|
8
|
+
* the rail by the float Tooltip with its key. The exploration's `Floating tool rail` (kol-float--style 9:9192).
|
|
9
|
+
*
|
|
10
|
+
* @param {Array} tools `[{ id, icon, label, kbd? }]` in rail order — `icon` a kol-icons name, `kbd` the tooltip's key
|
|
11
|
+
* @param {string} value the armed tool's id
|
|
12
|
+
* @param {Function} onChange `(id) => void`
|
|
13
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the rail is made of (default `solid`); a glass puts its own ink on the slots
|
|
14
|
+
* @param {string} className
|
|
15
|
+
*/
|
|
16
|
+
export default function ToolRail({ tools = [], value, onChange, surface = 'solid', className = '' }) {
|
|
17
|
+
return (
|
|
18
|
+
<div role="toolbar" aria-orientation="vertical" aria-label="Tools" className={`kol-tool-rail kol-float-chrome inline-flex flex-col gap-1 p-1.5 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
|
|
19
|
+
{tools.map((t) => (
|
|
20
|
+
<Tooltip key={t.id} variant="float" placement="right" offset={12} label={t.label} shortcut={t.kbd}>
|
|
21
|
+
<Button variant="float" tone="ghost" iconOnly={t.icon} aria-label={t.label} pressed={t.id === value} onClick={() => onChange?.(t.id)} />
|
|
22
|
+
</Tooltip>
|
|
23
|
+
))}
|
|
24
|
+
</div>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { Button, TabsRow, usePopover, PopoverPanel, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
3
|
+
import DocumentCapsule from './DocumentCapsule.jsx'
|
|
4
|
+
import MoreRows, { FloatMenu } from './MoreSheet.jsx'
|
|
5
|
+
|
|
6
|
+
/* taxonomy-ok: organism — the top bar: DocumentCapsule · TabsRow float · float Buttons · PanelsRestore */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* PanelsRestore — The Panels ▾ control (float-everything W5 row 79, 2026-11-04): a float capsule that opens the
|
|
10
|
+
* workspace's panels menu — `children` when the consumer brings one (kol-component's PanelsMenu), else `items` as the
|
|
11
|
+
* float menu's rows. The exploration's `Panels restore control` (kol-float--style 9:15406).
|
|
12
|
+
*
|
|
13
|
+
* @param {string} label the capsule's word (default "Panels")
|
|
14
|
+
* @param {ReactNode} children the menu's body, drawn in the float card
|
|
15
|
+
* @param {Array} items `[{ label, icon?, onPress }]` — rows when there is no `children`
|
|
16
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the capsule and its card are made of (default `solid`)
|
|
17
|
+
* @param {string} className
|
|
18
|
+
*/
|
|
19
|
+
export function PanelsRestore({ label = 'Panels', children, items, surface = 'solid', className = '' }) {
|
|
20
|
+
const [open, setOpen] = useState(false)
|
|
21
|
+
const popover = usePopover({ open, onOpenChange: setOpen, placement: 'bottom-end', offset: 8 })
|
|
22
|
+
const card = `kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}`
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<span ref={popover.refs.setReference} {...popover.getReferenceProps()} className="inline-flex">
|
|
26
|
+
<Button variant="float" size="lg" iconRight="chevron-down" aria-haspopup="menu" aria-expanded={open} className={`${floatSurfaceClass(surface)} ${className}`.trim()}>{label}</Button>
|
|
27
|
+
</span>
|
|
28
|
+
<PopoverPanel popover={popover} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
|
|
29
|
+
{children ?? (
|
|
30
|
+
<FloatMenu beside cardClass={card} onLeaf={() => setOpen(false)}>
|
|
31
|
+
<MoreRows variant="float" actions={items ?? []} onPick={() => setOpen(false)} />
|
|
32
|
+
</FloatMenu>
|
|
33
|
+
)}
|
|
34
|
+
</PopoverPanel>
|
|
35
|
+
</>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* TopControlsBar — The one 64 bar over a workspace (float-everything W5 row 77, 2026-11-04): the document capsule at
|
|
41
|
+
* the start, the section tabs (TabsRow float) in the middle with the search glyph, Panels ▾ and the primary action at the
|
|
42
|
+
* end — every piece a float on its `surface`, 16 between, nothing behind them. `start` · `center` · `end` replace any
|
|
43
|
+
* of the three. The exploration's `Floating application controls` (kol-float--style 9:14341).
|
|
44
|
+
*
|
|
45
|
+
* @param {Object} document DocumentCapsule's props (`name`, `status`, `onBack`, `menuItems`)
|
|
46
|
+
* @param {Array} tabs TabsRow tabs `[{ value, label, icon? }]`; `tab` the current value · `onTab` `(value) => void`
|
|
47
|
+
* @param {Function} onSearch the search glyph's press; unset, no glyph
|
|
48
|
+
* @param {Object} panels PanelsRestore's props (`items` or `children`); unset, no Panels
|
|
49
|
+
* @param {Object} action `{ label, icon?, onPress }` — the primary action (New task), the inverted float capsule
|
|
50
|
+
* @param {ReactNode} start · {ReactNode} center · {ReactNode} end the three regions, when the props above are not the bar
|
|
51
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what every float on the bar is made of (default `solid`)
|
|
52
|
+
* @param {string} className
|
|
53
|
+
*/
|
|
54
|
+
export default function TopControlsBar({ document, tabs, tab, onTab, onSearch, panels, action, start, center, end, surface = 'solid', className = '' }) {
|
|
55
|
+
return (
|
|
56
|
+
<div className={`kol-top-controls kol-float-chrome flex items-center gap-4 h-16 ${className}`.trim()}>
|
|
57
|
+
<div className="flex items-center gap-4">
|
|
58
|
+
{start ?? (document && <DocumentCapsule {...document} surface={surface} />)}
|
|
59
|
+
</div>
|
|
60
|
+
<div className="flex-1 flex items-center justify-center gap-4 min-w-0">
|
|
61
|
+
{center ?? (
|
|
62
|
+
<>
|
|
63
|
+
{tabs?.length > 0 && <TabsRow variant="float" tabs={tabs} value={tab} onChange={onTab} className={`rounded-full p-1.5 ${floatSurfaceClass(surface)}`} />}
|
|
64
|
+
{onSearch && <Button variant="float" tone="ghost" size="lg" iconOnly="search" aria-label="Search" onClick={onSearch} className={floatSurfaceClass(surface)} />}
|
|
65
|
+
</>
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
<div className="flex items-center gap-4">
|
|
69
|
+
{end ?? (
|
|
70
|
+
<>
|
|
71
|
+
{panels && <PanelsRestore {...panels} surface={surface} />}
|
|
72
|
+
{action && <Button variant="float" tone="inverted" size="lg" iconLeft={action.icon ?? 'plus'} onClick={action.onPress}>{action.label}</Button>}
|
|
73
|
+
</>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Avatar, Badge, Button, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: molecule — a workspace's strips: Avatar · Badge · float Buttons on the float type roles */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AccountFooter — The account at the rail's foot (float-everything W9 row 132, 2026-11-04): the avatar (a picture or the
|
|
7
|
+
* initial), the name (`kol-float-body`) over the workspace (`kol-float-hint`, oq-64); a press opens the account menu
|
|
8
|
+
* the consumer owns. The exploration's `Account` (kol-float--style 9:1572).
|
|
9
|
+
*
|
|
10
|
+
* @param {string} name · {string} workspace
|
|
11
|
+
* @param {string} src · {string} initial Avatar's picture or glyph
|
|
12
|
+
* @param {Function} onPress the row's press; unset, it is a line, not a button
|
|
13
|
+
* @param {string} className
|
|
14
|
+
*/
|
|
15
|
+
export function AccountFooter({ name, workspace, src, initial, onPress, className = '' }) {
|
|
16
|
+
const body = (
|
|
17
|
+
<>
|
|
18
|
+
<Avatar src={src} initial={initial ?? name?.[0]} alt="" size="sm" />
|
|
19
|
+
<span className="flex flex-col gap-0.5 min-w-0 text-left">
|
|
20
|
+
<span className="kol-float-body text-emphasis truncate">{name}</span>
|
|
21
|
+
{workspace && <span className="kol-float-hint text-oq-64 truncate">{workspace}</span>}
|
|
22
|
+
</span>
|
|
23
|
+
</>
|
|
24
|
+
)
|
|
25
|
+
const cls = `kol-account-footer inline-flex items-center gap-2.5 ${className}`.trim()
|
|
26
|
+
return onPress
|
|
27
|
+
? <button type="button" onClick={onPress} className={`${cls} bg-transparent border-0 p-0 cursor-pointer`}>{body}</button>
|
|
28
|
+
: <div className={cls}>{body}</div>
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* StatusStrip — The system's state as one line (float-everything W9 row 133, 2026-11-04): the outline Badge at its
|
|
33
|
+
* smallest, the words verbatim ("ALL SYSTEMS OBSERVING"). The exploration's `Tracking status` (kol-float--style 9:1571).
|
|
34
|
+
*
|
|
35
|
+
* @param {string} label the words
|
|
36
|
+
* @param {string} className
|
|
37
|
+
*/
|
|
38
|
+
export function StatusStrip({ label, className = '' }) {
|
|
39
|
+
return <Badge variant="outline" size="xs" className={`kol-status-strip ${className}`.trim()}>{label}</Badge>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Breadcrumb — Where the page is (float-everything W9 row 136, 2026-11-04): the crumbs in `kol-float-timecode` (oq-64)
|
|
44
|
+
* with a slash between; a crumb with `onPress` is a button, the last is the page. The exploration's `Breadcrumb and
|
|
45
|
+
* disclosure` (kol-float--style 9:1579).
|
|
46
|
+
*
|
|
47
|
+
* @param {Array} items `[{ label, onPress? }]` or strings, root first
|
|
48
|
+
* @param {string} className
|
|
49
|
+
*/
|
|
50
|
+
export function Breadcrumb({ items = [], className = '' }) {
|
|
51
|
+
return (
|
|
52
|
+
<nav aria-label="Breadcrumb" className={`kol-breadcrumb kol-float-timecode text-oq-64 flex items-center gap-2 ${className}`.trim()}>
|
|
53
|
+
{items.map((raw, i) => {
|
|
54
|
+
const it = typeof raw === 'string' ? { label: raw } : raw
|
|
55
|
+
const last = i === items.length - 1
|
|
56
|
+
return (
|
|
57
|
+
<span key={i} className="inline-flex items-center gap-2">
|
|
58
|
+
{it.onPress && !last
|
|
59
|
+
? <button type="button" onClick={it.onPress} className="bg-transparent border-0 p-0 cursor-pointer text-oq-64 hover:text-oq-96 font-[inherit] text-[length:inherit]">{it.label}</button>
|
|
60
|
+
: <span aria-current={last ? 'page' : undefined}>{it.label}</span>}
|
|
61
|
+
{!last && <span className="text-oq-48">/</span>}
|
|
62
|
+
</span>
|
|
63
|
+
)
|
|
64
|
+
})}
|
|
65
|
+
</nav>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* FooterStrip — The page's foot line (float-everything W9 row 139, 2026-11-04): counts at the start, meta at the end,
|
|
71
|
+
* both in `kol-float-timecode` (oq-64); an array joins with ` / `. The exploration's `Workspace footer`
|
|
72
|
+
* (kol-float--style 9:13452).
|
|
73
|
+
*
|
|
74
|
+
* @param {ReactNode|string[]} start · {ReactNode|string[]} end
|
|
75
|
+
* @param {string} className
|
|
76
|
+
*/
|
|
77
|
+
export function FooterStrip({ start, end, className = '' }) {
|
|
78
|
+
const words = (x) => (Array.isArray(x) ? x.join(' / ') : x)
|
|
79
|
+
return (
|
|
80
|
+
<div className={`kol-footer-strip kol-float-timecode text-oq-64 flex items-center justify-between gap-4 ${className}`.trim()}>
|
|
81
|
+
<span>{words(start)}</span>
|
|
82
|
+
<span>{words(end)}</span>
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* PeriodNav — The period's ‹ › Today (float-everything W9 row 142, 2026-11-04): one 36 float capsule — the two chevrons
|
|
89
|
+
* as quiet slots around the word (`kol-float-hint`), a press on it returns to now. The exploration's `Go to today`
|
|
90
|
+
* (kol-float--style 9:13720).
|
|
91
|
+
*
|
|
92
|
+
* @param {string} label the word (default "Today")
|
|
93
|
+
* @param {Function} onPrev · {Function} onNext · {Function} onToday
|
|
94
|
+
* @param {'solid'|'glass-dark'|'glass-light'} surface what the capsule is made of (default `solid`)
|
|
95
|
+
* @param {string} className
|
|
96
|
+
*/
|
|
97
|
+
export function PeriodNav({ label = 'Today', onPrev, onNext, onToday, surface = 'solid', className = '' }) {
|
|
98
|
+
return (
|
|
99
|
+
<div className={`kol-period-nav kol-float-chrome inline-flex items-center h-9 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
|
|
100
|
+
<Button variant="float" tone="ghost" size="md" iconOnly="chevron-left" aria-label="Previous" onClick={onPrev} />
|
|
101
|
+
<Button variant="float" tone="ghost" size="md" onClick={onToday} className="kol-float-hint px-3">{label}</Button>
|
|
102
|
+
<Button variant="float" tone="ghost" size="md" iconOnly="chevron-right" aria-label="Next" onClick={onNext} />
|
|
103
|
+
</div>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* DataStatus — What the numbers are (float-everything W9 row 143, 2026-11-04): the disclosure Badge ("Demo data") and
|
|
109
|
+
* when they were last refreshed in `kol-float-timecode` (oq-64). The exploration's `Data status` (kol-float--style 9:1581).
|
|
110
|
+
*
|
|
111
|
+
* @param {string} badge the disclosure; unset, none
|
|
112
|
+
* @param {string} updated the refresh line, verbatim ("UPDATED 14:32 UTC")
|
|
113
|
+
* @param {string} className
|
|
114
|
+
*/
|
|
115
|
+
export function DataStatus({ badge, updated, className = '' }) {
|
|
116
|
+
return (
|
|
117
|
+
<div className={`kol-data-status flex items-center gap-4 ${className}`.trim()}>
|
|
118
|
+
{badge && <Badge variant="outline" size="sm">{badge}</Badge>}
|
|
119
|
+
{updated && <span className="kol-float-timecode text-oq-64">{updated}</span>}
|
|
120
|
+
</div>
|
|
121
|
+
)
|
|
122
|
+
}
|
package/src/index.js
CHANGED
|
@@ -17,6 +17,20 @@ export { NavRail } from '@kolkrabbi/kol-component' // lives in kol-component sin
|
|
|
17
17
|
// the floating nav, one family (AppFloatNav, kol-fxr 2026-10-30) — PhoneNav and TransportPill are its deprecated aliases
|
|
18
18
|
// on the retirement ledger (PhoneNav's `nav` is `mobile`; TransportPill is `variant="transport"`)
|
|
19
19
|
export { default as AppFloatNav, APP_FLOAT_NAV_VARIANTS } from './AppFloatNav.jsx'
|
|
20
|
+
export { default as Timecode } from './Timecode.jsx'
|
|
21
|
+
// THE FLOAT CHROME (float-everything W5 · W9, 2026-11-04 — the gap map's rows 63–81 and 129–144): the editor's and the
|
|
22
|
+
// workspace's chrome on the float tokens, every boxed part on its `surface`. Composed from kol-component's float controls.
|
|
23
|
+
export { default as ToolRail } from './ToolRail.jsx'
|
|
24
|
+
export { default as PropertyRail } from './PropertyRail.jsx'
|
|
25
|
+
export { default as DocumentCapsule } from './DocumentCapsule.jsx'
|
|
26
|
+
export { default as GlobalActions } from './GlobalActions.jsx'
|
|
27
|
+
export { ZoomReadout, SceneBreadcrumb, CanvasHint, SelectionMeasure } from './CanvasReadouts.jsx'
|
|
28
|
+
export { default as TopControlsBar, PanelsRestore } from './TopControlsBar.jsx'
|
|
29
|
+
export { default as ReaderBar, ProgressDock } from './ReaderBar.jsx'
|
|
30
|
+
export { default as RailTrigger } from './RailTrigger.jsx'
|
|
31
|
+
export { default as RailFlyout } from './RailFlyout.jsx'
|
|
32
|
+
export { default as RailDisplayControls } from './RailDisplayControls.jsx'
|
|
33
|
+
export { AccountFooter, StatusStrip, Breadcrumb, FooterStrip, PeriodNav, DataStatus } from './WorkspaceStrips.jsx'
|
|
20
34
|
export { default as PhoneNav, PHONE_NAV_VARIANTS } from './PhoneNav.jsx'
|
|
21
35
|
export { default as TransportPill } from './TransportPill.jsx'
|
|
22
36
|
export { default as PageShell, PageBleed } from './PageShell.jsx'
|