@emblemvault/identity-mesh 1.0.0 → 2.0.0

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/index.d.mts CHANGED
@@ -116,6 +116,55 @@ interface IdentityMeshProps {
116
116
  showIdentityCount?: boolean;
117
117
  }
118
118
 
119
+ /**
120
+ * Props for the IdentityMeshRenderer component
121
+ */
122
+ interface IdentityMeshRendererProps {
123
+ /** Array of links from API */
124
+ links: DisplayLink[];
125
+ /** Visitor details keyed by visitor ID */
126
+ visitorDetails: Record<string, VisitorDetails>;
127
+ /** Currently selected visitor ID */
128
+ selectedVisitor?: string | null;
129
+ /** Callback when a visitor is selected */
130
+ onSelectVisitor?: (id: string | null) => void;
131
+ /** Custom node type configurations */
132
+ nodeTypes?: Record<string, NodeType>;
133
+ /** Height of the visualization (default: 600) */
134
+ height?: number;
135
+ /** Show the legend (default: true) */
136
+ showLegend?: boolean;
137
+ /** Show identity count badge (default: true) */
138
+ showIdentityCount?: boolean;
139
+ }
140
+ /**
141
+ * IdentityMeshRenderer - Pure visualization component for identity mesh
142
+ *
143
+ * This is a data-agnostic component that renders the mesh visualization.
144
+ * Use with @emblemvault/embeddable for API data fetching, or pass data directly.
145
+ *
146
+ * @example
147
+ * ```tsx
148
+ * // With @emblemvault/embeddable
149
+ * import { Embeddable } from '@emblemvault/embeddable';
150
+ * import { IdentityMeshRenderer } from '@emblemvault/identity-mesh';
151
+ *
152
+ * <Embeddable
153
+ * apiUrl="https://api.example.com/mesh"
154
+ * params={{ vaultId: 'vault_123' }}
155
+ * >
156
+ * <IdentityMeshRenderer />
157
+ * </Embeddable>
158
+ *
159
+ * // Or with direct data
160
+ * <IdentityMeshRenderer
161
+ * links={myLinks}
162
+ * visitorDetails={myDetails}
163
+ * />
164
+ * ```
165
+ */
166
+ declare function IdentityMeshRenderer({ links, visitorDetails, selectedVisitor: externalSelectedVisitor, onSelectVisitor: externalOnSelectVisitor, nodeTypes: customNodeTypes, height, showLegend, showIdentityCount, }: IdentityMeshRendererProps): react_jsx_runtime.JSX.Element;
167
+
119
168
  /**
120
169
  * IdentityMesh - Embeddable identity visualization component
121
170
  *
@@ -173,4 +222,4 @@ declare function getBrowserIcon(browser?: string): string;
173
222
  */
174
223
  declare function renderNodeShape(nodeTypes: Record<string, NodeType>, type: string, x: number, y: number, size: number, isHovered: boolean, isSelected: boolean): JSX.Element;
175
224
 
176
- export { type DisplayLink, type IdentityLink, IdentityMesh, type IdentityMeshProps, type MeshApiResponse, type MeshTheme, type NodeType, type UseMeshDataOptions, type UseMeshDataResult, type VisitorDetails, defaultNodeTypes, getBrowserIcon, getCountryFlag, getDeviceIcon, renderNodeShape, useMeshData };
225
+ export { type DisplayLink, type IdentityLink, IdentityMesh, type IdentityMeshProps, IdentityMeshRenderer, type IdentityMeshRendererProps, type MeshApiResponse, type MeshTheme, type NodeType, type UseMeshDataOptions, type UseMeshDataResult, type VisitorDetails, defaultNodeTypes, getBrowserIcon, getCountryFlag, getDeviceIcon, renderNodeShape, useMeshData };
package/dist/index.d.ts CHANGED
@@ -116,6 +116,55 @@ interface IdentityMeshProps {
116
116
  showIdentityCount?: boolean;
117
117
  }
118
118
 
119
+ /**
120
+ * Props for the IdentityMeshRenderer component
121
+ */
122
+ interface IdentityMeshRendererProps {
123
+ /** Array of links from API */
124
+ links: DisplayLink[];
125
+ /** Visitor details keyed by visitor ID */
126
+ visitorDetails: Record<string, VisitorDetails>;
127
+ /** Currently selected visitor ID */
128
+ selectedVisitor?: string | null;
129
+ /** Callback when a visitor is selected */
130
+ onSelectVisitor?: (id: string | null) => void;
131
+ /** Custom node type configurations */
132
+ nodeTypes?: Record<string, NodeType>;
133
+ /** Height of the visualization (default: 600) */
134
+ height?: number;
135
+ /** Show the legend (default: true) */
136
+ showLegend?: boolean;
137
+ /** Show identity count badge (default: true) */
138
+ showIdentityCount?: boolean;
139
+ }
140
+ /**
141
+ * IdentityMeshRenderer - Pure visualization component for identity mesh
142
+ *
143
+ * This is a data-agnostic component that renders the mesh visualization.
144
+ * Use with @emblemvault/embeddable for API data fetching, or pass data directly.
145
+ *
146
+ * @example
147
+ * ```tsx
148
+ * // With @emblemvault/embeddable
149
+ * import { Embeddable } from '@emblemvault/embeddable';
150
+ * import { IdentityMeshRenderer } from '@emblemvault/identity-mesh';
151
+ *
152
+ * <Embeddable
153
+ * apiUrl="https://api.example.com/mesh"
154
+ * params={{ vaultId: 'vault_123' }}
155
+ * >
156
+ * <IdentityMeshRenderer />
157
+ * </Embeddable>
158
+ *
159
+ * // Or with direct data
160
+ * <IdentityMeshRenderer
161
+ * links={myLinks}
162
+ * visitorDetails={myDetails}
163
+ * />
164
+ * ```
165
+ */
166
+ declare function IdentityMeshRenderer({ links, visitorDetails, selectedVisitor: externalSelectedVisitor, onSelectVisitor: externalOnSelectVisitor, nodeTypes: customNodeTypes, height, showLegend, showIdentityCount, }: IdentityMeshRendererProps): react_jsx_runtime.JSX.Element;
167
+
119
168
  /**
120
169
  * IdentityMesh - Embeddable identity visualization component
121
170
  *
@@ -173,4 +222,4 @@ declare function getBrowserIcon(browser?: string): string;
173
222
  */
174
223
  declare function renderNodeShape(nodeTypes: Record<string, NodeType>, type: string, x: number, y: number, size: number, isHovered: boolean, isSelected: boolean): JSX.Element;
175
224
 
176
- export { type DisplayLink, type IdentityLink, IdentityMesh, type IdentityMeshProps, type MeshApiResponse, type MeshTheme, type NodeType, type UseMeshDataOptions, type UseMeshDataResult, type VisitorDetails, defaultNodeTypes, getBrowserIcon, getCountryFlag, getDeviceIcon, renderNodeShape, useMeshData };
225
+ export { type DisplayLink, type IdentityLink, IdentityMesh, type IdentityMeshProps, IdentityMeshRenderer, type IdentityMeshRendererProps, type MeshApiResponse, type MeshTheme, type NodeType, type UseMeshDataOptions, type UseMeshDataResult, type VisitorDetails, defaultNodeTypes, getBrowserIcon, getCountryFlag, getDeviceIcon, renderNodeShape, useMeshData };