@rkmodules/rules 0.0.87 → 0.0.89

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.
@@ -3,6 +3,7 @@ type Point = {
3
3
  x: number;
4
4
  y: number;
5
5
  };
6
+ export declare function getPositions(fn: GraphedFunction): Record<string, Point>;
6
7
  export declare function usePositions(fn: GraphedFunction): [Record<string, Point>, (t: Record<string, Point> | ((oldValue: Record<string, Point>) => Record<string, Point>)) => void];
7
8
  export declare function useUpdatePositions(fn: GraphedFunction): (id: string, position: Point) => void;
8
9
  export {};
@@ -1,8 +1,15 @@
1
1
  type Updater<T> = (oldValue: T) => T;
2
+ interface VariableStore {
3
+ data: Record<string, any>;
4
+ getVar: (scope: string, name: string, persist: boolean) => any;
5
+ setVar: (scope: string, name: string, value: any, persist: boolean) => void;
6
+ }
7
+ export declare let variableStore: import("zustand").UseBoundStore<import("zustand").StoreApi<VariableStore>>;
2
8
  /**
3
9
  * scope restricts the variable scope, for example to a view id
4
10
  * @param scope
5
11
  * @param name
6
12
  */
7
13
  export declare const useVariable: <T = any>(scope: string, name: string, initial: T, persist?: boolean) => [T, (t: T | Updater<T>) => void];
14
+ export declare const getVariable: <T = any>(scope: string, name: string, persist?: boolean) => T;
8
15
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",