@rkmodules/rules 0.0.26 → 0.0.28

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.
@@ -1,5 +1,5 @@
1
1
  import { Tree } from "../DataTree";
2
- import { GraphedFunction, NormalizedVarDef, PrimitiveFunction, AnyFunction, VarDef, VarRef, FunctionCall } from "./types";
2
+ import { GraphedFunction, NormalizedVarDef, PrimitiveFunction, AnyFunction, VarDef, VarRef, RecOfTrees, FunctionCall } from "./types";
3
3
  export * from "./types";
4
4
  export * from "./util";
5
5
  export interface Ref {
@@ -24,6 +24,7 @@ interface EngineEvent {
24
24
  outputs?: Record<string, Tree<any>>;
25
25
  executionId: string;
26
26
  context: ExecutionContext;
27
+ result?: RecOfTrees;
27
28
  startTime: number;
28
29
  endTime?: number;
29
30
  duration?: number;
@@ -1,7 +1,12 @@
1
1
  import React from "react";
2
- export declare const Input: ({ name, varDef, id, data }: {
3
- name: any;
4
- varDef: any;
5
- id: any;
6
- data: any;
7
- }) => React.JSX.Element;
2
+ import { VarDef } from "../../Engine";
3
+ import { FunctionNode } from "../types";
4
+ interface InputProps {
5
+ name: string;
6
+ varDef: VarDef;
7
+ id: string;
8
+ data: FunctionNode["data"];
9
+ onClick?: (e: React.MouseEvent) => void;
10
+ }
11
+ export declare const Input: ({ name, varDef, id, data, onClick }: InputProps) => React.JSX.Element;
12
+ export {};
@@ -1,6 +1,11 @@
1
1
  import React from "react";
2
- export declare const Output: ({ name, varDef, id }: {
3
- name: any;
4
- varDef: any;
5
- id: any;
6
- }) => React.JSX.Element;
2
+ import { VarDef } from "../../Engine";
3
+ interface OutputProps {
4
+ name: string;
5
+ varDef: VarDef;
6
+ id: string;
7
+ onClick?: (e: React.MouseEvent) => void;
8
+ focus?: boolean;
9
+ }
10
+ export declare const Output: ({ name, varDef, id, onClick, focus }: OutputProps) => React.JSX.Element;
11
+ export {};
@@ -1,7 +1,12 @@
1
1
  import React from "react";
2
- export declare const Param: ({ id, name, varDef, data }: {
3
- id: any;
4
- name: any;
5
- varDef: any;
6
- data: any;
7
- }) => React.JSX.Element;
2
+ import { VarDef } from "../../Engine";
3
+ import { FunctionNode } from "../types";
4
+ interface ParamProps {
5
+ id: string;
6
+ name: string;
7
+ varDef: VarDef;
8
+ data: FunctionNode["data"];
9
+ onClick?: (e: React.MouseEvent) => void;
10
+ }
11
+ export declare const Param: ({ id, name, varDef, data, onClick }: ParamProps) => React.JSX.Element;
12
+ export {};
@@ -1,4 +1,10 @@
1
1
  import React from "react";
2
2
  import { NodeProps } from "@xyflow/react";
3
3
  import { FunctionNode } from "../types";
4
+ import { Tree } from "../../DataTree";
5
+ interface TreeViewProps {
6
+ value: Tree<any> | null;
7
+ }
8
+ export declare function TreeView({ value }: TreeViewProps): React.JSX.Element;
4
9
  export declare const Log: React.MemoExoticComponent<({ id, data, selected }: NodeProps<FunctionNode>) => React.JSX.Element>;
10
+ export {};
@@ -2,6 +2,8 @@ import { Node } from "@xyflow/react";
2
2
  import { PrimitiveFunction, VarDef, VarRef } from "../Engine";
3
3
  export type FunctionNode = Node<{
4
4
  name: string;
5
+ label: string;
6
+ description?: string;
5
7
  inputs?: VarRef;
6
8
  params?: VarRef;
7
9
  inputDefs: Record<string, VarDef>;
@@ -0,0 +1,2 @@
1
+ import { PrimitiveFunction } from "../../Engine/types";
2
+ export declare const mergeGroup: PrimitiveFunction;
@@ -0,0 +1,2 @@
1
+ import { PrimitiveFunction } from "../../Engine/types";
2
+ export declare const splitGroup: PrimitiveFunction;
@@ -1,2 +1,2 @@
1
1
  import { PrimitiveFunction } from "../../Engine/types";
2
- export declare const trimTree: PrimitiveFunction;
2
+ export declare const groupAnd: PrimitiveFunction;
@@ -1,2 +1,2 @@
1
1
  import { PrimitiveFunction } from "../../Engine/types";
2
- export declare const graftTree: PrimitiveFunction;
2
+ export declare const groupOr: PrimitiveFunction;
@@ -0,0 +1,3 @@
1
+ import { PrimitiveFunction } from "../../Engine";
2
+ declare const primitives: Record<string, PrimitiveFunction>;
3
+ export default primitives;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "main": "dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [