@riebeckite/graph 0.0.40 → 0.0.42

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/dist/client.js CHANGED
@@ -442,14 +442,15 @@ function buildVisibleGraph(input) {
442
442
  for (const id of candidates) {
443
443
  const node = nodeById.get(id);
444
444
  if (!node) continue;
445
+ const isCenter = mode === "local" && id === centerId;
445
446
  if (node.kind === "tag" && !settings.showTags) continue;
446
447
  if (node.kind === "attachment" && !settings.showAttachments) continue;
447
448
  if (node.kind === "unresolved" && settings.existingOnly) continue;
448
- if (node.kind === "note" && !settings.showOrphans && (fullDegree.get(node.id) ?? 0) === 0) {
449
+ if (node.kind === "note" && !settings.showOrphans && !isCenter && (fullDegree.get(node.id) ?? 0) === 0) {
449
450
  continue;
450
451
  }
451
452
  if (settings.search.trim().length > 0 && !matchesGraphQuery(node, search)) {
452
- if (mode !== "local" || id !== centerId) continue;
453
+ if (!isCenter) continue;
453
454
  }
454
455
  visibleNodes.push({
455
456
  ...node,
package/dist/index.js CHANGED
@@ -797,14 +797,15 @@ function buildVisibleGraph(input) {
797
797
  for (const id of candidates) {
798
798
  const node = nodeById.get(id);
799
799
  if (!node) continue;
800
+ const isCenter = mode === "local" && id === centerId;
800
801
  if (node.kind === "tag" && !settings.showTags) continue;
801
802
  if (node.kind === "attachment" && !settings.showAttachments) continue;
802
803
  if (node.kind === "unresolved" && settings.existingOnly) continue;
803
- if (node.kind === "note" && !settings.showOrphans && (fullDegree.get(node.id) ?? 0) === 0) {
804
+ if (node.kind === "note" && !settings.showOrphans && !isCenter && (fullDegree.get(node.id) ?? 0) === 0) {
804
805
  continue;
805
806
  }
806
807
  if (settings.search.trim().length > 0 && !matchesGraphQuery(node, search)) {
807
- if (mode !== "local" || id !== centerId) continue;
808
+ if (!isCenter) continue;
808
809
  }
809
810
  visibleNodes.push({
810
811
  ...node,
package/dist/ui.js CHANGED
@@ -602,14 +602,15 @@ function buildVisibleGraph(input) {
602
602
  for (const id of candidates) {
603
603
  const node = nodeById.get(id);
604
604
  if (!node) continue;
605
+ const isCenter = mode === "local" && id === centerId;
605
606
  if (node.kind === "tag" && !settings.showTags) continue;
606
607
  if (node.kind === "attachment" && !settings.showAttachments) continue;
607
608
  if (node.kind === "unresolved" && settings.existingOnly) continue;
608
- if (node.kind === "note" && !settings.showOrphans && (fullDegree.get(node.id) ?? 0) === 0) {
609
+ if (node.kind === "note" && !settings.showOrphans && !isCenter && (fullDegree.get(node.id) ?? 0) === 0) {
609
610
  continue;
610
611
  }
611
612
  if (settings.search.trim().length > 0 && !matchesGraphQuery(node, search)) {
612
- if (mode !== "local" || id !== centerId) continue;
613
+ if (!isCenter) continue;
613
614
  }
614
615
  visibleNodes.push({
615
616
  ...node,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/graph",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",