@statewalker/fsm-charts 0.2.2 → 0.2.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/dist/index-dom.d.ts
CHANGED
|
@@ -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 |
|
|
22
|
+
header?: (section: T) => undefined | string | Node;
|
|
23
23
|
}): HTMLDivElement;
|
|
24
24
|
|
|
25
25
|
type StateDescriptionSection = DomSection & {
|
package/dist/index-runtime.d.ts
CHANGED
|
@@ -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:
|
|
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
|
@@ -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
|
|
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 |
|
|
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()}`;
|
|
@@ -83,7 +83,7 @@ export class RuntimeStatechartApi {
|
|
|
83
83
|
|
|
84
84
|
setStateDescription(
|
|
85
85
|
stateId: string,
|
|
86
|
-
description:
|
|
86
|
+
description: Node | string | undefined,
|
|
87
87
|
) {
|
|
88
88
|
const descriptionContainer = this.element.querySelector(
|
|
89
89
|
`details[data-state-id="${stateId}"] .state-details__description`,
|