x-block-lib 0.10.32 → 0.10.34
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/i18n-en.g7xrumzj.js +1 -0
- package/dist/i18n-zhHans.hwzyg72e.js +1 -0
- package/dist/index.d.ts +140 -316
- package/dist/index.js +151 -10198
- package/dist/rolldown-runtime.mam1o4z7.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +37 -53
- package/dist/i18n-en.may04z0x.js +0 -21
- package/dist/i18n-zhHans.co0odqoc.js +0 -21
- package/dist/msg-en.k1nt2k1p.js +0 -520
- package/dist/msg-zhHans.fw3xr2l3.js +0 -520
- package/dist/rolldown-runtime.expcly8c.js +0 -20
- package/dist/vendor.kijv4sw8.js +0 -24153
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime.mam1o4z7.js";var t=e({default:()=>n}),n={"x-block-lib":{bind:`Bind`,dlg:{source:{title:`Source`}},funcEntry:`Func Entry`,implementMethod:`Implement Method`,msg:{cannotOperateInLockedState:`Cannot operate in locked state`},navigator:`Navigator`,noOption:`No Option`,procedure:`Procedure`,temporaryBlock:`Temporary Block`,tip:{hotkeyCtrlE:`Press 'Ctrl W' to navigate`,hotkeyCtrlQ:`Press 'Ctrl Q' to clean workspace`,hotkeyCtrlW:`Press 'Ctrl R' to toggle lock state`},watchEffect:`Watch Effect`}};export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime.mam1o4z7.js";var t=e({default:()=>n}),n={"x-block-lib":{bind:`绑定`,dlg:{source:{title:`源代码`}},funcEntry:`函数入口`,implementMethod:`实现方法`,msg:{cannotOperateInLockedState:`锁定状态下不能操作`},navigator:`导航器`,noOption:`没有选项`,procedure:`子程序`,temporaryBlock:`临时块`,tip:{hotkeyCtrlE:`按「Ctrl E」导航`,hotkeyCtrlQ:`按「Ctrl Q」清理工作区`,hotkeyCtrlW:`按「Ctrl W」切换锁状态`},watchEffect:`观察效应`}};export{t};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,316 +1,140 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
} & {
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
update: () =>
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
};
|
|
142
|
-
refs: {
|
|
143
|
-
blocklyDiv: HTMLDivElement;
|
|
144
|
-
clean: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
145
|
-
lock: boolean;
|
|
146
|
-
}> & Readonly<{}>, {
|
|
147
|
-
cleanWorkspace: () => void;
|
|
148
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
149
|
-
P: {};
|
|
150
|
-
B: {};
|
|
151
|
-
D: {};
|
|
152
|
-
C: {};
|
|
153
|
-
M: {};
|
|
154
|
-
Defaults: {};
|
|
155
|
-
}, Readonly<{
|
|
156
|
-
lock: boolean;
|
|
157
|
-
}> & Readonly<{}>, {
|
|
158
|
-
cleanWorkspace: () => void;
|
|
159
|
-
}, {}, {}, {}, {}> | null;
|
|
160
|
-
navigator: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
161
|
-
type: "list" | "tree";
|
|
162
|
-
lock: boolean;
|
|
163
|
-
}> & Readonly<{}>, {
|
|
164
|
-
open: WritableComputedRef<boolean, boolean>;
|
|
165
|
-
update: () => void;
|
|
166
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
167
|
-
blockList: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
168
|
-
modelValue: boolean;
|
|
169
|
-
} & {
|
|
170
|
-
lock: boolean;
|
|
171
|
-
}> & Readonly<{
|
|
172
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
173
|
-
}>, {
|
|
174
|
-
update: () => void;
|
|
175
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
176
|
-
"update:modelValue": (value: boolean) => any;
|
|
177
|
-
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
178
|
-
P: {};
|
|
179
|
-
B: {};
|
|
180
|
-
D: {};
|
|
181
|
-
C: {};
|
|
182
|
-
M: {};
|
|
183
|
-
Defaults: {};
|
|
184
|
-
}, Readonly<{
|
|
185
|
-
modelValue: boolean;
|
|
186
|
-
} & {
|
|
187
|
-
lock: boolean;
|
|
188
|
-
}> & Readonly<{
|
|
189
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
190
|
-
}>, {
|
|
191
|
-
update: () => void;
|
|
192
|
-
}, {}, {}, {}, {}> | null;
|
|
193
|
-
blockTree: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
194
|
-
modelValue: boolean;
|
|
195
|
-
}> & Readonly<{
|
|
196
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
197
|
-
}>, {
|
|
198
|
-
update: () => void;
|
|
199
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
200
|
-
"update:modelValue": (value: boolean) => any;
|
|
201
|
-
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
202
|
-
P: {};
|
|
203
|
-
B: {};
|
|
204
|
-
D: {};
|
|
205
|
-
C: {};
|
|
206
|
-
M: {};
|
|
207
|
-
Defaults: {};
|
|
208
|
-
}, Readonly<{
|
|
209
|
-
modelValue: boolean;
|
|
210
|
-
}> & Readonly<{
|
|
211
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
212
|
-
}>, {
|
|
213
|
-
update: () => void;
|
|
214
|
-
}, {}, {}, {}, {}> | null;
|
|
215
|
-
}, any, ComponentProvideOptions, {
|
|
216
|
-
P: {};
|
|
217
|
-
B: {};
|
|
218
|
-
D: {};
|
|
219
|
-
C: {};
|
|
220
|
-
M: {};
|
|
221
|
-
Defaults: {};
|
|
222
|
-
}, Readonly<{
|
|
223
|
-
type: "list" | "tree";
|
|
224
|
-
lock: boolean;
|
|
225
|
-
}> & Readonly<{}>, {
|
|
226
|
-
open: WritableComputedRef<boolean, boolean>;
|
|
227
|
-
update: () => void;
|
|
228
|
-
}, {}, {}, {}, {}> | null;
|
|
229
|
-
parentContainer: HTMLDivElement;
|
|
230
|
-
};
|
|
231
|
-
rootEl: HTMLDivElement;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
235
|
-
|
|
236
|
-
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
237
|
-
new (): {
|
|
238
|
-
$slots: S;
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
declare const _default: {
|
|
243
|
-
install: (app: App) => void;
|
|
244
|
-
};
|
|
245
|
-
export default _default;
|
|
246
|
-
|
|
247
|
-
declare interface EventInfo {
|
|
248
|
-
id: string;
|
|
249
|
-
kind: EventKind;
|
|
250
|
-
names: string[];
|
|
251
|
-
params?: Param[];
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
declare interface Field {
|
|
255
|
-
key: string;
|
|
256
|
-
name: string;
|
|
257
|
-
type: Type;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export declare function getCallMethodInfo(id: string): MethodInfo | undefined;
|
|
261
|
-
|
|
262
|
-
export declare function getImplementMethodInfo(id: string): MethodInfo | undefined;
|
|
263
|
-
|
|
264
|
-
export declare function getNodeInfo(nodeid: string): NodeInfo | undefined;
|
|
265
|
-
|
|
266
|
-
export declare function getOnEventInfo(id: string): EventInfo | undefined;
|
|
267
|
-
|
|
268
|
-
export declare function getPropertyInfo(id: string): PropertyInfo | undefined;
|
|
269
|
-
|
|
270
|
-
export declare function getTriggerEventInfo(id: string): EventInfo | undefined;
|
|
271
|
-
|
|
272
|
-
export declare const install: (app: App) => void;
|
|
273
|
-
|
|
274
|
-
export declare function loadLocaleMessageBlock(locale: string): Promise<object>;
|
|
275
|
-
|
|
276
|
-
declare interface MethodInfo {
|
|
277
|
-
id: string;
|
|
278
|
-
kind: MethodKind;
|
|
279
|
-
names: string[];
|
|
280
|
-
inputs?: Field[];
|
|
281
|
-
outputs?: Field[];
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
declare interface NodeInfo {
|
|
285
|
-
id: string;
|
|
286
|
-
key: string;
|
|
287
|
-
name: string;
|
|
288
|
-
alias: string;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
declare interface Param {
|
|
292
|
-
key: string;
|
|
293
|
-
name: string;
|
|
294
|
-
type: Type;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
declare interface PropertyInfo {
|
|
298
|
-
id: string;
|
|
299
|
-
kind: PropertyKind;
|
|
300
|
-
names: string[];
|
|
301
|
-
meta: {
|
|
302
|
-
element: true;
|
|
303
|
-
raw: ZProperty;
|
|
304
|
-
} | {
|
|
305
|
-
element?: false;
|
|
306
|
-
raw: {
|
|
307
|
-
type: Type;
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
declare type Type_2 = 'page' | 'comp' | 'func' | 'flow' | 'json';
|
|
313
|
-
|
|
314
|
-
export declare const XBlockly: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
315
|
-
|
|
316
|
-
export { }
|
|
1
|
+
import * as Blockly from "blockly/core";
|
|
2
|
+
import { Type } from "x-essential-lib";
|
|
3
|
+
import { EventKind, MethodKind, PropertyKind, ZProperty } from "x-runtime-lib";
|
|
4
|
+
import { App } from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/core/utils/app/event.d.ts
|
|
7
|
+
interface Param {
|
|
8
|
+
key: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: Type;
|
|
11
|
+
}
|
|
12
|
+
interface EventInfo {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: EventKind;
|
|
15
|
+
names: string[];
|
|
16
|
+
params?: Param[];
|
|
17
|
+
}
|
|
18
|
+
declare function getOnEventInfo(id: string): EventInfo | undefined;
|
|
19
|
+
declare function getTriggerEventInfo(id: string): EventInfo | undefined;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/core/utils/app/method.d.ts
|
|
22
|
+
interface Field {
|
|
23
|
+
key: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: Type;
|
|
26
|
+
}
|
|
27
|
+
interface MethodInfo {
|
|
28
|
+
id: string;
|
|
29
|
+
kind: MethodKind;
|
|
30
|
+
names: string[];
|
|
31
|
+
inputs?: Field[];
|
|
32
|
+
outputs?: Field[];
|
|
33
|
+
}
|
|
34
|
+
declare function getCallMethodInfo(id: string): MethodInfo | undefined;
|
|
35
|
+
declare function getImplementMethodInfo(id: string): MethodInfo | undefined;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/core/utils/app/node.d.ts
|
|
38
|
+
interface NodeInfo {
|
|
39
|
+
id: string;
|
|
40
|
+
key: string;
|
|
41
|
+
name: string;
|
|
42
|
+
alias: string;
|
|
43
|
+
}
|
|
44
|
+
declare function getNodeInfo(nodeid: string): NodeInfo | undefined;
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/core/utils/app/property.d.ts
|
|
47
|
+
interface PropertyInfo {
|
|
48
|
+
id: string;
|
|
49
|
+
kind: PropertyKind;
|
|
50
|
+
names: string[];
|
|
51
|
+
meta: {
|
|
52
|
+
element: true;
|
|
53
|
+
raw: ZProperty;
|
|
54
|
+
} | {
|
|
55
|
+
element?: false;
|
|
56
|
+
raw: {
|
|
57
|
+
type: Type;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
declare function getPropertyInfo(id: string): PropertyInfo | undefined;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/blockly/workspace.d.ts
|
|
64
|
+
type Type$1 = 'page' | 'comp' | 'func' | 'flow' | 'json';
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/blockly/index.vue.d.ts
|
|
67
|
+
type __VLS_Props = {
|
|
68
|
+
type: Type$1;
|
|
69
|
+
version: string;
|
|
70
|
+
locale: string;
|
|
71
|
+
dark: boolean;
|
|
72
|
+
};
|
|
73
|
+
type __VLS_ModelProps = {
|
|
74
|
+
'lock': boolean;
|
|
75
|
+
'scale': number;
|
|
76
|
+
};
|
|
77
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
78
|
+
declare var __VLS_1: {};
|
|
79
|
+
type __VLS_Slots = {} & {
|
|
80
|
+
bottom?: (props: typeof __VLS_1) => any;
|
|
81
|
+
};
|
|
82
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
83
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
84
|
+
load: (state: any) => void;
|
|
85
|
+
save: () => any;
|
|
86
|
+
appendBlock: (state: Blockly.serialization.blocks.State) => void;
|
|
87
|
+
generateCode: () => string | undefined;
|
|
88
|
+
generateReactivity: () => import("x-runtime-lib").Reactivity;
|
|
89
|
+
fireStateChange: () => void;
|
|
90
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
|
+
"update:lock": (value: boolean) => any;
|
|
92
|
+
"update:scale": (value: number) => any;
|
|
93
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
94
|
+
"onUpdate:lock"?: ((value: boolean) => any) | undefined;
|
|
95
|
+
"onUpdate:scale"?: ((value: number) => any) | undefined;
|
|
96
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
97
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
98
|
+
declare const _default: typeof __VLS_export;
|
|
99
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
100
|
+
new (): {
|
|
101
|
+
$slots: S;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/index.d.ts
|
|
106
|
+
declare const install: (app: App) => void;
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/i18n/index.d.ts
|
|
109
|
+
declare function loadLocaleMessageBlock(locale: string): Promise<{
|
|
110
|
+
'x-block-lib': {
|
|
111
|
+
bind: string;
|
|
112
|
+
dlg: {
|
|
113
|
+
source: {
|
|
114
|
+
title: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
funcEntry: string;
|
|
118
|
+
implementMethod: string;
|
|
119
|
+
msg: {
|
|
120
|
+
cannotOperateInLockedState: string;
|
|
121
|
+
};
|
|
122
|
+
navigator: string;
|
|
123
|
+
noOption: string;
|
|
124
|
+
procedure: string;
|
|
125
|
+
temporaryBlock: string;
|
|
126
|
+
tip: {
|
|
127
|
+
hotkeyCtrlE: string;
|
|
128
|
+
hotkeyCtrlQ: string;
|
|
129
|
+
hotkeyCtrlW: string;
|
|
130
|
+
};
|
|
131
|
+
watchEffect: string;
|
|
132
|
+
};
|
|
133
|
+
}>;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/index.d.ts
|
|
136
|
+
declare const _default$1: {
|
|
137
|
+
install: (app: import("vue").App) => void;
|
|
138
|
+
};
|
|
139
|
+
//#endregion
|
|
140
|
+
export { _default as XBlockly, _default$1 as default, getCallMethodInfo, getImplementMethodInfo, getNodeInfo, getOnEventInfo, getPropertyInfo, getTriggerEventInfo, install, loadLocaleMessageBlock };
|