@rkmodules/rules 0.0.142 → 0.0.143

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.
@@ -5,4 +5,5 @@ export declare function hasReference(value: any): value is string;
5
5
  export declare function parseReference(ref: string): string;
6
6
  export declare function uid(): string;
7
7
  export declare function getValue(obj: Record<string, any>, path: string): any;
8
+ export declare function safeName(name: string): string;
8
9
  export declare function interpolate(inputs: VarRef, scope: Record<string, Record<string, Tree<any>>>): Record<string, Tree<any>>;
@@ -11,6 +11,15 @@ export interface FlowOptions {
11
11
  onDataChange?: (id: string) => (newData: Partial<FunctionNode["data"]>) => void;
12
12
  onIOChange?: (callback: (fn: GraphedFunction) => Partial<GraphedFunction>) => void;
13
13
  }
14
+ /**
15
+ * gets the source and target node and field from an edge by de-referencing the handles
16
+ * the handles are in the format `${nodeId}-${fieldName}`
17
+ * returns an object with the source node id, target node id, source field name and target field name
18
+ */
19
+ export declare function deRefEdgeHandle(handle: string): {
20
+ node: string;
21
+ field: string;
22
+ };
14
23
  /**
15
24
  * creates a flow state and provides handlers to update nodes and edges
16
25
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.142",
3
+ "version": "0.0.143",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",