@rkmodules/rules 0.0.165 → 0.0.166

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.
@@ -39,7 +39,19 @@ export declare function isEmptyTree(value: any): boolean;
39
39
  * use isEmptyTree to check if there are no groups at all
40
40
  */
41
41
  export declare function isEmpty(value: any): boolean;
42
+ /**
43
+ * checks whether the tree has only one branch with one item
44
+ */
42
45
  export declare function isSingleTon(value: Tree<any>): boolean;
46
+ /**
47
+ * checks whether the tree has only one branch with multiple items
48
+ * @param value
49
+ */
50
+ export declare function isList(value: Tree<any>): boolean;
51
+ /**
52
+ * checks whether the tree has multiple branches
53
+ */
54
+ export declare function isMultiBranch(value: Tree<any>): boolean;
43
55
  /**
44
56
  * turns a value or array of values into a tree
45
57
  * - a single value becomes a tree with one branch "0" and one item
@@ -41,6 +41,7 @@ export declare class Engine {
41
41
  private listeners;
42
42
  private cache;
43
43
  private cacheMiss;
44
+ private context;
44
45
  env: Record<string, any>;
45
46
  constructor(morePrimitives?: Record<string, PrimitiveFunction>, env?: Record<string, any>);
46
47
  private checkCache;
@@ -53,6 +54,7 @@ export declare class Engine {
53
54
  */
54
55
  build(node: AnyFunction, id?: string): PrimitiveFunction;
55
56
  mount(node: PrimitiveFunction): void | (() => void) | undefined;
57
+ getContext(): ExecutionContext | null;
56
58
  subscribe(eventName: "result", listener: (event: EngineEndEvent) => void): () => void;
57
59
  subscribe(eventName: "functionCall", listener: (event: EngineStartEvent) => void): () => void;
58
60
  subscribe(eventName: "functionResult", listener: (event: EngineEndEvent) => void): () => void;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { EdgeProps } from "@xyflow/react";
3
+ export declare const Default: React.MemoExoticComponent<({ ...props }: EdgeProps) => React.JSX.Element>;
@@ -0,0 +1,3 @@
1
+ export declare const edgeTypes: {
2
+ default: import("react").MemoExoticComponent<({ ...props }: import("@xyflow/react").EdgeProps) => import("react").JSX.Element>;
3
+ };
@@ -1,4 +1,5 @@
1
1
  export declare const nodeTypes: {
2
+ default: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
2
3
  Default: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
3
4
  Calc: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
4
5
  Log: import("react").MemoExoticComponent<({ id, data, selected }: import("@xyflow/react").NodeProps<import("..").FunctionNode>) => import("react").JSX.Element>;
@@ -27,6 +27,7 @@ interface FlowProps {
27
27
  customControls?: Record<string, React.ComponentType<WidgetProps<any>>>;
28
28
  customNodes?: Record<string, React.ComponentType<NodeProps<FunctionNode>>>;
29
29
  customPrompts?: Prompts;
30
+ edgeDecoration?: boolean;
30
31
  onInit?: (instance: ReactFlowInstance) => void;
31
32
  }
32
33
  export declare function Flow(props: FlowProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function useNodeResult(id: string): Record<string, import("../DataTree").Tree<any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.165",
3
+ "version": "0.0.166",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.mjs",
6
6
  "types": "./dist/index.d.ts",