x-block-lib 0.8.16 → 0.8.17

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.
@@ -1,9 +1,3 @@
1
1
  import './blocks';
2
- export * from './category';
3
2
  import './dialog';
4
- export * from './events';
5
- export * from './locale';
6
- export * from './misc';
7
3
  import './plugins';
8
- export * from './theme';
9
- export * from './toolbox';
@@ -1,21 +1,20 @@
1
1
  import * as Blockly from 'blockly/core';
2
- import { Type } from 'x-runtime-lib';
3
- export type EventFrom = 'regular' | 'singleRef' | 'multipleRef' | 'property' | 'custom';
4
- interface EventInfo {
2
+ import { EventKind, Type } from 'x-runtime-lib';
3
+ interface Param {
5
4
  key: string;
5
+ name: string;
6
+ type: Type;
7
+ }
8
+ interface EventInfo {
9
+ id: string;
6
10
  names: string[];
7
- from: EventFrom;
8
- params: {
9
- key: string;
10
- name: string;
11
- type: Type;
12
- }[];
11
+ kind: EventKind;
12
+ params: Param[];
13
13
  }
14
- export declare function isLocaleOfEventFrom(from: EventFrom): boolean;
15
- export declare function getAllOnEventInfos(nodeid: string): EventInfo[];
16
- export declare function getOnEventInfo(nodeid: string, eventKey: string): EventInfo | undefined;
17
- export declare function genOnEventOpts(nodeid: string): Blockly.MenuOption[];
14
+ export declare function getAllOnEventInfos(nodeId: string): EventInfo[];
15
+ export declare function getOnEventInfo(id: string): EventInfo | undefined;
16
+ export declare function genOnEventOpts(nodeId: string): Blockly.MenuOption[];
18
17
  export declare function getAllTriggerEventInfos(): EventInfo[];
19
- export declare function getTriggerEventInfo(eventKey: string): EventInfo | undefined;
18
+ export declare function getTriggerEventInfo(id: string): EventInfo | undefined;
20
19
  export declare function genTriggerEventOpts(): Blockly.MenuOption[];
21
20
  export {};
@@ -1,37 +1,29 @@
1
1
  import * as Blockly from 'blockly/core';
2
- import { Type } from 'x-runtime-lib';
3
- export type MethodFrom = 'regular' | 'singleRef' | 'multipleRef' | 'slot' | 'custom';
4
- interface MethodInfo {
5
- key: string;
6
- names: string[];
7
- from: MethodFrom;
8
- inputs: {
9
- key: string;
10
- name: string;
11
- type: Type;
12
- }[];
13
- outputs: {
14
- key: string;
15
- name: string;
16
- type: Type;
17
- }[];
18
- }
19
- export declare function isLocaleOfMethodFrom(from: MethodFrom): boolean;
20
- export declare function getAllCallMethodInfos(nodeid: string): MethodInfo[];
21
- export declare function getCallMethodInfo(nodeid: string, methodKey: string): MethodInfo | undefined;
22
- export declare function genCallMethodOpts(nodeid: string): Blockly.MenuOption[];
23
- export declare function getAllImplMethodInfos(): MethodInfo[];
24
- export declare function getImplMethodInfo(methodKey: string): MethodInfo | undefined;
25
- export declare function genImplMethodOpts(): Blockly.MenuOption[];
26
- export declare function getAllImplMethodOutputInfos(methodKey: string): {
2
+ import { MethodKind, Type } from 'x-runtime-lib';
3
+ interface Input {
27
4
  key: string;
28
5
  name: string;
29
6
  type: Type;
30
- }[];
31
- export declare function getImplMethodOutputInfo(methodKey: string, outputKey: string): {
7
+ }
8
+ interface Output {
32
9
  key: string;
33
10
  name: string;
34
11
  type: Type;
35
- } | undefined;
12
+ }
13
+ interface MethodInfo {
14
+ id: string;
15
+ names: string[];
16
+ kind: MethodKind;
17
+ inputs: Input[];
18
+ outputs: Output[];
19
+ }
20
+ export declare function getAllCallMethodInfos(nodeId: string): MethodInfo[];
21
+ export declare function getCallMethodInfo(id: string): MethodInfo | undefined;
22
+ export declare function genCallMethodOpts(nodeId: string): Blockly.MenuOption[];
23
+ export declare function getAllImplMethodInfos(): MethodInfo[];
24
+ export declare function getImplMethodInfo(id: string): MethodInfo | undefined;
25
+ export declare function genImplMethodOpts(): Blockly.MenuOption[];
26
+ export declare function getAllImplMethodOutputInfos(methodId: string): Output[];
27
+ export declare function getImplMethodOutputInfo(methodId: string, outputKey: string): Output | undefined;
36
28
  export declare function genImplMethodOutputOpts(methodKey: string): Blockly.MenuOption[];
37
29
  export {};
@@ -1,24 +1,20 @@
1
1
  import * as Blockly from 'blockly/core';
2
2
  import { Type, ZProp } from 'x-runtime-lib';
3
- export type PropFrom = 'regular' | 'singleRef' | 'multipleRef' | 'slot' | 'custom';
4
- interface MetaRegular {
5
- from: 'regular';
6
- raw: ZProp;
7
- }
8
- interface MetaRemain {
9
- from: 'singleRef' | 'multipleRef' | 'slot' | 'custom';
10
- raw: {
11
- type: Type;
12
- };
13
- }
14
3
  interface PropInfo {
15
- key: string;
4
+ id: string;
16
5
  names: string[];
17
- meta: MetaRegular | MetaRemain;
6
+ meta: {
7
+ kind: 'elementProperty';
8
+ raw: ZProp;
9
+ } | {
10
+ kind: 'refProperty' | 'customProperty' | 'elementSlotProperty' | 'customSlotProperty';
11
+ raw: {
12
+ type: Type;
13
+ };
14
+ };
18
15
  }
19
16
  type Filter = 'read' | 'write';
20
- export declare function isLocaleOfPropFrom(from: PropFrom): boolean;
21
- export declare function getAllPropInfos(nodeid: string, filter: Filter): PropInfo[];
22
- export declare function getPropInfo(nodeid: string, propKey: string): PropInfo | undefined;
23
- export declare function genPropOpts(nodeid: string, filter: Filter): Blockly.MenuOption[];
17
+ export declare function getAllPropInfos(nodeId: string, filter: Filter): PropInfo[];
18
+ export declare function getPropInfo(id: string): PropInfo | undefined;
19
+ export declare function genPropOpts(nodeId: string, filter: Filter): Blockly.MenuOption[];
24
20
  export {};
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import '@/core';
1
2
  declare const _default: {
2
3
  install: (app: import("vue").App) => void;
3
4
  };