@stonecrop/node-editor 0.2.64 → 0.2.65

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import NodeEditor from '@/components/NodeEditor.vue';
2
- import StateEditor from '@/components/StateEditor.vue';
1
+ import NodeEditor from './components/NodeEditor.vue';
2
+ import StateEditor from './components/StateEditor.vue';
3
3
  /**
4
4
  * Install all Node Editor components
5
5
  * @param app - Vue app instance
@@ -1,16 +1,45 @@
1
+ import type { AnyStateMachine } from 'xstate';
2
+ import type { AnyStateNodeDefinition } from 'xstate';
1
3
  import { App } from 'vue';
2
- import { EditorStates } from '@/types';
3
- import { FlowElement } from '@/types';
4
- import { FlowElements } from '@/types';
5
- import { Layout } from '@/types';
6
- import NodeEditor from '@/components/NodeEditor.vue';
7
- import StateEditor from '@/components/StateEditor.vue';
4
+ import { Element as Element_2 } from '@vue-flow/core';
5
+ import { Elements } from '@vue-flow/core';
6
+ import NodeEditor from './components/NodeEditor.vue';
7
+ import { Position } from '@vue-flow/core';
8
+ import StateEditor from './components/StateEditor.vue';
9
+ import type { StatesConfig } from 'xstate';
10
+ import { XYPosition } from '@vue-flow/core';
8
11
 
9
- export { EditorStates }
12
+ /**
13
+ * Editor states
14
+ * @public
15
+ */
16
+ export declare type EditorStates = {
17
+ [key: string]: AnyStateMachine | AnyStateNodeDefinition | StatesConfig<any, any, any>;
18
+ };
10
19
 
11
- export { FlowElement }
20
+ /**
21
+ * Flow element
22
+ * @public
23
+ */
24
+ export declare type FlowElement = Element_2<{
25
+ hasInput?: boolean;
26
+ hasOutput?: boolean;
27
+ }, {
28
+ hasInput?: boolean;
29
+ hasOutput?: boolean;
30
+ }>;
12
31
 
13
- export { FlowElements }
32
+ /**
33
+ * Flow elements
34
+ * @public
35
+ */
36
+ export declare type FlowElements = Elements<{
37
+ hasInput?: boolean;
38
+ hasOutput?: boolean;
39
+ }, {
40
+ hasInput?: boolean;
41
+ hasOutput?: boolean;
42
+ }>;
14
43
 
15
44
  /**
16
45
  * Install all Node Editor components
@@ -19,7 +48,17 @@ export { FlowElements }
19
48
  */
20
49
  export declare function install(app: App): void;
21
50
 
22
- export { Layout }
51
+ /**
52
+ * Node layout
53
+ * @public
54
+ */
55
+ export declare type Layout = {
56
+ [key: string]: {
57
+ position?: XYPosition;
58
+ targetPosition?: Position;
59
+ sourcePosition?: Position;
60
+ };
61
+ };
23
62
 
24
63
  export { NodeEditor }
25
64