@luna-park/plugin 1.0.1 → 1.0.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/README.md +139 -0
- package/dist/extractor.cjs +16 -0
- package/dist/extractor.d.ts +245 -0
- package/dist/extractor.js +577 -0
- package/dist/index-CxGB_fZK.js +394 -0
- package/dist/index-DmZsz62R.cjs +5 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +483 -19
- package/dist/index.js +18 -70
- package/package.json +21 -16
- package/dist/index.umd.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,90 @@
|
|
|
1
|
-
import { Component
|
|
1
|
+
import { Component } from 'vue';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { PluginOption } from 'vite';
|
|
4
4
|
|
|
5
|
-
declare type
|
|
5
|
+
declare type Component_2 = {
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
+
declare enum EComponentPreview {
|
|
10
|
+
Compact = "compact",
|
|
11
|
+
Stretch = "stretch",
|
|
12
|
+
Full = "full"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare enum EComponentType {
|
|
16
|
+
Component = "component",
|
|
17
|
+
Page = "page"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare enum EConfigDisplay {
|
|
21
|
+
Smart = "smart",
|
|
22
|
+
Performance = "performance"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare enum EDynamicVariableOperation {
|
|
26
|
+
Equal = "equal",
|
|
27
|
+
Greater = "greater",
|
|
28
|
+
Less = "less",
|
|
29
|
+
StartsWith = "starts-with",
|
|
30
|
+
EndsWith = "ends-with",
|
|
31
|
+
Contains = "contains"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare enum EDynamicVariableType {
|
|
35
|
+
Constant = "constant",
|
|
36
|
+
Dynamic = "dynamic",
|
|
37
|
+
Token = "token"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare enum EElementType {
|
|
41
|
+
Script = "script",
|
|
42
|
+
Standalone = "standalone",
|
|
43
|
+
Folder = "folder",
|
|
44
|
+
MainLogic = "main",
|
|
45
|
+
Logic = "logic",
|
|
46
|
+
Config = "config",
|
|
47
|
+
Text = "text",
|
|
48
|
+
Store = "store",
|
|
49
|
+
Database = "database",
|
|
50
|
+
Component = "component",
|
|
51
|
+
Route = "route",
|
|
52
|
+
Type = "type",
|
|
53
|
+
Cron = "cron",
|
|
54
|
+
Media = "media"
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare enum EFileSortStrategy {
|
|
58
|
+
Name = "name",
|
|
59
|
+
Type = "type"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare enum EHistoryMode {
|
|
63
|
+
Hash = "hash",
|
|
64
|
+
Web = "web",
|
|
65
|
+
Memory = "memory"
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare enum ELayoutElement {
|
|
69
|
+
input = "input",
|
|
70
|
+
div = "div",
|
|
71
|
+
media = "media",
|
|
72
|
+
customText = "customText",
|
|
73
|
+
component = "component",
|
|
74
|
+
package = "package",
|
|
75
|
+
customHtml = "customHtml",
|
|
76
|
+
slot = "slot",
|
|
77
|
+
template = "template",
|
|
78
|
+
variable = "variable",
|
|
79
|
+
widget = "widget"
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare enum ELogicMode {
|
|
83
|
+
Pure = "pure",
|
|
84
|
+
Macro = "macro",
|
|
85
|
+
Code = "code"
|
|
86
|
+
}
|
|
87
|
+
|
|
9
88
|
export declare enum ELogicScope {
|
|
10
89
|
Frontend = "frontend",
|
|
11
90
|
Backend = "backend",
|
|
@@ -19,12 +98,46 @@ export declare enum ELogicType {
|
|
|
19
98
|
operation = "operation"
|
|
20
99
|
}
|
|
21
100
|
|
|
101
|
+
declare enum EResponsiveStrategy {
|
|
102
|
+
DesktopFirst = "desktop-first",
|
|
103
|
+
MobileFirst = "mobile-first"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare enum ERouteMethod {
|
|
107
|
+
Get = "get",
|
|
108
|
+
Post = "post",
|
|
109
|
+
Put = "put",
|
|
110
|
+
Delete = "delete"
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare enum EStoreType {
|
|
114
|
+
Memory = "memory",
|
|
115
|
+
Session = "session",
|
|
116
|
+
Local = "local"
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare enum EThemeMode {
|
|
120
|
+
Dark = "dark",
|
|
121
|
+
Light = "light",
|
|
122
|
+
Auto = "auto"
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare enum ETokenType {
|
|
126
|
+
Color = "color",
|
|
127
|
+
FontSize = "font-size",
|
|
128
|
+
FontWeight = "font-weight",
|
|
129
|
+
FontFamily = "font-family",
|
|
130
|
+
Length = "length",
|
|
131
|
+
Time = "time"
|
|
132
|
+
}
|
|
133
|
+
|
|
22
134
|
export declare enum EVarType {
|
|
23
135
|
exec = "exec",
|
|
24
136
|
number = "number",
|
|
25
137
|
string = "string",
|
|
26
138
|
boolean = "boolean",
|
|
27
139
|
object = "object",
|
|
140
|
+
record = "record",
|
|
28
141
|
array = "array",
|
|
29
142
|
interface = "interface",
|
|
30
143
|
type = "type",
|
|
@@ -42,10 +155,11 @@ export declare const LogicType: {
|
|
|
42
155
|
array: <T extends TSchema, TArgs extends TArguments<Array<T>>>(items: T, args?: TArgs) => TArray<T> & TArgs;
|
|
43
156
|
boolean: <TArgs extends TArguments<boolean>>(args?: TArgs) => TBoolean & TArgs;
|
|
44
157
|
exec: (args?: TArguments) => TExec;
|
|
45
|
-
function: <TInputs extends TObject, TOutput extends TSchema = TUndefined>(inputs
|
|
158
|
+
function: <TInputs extends TObject, TOutput extends TSchema = TUndefined>(inputs?: TInputs, output?: TOutput, args?: TArguments) => TFunction<TInputs, TOutput>;
|
|
46
159
|
interface: <T, TArgs extends TArguments<T> = TArguments<T>>(interfaceClass: (new (...args: any) => T) | string, args?: TArgs) => TInterface<T> & TArgs;
|
|
47
160
|
number: <TArgs extends TArguments<number>>(args?: TArgs) => TNumber & TArgs;
|
|
48
161
|
object: <T extends TProperties, TArgs extends TArguments<object>>(properties?: T, args?: TArgs) => TObject<T> & TArgs;
|
|
162
|
+
record: <TKey extends TString | TNumber, TValue extends TSchema = TSchema<TAnyLogic>>(key: TKey, value: TValue, args?: TArguments) => TRecord<TKey, TValue>;
|
|
49
163
|
string: <TArgs extends TArguments<string>>(args?: TArgs) => TString & TArgs;
|
|
50
164
|
undefined: (args?: TArguments) => TUndefined;
|
|
51
165
|
union: <T extends Array<TSchema>>(elements: T, args?: TArguments) => TUnion<T>;
|
|
@@ -53,6 +167,14 @@ export declare const LogicType: {
|
|
|
53
167
|
void: (args?: TArguments) => TVoid;
|
|
54
168
|
};
|
|
55
169
|
|
|
170
|
+
export declare const LogicUtil: {
|
|
171
|
+
omit(target: TObject, keys: Array<string>): TObject;
|
|
172
|
+
partial(target: TObject, force?: boolean): TObject;
|
|
173
|
+
pick(target: TObject, keys: Array<string>): TObject;
|
|
174
|
+
promise(target: TSchema): TSchema;
|
|
175
|
+
required(target: TObject): TObject;
|
|
176
|
+
};
|
|
177
|
+
|
|
56
178
|
export declare function makeLogicNode<TInputs extends TNodeInterfaceDescriptor, TOutputs extends TNodeInterfaceDescriptor, TConfig extends TNodeConfigDescriptor>(node: TNodeDescriptor<TInputs, TOutputs, TConfig>): TLogicNode;
|
|
57
179
|
|
|
58
180
|
export declare function makePlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>): TPlugin<TConfig, TInternal>;
|
|
@@ -81,11 +203,98 @@ declare type StaticObject<T extends TProperties> = {
|
|
|
81
203
|
[K in OptionalKeys<T>]?: Static<T[K]>;
|
|
82
204
|
};
|
|
83
205
|
|
|
206
|
+
declare type StaticRecord<TKey extends TSchema, TValue extends TSchema> = Record<Static<TKey>, Static<TValue>>;
|
|
207
|
+
|
|
84
208
|
declare type StaticUnion<T extends Array<TSchema>> = {
|
|
85
209
|
[K in keyof T]: Static<T[K]>;
|
|
86
210
|
}[number];
|
|
87
211
|
|
|
88
|
-
declare type
|
|
212
|
+
declare type TAnchorExport = TSchema;
|
|
213
|
+
|
|
214
|
+
declare type TAnyLogic = TExec | TObject | TRecord<any, any> | TInterface | TType | TArray<any> | TString | TNumber | TBoolean | TUnknown | TUndefined | TUnion<any> | TFunction<any, any> | TVoid;
|
|
215
|
+
|
|
216
|
+
declare type TApplicationConfig = {
|
|
217
|
+
backend: {
|
|
218
|
+
proxy: string;
|
|
219
|
+
salt: string;
|
|
220
|
+
};
|
|
221
|
+
database: {
|
|
222
|
+
type: string;
|
|
223
|
+
};
|
|
224
|
+
description?: string;
|
|
225
|
+
desktop: {
|
|
226
|
+
fullscreen: boolean;
|
|
227
|
+
height: number;
|
|
228
|
+
resizable: boolean;
|
|
229
|
+
version: string;
|
|
230
|
+
width: number;
|
|
231
|
+
};
|
|
232
|
+
libraries: Record<string, boolean>;
|
|
233
|
+
packages: Record<string, {
|
|
234
|
+
name: string;
|
|
235
|
+
components: TExportNodeResult["components"];
|
|
236
|
+
description?: string;
|
|
237
|
+
functions: TExportNodeResult["functions"];
|
|
238
|
+
types: TExportNodeResult["types"];
|
|
239
|
+
}>;
|
|
240
|
+
palette: {
|
|
241
|
+
content: string;
|
|
242
|
+
forceTheme: boolean;
|
|
243
|
+
inject: {
|
|
244
|
+
css: string;
|
|
245
|
+
head: string;
|
|
246
|
+
html: string;
|
|
247
|
+
js: string;
|
|
248
|
+
};
|
|
249
|
+
length: {
|
|
250
|
+
border: number;
|
|
251
|
+
radius: number;
|
|
252
|
+
};
|
|
253
|
+
matchEditor: boolean;
|
|
254
|
+
primary: string;
|
|
255
|
+
theme: EThemeMode;
|
|
256
|
+
tokens: {
|
|
257
|
+
colors: Array<{
|
|
258
|
+
id: string;
|
|
259
|
+
name: string;
|
|
260
|
+
value: string;
|
|
261
|
+
}>;
|
|
262
|
+
fonts: Array<{
|
|
263
|
+
id: string;
|
|
264
|
+
name: string;
|
|
265
|
+
value: string;
|
|
266
|
+
}>;
|
|
267
|
+
lengths: Array<{
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
value: string;
|
|
271
|
+
}>;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
plugins: Record<string, {
|
|
275
|
+
config?: unknown;
|
|
276
|
+
internal?: unknown;
|
|
277
|
+
target: string;
|
|
278
|
+
}>;
|
|
279
|
+
state: {
|
|
280
|
+
currentTab: string;
|
|
281
|
+
explorerSort: EFileSortStrategy;
|
|
282
|
+
tabs: Array<string>;
|
|
283
|
+
};
|
|
284
|
+
style: {
|
|
285
|
+
strategy: EResponsiveStrategy;
|
|
286
|
+
};
|
|
287
|
+
web: {
|
|
288
|
+
history: EHistoryMode;
|
|
289
|
+
pwa: boolean;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
declare type TApplicationExport = {
|
|
294
|
+
name: string;
|
|
295
|
+
config: TApplicationConfig;
|
|
296
|
+
tree: TFileExport;
|
|
297
|
+
};
|
|
89
298
|
|
|
90
299
|
declare interface TArguments<TType = any> {
|
|
91
300
|
name?: string;
|
|
@@ -111,6 +320,8 @@ declare interface TArguments<TType = any> {
|
|
|
111
320
|
parse?: (arg: unknown) => unknown;
|
|
112
321
|
placeholder?: string;
|
|
113
322
|
priority?: boolean;
|
|
323
|
+
promise?: boolean;
|
|
324
|
+
required?: boolean;
|
|
114
325
|
static?: unknown;
|
|
115
326
|
sub?: TSchema;
|
|
116
327
|
}
|
|
@@ -126,18 +337,77 @@ declare interface TBoolean {
|
|
|
126
337
|
static: boolean;
|
|
127
338
|
}
|
|
128
339
|
|
|
129
|
-
declare type
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
340
|
+
declare type TCanvasExport = {
|
|
341
|
+
location: TVector;
|
|
342
|
+
zoom: number;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
export declare type TComponent = {
|
|
346
|
+
component: Component;
|
|
133
347
|
custom?: {
|
|
134
348
|
slots: (attributes: Record<string, unknown>) => Record<string, false | TSchema>;
|
|
135
349
|
};
|
|
350
|
+
emits?: Record<string, TSchema>;
|
|
136
351
|
import?: Array<{
|
|
137
352
|
name: string;
|
|
138
353
|
target: string;
|
|
139
354
|
}>;
|
|
140
|
-
|
|
355
|
+
models?: Record<string, TSchema>;
|
|
356
|
+
name: string;
|
|
357
|
+
properties?: Record<string, TSchema>;
|
|
358
|
+
slots?: Record<string, TSchema<TObject> | TSchema<TVoid>>;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
declare type TComponentExport = {
|
|
362
|
+
name: string;
|
|
363
|
+
type: EElementType.Component;
|
|
364
|
+
collapsed?: boolean;
|
|
365
|
+
layout: TLayoutSchemaExport;
|
|
366
|
+
logics: Record<string, TLogicExport | TMainLogicExport>;
|
|
367
|
+
options: TComponentOptions;
|
|
368
|
+
state: TStateExport;
|
|
369
|
+
values: {
|
|
370
|
+
computed: Record<string, TValueExport>;
|
|
371
|
+
events: Record<string, TValueExport>;
|
|
372
|
+
model?: TSchema;
|
|
373
|
+
properties: Record<string, TValueExport>;
|
|
374
|
+
variables: Record<string, TValueExport>;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
declare type TComponentOptions = {
|
|
379
|
+
type: EComponentType;
|
|
380
|
+
path: string;
|
|
381
|
+
preview: EComponentPreview;
|
|
382
|
+
previewSize: string;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
declare type TConfigExport = {
|
|
386
|
+
name: string;
|
|
387
|
+
type: EElementType.Config;
|
|
388
|
+
content: unknown;
|
|
389
|
+
display: EConfigDisplay;
|
|
390
|
+
schema: TSchema;
|
|
391
|
+
scope: ELogicScope;
|
|
392
|
+
state: TStateExport;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
declare type TCronExport = {
|
|
396
|
+
name: string;
|
|
397
|
+
type: EElementType.Cron;
|
|
398
|
+
active: boolean;
|
|
399
|
+
editorTrigger: boolean;
|
|
400
|
+
logics: Record<string, TLogicExport | TMainLogicExport>;
|
|
401
|
+
state: TStateExport;
|
|
402
|
+
time: string;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
declare type TDatabaseExport = {
|
|
406
|
+
name: string;
|
|
407
|
+
type: EElementType.Database;
|
|
408
|
+
data: Array<Record<string, unknown>>;
|
|
409
|
+
schema: TSchema<TObject>;
|
|
410
|
+
state: TStateExport;
|
|
141
411
|
};
|
|
142
412
|
|
|
143
413
|
declare type TDocumentation = {
|
|
@@ -158,9 +428,22 @@ declare type TDocumentation = {
|
|
|
158
428
|
}>;
|
|
159
429
|
};
|
|
160
430
|
|
|
431
|
+
declare type TDynamicVariable = {
|
|
432
|
+
type: EDynamicVariableType;
|
|
433
|
+
access: Array<string>;
|
|
434
|
+
target: {
|
|
435
|
+
invert?: boolean;
|
|
436
|
+
operation: EDynamicVariableOperation;
|
|
437
|
+
variable?: TDynamicVariable;
|
|
438
|
+
};
|
|
439
|
+
token: string;
|
|
440
|
+
value: unknown;
|
|
441
|
+
};
|
|
442
|
+
|
|
161
443
|
declare type TEnum<TEnumType> = Array<TEnumType> | Record<string, TEnumType>;
|
|
162
444
|
|
|
163
445
|
declare type TEnv<TConfig extends TSchema = TSchema, TInternal = unknown> = {
|
|
446
|
+
app: TApplicationExport;
|
|
164
447
|
config: Static<TConfig>;
|
|
165
448
|
internal: TInternal;
|
|
166
449
|
mode: "build" | "editor";
|
|
@@ -170,6 +453,33 @@ declare interface TExec {
|
|
|
170
453
|
type: EVarType.exec;
|
|
171
454
|
}
|
|
172
455
|
|
|
456
|
+
declare type TExportNodeFunction = {
|
|
457
|
+
name?: string;
|
|
458
|
+
description?: string;
|
|
459
|
+
parameters?: Array<TSchema>;
|
|
460
|
+
return?: TSchema;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
declare type TExportNodeResult = {
|
|
464
|
+
components: Record<string, {
|
|
465
|
+
properties: Record<string, TSchema>;
|
|
466
|
+
slots: Record<string, TSchema>;
|
|
467
|
+
}>;
|
|
468
|
+
functions: Record<string, TExportNodeFunction>;
|
|
469
|
+
types: Record<string, TSchema>;
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
declare type TFileExport = (TFolderExport | TComponentExport | TConfigExport | TCronExport | TDatabaseExport | TRouteExport | TScriptExport | TStoreExport | TTextExport | TTypeExport | TMediaExport) & {
|
|
473
|
+
isEditing?: boolean;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
declare type TFolderExport = {
|
|
477
|
+
name: string;
|
|
478
|
+
type: EElementType.Folder;
|
|
479
|
+
children: Record<string, TFileExport>;
|
|
480
|
+
color?: string;
|
|
481
|
+
};
|
|
482
|
+
|
|
173
483
|
declare interface TFunction<TInputs extends TObject = TObject, TOutput extends TSchema = TUnknown> {
|
|
174
484
|
type: EVarType.function;
|
|
175
485
|
inputs: TInputs;
|
|
@@ -177,6 +487,12 @@ declare interface TFunction<TInputs extends TObject = TObject, TOutput extends T
|
|
|
177
487
|
static: StaticFunction<TInputs, TOutput>;
|
|
178
488
|
}
|
|
179
489
|
|
|
490
|
+
declare type TGraphExport = {
|
|
491
|
+
canvas: TCanvasExport;
|
|
492
|
+
nodes: Record<string, TNodeExport>;
|
|
493
|
+
wires: Record<string, TWireExport>;
|
|
494
|
+
};
|
|
495
|
+
|
|
180
496
|
declare interface TInterface<T = unknown> {
|
|
181
497
|
type: EVarType.interface;
|
|
182
498
|
class?: new (...args: any) => T;
|
|
@@ -184,7 +500,38 @@ declare interface TInterface<T = unknown> {
|
|
|
184
500
|
static: T;
|
|
185
501
|
}
|
|
186
502
|
|
|
187
|
-
declare type
|
|
503
|
+
declare type TLayoutSchemaExport = {
|
|
504
|
+
id: string;
|
|
505
|
+
name: string;
|
|
506
|
+
children: Array<TLayoutSchemaExport>;
|
|
507
|
+
classes: Array<TDynamicVariable>;
|
|
508
|
+
content?: Record<string, unknown>;
|
|
509
|
+
element: ELayoutElement;
|
|
510
|
+
events: Array<string>;
|
|
511
|
+
model?: Array<string>;
|
|
512
|
+
properties: Record<string, TDynamicVariable>;
|
|
513
|
+
style: Record<"base" | string, Record<"default" | "hover", Record<string, Record<string, TDynamicVariable>> & {
|
|
514
|
+
collapsed?: boolean;
|
|
515
|
+
}>>;
|
|
516
|
+
tag?: string;
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
declare type TLogicExport = {
|
|
520
|
+
name: string;
|
|
521
|
+
type: EElementType.Logic | EElementType.Standalone;
|
|
522
|
+
code?: string;
|
|
523
|
+
export: boolean;
|
|
524
|
+
graph: TGraphExport;
|
|
525
|
+
inputs: Record<string, TAnchorExport>;
|
|
526
|
+
mode: ELogicMode;
|
|
527
|
+
outputs: Record<string, TAnchorExport>;
|
|
528
|
+
packages?: Array<string>;
|
|
529
|
+
values: {
|
|
530
|
+
variables: Record<string, TValueExport>;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
export declare type TLogicNode = {
|
|
188
535
|
name: string;
|
|
189
536
|
type?: ELogicType;
|
|
190
537
|
build?: {
|
|
@@ -229,6 +576,22 @@ declare type TLogicNode = {
|
|
|
229
576
|
outputs: TNodeInterfaceDescriptor;
|
|
230
577
|
};
|
|
231
578
|
|
|
579
|
+
declare type TMainLogicExport = {
|
|
580
|
+
name: "Main";
|
|
581
|
+
type: EElementType.MainLogic;
|
|
582
|
+
graph: TGraphExport;
|
|
583
|
+
values: {
|
|
584
|
+
variables: Record<string, TValueExport>;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
declare type TMediaExport = {
|
|
589
|
+
name: string;
|
|
590
|
+
type: EElementType.Media;
|
|
591
|
+
mimeType: string;
|
|
592
|
+
target: string;
|
|
593
|
+
};
|
|
594
|
+
|
|
232
595
|
declare type TMethodsOf<TInputs extends TNodeInterfaceDescriptor, TOutputs extends TNodeInterfaceDescriptor> = MethodsFrom<TOnlyExecOf<TInputs>> & MethodsFrom<TOnlyVarsOf<TOutputs>>;
|
|
233
596
|
|
|
234
597
|
declare type TNodeConfigDescriptor = Record<string, TSchema>;
|
|
@@ -282,10 +645,10 @@ declare type TNodeDisplay = {
|
|
|
282
645
|
scope?: ELogicScope;
|
|
283
646
|
transparent?: boolean;
|
|
284
647
|
};
|
|
285
|
-
custom?:
|
|
648
|
+
custom?: Component_2 | string;
|
|
286
649
|
data?: Record<string, unknown>;
|
|
287
650
|
inspector?: string;
|
|
288
|
-
interface?:
|
|
651
|
+
interface?: Component_2 | string;
|
|
289
652
|
priority?: number;
|
|
290
653
|
};
|
|
291
654
|
|
|
@@ -304,6 +667,16 @@ declare type TNodeDynamics<TInputs extends TNodeInterfaceDescriptor, TOutputs ex
|
|
|
304
667
|
}) => Partial<TNodeInterfaceDescriptor>;
|
|
305
668
|
};
|
|
306
669
|
|
|
670
|
+
declare type TNodeExport = {
|
|
671
|
+
data?: Record<string, unknown>;
|
|
672
|
+
internal?: {
|
|
673
|
+
inputs?: Record<string, unknown>;
|
|
674
|
+
outputs?: Record<string, unknown>;
|
|
675
|
+
};
|
|
676
|
+
location: TVector;
|
|
677
|
+
logic: string;
|
|
678
|
+
};
|
|
679
|
+
|
|
307
680
|
declare type TNodeGenerated<TInputs extends TNodeInterfaceDescriptor, TOutputs extends TNodeInterfaceDescriptor, TConfig extends TNodeConfigDescriptor> = {
|
|
308
681
|
name?: string;
|
|
309
682
|
type?: ELogicType;
|
|
@@ -374,8 +747,6 @@ declare type TOnlyVarsOf<TNodeInterfaceDescriptor> = {
|
|
|
374
747
|
declare type TOption<TParams = unknown, TResult = unknown> = TResult | ((env: TParams) => Promise<TResult> | TResult | undefined);
|
|
375
748
|
|
|
376
749
|
export declare type TPlugin<TConfig extends TSchema = TSchema, TInternal = unknown> = {
|
|
377
|
-
id: string;
|
|
378
|
-
name: string;
|
|
379
750
|
build?: {
|
|
380
751
|
imports?: TOption<TEnv<TConfig, TInternal>, Array<{
|
|
381
752
|
name: string;
|
|
@@ -391,39 +762,114 @@ export declare type TPlugin<TConfig extends TSchema = TSchema, TInternal = unkno
|
|
|
391
762
|
}>;
|
|
392
763
|
description?: string;
|
|
393
764
|
editor?: {
|
|
394
|
-
components?: TOption<TEnv<TConfig, TInternal>, Array<
|
|
395
|
-
nodes?: TOption<TEnv<TConfig, TInternal>, Array<
|
|
396
|
-
|
|
765
|
+
components?: TOption<TEnv<TConfig, TInternal>, Array<TComponent>>;
|
|
766
|
+
nodes?: TOption<TEnv<TConfig, TInternal>, Array<TLogicNode>>;
|
|
767
|
+
tokens?: TOption<TEnv<TConfig, TInternal>, Record<ETokenType, Record<string, TToken>>>;
|
|
768
|
+
wrapper?: TOption<TEnv<TConfig, TInternal>, Component>;
|
|
397
769
|
};
|
|
398
770
|
icon: string;
|
|
771
|
+
id: string;
|
|
399
772
|
inject?: {
|
|
400
773
|
css?: TOption<TEnv<TConfig, TInternal>, string>;
|
|
401
774
|
js?: TOption<TEnv<TConfig, TInternal>, string>;
|
|
402
775
|
};
|
|
403
|
-
interface?:
|
|
776
|
+
interface?: Component;
|
|
404
777
|
internal?: TInternal;
|
|
405
778
|
lifecycle?: {
|
|
406
779
|
mount?: (env: TEnv<TConfig, TInternal>) => Promise<void> | void;
|
|
407
780
|
unmount?: (env: TEnv<TConfig, TInternal>) => Promise<void> | void;
|
|
408
781
|
update?: (env: TEnv<TConfig, TInternal>) => Promise<void> | void;
|
|
409
782
|
};
|
|
783
|
+
name: string;
|
|
410
784
|
};
|
|
411
785
|
|
|
412
786
|
declare type TProperties = Record<string, TSchema>;
|
|
413
787
|
|
|
414
|
-
declare
|
|
788
|
+
declare interface TRecord<TKey extends TString | TNumber = TString, TValue extends TSchema = TSchema> {
|
|
789
|
+
type: EVarType.record;
|
|
790
|
+
key: TKey;
|
|
791
|
+
static: StaticRecord<TKey, TValue>;
|
|
792
|
+
value: TValue;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
declare type TRouteExport = {
|
|
796
|
+
name: string;
|
|
797
|
+
type: EElementType.Route;
|
|
798
|
+
dev?: boolean;
|
|
799
|
+
input: {
|
|
800
|
+
body: TSchema;
|
|
801
|
+
headers: TSchema;
|
|
802
|
+
query: TSchema;
|
|
803
|
+
};
|
|
804
|
+
logics: Record<string, TLogicExport | TMainLogicExport>;
|
|
805
|
+
method: ERouteMethod;
|
|
806
|
+
output: TSchema;
|
|
807
|
+
path: string;
|
|
808
|
+
state: TStateExport;
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
export declare type TSchema<TLogic extends TAnyLogic = TAnyLogic> = TArguments & TLogic;
|
|
812
|
+
|
|
813
|
+
declare type TScriptExport = {
|
|
814
|
+
name: string;
|
|
815
|
+
type: EElementType.Script;
|
|
816
|
+
logics: Record<string, TLogicExport | TMainLogicExport>;
|
|
817
|
+
options?: {
|
|
818
|
+
autoReload?: boolean;
|
|
819
|
+
};
|
|
820
|
+
scope: ELogicScope;
|
|
821
|
+
state: TStateExport;
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
declare type TStateExport = Record<string, unknown>;
|
|
825
|
+
|
|
826
|
+
declare type TStoreExport = {
|
|
827
|
+
name: string;
|
|
828
|
+
type: EElementType.Store;
|
|
829
|
+
default: unknown;
|
|
830
|
+
logics: Record<string, TLogicExport>;
|
|
831
|
+
options: TStoreOptions;
|
|
832
|
+
schema: TSchema;
|
|
833
|
+
state: TStateExport;
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
declare type TStoreOptions = {
|
|
837
|
+
type: EStoreType;
|
|
838
|
+
};
|
|
415
839
|
|
|
416
840
|
declare interface TString {
|
|
417
841
|
type: EVarType.string;
|
|
418
842
|
static: string;
|
|
419
843
|
}
|
|
420
844
|
|
|
845
|
+
declare type TTextExport = {
|
|
846
|
+
name: string;
|
|
847
|
+
type: EElementType.Text;
|
|
848
|
+
blocks: Array<{
|
|
849
|
+
content: string;
|
|
850
|
+
key: string;
|
|
851
|
+
}>;
|
|
852
|
+
state: TStateExport;
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
declare type TToken = {
|
|
856
|
+
name?: string;
|
|
857
|
+
value: string;
|
|
858
|
+
};
|
|
859
|
+
|
|
421
860
|
declare interface TType<T extends TSchema = TSchema> {
|
|
422
861
|
type: EVarType.type;
|
|
423
862
|
static: T;
|
|
424
863
|
target: Array<string>;
|
|
425
864
|
}
|
|
426
865
|
|
|
866
|
+
declare type TTypeExport = {
|
|
867
|
+
name: string;
|
|
868
|
+
type: EElementType.Type;
|
|
869
|
+
schemas: Record<string, TSchema>;
|
|
870
|
+
state: TStateExport;
|
|
871
|
+
};
|
|
872
|
+
|
|
427
873
|
declare interface TUndefined {
|
|
428
874
|
type: EVarType.undefined;
|
|
429
875
|
static: undefined;
|
|
@@ -440,9 +886,27 @@ declare interface TUnknown {
|
|
|
440
886
|
static: unknown;
|
|
441
887
|
}
|
|
442
888
|
|
|
889
|
+
declare type TValueExport = TSchema;
|
|
890
|
+
|
|
891
|
+
declare type TVector = {
|
|
892
|
+
x: number;
|
|
893
|
+
y: number;
|
|
894
|
+
};
|
|
895
|
+
|
|
443
896
|
declare interface TVoid {
|
|
444
897
|
type: EVarType.void;
|
|
445
898
|
static: void;
|
|
446
899
|
}
|
|
447
900
|
|
|
901
|
+
declare type TWireExport = {
|
|
902
|
+
from: {
|
|
903
|
+
key: string;
|
|
904
|
+
node: string;
|
|
905
|
+
};
|
|
906
|
+
to: {
|
|
907
|
+
key: string;
|
|
908
|
+
node: string;
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
|
|
448
912
|
export { }
|