x-block-lib 0.8.2 → 0.8.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.
- package/dist/core/blocks/app/method/index.d.ts +1 -1
- package/dist/core/locale/msg/en.d.ts +3 -13
- package/dist/core/locale/msg/zhHans.d.ts +3 -13
- package/dist/core/utils/app/argument.d.ts +15 -0
- package/dist/core/utils/app/event.d.ts +19 -0
- package/dist/core/utils/app/index.d.ts +7 -0
- package/dist/core/utils/app/method.d.ts +35 -0
- package/dist/core/utils/app/node.d.ts +3 -51
- package/dist/core/utils/app/prop.d.ts +27 -0
- package/dist/core/utils/common/misc.d.ts +2 -0
- package/dist/core/utils/compute/index.d.ts +2 -0
- package/dist/core/utils/data/index.d.ts +2 -0
- package/dist/core/utils/resource/index.d.ts +3 -0
- package/dist/index.js +1861 -1838
- package/dist/{msg-en.dpnu3yhj.js → msg-en.jq2w67rd.js} +3 -14
- package/dist/{msg-zhHans.l0fgbms4.js → msg-zhHans.hsanc2zi.js} +3 -14
- package/dist/utils/name.d.ts +3 -0
- package/dist/{vendor.dbls1i6v.js → vendor.hbs954v9.js} +5007 -4934
- package/package.json +17 -17
- package/dist/core/utils/app/comp.d.ts +0 -71
- package/dist/core/utils/app/page.d.ts +0 -12
- /package/dist/core/blocks/app/method/{appMethodImpl → implAppMethod}/v1/index.d.ts +0 -0
|
@@ -77,16 +77,6 @@ declare const _default: {
|
|
|
77
77
|
LABEL_TEXT: string;
|
|
78
78
|
LABEL_VALUE: string;
|
|
79
79
|
LABEL_VARIABLE: string;
|
|
80
|
-
PARAM_DATA: string;
|
|
81
|
-
PARAM_EXTRA_DATA: string;
|
|
82
|
-
PARAM_IS_DARK_MODE: string;
|
|
83
|
-
PARAM_MAIN_DATA: string;
|
|
84
|
-
PARAM_MESSAGE: string;
|
|
85
|
-
PARAM_NEW_SCREEN_SIZE: string;
|
|
86
|
-
PARAM_OLD_SCREEN_SIZE: string;
|
|
87
|
-
PARAM_RESULT: string;
|
|
88
|
-
PARAM_STATE: string;
|
|
89
|
-
PARAM_SUCCESS: string;
|
|
90
80
|
WARN_APP_NOT_FOUND: string;
|
|
91
81
|
WARN_ARGUMENT_HAS_CHANGED: string;
|
|
92
82
|
WARN_ARGUMENT_NOT_FOUND: string;
|
|
@@ -148,9 +138,9 @@ declare const _default: {
|
|
|
148
138
|
APP_V1_GET_APP_PROP_TITLE: string;
|
|
149
139
|
APP_V1_GET_APP_PROP_TOOLTIP: string;
|
|
150
140
|
APP_V1_GET_APP_PROP_HELPURL: string;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
APP_V1_IMPL_APP_METHOD_TITLE: string;
|
|
142
|
+
APP_V1_IMPL_APP_METHOD_TOOLTIP: string;
|
|
143
|
+
APP_V1_IMPL_APP_METHOD_HELPURL: string;
|
|
154
144
|
APP_V1_NAVIGATE_TO_TITLE: string;
|
|
155
145
|
APP_V1_NAVIGATE_TO_TOOLTIP: string;
|
|
156
146
|
APP_V1_NAVIGATE_TO_HELPURL: string;
|
|
@@ -77,16 +77,6 @@ declare const _default: {
|
|
|
77
77
|
LABEL_TEXT: string;
|
|
78
78
|
LABEL_VALUE: string;
|
|
79
79
|
LABEL_VARIABLE: string;
|
|
80
|
-
PARAM_DATA: string;
|
|
81
|
-
PARAM_EXTRA_DATA: string;
|
|
82
|
-
PARAM_IS_DARK_MODE: string;
|
|
83
|
-
PARAM_MAIN_DATA: string;
|
|
84
|
-
PARAM_MESSAGE: string;
|
|
85
|
-
PARAM_NEW_SCREEN_SIZE: string;
|
|
86
|
-
PARAM_OLD_SCREEN_SIZE: string;
|
|
87
|
-
PARAM_RESULT: string;
|
|
88
|
-
PARAM_STATE: string;
|
|
89
|
-
PARAM_SUCCESS: string;
|
|
90
80
|
WARN_APP_NOT_FOUND: string;
|
|
91
81
|
WARN_ARGUMENT_HAS_CHANGED: string;
|
|
92
82
|
WARN_ARGUMENT_NOT_FOUND: string;
|
|
@@ -148,9 +138,9 @@ declare const _default: {
|
|
|
148
138
|
APP_V1_GET_APP_PROP_TITLE: string;
|
|
149
139
|
APP_V1_GET_APP_PROP_TOOLTIP: string;
|
|
150
140
|
APP_V1_GET_APP_PROP_HELPURL: string;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
APP_V1_IMPL_APP_METHOD_TITLE: string;
|
|
142
|
+
APP_V1_IMPL_APP_METHOD_TOOLTIP: string;
|
|
143
|
+
APP_V1_IMPL_APP_METHOD_HELPURL: string;
|
|
154
144
|
APP_V1_NAVIGATE_TO_TITLE: string;
|
|
155
145
|
APP_V1_NAVIGATE_TO_TOOLTIP: string;
|
|
156
146
|
APP_V1_NAVIGATE_TO_HELPURL: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Blockly from 'blockly/core';
|
|
2
|
+
import { Type } from 'x-runtime-lib';
|
|
3
|
+
interface ArgumentInfo {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: Type;
|
|
7
|
+
}
|
|
8
|
+
export declare function getAllArgumentInfos(): ArgumentInfo[];
|
|
9
|
+
export declare function getArgumentInfo(id: string): {
|
|
10
|
+
key: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
13
|
+
} | undefined;
|
|
14
|
+
export declare function genArgumentOpts(): Blockly.MenuOption[];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Blockly from 'blockly/core';
|
|
2
|
+
import { Type } from 'x-runtime-lib';
|
|
3
|
+
interface EventInfo {
|
|
4
|
+
key: string;
|
|
5
|
+
names: string[];
|
|
6
|
+
from: 'regular' | 'property' | 'custom';
|
|
7
|
+
params: {
|
|
8
|
+
key: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: Type;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
export declare function getAllOnEventInfos(nodeid: string): EventInfo[];
|
|
14
|
+
export declare function getOnEventInfo(nodeid: string, eventKey: string): EventInfo | undefined;
|
|
15
|
+
export declare function genOnEventOpts(nodeid: string): Blockly.MenuOption[];
|
|
16
|
+
export declare function getAllTriggerEventInfos(): EventInfo[];
|
|
17
|
+
export declare function getTriggerEventInfo(eventKey: string): EventInfo | undefined;
|
|
18
|
+
export declare function genTriggerEventOpts(): Blockly.MenuOption[];
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as Blockly from 'blockly/core';
|
|
2
|
+
import { Type } from 'x-runtime-lib';
|
|
3
|
+
interface MethodInfo {
|
|
4
|
+
key: string;
|
|
5
|
+
names: string[];
|
|
6
|
+
from: 'regular' | 'slot' | 'custom';
|
|
7
|
+
inputs: {
|
|
8
|
+
key: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: Type;
|
|
11
|
+
}[];
|
|
12
|
+
outputs: {
|
|
13
|
+
key: string;
|
|
14
|
+
name: string;
|
|
15
|
+
type: Type;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
export declare function getAllCallMethodInfos(nodeid: string): MethodInfo[];
|
|
19
|
+
export declare function getCallMethodInfo(nodeid: string, methodKey: string): MethodInfo | undefined;
|
|
20
|
+
export declare function genCallMethodOpts(nodeid: string): Blockly.MenuOption[];
|
|
21
|
+
export declare function getAllImplMethodInfos(): MethodInfo[];
|
|
22
|
+
export declare function getImplMethodInfo(methodKey: string): MethodInfo | undefined;
|
|
23
|
+
export declare function genImplMethodOpts(): Blockly.MenuOption[];
|
|
24
|
+
export declare function getAllImplMethodOutputInfos(methodKey: string): {
|
|
25
|
+
key: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: Type;
|
|
28
|
+
}[];
|
|
29
|
+
export declare function getImplMethodOutputInfo(methodKey: string, outputKey: string): {
|
|
30
|
+
key: string;
|
|
31
|
+
name: string;
|
|
32
|
+
type: Type;
|
|
33
|
+
} | undefined;
|
|
34
|
+
export declare function genImplMethodOutputOpts(methodKey: string): Blockly.MenuOption[];
|
|
35
|
+
export {};
|
|
@@ -1,60 +1,12 @@
|
|
|
1
1
|
import * as Blockly from 'blockly/core';
|
|
2
|
-
import { Type, ZProp, ZSlotProp } from 'x-runtime-lib';
|
|
3
2
|
interface NodeInfo {
|
|
4
3
|
id: string;
|
|
5
4
|
key: string;
|
|
6
5
|
name: string;
|
|
7
6
|
alias: string;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
type Filter = 'onEvent' | 'callMethod' | 'property';
|
|
9
|
+
export declare function getAllNodeInfos(filter: Filter): NodeInfo[];
|
|
10
10
|
export declare function getNodeInfo(nodeid: string): NodeInfo | undefined;
|
|
11
|
-
export declare function genNodeOpts(filter
|
|
12
|
-
interface EventInfo {
|
|
13
|
-
keys: string;
|
|
14
|
-
names: string[];
|
|
15
|
-
params: {
|
|
16
|
-
key: string;
|
|
17
|
-
name: string;
|
|
18
|
-
}[];
|
|
19
|
-
}
|
|
20
|
-
export declare function getAllEventInfos(nodeid: string): EventInfo[];
|
|
21
|
-
export declare function getEventInfo(nodeid: string, eventKeys: string): EventInfo | undefined;
|
|
22
|
-
export declare function genEventOpts(nodeid: string): Blockly.MenuOption[];
|
|
23
|
-
interface MethodInfo {
|
|
24
|
-
keys: string;
|
|
25
|
-
names: string[];
|
|
26
|
-
inputs: {
|
|
27
|
-
key: string;
|
|
28
|
-
name: string;
|
|
29
|
-
type: Type;
|
|
30
|
-
}[];
|
|
31
|
-
outputs: {
|
|
32
|
-
key: string;
|
|
33
|
-
name: string;
|
|
34
|
-
}[];
|
|
35
|
-
}
|
|
36
|
-
export declare function getAllMethodInfos(nodeid: string): MethodInfo[];
|
|
37
|
-
export declare function getMethodInfo(nodeid: string, methodKeys: string): MethodInfo | undefined;
|
|
38
|
-
export declare function genMethodOpts(nodeid: string): Blockly.MenuOption[];
|
|
39
|
-
interface PropInfo {
|
|
40
|
-
keys: string;
|
|
41
|
-
names: string[];
|
|
42
|
-
meta: {
|
|
43
|
-
from: 'prop';
|
|
44
|
-
raw: ZProp;
|
|
45
|
-
} | {
|
|
46
|
-
from: 'slot';
|
|
47
|
-
raw: ZSlotProp;
|
|
48
|
-
} | {
|
|
49
|
-
from: 'custom';
|
|
50
|
-
raw: {
|
|
51
|
-
id: string;
|
|
52
|
-
name: string;
|
|
53
|
-
type: Type;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export declare function getAllPropInfos(nodeid: string, modify?: boolean): PropInfo[];
|
|
58
|
-
export declare function getPropInfo(nodeid: string, propKeys: string): PropInfo | undefined;
|
|
59
|
-
export declare function genPropOpts(nodeid: string, modify?: boolean): Blockly.MenuOption[];
|
|
11
|
+
export declare function genNodeOpts(filter: Filter): Blockly.MenuOption[];
|
|
60
12
|
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Blockly from 'blockly/core';
|
|
2
|
+
import { Type, ZProp } from 'x-runtime-lib';
|
|
3
|
+
interface MetaRegular {
|
|
4
|
+
from: 'regular';
|
|
5
|
+
raw: ZProp;
|
|
6
|
+
}
|
|
7
|
+
interface MetaSlot {
|
|
8
|
+
from: 'slot';
|
|
9
|
+
raw: {
|
|
10
|
+
type: Type;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface MetaCustom {
|
|
14
|
+
from: 'custom';
|
|
15
|
+
raw: {
|
|
16
|
+
type: Type;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface PropInfo {
|
|
20
|
+
key: string;
|
|
21
|
+
names: string[];
|
|
22
|
+
meta: MetaRegular | MetaSlot | MetaCustom;
|
|
23
|
+
}
|
|
24
|
+
export declare function getAllPropInfos(nodeid: string, modify?: boolean): PropInfo[];
|
|
25
|
+
export declare function getPropInfo(nodeid: string, propKey: string): PropInfo | undefined;
|
|
26
|
+
export declare function genPropOpts(nodeid: string, modify?: boolean): Blockly.MenuOption[];
|
|
27
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as Blockly from 'blockly/core';
|
|
2
|
+
import { Type, ZProp } from 'x-runtime-lib';
|
|
2
3
|
export declare const plusImage: string;
|
|
3
4
|
export declare const minusImage: string;
|
|
4
5
|
export declare function toBlockType(key: string): string;
|
|
5
6
|
export declare function toCheck(key: string): string;
|
|
6
7
|
export declare function ensureOpts(options: Blockly.MenuOption[]): Blockly.MenuOption[];
|
|
7
8
|
export declare function getBlockDepth(block: Blockly.Block | null): number;
|
|
9
|
+
export declare function getPropType(prop: ZProp): Type;
|