x-block-lib 0.8.3 → 0.8.5
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/locale/msg/en.d.ts +0 -10
- package/dist/core/locale/msg/zhHans.d.ts +0 -10
- package/dist/core/utils/app/argument.d.ts +9 -6
- package/dist/core/utils/app/event.d.ts +3 -1
- package/dist/core/utils/app/index.d.ts +7 -0
- package/dist/core/utils/app/method.d.ts +3 -1
- package/dist/core/utils/app/node.d.ts +4 -3
- package/dist/core/utils/app/property.d.ts +24 -0
- package/dist/core/utils/common/misc.d.ts +1 -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 +1602 -1540
- package/dist/{msg-en.h8c0zmmh.js → msg-en.jq2w67rd.js} +0 -11
- package/dist/{msg-zhHans.dsez90cp.js → msg-zhHans.hsanc2zi.js} +0 -11
- package/dist/utils/name.d.ts +3 -0
- package/package.json +2 -2
- package/dist/core/utils/app/prop.d.ts +0 -19
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as Blockly from 'blockly/core';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Type } from 'x-runtime-lib';
|
|
3
|
+
interface ArgumentInfo {
|
|
4
|
+
key: string;
|
|
4
5
|
name: string;
|
|
5
|
-
type:
|
|
6
|
-
}
|
|
6
|
+
type: Type;
|
|
7
|
+
}
|
|
8
|
+
export declare function getAllArgumentInfos(): ArgumentInfo[];
|
|
7
9
|
export declare function getArgumentInfo(id: string): {
|
|
8
|
-
|
|
10
|
+
key: string;
|
|
9
11
|
name: string;
|
|
10
|
-
type:
|
|
12
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
11
13
|
} | undefined;
|
|
12
14
|
export declare function genArgumentOpts(): Blockly.MenuOption[];
|
|
15
|
+
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as Blockly from 'blockly/core';
|
|
2
2
|
import { Type } from 'x-runtime-lib';
|
|
3
|
+
export type EventFrom = 'regular' | 'singleRef' | 'multipleRef' | 'property' | 'custom';
|
|
3
4
|
interface EventInfo {
|
|
4
5
|
key: string;
|
|
5
6
|
names: string[];
|
|
6
|
-
from:
|
|
7
|
+
from: EventFrom;
|
|
7
8
|
params: {
|
|
8
9
|
key: string;
|
|
9
10
|
name: string;
|
|
10
11
|
type: Type;
|
|
11
12
|
}[];
|
|
12
13
|
}
|
|
14
|
+
export declare function isLocaleOfEventFrom(from: EventFrom): boolean;
|
|
13
15
|
export declare function getAllOnEventInfos(nodeid: string): EventInfo[];
|
|
14
16
|
export declare function getOnEventInfo(nodeid: string, eventKey: string): EventInfo | undefined;
|
|
15
17
|
export declare function genOnEventOpts(nodeid: string): Blockly.MenuOption[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as Blockly from 'blockly/core';
|
|
2
2
|
import { Type } from 'x-runtime-lib';
|
|
3
|
+
export type MethodFrom = 'regular' | 'singleRef' | 'multipleRef' | 'slot' | 'custom';
|
|
3
4
|
interface MethodInfo {
|
|
4
5
|
key: string;
|
|
5
6
|
names: string[];
|
|
6
|
-
from:
|
|
7
|
+
from: MethodFrom;
|
|
7
8
|
inputs: {
|
|
8
9
|
key: string;
|
|
9
10
|
name: string;
|
|
@@ -15,6 +16,7 @@ interface MethodInfo {
|
|
|
15
16
|
type: Type;
|
|
16
17
|
}[];
|
|
17
18
|
}
|
|
19
|
+
export declare function isLocaleOfMethodFrom(from: MethodFrom): boolean;
|
|
18
20
|
export declare function getAllCallMethodInfos(nodeid: string): MethodInfo[];
|
|
19
21
|
export declare function getCallMethodInfo(nodeid: string, methodKey: string): MethodInfo | undefined;
|
|
20
22
|
export declare function genCallMethodOpts(nodeid: string): Blockly.MenuOption[];
|
|
@@ -5,8 +5,9 @@ interface NodeInfo {
|
|
|
5
5
|
name: string;
|
|
6
6
|
alias: string;
|
|
7
7
|
}
|
|
8
|
-
type Filter = 'onEvent' | 'callMethod';
|
|
9
|
-
export declare function
|
|
8
|
+
type Filter = 'onEvent' | 'callMethod' | 'getProp' | 'setProp';
|
|
9
|
+
export declare function isAvailOfNode(filter: Filter): boolean;
|
|
10
|
+
export declare function getAllNodeInfos(filter: Filter): NodeInfo[];
|
|
10
11
|
export declare function getNodeInfo(nodeid: string): NodeInfo | undefined;
|
|
11
|
-
export declare function genNodeOpts(filter
|
|
12
|
+
export declare function genNodeOpts(filter: Filter): Blockly.MenuOption[];
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Blockly from 'blockly/core';
|
|
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
|
+
interface PropInfo {
|
|
15
|
+
key: string;
|
|
16
|
+
names: string[];
|
|
17
|
+
meta: MetaRegular | MetaRemain;
|
|
18
|
+
}
|
|
19
|
+
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[];
|
|
24
|
+
export {};
|
|
@@ -7,3 +7,4 @@ export declare function toCheck(key: string): string;
|
|
|
7
7
|
export declare function ensureOpts(options: Blockly.MenuOption[]): Blockly.MenuOption[];
|
|
8
8
|
export declare function getBlockDepth(block: Blockly.Block | null): number;
|
|
9
9
|
export declare function getPropType(prop: ZProp): Type;
|
|
10
|
+
export declare function isReadonlyOfProp(keys: string, prop: ZProp): boolean;
|