Point inspector at Norn viewer
This commit is contained in:
parent
c13a564c60
commit
d905639ecf
6 changed files with 27 additions and 30 deletions
|
|
@ -63,7 +63,7 @@ generated Huginn executable must use that package version in its filename.
|
|||
|
||||
Huginn is read-only. Drop a `.cc`, `.msgpack`, or `.mpack` file onto the window to
|
||||
inspect the snapshot header, schema catalog, records, decoded MessagePack
|
||||
payload previews, and an EpiphanyGraph cloud of the file's structured payload data
|
||||
payload previews, and an Norn graph cloud of the file's structured payload data
|
||||
without registering application schemas.
|
||||
|
||||
Huginn's background field uses the graph node AABB as its single world-space
|
||||
|
|
|
|||
|
|
@ -1002,8 +1002,8 @@ function attachNodeEnvelopeListener(
|
|||
}
|
||||
device.queue.writeBuffer(buffer, 0, state.data);
|
||||
};
|
||||
target.addEventListener("epiphanygraph-node-envelopes", onEnvelopes as EventListener);
|
||||
return () => target.removeEventListener("epiphanygraph-node-envelopes", onEnvelopes as EventListener);
|
||||
target.addEventListener("norn-node-envelopes", onEnvelopes as EventListener);
|
||||
return () => target.removeEventListener("norn-node-envelopes", onEnvelopes as EventListener);
|
||||
}
|
||||
|
||||
function screenEnvelopeToArtworkUv(
|
||||
|
|
@ -1047,8 +1047,8 @@ function attachViewportTransformListener(
|
|||
};
|
||||
state.received = true;
|
||||
};
|
||||
target.addEventListener("epiphanygraph-viewport-transform", onTransform as EventListener);
|
||||
return () => target.removeEventListener("epiphanygraph-viewport-transform", onTransform as EventListener);
|
||||
target.addEventListener("norn-viewport-transform", onTransform as EventListener);
|
||||
return () => target.removeEventListener("norn-viewport-transform", onTransform as EventListener);
|
||||
}
|
||||
|
||||
function isGraphBounds(value: unknown): value is GraphViewportTransform["bounds"] {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { EpiphanyGraphViewer, type EpiphanyGraphEdge, type EpiphanyGraphNode, type EpiphanyGraphsState, type ViewerSelection } from "@epiphanygraph/epiphany-graph-viewer";
|
||||
import { NornViewer, type NornGraphEdge, type NornGraphNode, type NornGraphsState, type ViewerSelection } from "@gamecult/norn-viewer";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { Component, useMemo, useState, type DragEvent, type ReactNode } from "react";
|
||||
|
||||
|
|
@ -10,14 +10,14 @@ type Selection = {
|
|||
record: number;
|
||||
};
|
||||
|
||||
type NodeArticle = NonNullable<Parameters<typeof EpiphanyGraphViewer>[0]["nodeArticle"]>;
|
||||
type NodeArticle = NonNullable<Parameters<typeof NornViewer>[0]["nodeArticle"]>;
|
||||
|
||||
type RawSelection =
|
||||
| { kind: "record"; index: number }
|
||||
| { kind: "value"; recordIndex: number; path: string; value: unknown };
|
||||
|
||||
type GraphProjection = {
|
||||
state: EpiphanyGraphsState;
|
||||
state: NornGraphsState;
|
||||
recordNodeIds: string[];
|
||||
nodeSelections: Map<string, RawSelection>;
|
||||
edgeSelections: Map<string, RawSelection>;
|
||||
|
|
@ -342,7 +342,7 @@ function InspectionView({
|
|||
return (
|
||||
<div className="inspector-stage">
|
||||
<section className="graph-panel">
|
||||
<EpiphanyGraphViewer
|
||||
<NornViewer
|
||||
className="huginn-graph-shell"
|
||||
state={graphProjection.state}
|
||||
initialGraph="dataflow"
|
||||
|
|
@ -540,13 +540,13 @@ function Facts({ rows }: { rows: Array<[string, string]> }) {
|
|||
}
|
||||
|
||||
function buildGraphProjection(inspection: CultCacheInspection): GraphProjection {
|
||||
const dataflowNodes: EpiphanyGraphNode[] = [];
|
||||
const dataflowEdges: EpiphanyGraphEdge[] = [];
|
||||
const dataflowNodes: NornGraphNode[] = [];
|
||||
const dataflowEdges: NornGraphEdge[] = [];
|
||||
const recordNodeIds: string[] = [];
|
||||
const nodeSelections = new Map<string, RawSelection>();
|
||||
const edgeSelections = new Map<string, RawSelection>();
|
||||
let collapsedPayloadValues = 0;
|
||||
const architectureNodes: EpiphanyGraphNode[] = [
|
||||
const architectureNodes: NornGraphNode[] = [
|
||||
{
|
||||
id: "store",
|
||||
title: ".cc Store",
|
||||
|
|
@ -567,7 +567,7 @@ function buildGraphProjection(inspection: CultCacheInspection): GraphProjection
|
|||
status: `${inspection.records.length} records`,
|
||||
},
|
||||
];
|
||||
const architectureEdges: EpiphanyGraphEdge[] = [
|
||||
const architectureEdges: NornGraphEdge[] = [
|
||||
{
|
||||
id: "store-catalog",
|
||||
source_id: "store",
|
||||
|
|
@ -659,8 +659,8 @@ function appendPayloadRegions({
|
|||
depth,
|
||||
budget,
|
||||
}: {
|
||||
nodes: EpiphanyGraphNode[];
|
||||
edges: EpiphanyGraphEdge[];
|
||||
nodes: NornGraphNode[];
|
||||
edges: NornGraphEdge[];
|
||||
nodeSelections: Map<string, RawSelection>;
|
||||
edgeSelections: Map<string, RawSelection>;
|
||||
recordIndex: number;
|
||||
|
|
@ -774,7 +774,7 @@ function countPayloadDescendants(value: unknown, limit = 20_000): number {
|
|||
return count;
|
||||
}
|
||||
|
||||
function regionNode(id: string, title: string, value: unknown, path: string): EpiphanyGraphNode {
|
||||
function regionNode(id: string, title: string, value: unknown, path: string): NornGraphNode {
|
||||
return {
|
||||
id,
|
||||
title,
|
||||
|
|
@ -788,7 +788,7 @@ function recordNodeId(record: InspectedRecord, index: number): string {
|
|||
return nodeId("record", `${record.schemaId}:${record.key}:${index}`);
|
||||
}
|
||||
|
||||
function valueEdge(sourceId: string, targetId: string, kind: string, label: string): EpiphanyGraphEdge {
|
||||
function valueEdge(sourceId: string, targetId: string, kind: string, label: string): NornGraphEdge {
|
||||
return {
|
||||
id: edgeId(sourceId, targetId, kind),
|
||||
source_id: sourceId,
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ code {
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
.epiphany-graph-overlay-panel {
|
||||
.norn-overlay-panel {
|
||||
background: rgba(4, 11, 16, 0.72) !important;
|
||||
border-color: rgba(51, 230, 243, 0.22) !important;
|
||||
box-shadow: 0 0 28px rgba(51, 230, 243, 0.08), 0 18px 48px rgba(0, 0, 0, 0.28) !important;
|
||||
|
|
@ -236,7 +236,7 @@ code {
|
|||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.huginn-graph-shell .epiphany-graph-overlay-panel,
|
||||
.huginn-graph-shell .norn-overlay-panel,
|
||||
.floating-panel {
|
||||
opacity: 0.28;
|
||||
transition:
|
||||
|
|
@ -246,8 +246,8 @@ code {
|
|||
background-color 160ms ease;
|
||||
}
|
||||
|
||||
.huginn-graph-shell .epiphany-graph-overlay-panel:hover,
|
||||
.huginn-graph-shell .epiphany-graph-overlay-panel:focus-within,
|
||||
.huginn-graph-shell .norn-overlay-panel:hover,
|
||||
.huginn-graph-shell .norn-overlay-panel:focus-within,
|
||||
.floating-panel:hover,
|
||||
.floating-panel:focus-within,
|
||||
.floating-panel.is-primary {
|
||||
|
|
|
|||
13
package-lock.json
generated
13
package-lock.json
generated
|
|
@ -13,7 +13,7 @@
|
|||
"zod": "^3.25.76"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@epiphanygraph/epiphany-graph-viewer": "file:../EpiphanyGraph/web/epiphany-graph-viewer",
|
||||
"@gamecult/norn-viewer": "file:../Norn/web/norn-viewer",
|
||||
"@types/node": "^24.0.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
|
|
@ -29,13 +29,10 @@
|
|||
"wait-on": "^9.0.10"
|
||||
}
|
||||
},
|
||||
"../EpiphanyGraph/web/epiphany-graph-viewer": {
|
||||
"name": "@epiphanygraph/epiphany-graph-viewer",
|
||||
"../Norn/web/norn-viewer": {
|
||||
"name": "@gamecult/norn-viewer",
|
||||
"version": "0.1.0",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"elkjs": "^0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
|
|
@ -404,8 +401,8 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@epiphanygraph/epiphany-graph-viewer": {
|
||||
"resolved": "../EpiphanyGraph/web/epiphany-graph-viewer",
|
||||
"node_modules/@gamecult/norn-viewer": {
|
||||
"resolved": "../Norn/web/norn-viewer",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@hapi/address": {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
"zod": "^3.25.76"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@epiphanygraph/epiphany-graph-viewer": "file:../EpiphanyGraph/web/epiphany-graph-viewer",
|
||||
"@gamecult/norn-viewer": "file:../Norn/web/norn-viewer",
|
||||
"@types/node": "^24.0.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
|
|
|
|||
Loading…
Reference in a new issue