From d905639ecfb8c18c119121e45d2475e7f0a1f0db Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 25 May 2026 18:19:03 +0100 Subject: [PATCH] Point inspector at Norn viewer --- README.md | 2 +- inspector/src/HuginnFieldCanvas.tsx | 8 ++++---- inspector/src/main.tsx | 24 ++++++++++++------------ inspector/src/styles.css | 8 ++++---- package-lock.json | 13 +++++-------- package.json | 2 +- 6 files changed, 27 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index f9aed6e..898b97d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/inspector/src/HuginnFieldCanvas.tsx b/inspector/src/HuginnFieldCanvas.tsx index 08a3881..2fd1247 100644 --- a/inspector/src/HuginnFieldCanvas.tsx +++ b/inspector/src/HuginnFieldCanvas.tsx @@ -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"] { diff --git a/inspector/src/main.tsx b/inspector/src/main.tsx index a728261..9049e94 100644 --- a/inspector/src/main.tsx +++ b/inspector/src/main.tsx @@ -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[0]["nodeArticle"]>; +type NodeArticle = NonNullable[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; edgeSelections: Map; @@ -342,7 +342,7 @@ function InspectionView({ return (
- }) { } function buildGraphProjection(inspection: CultCacheInspection): GraphProjection { - const dataflowNodes: EpiphanyGraphNode[] = []; - const dataflowEdges: EpiphanyGraphEdge[] = []; + const dataflowNodes: NornGraphNode[] = []; + const dataflowEdges: NornGraphEdge[] = []; const recordNodeIds: string[] = []; const nodeSelections = new Map(); const edgeSelections = new Map(); 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; edgeSelections: Map; 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, diff --git a/inspector/src/styles.css b/inspector/src/styles.css index 884bfe7..d6893b6 100644 --- a/inspector/src/styles.css +++ b/inspector/src/styles.css @@ -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 { diff --git a/package-lock.json b/package-lock.json index 74225d3..b9b4d49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index d4ed7dd..036e0a0 100644 --- a/package.json +++ b/package.json @@ -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",