@unson/brainbase-mcp 0.50.10 → 0.50.11
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 -2
- package/ui/workspace-kit.js +17 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unson/brainbase-mcp",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.11",
|
|
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",
|
|
@@ -624,6 +624,7 @@
|
|
|
624
624
|
"@types/node": "^22.15.29",
|
|
625
625
|
"@types/pg": "^8.23.1",
|
|
626
626
|
"esbuild": "0.28.2",
|
|
627
|
+
"modern-web-guidance": "1.0.0",
|
|
627
628
|
"pg": "^8.23.1",
|
|
628
629
|
"three": "0.186.1",
|
|
629
630
|
"tsx": "^4.19.4",
|
|
@@ -644,5 +645,5 @@
|
|
|
644
645
|
"url": "https://github.com/Unson-LLC/brainbase/issues"
|
|
645
646
|
},
|
|
646
647
|
"homepage": "https://github.com/Unson-LLC/brainbase#readme",
|
|
647
|
-
"gitHead": "
|
|
648
|
+
"gitHead": "0eb8f0dcc9261d17af72f5b54441414bad00d937"
|
|
648
649
|
}
|
package/ui/workspace-kit.js
CHANGED
|
@@ -107,6 +107,21 @@ export function workspaceTopbar(doc, { title = '', query } = {}) {
|
|
|
107
107
|
return header;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Backdrop click closes a modal. Browsers with `closedby` do it natively and fire `cancel`,
|
|
112
|
+
* which the caller already handles; the pointer check is the fallback where it is missing (Safari).
|
|
113
|
+
*/
|
|
114
|
+
function workspaceLightDismiss(doc, dialog, close) {
|
|
115
|
+
dialog.setAttribute('closedby', 'any');
|
|
116
|
+
const NativeDialog = doc.defaultView?.HTMLDialogElement;
|
|
117
|
+
if (NativeDialog && 'closedBy' in NativeDialog.prototype) return;
|
|
118
|
+
dialog.addEventListener('click', event => {
|
|
119
|
+
if (event.target !== dialog) return;
|
|
120
|
+
const rect = dialog.getBoundingClientRect();
|
|
121
|
+
if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) close();
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
110
125
|
/** A reusable right inspector whose content can refresh without replacing the modal. */
|
|
111
126
|
export function workspaceDetailDrawer(doc, { title = '詳細', opener, onClose } = {}) {
|
|
112
127
|
const dialog = workspaceApplyDrawer(el(doc, 'dialog', { className: 'bb-ws-dialog bb-ws-detail-drawer' }));
|
|
@@ -135,11 +150,7 @@ export function workspaceDetailDrawer(doc, { title = '詳細', opener, onClose }
|
|
|
135
150
|
const button = workspaceButton(doc, { text: '閉じる', onClick: () => close() });
|
|
136
151
|
head.append(label, button); dialog.append(head, body); doc.body.append(dialog);
|
|
137
152
|
dialog.addEventListener('cancel', event => { event.preventDefault(); close(); });
|
|
138
|
-
|
|
139
|
-
if (event.target !== dialog) return;
|
|
140
|
-
const rect = dialog.getBoundingClientRect();
|
|
141
|
-
if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) close();
|
|
142
|
-
});
|
|
153
|
+
workspaceLightDismiss(doc, dialog, () => close());
|
|
143
154
|
return {
|
|
144
155
|
dialog,
|
|
145
156
|
setContent(...content) { if (!disposed) body.replaceChildren(...content); },
|
|
@@ -432,11 +443,7 @@ export function workspaceDialog(doc, { title, content, opener, presentation = 'c
|
|
|
432
443
|
const body = el(doc, 'div', { className: 'bb-ws-dialog-body' }); appendContent(body, doc, content);
|
|
433
444
|
dialog.append(head, body); doc.body.append(dialog);
|
|
434
445
|
dialog.addEventListener('cancel', event => { event.preventDefault(); dialog.close(); });
|
|
435
|
-
|
|
436
|
-
if (event.target !== dialog) return;
|
|
437
|
-
const rect = dialog.getBoundingClientRect();
|
|
438
|
-
if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) dialog.close();
|
|
439
|
-
});
|
|
446
|
+
workspaceLightDismiss(doc, dialog, () => dialog.close());
|
|
440
447
|
dialog.addEventListener('close', cleanup, { once: true });
|
|
441
448
|
try { dialog.showModal(); close.focus(); } catch (error) { cleanup(); throw error; }
|
|
442
449
|
return dialog;
|