@kolkrabbi/kol-shell 0.26.0 → 0.27.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 +3 -3
- package/src/SettingsScaffold.jsx +49 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "KOL application shell — fixed 48px NavRail + AppShell layout root, PageShell/PageHeader scaffolds, ContentFilters catalog organism, GridCard, SettingsScaffold, WalkthroughPanel, ShortcutsOverlay. App chrome (kol-framework owns site chrome). Nav items, content, shortcuts and settings are consumer-injected. Sits above @kolkrabbi/kol-{theme,component,framework}.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@kolkrabbi/kol-component": "^0.136.0",
|
|
24
|
-
"@kolkrabbi/kol-framework": "^0.35.0",
|
|
25
24
|
"@kolkrabbi/kol-icons": "^0.25.0",
|
|
26
|
-
"@kolkrabbi/kol-
|
|
25
|
+
"@kolkrabbi/kol-framework": "^0.35.0",
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.106.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
package/src/SettingsScaffold.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { ContentFilters } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { ContentFilters, IconFrame } from '@kolkrabbi/kol-component'
|
|
3
3
|
import PageShell from './PageShell.jsx'
|
|
4
4
|
import PageHeader from './PageHeader.jsx'
|
|
5
5
|
|
|
@@ -54,6 +54,13 @@ import PageHeader from './PageHeader.jsx'
|
|
|
54
54
|
* A FUNCTION receives `(tab, setTab)` — for a control that has to
|
|
55
55
|
* move the page, e.g. an icon pair that jumps back to Settings
|
|
56
56
|
* @param {string} props.tone forwarded to ContentFilters (`sunken` is fxr's approved page)
|
|
57
|
+
* @param {ReactNode} props.picker the app's own picker for the masthead cluster —
|
|
58
|
+
* fxr opens a chrome, kol-r2b2 a bucket. Optional
|
|
59
|
+
* @param {ReactNode} props.themeToggle the app's ThemeToggle node. A NODE, not rendered
|
|
60
|
+
* here, because it lives in kol-framework and shell
|
|
61
|
+
* dropped that peer in 0.16.0
|
|
62
|
+
* @param {Function} props.onOpenSettings the gear's handler — opens the app's settings
|
|
63
|
+
* drawer. The scaffold draws the control
|
|
57
64
|
* @param {Object} props.filtersProps escape hatch — anything else the organism takes
|
|
58
65
|
*/
|
|
59
66
|
export default function SettingsScaffold({
|
|
@@ -67,6 +74,9 @@ export default function SettingsScaffold({
|
|
|
67
74
|
searchKeys,
|
|
68
75
|
trailingActions,
|
|
69
76
|
tone = 'sunken',
|
|
77
|
+
picker,
|
|
78
|
+
themeToggle,
|
|
79
|
+
onOpenSettings,
|
|
70
80
|
filtersProps,
|
|
71
81
|
}) {
|
|
72
82
|
const [tab, setTab] = useState(defaultTab ?? tabs[0]?.value)
|
|
@@ -85,13 +95,50 @@ export default function SettingsScaffold({
|
|
|
85
95
|
const viewTabs = tabs.filter((t) => t.row !== 'layout')
|
|
86
96
|
const layoutTabs = tabs.filter((t) => t.row === 'layout')
|
|
87
97
|
|
|
98
|
+
/* THE MASTHEAD CLUSTER — picker · theme toggle · gear, in that order, on the
|
|
99
|
+
* subtitle's baseline (user ruling 2026-08-30, off kol-fxr's approved page;
|
|
100
|
+
* kol-r2b2's row 1 is the same shape). It was a raw `header.actions` slot, so
|
|
101
|
+
* fxr and r2b2 each hand-built it and kol-mirror and kol-monitor passed
|
|
102
|
+
* NOTHING — which is the whole of why the three settings pages did not match.
|
|
103
|
+
* Order, gap and tone are the scaffold's now; only the picker's contents are
|
|
104
|
+
* the app's.
|
|
105
|
+
*
|
|
106
|
+
* `themeToggle` is a NODE rather than drawn here: it lives in kol-framework,
|
|
107
|
+
* and shell dropped that peer in 0.16.0. The gear is `IconFrame`, which is a
|
|
108
|
+
* peer, so the DS rules its glyph, tone and size.
|
|
109
|
+
*
|
|
110
|
+
* Pass none of the three and no cluster renders — mirror and monitor are
|
|
111
|
+
* untouched until they opt in. An explicit `header.actions` still wins. */
|
|
112
|
+
const cluster = picker || themeToggle || onOpenSettings ? (
|
|
113
|
+
<div className="flex items-center gap-2">
|
|
114
|
+
{picker}
|
|
115
|
+
{themeToggle}
|
|
116
|
+
{onOpenSettings && (
|
|
117
|
+
<IconFrame
|
|
118
|
+
name="settings-01"
|
|
119
|
+
variant="primary"
|
|
120
|
+
tone={tone}
|
|
121
|
+
size="sm"
|
|
122
|
+
onClick={onOpenSettings}
|
|
123
|
+
title="Display settings"
|
|
124
|
+
aria-label="Display settings"
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
) : null
|
|
129
|
+
|
|
88
130
|
return (
|
|
89
131
|
<PageShell mode="fixed">
|
|
90
132
|
{/* `header` is spread onto the PageHeader (PageHeaderMonoTitle addendum,
|
|
91
133
|
* kol-fxr 2026-08-27): a consumer could not reach this title at all —
|
|
92
134
|
* `voice="mono"`, `size`, `titleClass`, `eyebrow` all pass through.
|
|
93
135
|
* `actions` is where the drawer opener goes. */}
|
|
94
|
-
<PageHeader
|
|
136
|
+
<PageHeader
|
|
137
|
+
title={active?.title}
|
|
138
|
+
subtitle={active?.subtitle}
|
|
139
|
+
actions={cluster}
|
|
140
|
+
{...header}
|
|
141
|
+
/>
|
|
95
142
|
<ContentFilters
|
|
96
143
|
tone={tone}
|
|
97
144
|
title={title}
|