@unson/brainbase-mcp 0.49.0 → 0.49.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 +2 -2
- package/ui/area-nav.css +23 -13
- package/ui/area-nav.js +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unson/brainbase-mcp",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.1",
|
|
4
4
|
"description": "Local-first Brainbase judgment OS that lets supported AI agents reuse a user's approved goals, priorities, decisions, and judgment criteria.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -628,5 +628,5 @@
|
|
|
628
628
|
"url": "https://github.com/Unson-LLC/brainbase/issues"
|
|
629
629
|
},
|
|
630
630
|
"homepage": "https://github.com/Unson-LLC/brainbase#readme",
|
|
631
|
-
"gitHead": "
|
|
631
|
+
"gitHead": "f952568d63552398c0d6ebf29e05dbbf080d1bf9"
|
|
632
632
|
}
|
package/ui/area-nav.css
CHANGED
|
@@ -9,45 +9,55 @@
|
|
|
9
9
|
flex: 1 1 auto;
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
|
-
gap: 2px;
|
|
12
|
+
gap: var(--bb-area-nav-gap, 2px);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.bb-area-section {
|
|
16
|
+
display: grid;
|
|
17
|
+
gap: var(--bb-area-section-gap, 2px);
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
.bb-area-section,
|
|
16
20
|
.bb-area-section-links {
|
|
17
21
|
display: grid;
|
|
18
|
-
gap: 2px;
|
|
22
|
+
gap: var(--bb-area-section-links-gap, 2px);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
/* Space between the groups; the footer group sits at the bottom of the nav. */
|
|
22
26
|
.bb-area-section + .bb-area-section {
|
|
23
|
-
margin-top: var(--bb-space-4);
|
|
27
|
+
margin-top: var(--bb-area-section-margin-top, var(--bb-space-4));
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
.bb-area-section.is-footer {
|
|
27
|
-
margin-top: auto;
|
|
28
|
-
padding-top: var(--bb-space-4);
|
|
31
|
+
margin-top: var(--bb-area-footer-margin-top, auto);
|
|
32
|
+
padding-top: var(--bb-area-footer-padding-top, var(--bb-space-4));
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
.bb-area-section-label {
|
|
32
|
-
padding: 0 10px 4px;
|
|
33
|
-
color: var(--bb-color-rail-muted, var(--bb-color-muted));
|
|
34
|
-
font-size: 11px;
|
|
35
|
-
font-weight: var(--bb-font-weight-medium);
|
|
36
|
-
letter-spacing: .04em;
|
|
36
|
+
padding: var(--bb-area-section-label-padding, 0 10px 4px);
|
|
37
|
+
color: var(--bb-area-section-label-color, var(--bb-color-rail-muted, var(--bb-color-muted)));
|
|
38
|
+
font-size: var(--bb-area-section-label-font-size, 11px);
|
|
39
|
+
font-weight: var(--bb-area-section-label-font-weight, var(--bb-font-weight-medium));
|
|
40
|
+
letter-spacing: var(--bb-area-section-label-letter-spacing, .04em);
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
.bb-area-section-link {
|
|
40
44
|
display: flex;
|
|
41
45
|
align-items: center;
|
|
42
|
-
gap: 4px;
|
|
46
|
+
gap: var(--bb-area-section-link-gap, 4px);
|
|
43
47
|
border-radius: 6px;
|
|
44
|
-
padding-top: 4px;
|
|
48
|
+
padding-top: var(--bb-area-section-link-padding-top, 4px);
|
|
45
49
|
text-decoration: none;
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
.bb-area-section-icon {
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
flex: 0 0 auto;
|
|
55
|
+
}
|
|
56
|
+
|
|
48
57
|
/* A heading that opens a screen says so with a chevron (not part of its name). */
|
|
49
58
|
.bb-area-section-link::after {
|
|
50
59
|
content: "›";
|
|
60
|
+
display: var(--bb-area-section-link-indicator-display, inline);
|
|
51
61
|
font-size: 13px;
|
|
52
62
|
line-height: 1;
|
|
53
63
|
}
|
package/ui/area-nav.js
CHANGED
|
@@ -97,6 +97,8 @@ export function resolveAreaTarget(area, { remembered = null, isShown = () => tru
|
|
|
97
97
|
* @param {(screenId: string, event: Event) => void} [options.onSelect]
|
|
98
98
|
* @param {(linkId: string, event: Event) => void} [options.onSelectLink] A link given by `setLinks`.
|
|
99
99
|
* @param {(area: object) => Node|null} [options.iconFor] Icon in front of an area link.
|
|
100
|
+
* @param {(section: object) => Node|null} [options.sectionIconFor] Decorative icon in front of a section heading link.
|
|
101
|
+
* @param {string} [options.sectionLinkClassName] Extra class for section heading links.
|
|
100
102
|
* @param {string} [options.linkClassName] Extra class for the area links (the host's look).
|
|
101
103
|
*/
|
|
102
104
|
export function createAreaNav({
|
|
@@ -109,6 +111,8 @@ export function createAreaNav({
|
|
|
109
111
|
onSelect,
|
|
110
112
|
onSelectLink,
|
|
111
113
|
iconFor,
|
|
114
|
+
sectionIconFor,
|
|
115
|
+
sectionLinkClassName = '',
|
|
112
116
|
linkClassName = '',
|
|
113
117
|
label = '画面',
|
|
114
118
|
} = {}) {
|
|
@@ -194,7 +198,17 @@ export function createAreaNav({
|
|
|
194
198
|
if (section) {
|
|
195
199
|
// Both forms of the heading are made once; render shows one of them.
|
|
196
200
|
group.headingText = makeElement(doc, 'div', { className: 'bb-area-section-label', text: section.label ?? '' });
|
|
197
|
-
group.headingLink = makeElement(doc, 'a', {
|
|
201
|
+
group.headingLink = makeElement(doc, 'a', {
|
|
202
|
+
className: ['bb-area-section-label bb-area-section-link', sectionLinkClassName].filter(Boolean).join(' '),
|
|
203
|
+
text: section.label ?? '',
|
|
204
|
+
});
|
|
205
|
+
const sectionIcon = sectionIconFor?.(section) ?? null;
|
|
206
|
+
if (sectionIcon) {
|
|
207
|
+
const decoration = makeElement(doc, 'span', { className: 'bb-area-section-icon', attrs: { 'aria-hidden': 'true' } });
|
|
208
|
+
decoration.append(sectionIcon);
|
|
209
|
+
group.headingLink.textContent = '';
|
|
210
|
+
group.headingLink.append(decoration, makeElement(doc, 'span', { className: 'bb-area-link-label', text: section.label ?? '' }));
|
|
211
|
+
}
|
|
198
212
|
group.headingLink.addEventListener('click', (event) => {
|
|
199
213
|
if (section.screenId) onSelect?.(section.screenId, event);
|
|
200
214
|
});
|