@andespindola/brainlink 0.1.0-beta.147 → 0.1.0-beta.148
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.
|
@@ -258,12 +258,12 @@ li small {
|
|
|
258
258
|
|
|
259
259
|
.content-dialog {
|
|
260
260
|
position: fixed;
|
|
261
|
-
top:
|
|
262
|
-
right:
|
|
261
|
+
top: 74px;
|
|
262
|
+
right: 16px;
|
|
263
263
|
margin: 0;
|
|
264
|
-
width: min(
|
|
265
|
-
height: min(calc(100svh -
|
|
266
|
-
max-height: calc(100svh -
|
|
264
|
+
width: min(760px, calc(100vw - 32px));
|
|
265
|
+
height: min(calc(100svh - 96px), 920px);
|
|
266
|
+
max-height: calc(100svh - 96px);
|
|
267
267
|
padding: 0;
|
|
268
268
|
border: 1px solid var(--line);
|
|
269
269
|
border-radius: 8px;
|
|
@@ -331,7 +331,7 @@ li small {
|
|
|
331
331
|
|
|
332
332
|
.content-meta {
|
|
333
333
|
display: grid;
|
|
334
|
-
grid-template-columns: repeat(
|
|
334
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
335
335
|
gap: 10px;
|
|
336
336
|
padding: 14px 22px;
|
|
337
337
|
border-bottom: 1px solid var(--line);
|
|
@@ -358,12 +358,16 @@ li small {
|
|
|
358
358
|
|
|
359
359
|
.content-meta-section ul,
|
|
360
360
|
.content-meta-section .tags {
|
|
361
|
-
max-height:
|
|
361
|
+
max-height: 280px;
|
|
362
362
|
overflow: auto;
|
|
363
363
|
align-content: flex-start;
|
|
364
364
|
padding-right: 4px;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
.content-meta-section:last-child {
|
|
368
|
+
grid-column: span 2;
|
|
369
|
+
}
|
|
370
|
+
|
|
367
371
|
.content-dialog .note-content {
|
|
368
372
|
max-height: none;
|
|
369
373
|
min-height: 0;
|
|
@@ -421,10 +425,10 @@ li small {
|
|
|
421
425
|
top: auto;
|
|
422
426
|
right: 12px;
|
|
423
427
|
left: 12px;
|
|
424
|
-
bottom:
|
|
428
|
+
bottom: 28px;
|
|
425
429
|
width: auto;
|
|
426
|
-
height: min(calc(100svh -
|
|
427
|
-
max-height: calc(100svh -
|
|
430
|
+
height: min(calc(100svh - 150px), 760px);
|
|
431
|
+
max-height: calc(100svh - 150px);
|
|
428
432
|
}
|
|
429
433
|
|
|
430
434
|
.metric-chip {
|
|
@@ -61,6 +61,7 @@ const state = {
|
|
|
61
61
|
fetchTimer: null,
|
|
62
62
|
cameraSyncScheduled: false,
|
|
63
63
|
lastDragFetchAt: 0,
|
|
64
|
+
lastWheelAt: 0,
|
|
64
65
|
lastVisibleNodes: 0,
|
|
65
66
|
lastVisibleEdges: 0,
|
|
66
67
|
totals: {
|
|
@@ -303,7 +304,7 @@ const extractContextLinks = (content) => {
|
|
|
303
304
|
const lines = content.split(/\\r?\\n/)
|
|
304
305
|
let start = -1
|
|
305
306
|
for (let index = 0; index < lines.length; index += 1) {
|
|
306
|
-
if (
|
|
307
|
+
if (/^#{1,6}\\s+(?:context\\s+links?|links?\\s+de\\s+contexto)\\b/i.test(lines[index].trim())) {
|
|
307
308
|
start = index + 1
|
|
308
309
|
break
|
|
309
310
|
}
|
|
@@ -313,6 +314,7 @@ const extractContextLinks = (content) => {
|
|
|
313
314
|
}
|
|
314
315
|
|
|
315
316
|
const links = []
|
|
317
|
+
const seenTitles = new Set()
|
|
316
318
|
for (let index = start; index < lines.length; index += 1) {
|
|
317
319
|
const line = lines[index].trim()
|
|
318
320
|
if (!line) {
|
|
@@ -321,17 +323,21 @@ const extractContextLinks = (content) => {
|
|
|
321
323
|
if (/^#{1,6}\\s+/.test(line)) {
|
|
322
324
|
break
|
|
323
325
|
}
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
326
|
-
continue
|
|
327
|
-
}
|
|
328
|
-
const title = match[1].trim()
|
|
329
|
-
if (!title) {
|
|
326
|
+
const matches = Array.from(line.matchAll(/\\[\\[([^\\]]+)\\]\\]/g))
|
|
327
|
+
if (matches.length === 0) {
|
|
330
328
|
continue
|
|
331
329
|
}
|
|
332
330
|
const priorityMatch = line.match(/#(critical|important)\\b|priority:\\s*(high|critical)/i)
|
|
333
331
|
const priority = priorityMatch ? String(priorityMatch[1] || priorityMatch[2] || 'normal').toLowerCase() : 'normal'
|
|
334
|
-
|
|
332
|
+
|
|
333
|
+
for (let matchIndex = 0; matchIndex < matches.length; matchIndex += 1) {
|
|
334
|
+
const title = String(matches[matchIndex][1] || '').trim()
|
|
335
|
+
if (!title || seenTitles.has(title.toLowerCase())) {
|
|
336
|
+
continue
|
|
337
|
+
}
|
|
338
|
+
seenTitles.add(title.toLowerCase())
|
|
339
|
+
links.push({ title, priority })
|
|
340
|
+
}
|
|
335
341
|
}
|
|
336
342
|
return links
|
|
337
343
|
}
|
|
@@ -539,7 +545,9 @@ const scheduleChunkFetch = ({ fit } = { fit: false }) => {
|
|
|
539
545
|
clearTimeout(state.fetchTimer)
|
|
540
546
|
}
|
|
541
547
|
|
|
542
|
-
const
|
|
548
|
+
const now = performance.now()
|
|
549
|
+
const recentlyWheeling = now - state.lastWheelAt < 180
|
|
550
|
+
const delay = fit ? 0 : (state.pointer.down ? 120 : (recentlyWheeling ? 140 : 48))
|
|
543
551
|
state.fetchTimer = setTimeout(() => {
|
|
544
552
|
state.fetchTimer = null
|
|
545
553
|
fetchChunk({ fit }).catch((error) => {
|
|
@@ -630,6 +638,7 @@ const setupInput = () => {
|
|
|
630
638
|
|
|
631
639
|
canvas.addEventListener('wheel', (event) => {
|
|
632
640
|
event.preventDefault()
|
|
641
|
+
state.lastWheelAt = performance.now()
|
|
633
642
|
const pointer = resolvePointer(event)
|
|
634
643
|
const exponent = Math.max(-0.05, Math.min(0.05, -event.deltaY * 0.001))
|
|
635
644
|
zoomAtPoint(pointer.x, pointer.y, Math.exp(exponent))
|
|
@@ -680,13 +689,6 @@ const setupInput = () => {
|
|
|
680
689
|
return
|
|
681
690
|
}
|
|
682
691
|
|
|
683
|
-
if (state.renderWorker && state.workerReady) {
|
|
684
|
-
state.renderWorker.postMessage({
|
|
685
|
-
type: 'pointer',
|
|
686
|
-
x: pointer.x,
|
|
687
|
-
y: pointer.y
|
|
688
|
-
})
|
|
689
|
-
}
|
|
690
692
|
})
|
|
691
693
|
|
|
692
694
|
canvas.addEventListener('pointerup', (event) => {
|
package/package.json
CHANGED