quixotic-gol 0.1.1 → 0.1.4

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
@@ -9,6 +9,14 @@ import { RefAttributes } from 'react';
9
9
  */
10
10
  export declare function createLayoutConfig(overrides?: Partial<LayoutConfig>): LayoutConfig;
11
11
 
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
17
+ */
18
+ export declare function decodeDotString<T>(str: string): T;
19
+
12
20
  /**
13
21
  * Default layout configuration with sensible values.
14
22
  */
@@ -29,21 +37,25 @@ declare interface DrawOp {
29
37
  style?: string;
30
38
  }
31
39
 
32
- export declare interface Example {
33
- title: string;
34
- chain: string;
35
- tx: string;
36
- nodeMapping: Record<string, NodeMapping>;
37
- dot: string;
40
+ /**
41
+ * Content structure for graph edges
42
+ */
43
+ export declare interface EdgeContent {
44
+ /** Unique identifier for the edge */
45
+ id: string;
46
+ /** Color of the edge */
47
+ color: string;
48
+ /** Text label on the edge */
49
+ text: string;
38
50
  }
39
51
 
40
- export declare interface ExampleItem {
41
- filename: string;
42
- title: string;
43
- chain: string;
44
- tx: string;
45
- edgeCount: number;
46
- }
52
+ /**
53
+ * Encode an object by double JSON.stringify for use in DOT string labels.
54
+ * This escapes special characters that would break DOT syntax.
55
+ * @param obj - The object to encode
56
+ * @returns Double-stringified JSON string
57
+ */
58
+ export declare function encodeDotString<T>(obj: T): string;
47
59
 
48
60
  export declare interface GraphvizJson {
49
61
  name: string;
@@ -200,6 +212,18 @@ export declare interface LayoutConfig {
200
212
  nearlyAlignedThreshold: number;
201
213
  }
202
214
 
215
+ /**
216
+ * Content structure for graph nodes
217
+ */
218
+ export declare interface NodeContent {
219
+ /** Tags associated with the node */
220
+ tags: string[];
221
+ /** Display label for the node */
222
+ label: string;
223
+ /** Text content of the node */
224
+ text: string;
225
+ }
226
+
203
227
  export declare interface NodeMapping {
204
228
  sourceNodeId: string;
205
229
  targetNodeId: string;