x-block-lib 0.8.1 → 0.8.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/core/blocks/app/event/index.d.ts +2 -0
- package/dist/core/blocks/app/message/index.d.ts +1 -0
- package/dist/core/blocks/app/method/implAppMethod/v1/index.d.ts +1 -0
- package/dist/core/blocks/app/method/index.d.ts +1 -1
- package/dist/core/blocks/app/misc/index.d.ts +0 -2
- package/dist/core/category/app/{state → comp}/v1/index.d.ts +1 -1
- package/dist/core/category/app/index.d.ts +3 -4
- package/dist/core/category/app/{method → message}/v1/index.d.ts +1 -1
- package/dist/core/category/app/{event → page}/v1/index.d.ts +1 -1
- package/dist/core/category/utils/index.d.ts +4 -0
- package/dist/core/locale/index.d.ts +1 -0
- package/dist/core/locale/msg/en.d.ts +11 -8
- package/dist/core/locale/msg/zhHans.d.ts +11 -8
- package/dist/core/utils/app/event.d.ts +19 -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 +19 -0
- package/dist/core/utils/common/misc.d.ts +2 -0
- package/dist/index.js +1990 -1797
- package/dist/{msg-en.kxesdd6m.js → msg-en.h8c0zmmh.js} +12 -9
- package/dist/{msg-zhHans.ja44gwyv.js → msg-zhHans.dsez90cp.js} +12 -9
- package/dist/{vendor.d087hkbq.js → vendor.hbs954v9.js} +5007 -4934
- package/package.json +17 -17
- package/dist/core/category/app/property/v1/index.d.ts +0 -7
- package/dist/core/utils/app/comp.d.ts +0 -71
- /package/dist/core/blocks/app/{method/appMethodImpl → event/appBind}/v1/index.d.ts +0 -0
- /package/dist/core/blocks/app/{misc/appDebugTrace → event/watchEffect}/v1/index.d.ts +0 -0
- /package/dist/core/blocks/app/{misc/watchEffect → message/appDebugTrace}/v1/index.d.ts +0 -0
- /package/dist/core/utils/app/{page.d.ts → argument.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
export * from './comp/v1';
|
|
1
2
|
export * from './compute/v1';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './method/v1';
|
|
3
|
+
export * from './message/v1';
|
|
4
4
|
export * from './misc/v1';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './page/v1';
|
|
6
6
|
export * from './resource/v1';
|
|
7
|
-
export * from './state/v1';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare function createLabel(text: string): Element;
|
|
2
2
|
export declare function createBlock(type: string, children?: Element[]): Element;
|
|
3
|
+
export declare function createMutation(attrs: {
|
|
4
|
+
key: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[]): Element;
|
|
3
7
|
export declare function createShadowOfTextV1(inputName: string, content?: string): Element;
|
|
4
8
|
export declare function createShadowOfMathNumberV1(inputName: string, content?: number): Element;
|
|
5
9
|
export declare function createShadowOfLogicBooleanV1(inputName: string, content?: boolean): Element;
|
|
@@ -36,22 +36,21 @@ declare const _default: {
|
|
|
36
36
|
BUTTON_NO_COMPUTE: string;
|
|
37
37
|
BUTTON_NO_TABLE: string;
|
|
38
38
|
CATEGORY_COLOR: string;
|
|
39
|
+
CATEGORY_COMP: string;
|
|
39
40
|
CATEGORY_COMPUTE: string;
|
|
40
41
|
CATEGORY_DATA: string;
|
|
41
|
-
CATEGORY_EVENT: string;
|
|
42
42
|
CATEGORY_FLOW: string;
|
|
43
43
|
CATEGORY_FUNC: string;
|
|
44
44
|
CATEGORY_LIST: string;
|
|
45
45
|
CATEGORY_LOGIC: string;
|
|
46
46
|
CATEGORY_LOOP: string;
|
|
47
47
|
CATEGORY_MATH: string;
|
|
48
|
-
|
|
48
|
+
CATEGORY_MESSAGE: string;
|
|
49
49
|
CATEGORY_MISC: string;
|
|
50
50
|
CATEGORY_OBJECT: string;
|
|
51
|
+
CATEGORY_PAGE: string;
|
|
51
52
|
CATEGORY_PROCEDURE: string;
|
|
52
|
-
CATEGORY_PROPERTY: string;
|
|
53
53
|
CATEGORY_RESOURCE: string;
|
|
54
|
-
CATEGORY_STATE: string;
|
|
55
54
|
CATEGORY_TEXT: string;
|
|
56
55
|
CATEGORY_TIME: string;
|
|
57
56
|
CATEGORY_VARIABLE: string;
|
|
@@ -68,7 +67,6 @@ declare const _default: {
|
|
|
68
67
|
LABEL_MATH_OPERATION: string;
|
|
69
68
|
LABEL_MESSAGE: string;
|
|
70
69
|
LABEL_METHOD: string;
|
|
71
|
-
LABEL_MISC: string;
|
|
72
70
|
LABEL_OBJECT: string;
|
|
73
71
|
LABEL_OPERATION: string;
|
|
74
72
|
LABEL_PROCEDURE: string;
|
|
@@ -124,6 +122,11 @@ declare const _default: {
|
|
|
124
122
|
APP_TEXT: string;
|
|
125
123
|
APP_TITLE: string;
|
|
126
124
|
APP_VALUE: string;
|
|
125
|
+
APP_V1_APP_BIND_TITLE: string;
|
|
126
|
+
APP_V1_APP_BIND_TOOLTIP: string;
|
|
127
|
+
APP_V1_APP_BIND_HELPURL: string;
|
|
128
|
+
APP_V1_APP_BIND_CONTAINER_TITLE: string;
|
|
129
|
+
APP_V1_APP_BIND_ITEM_TITLE: string;
|
|
127
130
|
APP_V1_APP_DEBUG_TRACE_TITLE: string;
|
|
128
131
|
APP_V1_APP_DEBUG_TRACE_TOOLTIP: string;
|
|
129
132
|
APP_V1_APP_DEBUG_TRACE_HELPURL: string;
|
|
@@ -145,9 +148,9 @@ declare const _default: {
|
|
|
145
148
|
APP_V1_GET_APP_PROP_TITLE: string;
|
|
146
149
|
APP_V1_GET_APP_PROP_TOOLTIP: string;
|
|
147
150
|
APP_V1_GET_APP_PROP_HELPURL: string;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
APP_V1_IMPL_APP_METHOD_TITLE: string;
|
|
152
|
+
APP_V1_IMPL_APP_METHOD_TOOLTIP: string;
|
|
153
|
+
APP_V1_IMPL_APP_METHOD_HELPURL: string;
|
|
151
154
|
APP_V1_NAVIGATE_TO_TITLE: string;
|
|
152
155
|
APP_V1_NAVIGATE_TO_TOOLTIP: string;
|
|
153
156
|
APP_V1_NAVIGATE_TO_HELPURL: string;
|
|
@@ -36,22 +36,21 @@ declare const _default: {
|
|
|
36
36
|
BUTTON_NO_COMPUTE: string;
|
|
37
37
|
BUTTON_NO_TABLE: string;
|
|
38
38
|
CATEGORY_COLOR: string;
|
|
39
|
+
CATEGORY_COMP: string;
|
|
39
40
|
CATEGORY_COMPUTE: string;
|
|
40
41
|
CATEGORY_DATA: string;
|
|
41
|
-
CATEGORY_EVENT: string;
|
|
42
42
|
CATEGORY_FLOW: string;
|
|
43
43
|
CATEGORY_FUNC: string;
|
|
44
44
|
CATEGORY_LIST: string;
|
|
45
45
|
CATEGORY_LOGIC: string;
|
|
46
46
|
CATEGORY_LOOP: string;
|
|
47
47
|
CATEGORY_MATH: string;
|
|
48
|
-
|
|
48
|
+
CATEGORY_MESSAGE: string;
|
|
49
49
|
CATEGORY_MISC: string;
|
|
50
50
|
CATEGORY_OBJECT: string;
|
|
51
|
+
CATEGORY_PAGE: string;
|
|
51
52
|
CATEGORY_PROCEDURE: string;
|
|
52
|
-
CATEGORY_PROPERTY: string;
|
|
53
53
|
CATEGORY_RESOURCE: string;
|
|
54
|
-
CATEGORY_STATE: string;
|
|
55
54
|
CATEGORY_TEXT: string;
|
|
56
55
|
CATEGORY_TIME: string;
|
|
57
56
|
CATEGORY_VARIABLE: string;
|
|
@@ -68,7 +67,6 @@ declare const _default: {
|
|
|
68
67
|
LABEL_MATH_OPERATION: string;
|
|
69
68
|
LABEL_MESSAGE: string;
|
|
70
69
|
LABEL_METHOD: string;
|
|
71
|
-
LABEL_MISC: string;
|
|
72
70
|
LABEL_OBJECT: string;
|
|
73
71
|
LABEL_OPERATION: string;
|
|
74
72
|
LABEL_PROCEDURE: string;
|
|
@@ -124,6 +122,11 @@ declare const _default: {
|
|
|
124
122
|
APP_TEXT: string;
|
|
125
123
|
APP_TITLE: string;
|
|
126
124
|
APP_VALUE: string;
|
|
125
|
+
APP_V1_APP_BIND_TITLE: string;
|
|
126
|
+
APP_V1_APP_BIND_TOOLTIP: string;
|
|
127
|
+
APP_V1_APP_BIND_HELPURL: string;
|
|
128
|
+
APP_V1_APP_BIND_CONTAINER_TITLE: string;
|
|
129
|
+
APP_V1_APP_BIND_ITEM_TITLE: string;
|
|
127
130
|
APP_V1_APP_DEBUG_TRACE_TITLE: string;
|
|
128
131
|
APP_V1_APP_DEBUG_TRACE_TOOLTIP: string;
|
|
129
132
|
APP_V1_APP_DEBUG_TRACE_HELPURL: string;
|
|
@@ -145,9 +148,9 @@ declare const _default: {
|
|
|
145
148
|
APP_V1_GET_APP_PROP_TITLE: string;
|
|
146
149
|
APP_V1_GET_APP_PROP_TOOLTIP: string;
|
|
147
150
|
APP_V1_GET_APP_PROP_HELPURL: string;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
APP_V1_IMPL_APP_METHOD_TITLE: string;
|
|
152
|
+
APP_V1_IMPL_APP_METHOD_TOOLTIP: string;
|
|
153
|
+
APP_V1_IMPL_APP_METHOD_HELPURL: string;
|
|
151
154
|
APP_V1_NAVIGATE_TO_TITLE: string;
|
|
152
155
|
APP_V1_NAVIGATE_TO_TOOLTIP: string;
|
|
153
156
|
APP_V1_NAVIGATE_TO_HELPURL: string;
|
|
@@ -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';
|
|
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,19 @@
|
|
|
1
|
+
import * as Blockly from 'blockly/core';
|
|
2
|
+
import { Type, ZProp } from 'x-runtime-lib';
|
|
3
|
+
interface PropInfo {
|
|
4
|
+
key: string;
|
|
5
|
+
names: string[];
|
|
6
|
+
meta: {
|
|
7
|
+
from: 'regular';
|
|
8
|
+
raw: ZProp;
|
|
9
|
+
} | {
|
|
10
|
+
from: 'slot' | 'custom';
|
|
11
|
+
raw: {
|
|
12
|
+
type: Type;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function getAllPropInfos(nodeid: string, modify?: boolean): PropInfo[];
|
|
17
|
+
export declare function getPropInfo(nodeid: string, propKey: string): PropInfo | undefined;
|
|
18
|
+
export declare function genPropOpts(nodeid: string, modify?: boolean): Blockly.MenuOption[];
|
|
19
|
+
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;
|