@andespindola/brainlink 0.1.0-beta.161 → 0.1.0-beta.162

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.
@@ -342,7 +342,8 @@ li small {
342
342
  }
343
343
 
344
344
  .content-dialog {
345
- position: fixed;
345
+ position: absolute;
346
+ z-index: 6;
346
347
  top: 12px;
347
348
  right: 12px;
348
349
  bottom: 12px;
@@ -350,7 +351,7 @@ li small {
350
351
  top: max(12px, env(safe-area-inset-top));
351
352
  right: max(12px, env(safe-area-inset-right));
352
353
  bottom: max(12px, env(safe-area-inset-bottom));
353
- left: max(12px, calc(100vw - 780px));
354
+ left: max(12px, calc(100% - 780px));
354
355
  margin: 0;
355
356
  width: auto;
356
357
  height: auto;
@@ -365,9 +366,8 @@ li small {
365
366
  overflow: hidden;
366
367
  }
367
368
 
368
- .content-dialog::backdrop {
369
- background: rgba(4, 7, 10, 0.72);
370
- backdrop-filter: blur(4px);
369
+ .content-dialog[hidden] {
370
+ display: none;
371
371
  }
372
372
 
373
373
  .content-dialog article {
@@ -52,47 +52,47 @@ export const createClientHtml = () => `<!doctype html>
52
52
  <div id="graphLabels" class="graph-labels" aria-hidden="true"></div>
53
53
  <div id="graphTooltip" class="graph-tooltip" role="tooltip" hidden></div>
54
54
  <canvas id="miniMap" class="mini-map" aria-label="Graph overview"></canvas>
55
+ <aside id="contentDialog" class="content-dialog" role="dialog" aria-labelledby="contentTitle" hidden>
56
+ <article>
57
+ <header>
58
+ <div>
59
+ <span class="eyebrow">Node details</span>
60
+ <h2 id="contentTitle">Selected note</h2>
61
+ <p id="contentPath"></p>
62
+ </div>
63
+ <button id="contentClose" type="button" aria-label="Close node details" title="Close node details">&times;</button>
64
+ </header>
65
+ <div class="content-meta">
66
+ <section class="content-meta-section">
67
+ <h3>Facts</h3>
68
+ <ul id="contentFacts"></ul>
69
+ </section>
70
+ <section class="content-meta-section">
71
+ <h3>Context Links</h3>
72
+ <ul id="contentContextLinks"></ul>
73
+ </section>
74
+ <section class="content-meta-section">
75
+ <h3>Tags</h3>
76
+ <div id="contentTags" class="tags"></div>
77
+ </section>
78
+ <section class="content-meta-section">
79
+ <h3>Outgoing</h3>
80
+ <ul id="contentOutgoing"></ul>
81
+ </section>
82
+ <section class="content-meta-section">
83
+ <h3>Backlinks</h3>
84
+ <ul id="contentIncoming"></ul>
85
+ </section>
86
+ </div>
87
+ <pre id="contentBody" class="note-content"></pre>
88
+ </article>
89
+ </aside>
55
90
  </div>
56
91
  </section>
57
92
  </main>
58
93
  <footer class="app-footer" aria-label="Copyright notice">
59
94
  <small>Copyright © 2026 Substructa</small>
60
95
  </footer>
61
- <dialog id="contentDialog" class="content-dialog" aria-labelledby="contentTitle">
62
- <article>
63
- <header>
64
- <div>
65
- <span class="eyebrow">Node details</span>
66
- <h2 id="contentTitle">Selected note</h2>
67
- <p id="contentPath"></p>
68
- </div>
69
- <button id="contentClose" type="button" aria-label="Close node details" title="Close node details">&times;</button>
70
- </header>
71
- <div class="content-meta">
72
- <section class="content-meta-section">
73
- <h3>Facts</h3>
74
- <ul id="contentFacts"></ul>
75
- </section>
76
- <section class="content-meta-section">
77
- <h3>Context Links</h3>
78
- <ul id="contentContextLinks"></ul>
79
- </section>
80
- <section class="content-meta-section">
81
- <h3>Tags</h3>
82
- <div id="contentTags" class="tags"></div>
83
- </section>
84
- <section class="content-meta-section">
85
- <h3>Outgoing</h3>
86
- <ul id="contentOutgoing"></ul>
87
- </section>
88
- <section class="content-meta-section">
89
- <h3>Backlinks</h3>
90
- <ul id="contentIncoming"></ul>
91
- </section>
92
- </div>
93
- <pre id="contentBody" class="note-content"></pre>
94
- </article>
95
- </dialog>
96
96
  <script src="/app.js"></script>
97
97
  </body>
98
98
  </html>`;
@@ -866,10 +866,11 @@ const linkedNodes = (node) => {
866
866
  }
867
867
 
868
868
  const openContentDialog = () => {
869
- const dialog = elements.contentDialog
870
- if (!dialog.open) {
871
- dialog.show()
872
- }
869
+ elements.contentDialog.hidden = false
870
+ }
871
+
872
+ const closeContentDialog = () => {
873
+ elements.contentDialog.hidden = true
873
874
  }
874
875
 
875
876
  const loadNodeDetails = async (nodeId) => {
@@ -1282,6 +1283,10 @@ const setupInput = () => {
1282
1283
  })
1283
1284
 
1284
1285
  window.addEventListener('keydown', (event) => {
1286
+ if (event.key === 'Escape' && !elements.contentDialog.hidden) {
1287
+ closeContentDialog()
1288
+ return
1289
+ }
1285
1290
  if (event.key === '+') {
1286
1291
  zoomAtPoint(state.viewport.width / 2, state.viewport.height / 2, 1.06)
1287
1292
  return
@@ -1323,12 +1328,12 @@ const setupControls = () => {
1323
1328
  })
1324
1329
 
1325
1330
  elements.contentClose.addEventListener('click', () => {
1326
- elements.contentDialog.close()
1331
+ closeContentDialog()
1327
1332
  })
1328
1333
 
1329
1334
  elements.contentDialog.addEventListener('click', (event) => {
1330
1335
  if (event.target === elements.contentDialog) {
1331
- elements.contentDialog.close()
1336
+ closeContentDialog()
1332
1337
  }
1333
1338
  })
1334
1339
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andespindola/brainlink",
3
- "version": "0.1.0-beta.161",
3
+ "version": "0.1.0-beta.162",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",