@jxsuite/runtime 0.28.2 → 0.28.3

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.
package/src/types.ts CHANGED
@@ -1,10 +1,21 @@
1
1
  /// <reference lib="dom" />
2
- import type { JxPath } from "@jxsuite/schema/types";
2
+ import type { JxElement, JxPath } from "@jxsuite/schema/types";
3
+
3
4
  export type { JxPath };
4
5
 
6
+ /**
7
+ * The live reactive scope: a prototype-chained object whose keys are user-defined state names.
8
+ * Values are runtime JS values (signals, functions, JSON data) and must be narrowed at use — this
9
+ * alias marks the dynamic boundary by name.
10
+ */
11
+ export type JxScope = Record<string, unknown>;
12
+
13
+ /** An event handler stored in the scope: `(scope, event) => void`. */
14
+ export type JxEventHandler = (scope: JxScope, event: Event) => unknown;
15
+
5
16
  export interface JxRenderOptions {
6
17
  _path?: JxPath;
7
- onNodeCreated?: (el: HTMLElement | Text, path: JxPath, def: Record<string, unknown>) => void;
18
+ onNodeCreated?: (el: HTMLElement | Text, path: JxPath, def: JxElement | string) => void;
8
19
  }
9
20
 
10
21
  export interface DynamicClass {