x-block-lib 0.9.17 → 0.9.19

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 +1,59 @@
1
+ import * as Blockly from 'blockly/core';
2
+ import { Type } from 'x-essential-lib';
3
+ import { PropertyKind } from 'x-runtime-lib';
4
+ import { BindType } from '@/core/utils/app';
5
+ type AppBindEntryV1Type = typeof APP_BIND_ENTRY_V1;
6
+ interface AppBindEntryV1 extends AppBindEntryV1Type {
7
+ bindType: BindType | '';
8
+ node: {
9
+ id: string;
10
+ key: string;
11
+ alias: string;
12
+ };
13
+ property: {
14
+ id: string;
15
+ kind: PropertyKind | '';
16
+ names: string[];
17
+ };
18
+ state: {
19
+ id: string;
20
+ name: string;
21
+ type: Type;
22
+ };
23
+ }
24
+ export type AppBindEntryBlockV1 = Blockly.BlockSvg & AppBindEntryV1;
25
+ declare const APP_BIND_ENTRY_V1: {
26
+ init: (this: AppBindEntryBlockV1) => void;
27
+ initData_: (this: AppBindEntryBlockV1) => void;
28
+ saveExtraState: (this: AppBindEntryBlockV1) => {
29
+ bindType: "" | BindType;
30
+ node: {
31
+ id: string;
32
+ key: string;
33
+ alias: string;
34
+ };
35
+ property: {
36
+ id: string;
37
+ kind: PropertyKind | "";
38
+ names: string[];
39
+ };
40
+ state: {
41
+ id: string;
42
+ name: string;
43
+ type: Type;
44
+ };
45
+ };
46
+ loadExtraState: (this: AppBindEntryBlockV1, state: any) => void;
47
+ genBindTypeOpts_: (this: AppBindEntryBlockV1) => Blockly.MenuOption[];
48
+ genNodeOpts_: (this: AppBindEntryBlockV1) => Blockly.MenuOption[];
49
+ genPropertyOpts_: (this: AppBindEntryBlockV1) => Blockly.MenuOption[];
50
+ genStateOpts_: (this: AppBindEntryBlockV1) => Blockly.MenuOption[];
51
+ onchange: (this: AppBindEntryBlockV1, event: Blockly.Events.Abstract) => void;
52
+ onBindTypeChange_: (this: AppBindEntryBlockV1, value: string) => void;
53
+ onNodeChange_: (this: AppBindEntryBlockV1, value: string) => void;
54
+ onPropertyChange_: (this: AppBindEntryBlockV1, value: string) => void;
55
+ onStateChange_: (this: AppBindEntryBlockV1, value: string) => void;
56
+ updateShape_: (this: AppBindEntryBlockV1) => void;
57
+ checkWarning_: (this: AppBindEntryBlockV1) => void;
58
+ };
1
59
  export {};
@@ -102,6 +102,7 @@ declare const _default: {
102
102
  WARN_TABLE_HAS_CHANGED: string;
103
103
  WARN_TABLE_NOT_FOUND: string;
104
104
  WARN_TYPE_NOT_FOUND: string;
105
+ WARN_TYPE_NOT_MATCH: string;
105
106
  APP_DO: string;
106
107
  APP_ENV_DEV: string;
107
108
  APP_ENV_PROD: string;
@@ -111,7 +112,9 @@ declare const _default: {
111
112
  APP_POPUP_MESSAGE_TYPE_INFO: string;
112
113
  APP_POPUP_MESSAGE_TYPE_SUCCESS: string;
113
114
  APP_POPUP_MESSAGE_TYPE_WARNING: string;
115
+ APP_RPOPERTY: string;
114
116
  APP_RETURN: string;
117
+ APP_STATE: string;
115
118
  APP_TEXT: string;
116
119
  APP_TITLE: string;
117
120
  APP_VALUE: string;
@@ -102,6 +102,7 @@ declare const _default: {
102
102
  WARN_TABLE_HAS_CHANGED: string;
103
103
  WARN_TABLE_NOT_FOUND: string;
104
104
  WARN_TYPE_NOT_FOUND: string;
105
+ WARN_TYPE_NOT_MATCH: string;
105
106
  APP_DO: string;
106
107
  APP_ENV_DEV: string;
107
108
  APP_ENV_PROD: string;
@@ -111,7 +112,9 @@ declare const _default: {
111
112
  APP_POPUP_MESSAGE_TYPE_INFO: string;
112
113
  APP_POPUP_MESSAGE_TYPE_SUCCESS: string;
113
114
  APP_POPUP_MESSAGE_TYPE_WARNING: string;
115
+ APP_PROPERTY: string;
114
116
  APP_RETURN: string;
117
+ APP_STATE: string;
115
118
  APP_TEXT: string;
116
119
  APP_TITLE: string;
117
120
  APP_VALUE: string;
@@ -1,3 +1,4 @@
1
- export declare const bindTypes: string[];
2
- export type BindType = (typeof bindTypes)[number];
3
- export declare const bindTypeOpts: [string, string][];
1
+ import * as Blockly from 'blockly/core';
2
+ export type BindType = 'property' | 'state';
3
+ export declare function getAllBindTypes(): BindType[];
4
+ export declare function genBindTypeOpts(): Blockly.MenuOption[];
@@ -1,5 +1,6 @@
1
1
  export * from './app';
2
2
  export * from './argument';
3
+ export * from './bind';
3
4
  export * from './comp';
4
5
  export * from './event';
5
6
  export * from './method';
@@ -0,0 +1,2 @@
1
+ import { t as en_default } from "./msg-en.k3x2cfi4.js";
2
+ export { en_default as default };