diff --git a/src/components/KindRenderer.tsx b/src/components/KindRenderer.tsx
index 5ede7a4..f121b0d 100644
--- a/src/components/KindRenderer.tsx
+++ b/src/components/KindRenderer.tsx
@@ -1,6 +1,7 @@
import { getKindInfo } from "@/constants/kinds";
+import { kindRenderers } from "./nostr/kinds";
import { NIPBadge } from "./NIPBadge";
-import { Copy, CopyCheck } from "lucide-react";
+import { Copy, CopyCheck, Sparkles } from "lucide-react";
import { Button } from "./ui/button";
import { useCopy } from "@/hooks/useCopy";
import {
@@ -95,6 +96,17 @@ export default function KindRenderer({ kind }: { kind: number }) {
>
)}
+
Grimoire Support
+
+ {kind in kindRenderers ? (
+ <>
+
+ Rich rendering
+ >
+ ) : (
+ Raw content only
+ )}
+
{/* Schema Information */}
diff --git a/src/components/KindsViewer.tsx b/src/components/KindsViewer.tsx
index 41fcea2..53c0048 100644
--- a/src/components/KindsViewer.tsx
+++ b/src/components/KindsViewer.tsx
@@ -1,14 +1,18 @@
import { useState, useRef, useEffect } from "react";
-import { Search, X } from "lucide-react";
-import { getKindInfo } from "@/constants/kinds";
+import { Search, X, Sparkles } from "lucide-react";
+import { EVENT_KINDS, getKindInfo } from "@/constants/kinds";
import { kindRenderers } from "./nostr/kinds";
import { NIPBadge } from "./NIPBadge";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { CenteredContent } from "./ui/CenteredContent";
+import { useAddWindow } from "@/core/state";
-// Dynamically derive supported kinds from renderer registry
-const SUPPORTED_KINDS = Object.keys(kindRenderers).map(Number);
+// All known event kinds from the registry
+const ALL_KINDS = Object.keys(EVENT_KINDS).map(Number);
+
+// Kinds with rich rendering support
+const RICH_KINDS = new Set(Object.keys(kindRenderers).map(Number));
/**
* KindsViewer - System introspection command
@@ -17,6 +21,7 @@ const SUPPORTED_KINDS = Object.keys(kindRenderers).map(Number);
export default function KindsViewer() {
const [search, setSearch] = useState("");
const searchInputRef = useRef(null);
+ const addWindow = useAddWindow();
// Autofocus on mount
useEffect(() => {
@@ -24,7 +29,7 @@ export default function KindsViewer() {
}, []);
// Sort kinds in ascending order
- const sortedKinds = [...SUPPORTED_KINDS].sort((a, b) => a - b);
+ const sortedKinds = [...ALL_KINDS].sort((a, b) => a - b);
// Filter kinds by search term (matches kind number or name)
const filteredKinds = search
@@ -61,11 +66,12 @@ export default function KindsViewer() {
{search
? `Showing ${filteredKinds.length} of ${sortedKinds.length} Kinds`
- : `Supported Event Kinds (${sortedKinds.length})`}
+ : `Known Event Kinds (${sortedKinds.length})`}
- Event kinds with rich rendering support in Grimoire. Default kinds
- display raw content only.
+ All known Nostr event kinds. Kinds marked with{" "}
+ have rich
+ rendering support in Grimoire.
{/* Search Input */}
@@ -101,6 +107,8 @@ export default function KindsViewer() {
const kindInfo = getKindInfo(kind);
const Icon = kindInfo?.icon;
+ const hasRichRenderer = RICH_KINDS.has(kind);
+
return (
-
+
+ addWindow("kind", { number: String(kind) })
+ }
+ >
{kind}
{kindInfo?.name || `Kind ${kind}`}
-
+ {hasRichRenderer && (
+
+ )}
+
{kindInfo?.description || "No description available"}