quixotic-gol 0.1.6 → 0.1.7

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.ts CHANGED
@@ -10,10 +10,10 @@ import { RefAttributes } from 'react';
10
10
  export declare function createLayoutConfig(overrides?: Partial<LayoutConfig>): LayoutConfig;
11
11
 
12
12
  /**
13
- * Decode a double-stringified JSON string back to an object.
14
- * Reverses the encodeDotString operation.
15
- * @param str - The double-stringified JSON string
16
- * @returns The original object
13
+ * Decode a JSON string that may be single or double-encoded.
14
+ * Tries direct parse first, then falls back to double-parse for double-encoded strings.
15
+ * @param str - The JSON string (either single or double-encoded)
16
+ * @returns The parsed object
17
17
  */
18
18
  export declare function decodeDotString<T>(str: string): T;
19
19
 
@@ -45,8 +45,8 @@ export declare interface EdgeContent {
45
45
  index: number;
46
46
  /** Color of the edge */
47
47
  color: string;
48
- /** Text label on the edge */
49
- text: string;
48
+ /** Text elements on the edge */
49
+ elems: TextElem[];
50
50
  }
51
51
 
52
52
  /**
@@ -219,9 +219,9 @@ export declare interface NodeContent {
219
219
  /** Tags associated with the node */
220
220
  tags: string[];
221
221
  /** Display label for the node */
222
- label: string;
222
+ label: TextElem;
223
223
  /** Text content of the node */
224
- text: string;
224
+ text: TextElem;
225
225
  }
226
226
 
227
227
  export declare interface NodeMapping {
@@ -241,7 +241,7 @@ declare interface NodeMapping_2 {
241
241
  * @param config - Layout configuration
242
242
  * @returns Object containing zoom behavior and SVG references for imperative control
243
243
  */
244
- export declare function renderCustomGraph(container: HTMLDivElement, json: GraphvizJson, _nodeMapping?: Record<string, NodeMapping_2>, maxDepth?: number | null, includeLesserDepths?: boolean, config?: LayoutConfig, useOrthogonalRendering?: boolean, svgFontSize?: number, debug?: boolean, selectedEdgeId?: number | null, onEdgeSelect?: (edgeId: number | null) => void, nodeWidth?: number, nodeHeight?: number, nodeColumnSpacing?: number): {
244
+ export declare function renderCustomGraph(container: HTMLDivElement, json: GraphvizJson, _nodeMapping?: Record<string, NodeMapping_2>, maxDepth?: number | null, includeLesserDepths?: boolean, config?: LayoutConfig, useOrthogonalRendering?: boolean, svgFontSize?: number, debug?: boolean, selectedEdgeId?: number | null, onEdgeSelect?: (edgeIndex: number | null) => void, nodeWidth?: number, nodeHeight?: number, nodeColumnSpacing?: number): {
245
245
  zoomBehavior: any;
246
246
  svgElement: SVGSVGElement;
247
247
  gElement: SVGGElement;
@@ -254,6 +254,16 @@ export declare function renderCustomGraph(container: HTMLDivElement, json: Graph
254
254
  */
255
255
  export declare function setupZoomPan(container: HTMLDivElement): void;
256
256
 
257
+ /**
258
+ * Text element with optional color
259
+ */
260
+ export declare interface TextElem {
261
+ /** Text content */
262
+ text: string;
263
+ /** Optional color for the text */
264
+ color?: string;
265
+ }
266
+
257
267
  export declare function useGraphvizWorker(): UseGraphvizWorkerResult;
258
268
 
259
269
  declare interface UseGraphvizWorkerResult {