@rkmodules/rules 0.0.146 → 0.0.148

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.
@@ -14,6 +14,7 @@ export declare function getReferences(inputs: VarRef): Ref[];
14
14
  export declare function topSort(fn: GraphedFunction): GraphedFunction;
15
15
  export interface ExecutionContext {
16
16
  scope: Record<string, Record<string, Tree<any>>>;
17
+ calls: Record<string, FunctionCall>;
17
18
  inputs: Record<string, Record<string, Tree<any>>>;
18
19
  params: Record<string, Record<string, any>>;
19
20
  timings: Record<string, number>;
@@ -46,6 +46,8 @@ export type FunctionCall = {
46
46
  label?: string;
47
47
  inputs?: VarRef;
48
48
  params?: VarRef;
49
+ inputDefs?: Record<string, VarDef>;
50
+ outputDefs?: Record<string, VarDef>;
49
51
  };
50
52
  /**
51
53
  * a node that contains other nodes, with input and output definitions and references to other nodes
@@ -7,6 +7,8 @@ interface InputProps {
7
7
  id: string;
8
8
  data: FunctionNode["data"];
9
9
  onClick?: (e: React.MouseEvent) => void;
10
+ onRename?: (name: string, varDef: VarDef) => void;
11
+ onDelete?: (name: string) => void;
10
12
  }
11
- export declare const Input: ({ name, varDef, id, data, onClick }: InputProps) => React.JSX.Element;
13
+ export declare const Input: ({ name, varDef, id, data, onClick, onRename, onDelete, }: InputProps) => React.JSX.Element;
12
14
  export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { NodeProps } from "@xyflow/react";
3
+ import { FunctionNode } from "../types";
4
+ export declare const NamedInput: {
5
+ ({ id, data, selected }: NodeProps<FunctionNode>): React.JSX.Element;
6
+ displayName: string;
7
+ };
@@ -4,6 +4,10 @@ export declare const nodeTypes: {
4
4
  Log: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
5
5
  DynamicInput: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
6
6
  DynamicOutput: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
7
+ NamedInput: {
8
+ ({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>): import("react").JSX.Element;
9
+ displayName: string;
10
+ };
7
11
  Input: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
8
12
  Output: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
9
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.146",
3
+ "version": "0.0.148",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",