@statewalker/fsm-charts 0.2.2 → 0.2.4

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.
@@ -19,7 +19,7 @@ declare function getStateDescriptionRenderer(options: {
19
19
  declare function renderSections<T extends DomSection>({ section, deep, header, }: {
20
20
  section: T;
21
21
  deep?: (s: T) => boolean;
22
- header?: (section: T) => undefined | string | HTMLElement;
22
+ header?: (section: T) => undefined | string | Node;
23
23
  }): HTMLDivElement;
24
24
 
25
25
  type StateDescriptionSection = DomSection & {
@@ -22,7 +22,7 @@ declare class RuntimeStatechartApi {
22
22
  toggleState(...stateIds: string[]): boolean;
23
23
  activateStates(...stateIds: string[]): void;
24
24
  focusStates(...stateIds: string[]): void;
25
- setStateDescription(stateId: string, description: HTMLElement | string | undefined): void;
25
+ setStateDescription(stateId: string, description: Node | string | undefined): void;
26
26
  closeStatePanel(stateId: string): void;
27
27
  openStatePanel(stateId: string): void;
28
28
  deselectTransitions(modifier?: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statewalker/fsm-charts",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "HFSM Implementation",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/statewalker/statewalker-fsm-charts",
@@ -36,11 +36,11 @@ export function getStateDescriptionRenderer(options: {
36
36
  export function renderSections<T extends DomSection>({
37
37
  section,
38
38
  deep = (s) => true,
39
- header = (section) => section.header?.cloneNode(true) as HTMLElement,
39
+ header = (section) => section.header?.cloneNode(true) as Node,
40
40
  }: {
41
41
  section: T;
42
42
  deep?: (s: T) => boolean;
43
- header?: (section: T) => undefined | string | HTMLElement;
43
+ header?: (section: T) => undefined | string | Node;
44
44
  }) {
45
45
  const container = document.createElement("div");
46
46
  const id = `id-${String(Math.random()).split(".")[1]}-${Date.now()}`;
@@ -95,7 +95,7 @@ ${css}
95
95
  transitions.forEach((t) => api.selectTransition(t.id));
96
96
  }
97
97
  }
98
- api.focusStates(...nodeIds);
98
+ // api.focusStates(...nodeIds);
99
99
  })
100
100
  );
101
101
 
@@ -83,7 +83,7 @@ export class RuntimeStatechartApi {
83
83
 
84
84
  setStateDescription(
85
85
  stateId: string,
86
- description: HTMLElement | string | undefined,
86
+ description: Node | string | undefined,
87
87
  ) {
88
88
  const descriptionContainer = this.element.querySelector(
89
89
  `details[data-state-id="${stateId}"] .state-details__description`,