@luna-park/plugin 1.8.0 → 2.0.0
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/dist-CZjmIqBC.mjs +894 -0
- package/dist/eslint.d.mts +1 -2
- package/dist/eslint.mjs +11 -4
- package/dist/extractor.d.mts +3 -13
- package/dist/extractor.mjs +31 -40
- package/dist/{index-76yMHag4.d.mts → index-B4kxQtaL.d.mts} +163 -145
- package/dist/index.d.mts +538 -459
- package/dist/index.mjs +1349 -212
- package/dist/preview.d.mts +1 -3
- package/dist/preview.mjs +2 -4
- package/package.json +30 -23
- package/dist/dist-BoFOku7q.mjs +0 -608
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { _ as TVector, a as LogicUtil, c as TInterfaceConstantValue, d as TSchema, f as TVoid, g as MaybePromise, h as DeepPartial, i as LogicType, l as TLogicNode, m as CVector, n as ELogicType, o as Static, p as makeLogicNode, r as EVarType, s as TInterfaceConfig, t as ELogicScope, u as TObject } from "./index-
|
|
2
|
-
import "typescript";
|
|
1
|
+
import { _ as TVector, a as LogicUtil, c as TInterfaceConstantValue, d as TSchema, f as TVoid, g as MaybePromise, h as DeepPartial, i as LogicType, l as TLogicNode, m as CVector, n as ELogicType, o as Static, p as makeLogicNode, r as EVarType, s as TInterfaceConfig, t as ELogicScope, u as TObject } from "./index-B4kxQtaL.mjs";
|
|
3
2
|
import { Component, ComputedRef, Directive } from "vue";
|
|
4
3
|
import "@sinclair/typebox";
|
|
5
4
|
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
6
5
|
import { Cron } from "lite-cron";
|
|
7
6
|
import { PGliteWorker } from "@electric-sql/pglite/worker";
|
|
8
|
-
//#region src/components/LSettingsStoryWrapper.vue.d.ts
|
|
9
7
|
declare var __VLS_1: {};
|
|
10
8
|
type __VLS_Slots = {} & {
|
|
11
9
|
default?: (props: typeof __VLS_1) => any;
|
|
@@ -18,13 +16,14 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
18
16
|
$slots: S;
|
|
19
17
|
};
|
|
20
18
|
};
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/types/component.d.ts
|
|
23
19
|
type TSlot = TSchema<TObject> | TSchema<TVoid>;
|
|
24
20
|
type StaticOfProps<T extends Record<string, TSchema>> = { [K in keyof T]: {
|
|
25
21
|
schema: TSchema;
|
|
26
22
|
value: Static<T[K]>;
|
|
27
23
|
}; };
|
|
24
|
+
type TAttributes<TProps extends Record<string, TSchema>, TInternals> = StaticOfProps<TProps> & {
|
|
25
|
+
internals: TInternals;
|
|
26
|
+
};
|
|
28
27
|
type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>, TInternals = unknown> = {
|
|
29
28
|
build?: {
|
|
30
29
|
imports?: Array<{
|
|
@@ -39,11 +38,11 @@ type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>
|
|
|
39
38
|
description?: string;
|
|
40
39
|
link?: string;
|
|
41
40
|
};
|
|
42
|
-
emits?: Record<string, TSchema
|
|
41
|
+
emits?: Record<string, TSchema> | ((attributes: TAttributes<TProps, TInternals>) => Record<string, TSchema>);
|
|
43
42
|
icon?: IconDefinition | string;
|
|
44
43
|
internals?: TInternals;
|
|
45
44
|
llm?: string;
|
|
46
|
-
models?: Record<string, TSchema
|
|
45
|
+
models?: Record<string, TSchema> | ((attributes: TAttributes<TProps, TInternals>) => Record<string, TSchema>);
|
|
47
46
|
name: string;
|
|
48
47
|
preview?: {
|
|
49
48
|
properties?: Partial<{ [TKey in keyof TProps]: Static<TProps[TKey]>; }>;
|
|
@@ -51,12 +50,8 @@ type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>
|
|
|
51
50
|
style?: string;
|
|
52
51
|
};
|
|
53
52
|
properties?: TProps;
|
|
54
|
-
slots?: Record<string, TSlot> | ((attributes:
|
|
55
|
-
internals: TInternals;
|
|
56
|
-
}) => Record<string, TSlot>);
|
|
53
|
+
slots?: Record<string, TSlot> | ((attributes: TAttributes<TProps, TInternals>) => Record<string, TSlot>);
|
|
57
54
|
};
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/types/guard.d.ts
|
|
60
55
|
type TRouteGuard = {
|
|
61
56
|
build: {
|
|
62
57
|
generate: (config: Record<string, unknown>) => string;
|
|
@@ -74,66 +69,12 @@ type TRouteGuard = {
|
|
|
74
69
|
id: string;
|
|
75
70
|
label: string;
|
|
76
71
|
};
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/types/hooks.d.ts
|
|
79
|
-
export declare enum EPluginHooks {
|
|
80
|
-
BackendMiddleware = "backend/middleware",
|
|
81
|
-
BackendInputNode = "backend/input-node",
|
|
82
|
-
DatabaseScope = "database/scope",
|
|
83
|
-
DatabaseChange = "database/change"
|
|
84
|
-
}
|
|
85
|
-
type TDatabaseCondition = {
|
|
86
|
-
operation: string;
|
|
87
|
-
source: Array<string>;
|
|
88
|
-
target: unknown;
|
|
89
|
-
type: "value" | "column";
|
|
90
|
-
} | {
|
|
91
|
-
conditions: Array<TDatabaseCondition>;
|
|
92
|
-
type: "and" | "or";
|
|
93
|
-
};
|
|
94
|
-
type THookParams = {
|
|
95
|
-
[EPluginHooks.DatabaseScope]: {
|
|
96
|
-
addConditions: (conditions: Array<TDatabaseCondition>) => void;
|
|
97
|
-
table: string;
|
|
98
|
-
};
|
|
99
|
-
[EPluginHooks.DatabaseChange]: {
|
|
100
|
-
operation: "insert" | "update" | "delete";
|
|
101
|
-
rows: Array<Record<string, unknown>>;
|
|
102
|
-
table: string;
|
|
103
|
-
};
|
|
104
|
-
[EPluginHooks.BackendMiddleware]: {
|
|
105
|
-
cookies: Record<string, {
|
|
106
|
-
options?: Record<string, unknown>;
|
|
107
|
-
value: string;
|
|
108
|
-
}>;
|
|
109
|
-
setContextVar: (key: string, value: unknown) => void;
|
|
110
|
-
};
|
|
111
|
-
[EPluginHooks.BackendInputNode]: {
|
|
112
|
-
addInput: (key: string, schema: TSchema) => void;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region src/types/interface.d.ts
|
|
117
|
-
type TInterface = TInterfaceConfig<Component> & {
|
|
118
|
-
arguments?: Array<TSchema>;
|
|
119
|
-
description?: string;
|
|
120
|
-
methods?: Array<{
|
|
121
|
-
name: string;
|
|
122
|
-
parameters?: Array<TSchema>;
|
|
123
|
-
return: TSchema;
|
|
124
|
-
}>;
|
|
125
|
-
};
|
|
126
|
-
type TInterfaceEditorProps = {
|
|
127
|
-
anchor?: boolean;
|
|
128
|
-
modelValue?: TInterfaceConstantValue;
|
|
129
|
-
placeholder?: string;
|
|
130
|
-
schema: TSchema;
|
|
131
|
-
};
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region ../logic-dts/dist/nodes.d.ts
|
|
134
72
|
type TExportNodeFunction = {
|
|
135
|
-
|
|
73
|
+
deprecated?: string;
|
|
136
74
|
description?: string;
|
|
75
|
+
instance?: TSchema;
|
|
76
|
+
kind?: "constructor" | "method";
|
|
77
|
+
name?: string;
|
|
137
78
|
parameters?: Array<TSchema>;
|
|
138
79
|
return?: TSchema;
|
|
139
80
|
};
|
|
@@ -145,10 +86,11 @@ type TExportNodeResult = {
|
|
|
145
86
|
functions: Record<string, TExportNodeFunction>;
|
|
146
87
|
types: Record<string, TSchema>;
|
|
147
88
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Runtime classes the editor registers through module augmentation, replacing the declarations below
|
|
91
|
+
*/
|
|
92
|
+
interface TEditorClasses {}
|
|
93
|
+
type TEditorClass<TKey extends string, TFallback> = TEditorClasses extends Record<TKey, infer TClass> ? TClass : TFallback;
|
|
152
94
|
declare class CPathPoint {
|
|
153
95
|
direction: CVector;
|
|
154
96
|
location: CVector;
|
|
@@ -161,7 +103,8 @@ declare class CPathPoint {
|
|
|
161
103
|
}): CPathPoint;
|
|
162
104
|
}
|
|
163
105
|
type TPath = Array<CPathPoint>;
|
|
164
|
-
|
|
106
|
+
type CWire = TEditorClass<"CWire", CBaseWire>;
|
|
107
|
+
declare class CBaseWire {
|
|
165
108
|
id: string;
|
|
166
109
|
from: CAnchor;
|
|
167
110
|
to: CAnchor;
|
|
@@ -174,10 +117,9 @@ declare class CWire {
|
|
|
174
117
|
});
|
|
175
118
|
get type(): TSchema;
|
|
176
119
|
get toType(): TSchema;
|
|
177
|
-
getPoints(): string;
|
|
178
120
|
getPath(): TPath;
|
|
179
121
|
}
|
|
180
|
-
type
|
|
122
|
+
type TWireExport = {
|
|
181
123
|
from: {
|
|
182
124
|
key: string;
|
|
183
125
|
node: string;
|
|
@@ -186,9 +128,8 @@ type TWire<TExport extends boolean = false> = TExport extends true ? {
|
|
|
186
128
|
key: string;
|
|
187
129
|
node: string;
|
|
188
130
|
};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
//#region src/types/file.d.ts
|
|
131
|
+
};
|
|
132
|
+
type TWire = CWire;
|
|
192
133
|
declare enum EElementType {
|
|
193
134
|
Script = "script",
|
|
194
135
|
Standalone = "standalone",
|
|
@@ -205,33 +146,352 @@ declare enum EElementType {
|
|
|
205
146
|
Cron = "cron",
|
|
206
147
|
Media = "media"
|
|
207
148
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
149
|
+
type TFolderArtboardView = {
|
|
150
|
+
name: string;
|
|
151
|
+
location: TVector;
|
|
152
|
+
properties: Record<string, unknown>;
|
|
153
|
+
};
|
|
154
|
+
type TFolderArtboard = {
|
|
155
|
+
location: TVector;
|
|
156
|
+
views: Record<string, TFolderArtboardView>;
|
|
157
|
+
};
|
|
158
|
+
interface TFolderOf<TChild> {
|
|
159
|
+
type: EElementType.Folder;
|
|
160
|
+
artboards?: Record<string, TFolderArtboard>;
|
|
161
|
+
children: Record<string, TChild>;
|
|
162
|
+
color?: string;
|
|
163
|
+
}
|
|
164
|
+
type TFolderExport = TFileBaseExport & TFolderOf<TFileExport>;
|
|
165
|
+
type TFolder = TFileBase & TFolderOf<TFile>;
|
|
166
|
+
type TFileState = {
|
|
167
|
+
expand?: boolean;
|
|
168
|
+
isEditing?: boolean;
|
|
169
|
+
logic?: TCanvas;
|
|
170
|
+
opened?: boolean;
|
|
171
|
+
panel?: string;
|
|
172
|
+
};
|
|
173
|
+
type TFileBaseExport = {
|
|
174
|
+
name: string;
|
|
175
|
+
state: TFileState;
|
|
176
|
+
};
|
|
177
|
+
type TFileBase = TFileBaseExport & {
|
|
178
|
+
id: string;
|
|
179
|
+
parent?: TFolder;
|
|
180
|
+
};
|
|
181
|
+
declare enum ELayoutElement {
|
|
182
|
+
input = "input",
|
|
183
|
+
div = "div",
|
|
184
|
+
media = "media",
|
|
185
|
+
customText = "customText",
|
|
186
|
+
component = "component",
|
|
187
|
+
package = "package",
|
|
188
|
+
customHtml = "customHtml",
|
|
189
|
+
slot = "slot",
|
|
190
|
+
template = "template",
|
|
191
|
+
variable = "variable",
|
|
192
|
+
link = "link"
|
|
193
|
+
}
|
|
194
|
+
declare enum ETokenType {
|
|
195
|
+
Class = "class",
|
|
196
|
+
Color = "color",
|
|
197
|
+
FontSize = "font-size",
|
|
198
|
+
FontWeight = "font-weight",
|
|
199
|
+
FontFamily = "font-family",
|
|
200
|
+
Length = "length",
|
|
201
|
+
Time = "time"
|
|
202
|
+
}
|
|
203
|
+
declare module "@luna-park/logicnodes" {
|
|
204
|
+
interface TSchemaOptions {
|
|
205
|
+
custom?: boolean;
|
|
206
|
+
displayGrid?: number;
|
|
207
|
+
dual?: boolean;
|
|
208
|
+
filter?: boolean;
|
|
209
|
+
flex?: boolean;
|
|
210
|
+
grid?: boolean;
|
|
211
|
+
image?: boolean;
|
|
212
|
+
mode?: "corner";
|
|
213
|
+
number?: boolean;
|
|
214
|
+
quad?: boolean;
|
|
215
|
+
ref?: boolean;
|
|
216
|
+
shadow?: boolean;
|
|
217
|
+
units?: Array<string>;
|
|
218
|
+
}
|
|
219
|
+
interface TString<T extends string = string> {
|
|
220
|
+
target?: string;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
declare enum ELayoutValueType {
|
|
224
|
+
Variable = "variable",
|
|
225
|
+
Property = "property",
|
|
226
|
+
Attribute = "attribute",
|
|
227
|
+
Context = "context",
|
|
228
|
+
Computed = "computed",
|
|
229
|
+
Event = "event",
|
|
230
|
+
File = "file",
|
|
231
|
+
Model = "model",
|
|
232
|
+
Logic = "logic"
|
|
233
|
+
}
|
|
234
|
+
type TContextValue = {
|
|
235
|
+
schema: TSchema;
|
|
236
|
+
value: unknown;
|
|
237
|
+
};
|
|
238
|
+
type TLayoutContext = Record<string, TContextValue>;
|
|
239
|
+
/**
|
|
240
|
+
* Runtime-only reactive value (never exported)
|
|
241
|
+
*/
|
|
242
|
+
type TLayoutValue = {
|
|
243
|
+
id: string;
|
|
244
|
+
type?: ELayoutValueType;
|
|
245
|
+
baseType?: ELayoutValueType;
|
|
246
|
+
child: Array<string>;
|
|
247
|
+
component?: TFileComponent;
|
|
248
|
+
context: TLayoutContext;
|
|
249
|
+
stackId: string;
|
|
250
|
+
get value(): unknown;
|
|
251
|
+
set value(value: unknown);
|
|
252
|
+
get schema(): TSchema;
|
|
253
|
+
get baseSchema(): TSchema;
|
|
254
|
+
};
|
|
255
|
+
declare enum EDynamicVariableType {
|
|
256
|
+
Constant = "constant",
|
|
257
|
+
Dynamic = "dynamic",
|
|
258
|
+
Token = "token"
|
|
259
|
+
}
|
|
260
|
+
declare enum EDynamicOperation {
|
|
261
|
+
Equal = "equal",
|
|
262
|
+
NotEqual = "not-equal",
|
|
263
|
+
Greater = "greater",
|
|
264
|
+
GreaterEqual = "greater-equal",
|
|
265
|
+
Less = "less",
|
|
266
|
+
LessEqual = "less-equal",
|
|
267
|
+
StartsWith = "starts-with",
|
|
268
|
+
EndsWith = "ends-with",
|
|
269
|
+
Includes = "includes",
|
|
270
|
+
At = "at",
|
|
271
|
+
Join = "join",
|
|
272
|
+
ToLowerCase = "to-lower-case",
|
|
273
|
+
ToUpperCase = "to-upper-case",
|
|
274
|
+
Trim = "trim",
|
|
275
|
+
Length = "length",
|
|
276
|
+
Not = "not",
|
|
277
|
+
And = "and",
|
|
278
|
+
Or = "or",
|
|
279
|
+
Add = "add",
|
|
280
|
+
Subtract = "subtract",
|
|
281
|
+
Multiply = "multiply",
|
|
282
|
+
Divide = "divide",
|
|
283
|
+
Modulo = "modulo",
|
|
284
|
+
Ternary = "ternary",
|
|
285
|
+
ToString = "to-string",
|
|
286
|
+
ToNumber = "to-number",
|
|
287
|
+
ToBoolean = "to-boolean",
|
|
288
|
+
Call = "call"
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* One operation applied to the previous value, optionally followed by a property access on its result.
|
|
292
|
+
*/
|
|
293
|
+
type TDynamicVariableStep = {
|
|
294
|
+
access?: Array<string>;
|
|
295
|
+
operation: EDynamicOperation;
|
|
296
|
+
variables: Array<TMaybeDynamicVariableExport>;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Serializable data of a dynamic variable. Runtime variables extend it with methods, so they stay assignable to it.
|
|
300
|
+
*/
|
|
301
|
+
type TDynamicVariableExport = {
|
|
302
|
+
type: EDynamicVariableType;
|
|
303
|
+
_dynamic: true;
|
|
304
|
+
access: Array<string>;
|
|
305
|
+
steps?: Array<TDynamicVariableStep>;
|
|
306
|
+
token: string;
|
|
307
|
+
value: unknown;
|
|
308
|
+
};
|
|
309
|
+
type TDynamicVariable = TDynamicVariableExport & {
|
|
310
|
+
getComputed(component: TFileComponent, options?: {
|
|
311
|
+
context?: TLayoutContext;
|
|
312
|
+
stackId?: string;
|
|
313
|
+
}): ComputedRef<TContextValue | TLayoutValue>;
|
|
314
|
+
getValue(component: TFileComponent, options?: {
|
|
315
|
+
base?: boolean;
|
|
316
|
+
context?: TLayoutContext;
|
|
317
|
+
stackId?: string;
|
|
318
|
+
}): TContextValue;
|
|
319
|
+
getRawValue(): unknown;
|
|
320
|
+
toJSON(): unknown;
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* A raw constant stored in place of a dynamic variable (constants are unwrapped on load).
|
|
324
|
+
* Arrays and objects may still contain dynamic variables.
|
|
325
|
+
*/
|
|
326
|
+
type TRawValueExport = string | number | boolean | null | undefined | Array<TMaybeDynamicVariableExport> | {
|
|
327
|
+
[key: string]: TMaybeDynamicVariableExport;
|
|
328
|
+
};
|
|
329
|
+
type TRawValue = string | number | boolean | null | undefined | Array<TMaybeDynamicVariable> | {
|
|
330
|
+
[key: string]: TMaybeDynamicVariable;
|
|
331
|
+
};
|
|
332
|
+
type TMaybeDynamicVariableExport = TDynamicVariableExport | TRawValueExport;
|
|
333
|
+
type TMaybeDynamicVariable = TDynamicVariable | TRawValue;
|
|
334
|
+
type TValueExport = TSchema;
|
|
335
|
+
type TValue = {
|
|
336
|
+
id: string;
|
|
337
|
+
isEditing?: boolean;
|
|
338
|
+
parent?: TLogic;
|
|
339
|
+
schema: TSchema;
|
|
340
|
+
};
|
|
341
|
+
type TTextBlock = {
|
|
342
|
+
content: string;
|
|
343
|
+
key: string;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Element of a plugin component, as `plugin/<plugin id>/<component>`
|
|
347
|
+
*/
|
|
348
|
+
type TPluginElement = `plugin/${string}`;
|
|
349
|
+
type TLayoutElementType = ELayoutElement | TPluginElement;
|
|
350
|
+
type TLayoutContentOf<TElement extends TLayoutElementType, TVariable, TChild> = TElement extends ELayoutElement.variable ? {
|
|
351
|
+
var: TVariable;
|
|
352
|
+
} : TElement extends ELayoutElement.component ? {
|
|
353
|
+
id: string;
|
|
354
|
+
slots: Record<string, TChild>;
|
|
355
|
+
} : TElement extends ELayoutElement.customText ? {
|
|
356
|
+
text: TTextBlock;
|
|
357
|
+
variables: Array<string>;
|
|
358
|
+
} : TElement extends ELayoutElement.customHtml ? {
|
|
359
|
+
html: string;
|
|
360
|
+
variables: Array<string>;
|
|
361
|
+
} : TElement extends ELayoutElement.package ? {
|
|
362
|
+
slots: Record<string, TChild>;
|
|
363
|
+
target: Array<string>;
|
|
364
|
+
} : TElement extends TPluginElement ? {
|
|
365
|
+
internals?: unknown;
|
|
366
|
+
slots: Record<string, TChild>;
|
|
367
|
+
target: string;
|
|
368
|
+
} : Record<string, unknown>;
|
|
369
|
+
/**
|
|
370
|
+
* Style rules by category, then by property. The `custom` category holds raw CSS properties absent from `layoutStyles`
|
|
371
|
+
*/
|
|
372
|
+
type TLayoutStyleRulesExport = Record<string, Record<string, TMaybeDynamicVariableExport>>;
|
|
373
|
+
type TLayoutStyleRules = Record<string, Record<string, TMaybeDynamicVariable>>;
|
|
374
|
+
type TLayoutStyleStatesOf<TRules> = {
|
|
375
|
+
default?: TRules;
|
|
376
|
+
hover?: TRules;
|
|
377
|
+
};
|
|
378
|
+
type TLayoutStyleStatesExport = TLayoutStyleStatesOf<TLayoutStyleRulesExport>;
|
|
379
|
+
type TLayoutStyleStates = TLayoutStyleStatesOf<TLayoutStyleRules>;
|
|
380
|
+
type TLayoutStyleOf<TStates> = {
|
|
381
|
+
base?: TStates;
|
|
382
|
+
quick?: Array<string>;
|
|
383
|
+
[media: `${number}`]: TStates | undefined;
|
|
384
|
+
};
|
|
385
|
+
type TLayoutStyleExport = TLayoutStyleOf<TLayoutStyleStatesExport>;
|
|
386
|
+
type TLayoutStyle = TLayoutStyleOf<TLayoutStyleStates>;
|
|
387
|
+
type TLayoutClassOf<TStyle> = {
|
|
388
|
+
id: string;
|
|
389
|
+
name: string;
|
|
390
|
+
style: TStyle;
|
|
391
|
+
};
|
|
392
|
+
type TLayoutClassExport = TLayoutClassOf<TLayoutStyleExport>;
|
|
393
|
+
type TLayoutClass = TLayoutClassOf<TLayoutStyle>;
|
|
394
|
+
type TLayoutEventParameterOf<TVariable> = {
|
|
395
|
+
schema: TSchema;
|
|
396
|
+
value: TVariable;
|
|
397
|
+
};
|
|
398
|
+
type TLayoutEventParameterExport = TLayoutEventParameterOf<TMaybeDynamicVariableExport>;
|
|
399
|
+
type TLayoutEventParameter = TLayoutEventParameterOf<TMaybeDynamicVariable>;
|
|
400
|
+
interface TLayoutNodeOf<TElement extends TLayoutElementType, TVariable, TChild, TStyle, TEventParameter> {
|
|
401
|
+
id: string;
|
|
402
|
+
name: string;
|
|
403
|
+
children: Array<TChild>;
|
|
404
|
+
classes: Array<TVariable>;
|
|
405
|
+
collapsed?: boolean;
|
|
406
|
+
content: TLayoutContentOf<TElement, TVariable, TChild>;
|
|
407
|
+
element: TElement;
|
|
408
|
+
events: Record<string, Record<string, TEventParameter>>;
|
|
409
|
+
models?: Record<string, Array<string>>;
|
|
410
|
+
plugins?: Record<string, Record<string, TVariable>>;
|
|
411
|
+
properties: Record<string, TVariable>;
|
|
412
|
+
style: TStyle;
|
|
413
|
+
tag?: string;
|
|
414
|
+
}
|
|
415
|
+
interface TLayoutNodeExport<TElement extends TLayoutElementType> extends TLayoutNodeOf<TElement, TMaybeDynamicVariableExport, TLayoutSchemaExport, TLayoutStyleExport, TLayoutEventParameterExport> {}
|
|
416
|
+
interface TLayoutNode<TElement extends TLayoutElementType> extends TLayoutNodeOf<TElement, TMaybeDynamicVariable, TLayoutSchema, TLayoutStyle, TLayoutEventParameter> {
|
|
417
|
+
component: TFileComponent;
|
|
418
|
+
parent?: TLayoutSchema;
|
|
419
|
+
}
|
|
420
|
+
type TLayoutSchemaExport<TElement extends TLayoutElementType = TLayoutElementType> = { [TInnerElement in TElement]: TLayoutNodeExport<TInnerElement>; }[TElement];
|
|
421
|
+
type TLayoutSchema<TElement extends TLayoutElementType = TLayoutElementType> = { [TInnerElement in TElement]: TLayoutNode<TInnerElement>; }[TElement];
|
|
422
|
+
declare enum EComponentType {
|
|
423
|
+
Component = "component",
|
|
424
|
+
Page = "page"
|
|
425
|
+
}
|
|
426
|
+
declare enum EComponentPreview {
|
|
427
|
+
Compact = "compact",
|
|
428
|
+
Stretch = "stretch",
|
|
429
|
+
Full = "full"
|
|
430
|
+
}
|
|
431
|
+
type TComponentOptions = {
|
|
432
|
+
type: EComponentType;
|
|
433
|
+
path: string;
|
|
434
|
+
preview: EComponentPreview;
|
|
435
|
+
previewSize?: string;
|
|
436
|
+
seo?: TPageSeo;
|
|
437
|
+
};
|
|
438
|
+
declare enum ESeoSource {
|
|
439
|
+
Static = "static",
|
|
440
|
+
Dynamic = "dynamic"
|
|
441
|
+
}
|
|
442
|
+
type TPageSeo = {
|
|
443
|
+
description?: string;
|
|
444
|
+
image?: string;
|
|
445
|
+
metadataRoute?: string;
|
|
446
|
+
noindex?: boolean;
|
|
447
|
+
sitemapRoute?: string;
|
|
448
|
+
source?: ESeoSource;
|
|
449
|
+
title?: string;
|
|
450
|
+
};
|
|
451
|
+
interface TFileComponentOf<TClass, TLayout, TLogic, TValue> {
|
|
452
|
+
type: EElementType.Component;
|
|
453
|
+
classes?: Record<string, TClass>;
|
|
454
|
+
collapsed?: boolean;
|
|
455
|
+
layout: TLayout;
|
|
456
|
+
logics: Record<string, TLogic>;
|
|
457
|
+
options: TComponentOptions;
|
|
458
|
+
values: {
|
|
459
|
+
computed: Record<string, TValue>;
|
|
460
|
+
events: Record<string, TValue>;
|
|
461
|
+
model?: TSchema;
|
|
462
|
+
properties: Record<string, TValue>;
|
|
463
|
+
variables: Record<string, TValue>;
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
type TFileComponentExport = TFileBaseExport & TFileComponentOf<TLayoutClassExport, TLayoutSchemaExport, TAnyLogicExport, TValueExport>;
|
|
467
|
+
type TFileComponent = TFileBase & TFileComponentOf<TLayoutClass, TLayoutSchema, TAnyLogic, TValue> & {
|
|
468
|
+
flat: Record<string, TLayoutSchema>;
|
|
469
|
+
};
|
|
470
|
+
type TFileConfigFields = {
|
|
211
471
|
type: EElementType.Config;
|
|
212
472
|
content: unknown;
|
|
213
473
|
display: EConfigDisplay;
|
|
214
474
|
schema: TSchema;
|
|
215
475
|
scope: ELogicScope;
|
|
216
476
|
};
|
|
477
|
+
type TFileConfigExport = TFileBaseExport & TFileConfigFields;
|
|
478
|
+
type TFileConfig = TFileBase & TFileConfigFields;
|
|
217
479
|
declare enum EConfigDisplay {
|
|
218
480
|
Smart = "smart",
|
|
219
481
|
Performance = "performance"
|
|
220
482
|
}
|
|
221
|
-
|
|
222
|
-
//#region src/types/files/cron.d.ts
|
|
223
|
-
type TFileCron<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
483
|
+
interface TFileCronOf<TLogic> {
|
|
224
484
|
type: EElementType.Cron;
|
|
225
485
|
active: boolean;
|
|
226
486
|
editorTrigger: boolean;
|
|
227
|
-
logics: Record<string,
|
|
487
|
+
logics: Record<string, TLogic>;
|
|
228
488
|
time: string;
|
|
229
|
-
}
|
|
489
|
+
}
|
|
490
|
+
type TFileCronExport = TFileBaseExport & TFileCronOf<TAnyLogicExport>;
|
|
491
|
+
type TFileCron = TFileBase & TFileCronOf<TAnyLogic> & {
|
|
230
492
|
cron?: Cron;
|
|
231
493
|
scope: ELogicScope.Backend;
|
|
232
|
-
}
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/types/editor/database.d.ts
|
|
494
|
+
};
|
|
235
495
|
type TDatabaseRow = Record<string, unknown>;
|
|
236
496
|
type TQueryValue = string | number | boolean;
|
|
237
497
|
type TQueryOperation = Record<string, {
|
|
@@ -261,13 +521,15 @@ type TOrder = {
|
|
|
261
521
|
column: string;
|
|
262
522
|
direction: "asc" | "desc";
|
|
263
523
|
};
|
|
264
|
-
|
|
524
|
+
type CDatabase = TEditorClass<"CDatabase", CBaseDatabase>;
|
|
525
|
+
declare class CBaseDatabase {
|
|
265
526
|
file: TFileDatabase;
|
|
266
527
|
db: PGliteWorker;
|
|
267
528
|
ready: boolean;
|
|
268
529
|
exist: boolean;
|
|
269
530
|
constructor(file: TFileDatabase);
|
|
270
531
|
init(): Promise<void>;
|
|
532
|
+
prepare(): Promise<void>;
|
|
271
533
|
findById(id: string): Promise<TDatabaseRow | undefined>;
|
|
272
534
|
find(filter: TDatabaseRow): Promise<Array<TDatabaseRow>>;
|
|
273
535
|
findWithQuery(query: TQuery, options?: TQueryOptions): Promise<Array<TDatabaseRow>>;
|
|
@@ -283,43 +545,43 @@ declare class CDatabase {
|
|
|
283
545
|
updateColumns(init: boolean): Promise<void>;
|
|
284
546
|
save(): Promise<Array<TDatabaseRow>>;
|
|
285
547
|
load(): Promise<void>;
|
|
548
|
+
reload(): Promise<void>;
|
|
286
549
|
getUpdate(data: TDatabaseRow): unknown;
|
|
287
550
|
getQueryFilter(filter: TDatabaseRow): unknown;
|
|
288
551
|
getQueryOptions(options?: TQueryOptions): unknown;
|
|
289
552
|
getQuery(query: TQuery): unknown;
|
|
290
553
|
getOperation(query: TQueryOperation): unknown;
|
|
291
554
|
}
|
|
292
|
-
|
|
293
|
-
//#region src/types/files/database.d.ts
|
|
294
|
-
type TFileDatabase<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
555
|
+
type TFileDatabaseFields = {
|
|
295
556
|
type: EElementType.Database;
|
|
296
557
|
data: Array<TDatabaseRow>;
|
|
297
558
|
schema: TSchema<TObject>;
|
|
298
|
-
}
|
|
559
|
+
};
|
|
560
|
+
type TFileDatabaseExport = TFileBaseExport & TFileDatabaseFields;
|
|
561
|
+
type TFileDatabase = TFileBase & TFileDatabaseFields & {
|
|
299
562
|
db: CDatabase;
|
|
300
563
|
scope: ELogicScope.Backend;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
//#region src/types/files/media.d.ts
|
|
304
|
-
type TFileMedia<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
564
|
+
};
|
|
565
|
+
type TFileMediaFields = {
|
|
305
566
|
type: EElementType.Media;
|
|
306
567
|
mimeType: string;
|
|
307
|
-
target: string;
|
|
308
568
|
previewUrl?: string;
|
|
569
|
+
target: string;
|
|
309
570
|
};
|
|
310
|
-
|
|
311
|
-
|
|
571
|
+
type TFileMediaExport = TFileBaseExport & TFileMediaFields;
|
|
572
|
+
type TFileMedia = TFileBase & TFileMediaFields;
|
|
312
573
|
declare enum ERouteMethod {
|
|
313
574
|
Get = "get",
|
|
314
575
|
Post = "post",
|
|
315
576
|
Put = "put",
|
|
577
|
+
Patch = "patch",
|
|
316
578
|
Delete = "delete"
|
|
317
579
|
}
|
|
318
580
|
type TRouteGuardRef = {
|
|
319
581
|
id: string;
|
|
320
582
|
config: Record<string, unknown>;
|
|
321
583
|
};
|
|
322
|
-
|
|
584
|
+
interface TFileRouteOf<TLogic> {
|
|
323
585
|
type: EElementType.Route;
|
|
324
586
|
guards?: Array<TRouteGuardRef>;
|
|
325
587
|
input: {
|
|
@@ -327,25 +589,25 @@ type TFileRoute<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
|
327
589
|
headers: TSchema;
|
|
328
590
|
query: TSchema;
|
|
329
591
|
};
|
|
330
|
-
logics: Record<string,
|
|
592
|
+
logics: Record<string, TLogic>;
|
|
331
593
|
method: ERouteMethod;
|
|
332
594
|
output: TSchema;
|
|
333
595
|
path: string;
|
|
334
|
-
}
|
|
596
|
+
}
|
|
597
|
+
type TFileRouteExport = TFileBaseExport & TFileRouteOf<TAnyLogicExport>;
|
|
598
|
+
type TFileRoute = TFileBase & TFileRouteOf<TAnyLogic> & {
|
|
335
599
|
scope: ELogicScope.Backend;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
//#region src/types/files/script.d.ts
|
|
339
|
-
type TFileScript<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
600
|
+
};
|
|
601
|
+
interface TFileScriptOf<TLogic> {
|
|
340
602
|
type: EElementType.Script;
|
|
341
|
-
logics: Record<string,
|
|
603
|
+
logics: Record<string, TLogic>;
|
|
342
604
|
options?: {
|
|
343
605
|
autoReload?: boolean;
|
|
344
606
|
};
|
|
345
607
|
scope: ELogicScope;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
608
|
+
}
|
|
609
|
+
type TFileScriptExport = TFileBaseExport & TFileScriptOf<TAnyLogicExport>;
|
|
610
|
+
type TFileScript = TFileBase & TFileScriptOf<TAnyLogic>;
|
|
349
611
|
declare enum EStoreType {
|
|
350
612
|
Memory = "memory",
|
|
351
613
|
Session = "session",
|
|
@@ -354,102 +616,43 @@ declare enum EStoreType {
|
|
|
354
616
|
type TStoreOptions = {
|
|
355
617
|
type: EStoreType;
|
|
356
618
|
};
|
|
357
|
-
|
|
619
|
+
interface TFileStoreOf<TLogic> {
|
|
358
620
|
type: EElementType.Store;
|
|
359
621
|
default: unknown;
|
|
360
|
-
logics: Record<string, TLogic
|
|
361
|
-
options: TStoreOptions;
|
|
362
|
-
schema: TSchema;
|
|
363
|
-
} & TRuntimeOnly<TExport, {
|
|
364
|
-
proxy: TSchema;
|
|
365
|
-
scope: ELogicScope.Frontend;
|
|
366
|
-
value: Record<string, unknown>;
|
|
367
|
-
}>;
|
|
368
|
-
//#endregion
|
|
369
|
-
//#region src/types/layout.d.ts
|
|
370
|
-
type TTextBlock = {
|
|
371
|
-
content: string;
|
|
372
|
-
key: string;
|
|
373
|
-
};
|
|
374
|
-
type TLayoutContentType<TElement extends ELayoutElement, TExport extends boolean = false> = TElement extends ELayoutElement.variable ? {
|
|
375
|
-
var: TMaybeDynamicVariable<TExport>;
|
|
376
|
-
} : TElement extends ELayoutElement.component ? {
|
|
377
|
-
id: string;
|
|
378
|
-
slots: Record<string, TLayoutSchema<ELayoutElement, TExport>>;
|
|
379
|
-
} : TElement extends ELayoutElement.customText ? {
|
|
380
|
-
text: TTextBlock;
|
|
381
|
-
variables: Array<string>;
|
|
382
|
-
} : TElement extends ELayoutElement.customHtml ? {
|
|
383
|
-
html: string;
|
|
384
|
-
variables: Array<string>;
|
|
385
|
-
} : TElement extends ELayoutElement.package ? {
|
|
386
|
-
slots: Record<string, TLayoutSchema<ELayoutElement, TExport>>;
|
|
387
|
-
target: Array<string>;
|
|
388
|
-
} : Record<string, unknown>;
|
|
389
|
-
/**
|
|
390
|
-
* Style rules by category, then by property
|
|
391
|
-
*/
|
|
392
|
-
type TLayoutStyleRules<TExport extends boolean = false> = Record<string, Record<string, TMaybeDynamicVariable<TExport>>>;
|
|
393
|
-
type TLayoutStyleStates<TExport extends boolean = false> = {
|
|
394
|
-
default?: TLayoutStyleRules<TExport>;
|
|
395
|
-
hover?: TLayoutStyleRules<TExport>;
|
|
396
|
-
};
|
|
397
|
-
type TLayoutStyle<TExport extends boolean = false> = {
|
|
398
|
-
base?: TLayoutStyleStates<TExport>;
|
|
399
|
-
quick?: Array<string>;
|
|
400
|
-
[media: `${number}`]: TLayoutStyleStates<TExport> | undefined;
|
|
401
|
-
};
|
|
402
|
-
type TLayoutClass<TExport extends boolean = false> = {
|
|
403
|
-
id: string;
|
|
404
|
-
name: string;
|
|
405
|
-
style: TLayoutStyle<TExport>;
|
|
406
|
-
};
|
|
407
|
-
type TLayoutEventParameter<TExport extends boolean = false> = {
|
|
622
|
+
logics: Record<string, TLogic>;
|
|
623
|
+
options: TStoreOptions;
|
|
408
624
|
schema: TSchema;
|
|
409
|
-
|
|
625
|
+
}
|
|
626
|
+
type TFileStoreExport = TFileBaseExport & TFileStoreOf<TLogicExport>;
|
|
627
|
+
type TFileStore = TFileBase & TFileStoreOf<TLogic> & {
|
|
628
|
+
proxy: TSchema;
|
|
629
|
+
scope: ELogicScope.Frontend;
|
|
630
|
+
value: Record<string, unknown>;
|
|
410
631
|
};
|
|
411
|
-
type
|
|
412
|
-
id: string;
|
|
413
|
-
name: string;
|
|
414
|
-
children: Array<TLayoutSchema<ELayoutElement, TExport>>;
|
|
415
|
-
classes: Array<TMaybeDynamicVariable<TExport>>;
|
|
416
|
-
collapsed?: boolean;
|
|
417
|
-
content: TLayoutContentType<TInnerElement, TExport>;
|
|
418
|
-
element: TInnerElement;
|
|
419
|
-
events: Record<string, Record<string, TLayoutEventParameter<TExport>>>;
|
|
420
|
-
models?: Record<string, Array<string>>;
|
|
421
|
-
plugins?: Record<string, Record<string, TMaybeDynamicVariable<TExport>>>;
|
|
422
|
-
properties: Record<string, TMaybeDynamicVariable<TExport>>;
|
|
423
|
-
style: TLayoutStyle<TExport>;
|
|
424
|
-
tag?: string;
|
|
425
|
-
}; }[TElement] & TRuntimeOnly<TExport, {
|
|
426
|
-
component: TFileComponent<TExport>;
|
|
427
|
-
parent?: TLayoutSchema<ELayoutElement, TExport>;
|
|
428
|
-
}>;
|
|
429
|
-
//#endregion
|
|
430
|
-
//#region src/types/files/text.d.ts
|
|
431
|
-
type TFileText<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
632
|
+
type TFileTextFields = {
|
|
432
633
|
type: EElementType.Text;
|
|
433
634
|
blocks: Array<TTextBlock>;
|
|
434
|
-
}
|
|
635
|
+
};
|
|
636
|
+
type TFileTextExport = TFileBaseExport & TFileTextFields;
|
|
637
|
+
type TFileText = TFileBase & TFileTextFields & {
|
|
435
638
|
scope: ELogicScope.Frontend;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
//#region src/types/files/type.d.ts
|
|
439
|
-
type TFileType<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
639
|
+
};
|
|
640
|
+
type TFileTypeFields = {
|
|
440
641
|
type: EElementType.Type;
|
|
441
642
|
schemas: Record<string, TSchema>;
|
|
442
|
-
}
|
|
643
|
+
};
|
|
644
|
+
type TFileTypeExport = TFileBaseExport & TFileTypeFields;
|
|
645
|
+
type TFileType = TFileBase & TFileTypeFields & {
|
|
443
646
|
scope: ELogicScope.Shared;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
//#region src/types/files/index.d.ts
|
|
447
|
-
type TApplication<TExport extends boolean = false> = {
|
|
647
|
+
};
|
|
648
|
+
interface TApplicationOf<TTree> {
|
|
448
649
|
name: string;
|
|
449
650
|
config: TApplicationConfig;
|
|
450
|
-
tree:
|
|
651
|
+
tree: TTree;
|
|
451
652
|
version: number;
|
|
452
|
-
}
|
|
653
|
+
}
|
|
654
|
+
type TApplicationExport = TApplicationOf<TFolderExport>;
|
|
655
|
+
type TApplication = TApplicationOf<TFolder>;
|
|
453
656
|
declare enum EHistoryMode {
|
|
454
657
|
Hash = "hash",
|
|
455
658
|
Web = "web",
|
|
@@ -469,8 +672,8 @@ type TApplicationToken = {
|
|
|
469
672
|
value: string;
|
|
470
673
|
};
|
|
471
674
|
type TApplicationFontToken = TApplicationToken & {
|
|
472
|
-
default?: boolean;
|
|
473
675
|
cdn?: string;
|
|
676
|
+
default?: boolean;
|
|
474
677
|
};
|
|
475
678
|
type TApplicationTokens = {
|
|
476
679
|
colors: Array<TApplicationToken>;
|
|
@@ -479,7 +682,6 @@ type TApplicationTokens = {
|
|
|
479
682
|
};
|
|
480
683
|
type TApplicationConfig = {
|
|
481
684
|
backend: {
|
|
482
|
-
proxy: string;
|
|
483
685
|
salt: string;
|
|
484
686
|
};
|
|
485
687
|
description?: string;
|
|
@@ -517,7 +719,7 @@ type TApplicationConfig = {
|
|
|
517
719
|
}>;
|
|
518
720
|
state: {
|
|
519
721
|
currentTab: string;
|
|
520
|
-
explorerSort
|
|
722
|
+
explorerSort?: EFileSortStrategy;
|
|
521
723
|
tabs: Array<string>;
|
|
522
724
|
};
|
|
523
725
|
style: {
|
|
@@ -527,8 +729,17 @@ type TApplicationConfig = {
|
|
|
527
729
|
history: EHistoryMode;
|
|
528
730
|
pwa: boolean;
|
|
529
731
|
pwaConfig?: TApplicationPwaConfig;
|
|
732
|
+
seo?: TApplicationSeoConfig;
|
|
530
733
|
};
|
|
531
734
|
};
|
|
735
|
+
type TApplicationSeoConfig = {
|
|
736
|
+
description: string;
|
|
737
|
+
image: string;
|
|
738
|
+
language: string;
|
|
739
|
+
noindex: boolean;
|
|
740
|
+
siteUrl: string;
|
|
741
|
+
titleTemplate: string;
|
|
742
|
+
};
|
|
532
743
|
declare enum EPwaDisplay {
|
|
533
744
|
Standalone = "standalone",
|
|
534
745
|
Fullscreen = "fullscreen",
|
|
@@ -549,97 +760,66 @@ type TApplicationPwaConfig = {
|
|
|
549
760
|
shortName: string;
|
|
550
761
|
themeColor: string;
|
|
551
762
|
};
|
|
552
|
-
type
|
|
553
|
-
|
|
554
|
-
//#region src/types/files/folder.d.ts
|
|
555
|
-
type TFolderArtboardView = {
|
|
556
|
-
name: string;
|
|
557
|
-
location: TVector;
|
|
558
|
-
properties: Record<string, unknown>;
|
|
559
|
-
};
|
|
560
|
-
type TFolderArtboard = {
|
|
561
|
-
location: TVector;
|
|
562
|
-
views: Record<string, TFolderArtboardView>;
|
|
563
|
-
};
|
|
564
|
-
type TFolder<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
565
|
-
type: EElementType.Folder;
|
|
566
|
-
artboards?: Record<string, TFolderArtboard>;
|
|
567
|
-
children: Record<string, TFile<TExport>>;
|
|
568
|
-
color?: string;
|
|
569
|
-
};
|
|
570
|
-
//#endregion
|
|
571
|
-
//#region src/types/files/common.d.ts
|
|
572
|
-
/**
|
|
573
|
-
* Fields that only exist on the in-memory (non-export) shape
|
|
574
|
-
*/
|
|
575
|
-
type TRuntimeOnly<TExport extends boolean, T> = TExport extends false ? T : Record<never, never>;
|
|
576
|
-
type TFileState = {
|
|
577
|
-
expand?: boolean;
|
|
578
|
-
isEditing?: boolean;
|
|
579
|
-
logic?: TCanvas;
|
|
580
|
-
opened?: boolean;
|
|
581
|
-
panel?: string;
|
|
582
|
-
};
|
|
583
|
-
type TFileBase<TExport extends boolean = false> = {
|
|
584
|
-
name: string;
|
|
585
|
-
state: TFileState;
|
|
586
|
-
} & TRuntimeOnly<TExport, {
|
|
587
|
-
id: string;
|
|
588
|
-
parent?: TFolder<TExport>;
|
|
589
|
-
}>;
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region src/types/logic.d.ts
|
|
763
|
+
type TFileExport = TFolderExport | TFileComponentExport | TFileConfigExport | TFileCronExport | TFileDatabaseExport | TFileRouteExport | TFileScriptExport | TFileStoreExport | TFileTextExport | TFileTypeExport | TFileMediaExport;
|
|
764
|
+
type TFile = TFolder | TFileComponent | TFileConfig | TFileCron | TFileDatabase | TFileRoute | TFileScript | TFileStore | TFileText | TFileType | TFileMedia;
|
|
592
765
|
declare enum ELogicMode {
|
|
593
766
|
Pure = "pure",
|
|
594
767
|
Macro = "macro",
|
|
595
768
|
Code = "code"
|
|
596
769
|
}
|
|
597
|
-
type
|
|
770
|
+
type TCanvas = {
|
|
771
|
+
location: TVector;
|
|
772
|
+
zoom: number;
|
|
773
|
+
};
|
|
774
|
+
interface TGraphOf<TNode, TWire> {
|
|
775
|
+
autoplace?: boolean;
|
|
776
|
+
canvas: TCanvas;
|
|
777
|
+
nodes: Record<string, TNode>;
|
|
778
|
+
wires: Record<string, TWire>;
|
|
779
|
+
}
|
|
780
|
+
type TGraphExport = TGraphOf<TNodeExport, TWireExport>;
|
|
781
|
+
type TGraph = TGraphOf<TNode, TWire>;
|
|
782
|
+
type TAnchorExport = TSchema;
|
|
783
|
+
type TAnchor = {
|
|
784
|
+
id: string;
|
|
785
|
+
parent?: TLogic;
|
|
786
|
+
schema: TSchema;
|
|
787
|
+
};
|
|
788
|
+
interface TLogicBaseOf<TGraph, TValue> {
|
|
598
789
|
name: string;
|
|
599
|
-
graph: TGraph
|
|
790
|
+
graph: TGraph;
|
|
600
791
|
values: {
|
|
601
|
-
variables: Record<string, TValue
|
|
792
|
+
variables: Record<string, TValue>;
|
|
602
793
|
};
|
|
603
|
-
}
|
|
794
|
+
}
|
|
795
|
+
type TLogicRuntimeFields = {
|
|
604
796
|
id: string;
|
|
605
797
|
db: Record<string, TLogicNode>;
|
|
606
798
|
isEditing?: boolean;
|
|
607
|
-
parent: TFile
|
|
608
|
-
}
|
|
609
|
-
|
|
799
|
+
parent: TFile;
|
|
800
|
+
};
|
|
801
|
+
interface TLogicOf<TGraph, TValue, TAnchor> extends TLogicBaseOf<TGraph, TValue> {
|
|
610
802
|
type: EElementType.Logic | EElementType.Standalone;
|
|
611
803
|
async: boolean;
|
|
612
804
|
code?: string;
|
|
613
805
|
export: boolean;
|
|
614
|
-
inputs: Record<string, TAnchor
|
|
806
|
+
inputs: Record<string, TAnchor>;
|
|
615
807
|
mode: ELogicMode;
|
|
616
|
-
outputs: Record<string, TAnchor
|
|
808
|
+
outputs: Record<string, TAnchor>;
|
|
617
809
|
packages?: Array<string>;
|
|
618
|
-
}
|
|
619
|
-
type
|
|
810
|
+
}
|
|
811
|
+
type TLogicExport = TLogicOf<TGraphExport, TValueExport, TAnchorExport>;
|
|
812
|
+
type TLogic = TLogicOf<TGraph, TValue, TAnchor> & TLogicRuntimeFields;
|
|
813
|
+
interface TLogicMainOf<TGraph, TValue> extends TLogicBaseOf<TGraph, TValue> {
|
|
620
814
|
name: "Main";
|
|
621
815
|
type: EElementType.MainLogic;
|
|
622
|
-
}
|
|
816
|
+
}
|
|
817
|
+
type TLogicMainExport = TLogicMainOf<TGraphExport, TValueExport>;
|
|
818
|
+
type TLogicMain = TLogicMainOf<TGraph, TValue> & TLogicRuntimeFields & {
|
|
623
819
|
id: "main";
|
|
624
|
-
}>;
|
|
625
|
-
type TCanvas = {
|
|
626
|
-
location: TVector;
|
|
627
|
-
zoom: number;
|
|
628
|
-
};
|
|
629
|
-
type TGraph<TExport extends boolean = false> = {
|
|
630
|
-
autoplace?: boolean;
|
|
631
|
-
canvas: TCanvas;
|
|
632
|
-
nodes: Record<string, TNode<TExport>>;
|
|
633
|
-
wires: Record<string, TWire<TExport>>;
|
|
634
820
|
};
|
|
635
|
-
type
|
|
636
|
-
|
|
637
|
-
parent?: TLogic<TExport>;
|
|
638
|
-
schema: TSchema;
|
|
639
|
-
};
|
|
640
|
-
type TAnyLogic<TExport extends boolean = false> = TLogic<TExport> | TLogicMain<TExport>;
|
|
641
|
-
//#endregion
|
|
642
|
-
//#region src/types/editor/stack.d.ts
|
|
821
|
+
type TAnyLogicExport = TLogicExport | TLogicMainExport;
|
|
822
|
+
type TAnyLogic = TLogic | TLogicMain;
|
|
643
823
|
type TStackParent = {
|
|
644
824
|
logic?: TLogic;
|
|
645
825
|
node?: CNode;
|
|
@@ -652,8 +832,6 @@ type TStack = {
|
|
|
652
832
|
parent?: TStackParent;
|
|
653
833
|
variables: Record<string, unknown>;
|
|
654
834
|
};
|
|
655
|
-
//#endregion
|
|
656
|
-
//#region src/types/editor/node.d.ts
|
|
657
835
|
type TBaseNode = {
|
|
658
836
|
id: string;
|
|
659
837
|
data?: object;
|
|
@@ -675,15 +853,21 @@ type TGeneratedNode<TLogic extends TLogicNode = TLogicNode> = TLogic & {
|
|
|
675
853
|
proxy: TNodeProxy;
|
|
676
854
|
};
|
|
677
855
|
type TNodeData = {
|
|
678
|
-
|
|
856
|
+
color?: string;
|
|
857
|
+
config: Record<string, unknown>;
|
|
858
|
+
customTypes: Record<string, Partial<TSchema>>;
|
|
859
|
+
hideUnusedPins?: boolean;
|
|
860
|
+
manual?: Record<string, unknown>;
|
|
679
861
|
multiple?: {
|
|
680
862
|
isArray?: boolean;
|
|
681
863
|
number: number;
|
|
682
864
|
};
|
|
683
|
-
|
|
865
|
+
note?: string;
|
|
866
|
+
optionals: Record<string, boolean>;
|
|
684
867
|
size?: Partial<TVector>;
|
|
685
868
|
} & Record<string, unknown>;
|
|
686
|
-
|
|
869
|
+
type CNode = TEditorClass<"CNode", CBaseNode>;
|
|
870
|
+
declare class CBaseNode {
|
|
687
871
|
id: string;
|
|
688
872
|
dbNode: TGeneratedNode;
|
|
689
873
|
element?: HTMLElement;
|
|
@@ -713,6 +897,7 @@ declare class CNode {
|
|
|
713
897
|
set data(data: Record<string, unknown>);
|
|
714
898
|
get data(): TNodeData;
|
|
715
899
|
reset(): void;
|
|
900
|
+
dispose(): void;
|
|
716
901
|
setLocation(location: TVector): CNode;
|
|
717
902
|
getAnchorLocation(anchor: CNodeAnchor): CVector;
|
|
718
903
|
getRelativeAnchorLocation(anchor: CNodeAnchor): CVector;
|
|
@@ -725,7 +910,7 @@ declare class CNode {
|
|
|
725
910
|
getInput(inputKey: string, stack?: TStack): unknown;
|
|
726
911
|
setOutput(outputKey: string, value: unknown, stack?: TStack): void;
|
|
727
912
|
}
|
|
728
|
-
type
|
|
913
|
+
type TNodeExport = {
|
|
729
914
|
data?: Record<string, unknown>;
|
|
730
915
|
internal?: {
|
|
731
916
|
inputs?: Record<string, unknown>;
|
|
@@ -733,9 +918,8 @@ type TNode<TExport extends boolean = false> = TExport extends true ? {
|
|
|
733
918
|
};
|
|
734
919
|
location: TVector;
|
|
735
920
|
logic: string;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
//#region src/types/editor/anchor.d.ts
|
|
921
|
+
};
|
|
922
|
+
type TNode = CNode;
|
|
739
923
|
type TDBAnchor = {
|
|
740
924
|
id?: string;
|
|
741
925
|
schema: TSchema;
|
|
@@ -745,7 +929,9 @@ declare enum EAnchorDirection {
|
|
|
745
929
|
Output = "output",
|
|
746
930
|
None = "none"
|
|
747
931
|
}
|
|
748
|
-
|
|
932
|
+
type CAnchor = TEditorClass<"CAnchor", CBaseAnchor>;
|
|
933
|
+
type CNodeAnchor = TEditorClass<"CNodeAnchor", CBaseNodeAnchor>;
|
|
934
|
+
declare class CBaseAnchor {
|
|
749
935
|
connections: Array<CWire>;
|
|
750
936
|
dbAnchor: TDBAnchor;
|
|
751
937
|
padding?: number;
|
|
@@ -760,7 +946,7 @@ declare class CAnchor {
|
|
|
760
946
|
get schemaRaw(): TSchema;
|
|
761
947
|
get toSchema(): TSchema;
|
|
762
948
|
}
|
|
763
|
-
declare class
|
|
949
|
+
declare class CBaseNodeAnchor extends CBaseAnchor {
|
|
764
950
|
key: string;
|
|
765
951
|
index: number;
|
|
766
952
|
node: CNode;
|
|
@@ -793,170 +979,80 @@ declare class CNodeAnchor extends CAnchor {
|
|
|
793
979
|
setValue(value: string | number | boolean): void;
|
|
794
980
|
resetValue(): void;
|
|
795
981
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
Variable = "variable",
|
|
800
|
-
Property = "property",
|
|
801
|
-
Attribute = "attribute",
|
|
802
|
-
Context = "context",
|
|
803
|
-
Computed = "computed",
|
|
804
|
-
Event = "event",
|
|
805
|
-
File = "file",
|
|
806
|
-
Model = "model",
|
|
807
|
-
Logic = "logic"
|
|
982
|
+
declare enum EDBOperation {
|
|
983
|
+
And = "and",
|
|
984
|
+
Or = "or"
|
|
808
985
|
}
|
|
809
|
-
type
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
};
|
|
813
|
-
type TLayoutContext = Record<string, TContextValue>;
|
|
814
|
-
/**
|
|
815
|
-
* Runtime-only reactive value (never exported)
|
|
816
|
-
*/
|
|
817
|
-
type TLayoutValue = {
|
|
818
|
-
id: string;
|
|
819
|
-
type?: ELayoutValueType;
|
|
820
|
-
baseType?: ELayoutValueType;
|
|
821
|
-
child: Array<string>;
|
|
822
|
-
component?: TFileComponent;
|
|
823
|
-
context: TLayoutContext;
|
|
824
|
-
stackId: string;
|
|
825
|
-
get value(): unknown;
|
|
826
|
-
set value(value: unknown);
|
|
827
|
-
get schema(): TSchema;
|
|
828
|
-
get baseSchema(): TSchema;
|
|
986
|
+
type TDBOperation = {
|
|
987
|
+
type: EDBOperation;
|
|
988
|
+
conditions: Array<TDBCondition | TDBOperation>;
|
|
829
989
|
};
|
|
830
|
-
declare enum
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
//#endregion
|
|
844
|
-
//#region src/types/files/component.d.ts
|
|
845
|
-
declare enum EComponentType {
|
|
846
|
-
Component = "component",
|
|
847
|
-
Page = "page"
|
|
990
|
+
declare enum EDBCondition {
|
|
991
|
+
Equals = "equals",
|
|
992
|
+
NotEquals = "notEquals",
|
|
993
|
+
GreaterThan = "greaterThan",
|
|
994
|
+
LessThan = "lessThan",
|
|
995
|
+
GreaterThanOrEquals = "greaterThanOrEquals",
|
|
996
|
+
LessThanOrEquals = "lessThanOrEquals",
|
|
997
|
+
In = "in",
|
|
998
|
+
IsNull = "isNull",
|
|
999
|
+
NotNull = "notNull",
|
|
1000
|
+
Like = "like",
|
|
1001
|
+
ILike = "ilike",
|
|
1002
|
+
Contains = "contains"
|
|
848
1003
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1004
|
+
type TDBCondition = {
|
|
1005
|
+
operation: EDBCondition;
|
|
1006
|
+
source: Array<string>;
|
|
1007
|
+
} & ({
|
|
1008
|
+
type: "value";
|
|
1009
|
+
target: unknown;
|
|
1010
|
+
} | {
|
|
1011
|
+
type: "column";
|
|
1012
|
+
target: Array<string>;
|
|
1013
|
+
});
|
|
1014
|
+
export declare enum EPluginHooks {
|
|
1015
|
+
BackendMiddleware = "backend/middleware",
|
|
1016
|
+
BackendInputNode = "backend/input-node",
|
|
1017
|
+
DatabaseScope = "database/scope",
|
|
1018
|
+
DatabaseChange = "database/change"
|
|
853
1019
|
}
|
|
854
|
-
type
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
1020
|
+
type THookParams = {
|
|
1021
|
+
[EPluginHooks.DatabaseScope]: {
|
|
1022
|
+
addConditions: (conditions: Array<TDBCondition | TDBOperation>) => void;
|
|
1023
|
+
table: string;
|
|
1024
|
+
};
|
|
1025
|
+
[EPluginHooks.DatabaseChange]: {
|
|
1026
|
+
operation: "insert" | "update" | "delete";
|
|
1027
|
+
rows: Array<Record<string, unknown>>;
|
|
1028
|
+
table: string;
|
|
1029
|
+
};
|
|
1030
|
+
[EPluginHooks.BackendMiddleware]: {
|
|
1031
|
+
cookies: Record<string, {
|
|
1032
|
+
options?: Record<string, unknown>;
|
|
1033
|
+
value: string;
|
|
1034
|
+
}>;
|
|
1035
|
+
setContextVar: (key: string, value: unknown) => void;
|
|
1036
|
+
};
|
|
1037
|
+
[EPluginHooks.BackendInputNode]: {
|
|
1038
|
+
addInput: (key: string, schema: TSchema) => void;
|
|
873
1039
|
};
|
|
874
|
-
} & TRuntimeOnly<TExport, {
|
|
875
|
-
flat: Record<string, TLayoutSchema>;
|
|
876
|
-
}>;
|
|
877
|
-
//#endregion
|
|
878
|
-
//#region src/types/variable.d.ts
|
|
879
|
-
declare enum EDynamicVariableType {
|
|
880
|
-
Constant = "constant",
|
|
881
|
-
Dynamic = "dynamic",
|
|
882
|
-
Token = "token"
|
|
883
|
-
}
|
|
884
|
-
declare enum EDynamicOperation {
|
|
885
|
-
Equal = "equal",
|
|
886
|
-
NotEqual = "not-equal",
|
|
887
|
-
Greater = "greater",
|
|
888
|
-
GreaterEqual = "greater-equal",
|
|
889
|
-
Less = "less",
|
|
890
|
-
LessEqual = "less-equal",
|
|
891
|
-
StartsWith = "starts-with",
|
|
892
|
-
EndsWith = "ends-with",
|
|
893
|
-
Includes = "includes",
|
|
894
|
-
At = "at",
|
|
895
|
-
Join = "join",
|
|
896
|
-
ToLowerCase = "to-lower-case",
|
|
897
|
-
Length = "length",
|
|
898
|
-
Not = "not",
|
|
899
|
-
And = "and",
|
|
900
|
-
Or = "or",
|
|
901
|
-
Add = "add",
|
|
902
|
-
Subtract = "subtract",
|
|
903
|
-
Multiply = "multiply",
|
|
904
|
-
Divide = "divide",
|
|
905
|
-
Modulo = "modulo",
|
|
906
|
-
Ternary = "ternary",
|
|
907
|
-
ToString = "to-string",
|
|
908
|
-
ToNumber = "to-number",
|
|
909
|
-
ToBoolean = "to-boolean",
|
|
910
|
-
Call = "call"
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* One operation applied to the previous value, optionally followed by a property access on its result.
|
|
914
|
-
*/
|
|
915
|
-
type TDynamicVariableStep = {
|
|
916
|
-
access?: Array<string>;
|
|
917
|
-
operation: EDynamicOperation;
|
|
918
|
-
variables: Array<TMaybeDynamicVariable<true>>;
|
|
919
|
-
};
|
|
920
|
-
/**
|
|
921
|
-
* Serializable data of a dynamic variable. Runtime variables extend it with methods, so they stay assignable to it.
|
|
922
|
-
*/
|
|
923
|
-
type TBaseDynamicVariable = {
|
|
924
|
-
type: EDynamicVariableType;
|
|
925
|
-
_dynamic: true;
|
|
926
|
-
access: Array<string>;
|
|
927
|
-
steps?: Array<TDynamicVariableStep>;
|
|
928
|
-
token: string;
|
|
929
|
-
value: unknown;
|
|
930
|
-
};
|
|
931
|
-
type TDynamicVariable<TExport extends boolean = false> = TExport extends true ? TBaseDynamicVariable : TBaseDynamicVariable & {
|
|
932
|
-
getComputed(component: TFileComponent, options?: {
|
|
933
|
-
context?: TLayoutContext;
|
|
934
|
-
stackId?: string;
|
|
935
|
-
}): ComputedRef<TContextValue | TLayoutValue>;
|
|
936
|
-
getValue(component: TFileComponent, options?: {
|
|
937
|
-
base?: boolean;
|
|
938
|
-
context?: TLayoutContext;
|
|
939
|
-
stackId?: string;
|
|
940
|
-
}): TContextValue;
|
|
941
|
-
getRawValue(): unknown;
|
|
942
|
-
toJSON(): unknown;
|
|
943
1040
|
};
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1041
|
+
type TInterface = TInterfaceConfig<Component> & {
|
|
1042
|
+
arguments?: Array<TSchema>;
|
|
1043
|
+
description?: string;
|
|
1044
|
+
methods?: Array<{
|
|
1045
|
+
name: string;
|
|
1046
|
+
parameters?: Array<TSchema>;
|
|
1047
|
+
return: TSchema;
|
|
1048
|
+
}>;
|
|
950
1049
|
};
|
|
951
|
-
type
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
parent?: TLogic<TExport>;
|
|
1050
|
+
type TInterfaceEditorProps = {
|
|
1051
|
+
anchor?: boolean;
|
|
1052
|
+
modelValue?: TInterfaceConstantValue;
|
|
1053
|
+
placeholder?: string;
|
|
956
1054
|
schema: TSchema;
|
|
957
|
-
}
|
|
958
|
-
//#endregion
|
|
959
|
-
//#region src/types/panel.d.ts
|
|
1055
|
+
};
|
|
960
1056
|
type TElementPanelAction = {
|
|
961
1057
|
icon: IconDefinition;
|
|
962
1058
|
onClick: (params: {
|
|
@@ -989,31 +1085,17 @@ type TElementPanelProps<TValues = Record<string, unknown>> = {
|
|
|
989
1085
|
type TPanels = {
|
|
990
1086
|
element?: Array<TElementPanel>;
|
|
991
1087
|
};
|
|
992
|
-
//#endregion
|
|
993
|
-
//#region src/types/template.d.ts
|
|
994
1088
|
type TTemplate = {
|
|
995
1089
|
name: string;
|
|
996
1090
|
preview?: string;
|
|
997
|
-
template:
|
|
1091
|
+
template: TFileExport;
|
|
998
1092
|
};
|
|
999
|
-
//#endregion
|
|
1000
|
-
//#region src/types/token.d.ts
|
|
1001
|
-
export declare enum ETokenType {
|
|
1002
|
-
Color = "color",
|
|
1003
|
-
FontSize = "font-size",
|
|
1004
|
-
FontWeight = "font-weight",
|
|
1005
|
-
FontFamily = "font-family",
|
|
1006
|
-
Length = "length",
|
|
1007
|
-
Time = "time"
|
|
1008
|
-
}
|
|
1009
1093
|
type TToken = {
|
|
1010
1094
|
id: string;
|
|
1011
1095
|
name?: string;
|
|
1012
1096
|
type: ETokenType;
|
|
1013
1097
|
value: string;
|
|
1014
1098
|
};
|
|
1015
|
-
//#endregion
|
|
1016
|
-
//#region src/types/plugin.d.ts
|
|
1017
1099
|
export declare enum EInjectionKey {
|
|
1018
1100
|
ViteImport = "viteImport",
|
|
1019
1101
|
VitePlugin = "vitePlugin",
|
|
@@ -1085,10 +1167,10 @@ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
1085
1167
|
type TPlugin<TConfig extends TSchema = TSchema, TInternal = unknown, TBase extends TBasePlugin<TConfig, TInternal> = TBasePlugin<TConfig, TInternal>> = Omit<TBase, "build" | "editor" | "inject"> & { [TCategory in "build" | "editor" | "inject"]?: { [TKey in keyof NonNullable<TBase[TCategory]>]: TOption<TEnv<TConfig, TInternal>, NonNullable<TBase[TCategory]>[TKey]>; }; };
|
|
1086
1168
|
type TProxyPlugin<TConfig extends TSchema = TSchema, TInternal = unknown, TBase extends TBasePlugin<TConfig, TInternal> = TBasePlugin<TConfig, TInternal>> = Omit<TBase, "build" | "editor" | "inject"> & { [TCategory in "build" | "editor" | "inject"]?: { [TKey in keyof NonNullable<TBase[TCategory]>]: Promise<NonNullable<TBase[TCategory]>[TKey]>; }; };
|
|
1087
1169
|
type TEnv<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
1088
|
-
addFile: (file: DeepPartial<
|
|
1170
|
+
addFile: (file: DeepPartial<TFileExport> & {
|
|
1089
1171
|
type: EElementType;
|
|
1090
1172
|
}, parentId?: string) => TFile;
|
|
1091
|
-
app: TApplication
|
|
1173
|
+
app: TApplication | TApplicationExport;
|
|
1092
1174
|
backend: {
|
|
1093
1175
|
cookies: Record<string, {
|
|
1094
1176
|
options?: Record<string, unknown>;
|
|
@@ -1113,13 +1195,10 @@ type THost = {
|
|
|
1113
1195
|
writeFile: (path: string, data: Uint8Array) => Promise<void>;
|
|
1114
1196
|
};
|
|
1115
1197
|
type TOption<TParams = unknown, TResult = unknown> = TResult | ((env: TParams) => Promise<TResult> | TResult);
|
|
1116
|
-
//#endregion
|
|
1117
|
-
//#region src/index.d.ts
|
|
1118
1198
|
export declare function makePlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>): TPlugin<TConfig, TInternal>;
|
|
1119
1199
|
export declare function makeComponent<TProps extends Record<string, TSchema>>(component: TComponent<TProps>): TComponent<TProps>;
|
|
1120
1200
|
export declare function loadPlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>, env: Partial<TEnv>): Promise<TBasePlugin<TConfig, TInternal>>;
|
|
1121
1201
|
export declare function sortPlugins<T extends Pick<TBasePlugin, "dependencies" | "id">>(plugins: Array<T>): Array<T>;
|
|
1122
|
-
export declare function getPluginApi<TApi = unknown>(plugin: Pick<TBasePlugin, "api" | "id"> | undefined, env: Partial<TEnv>): Promise<TApi | undefined>;
|
|
1202
|
+
export declare function getPluginApi<TApi = unknown>(plugin: Pick<TBasePlugin, "api" | "config" | "id"> | undefined, env: Partial<TEnv>): Promise<TApi | undefined>;
|
|
1123
1203
|
export declare function getPluginParam<T>(target: TOption<TEnv, T>, env: Partial<TEnv>): Promise<T>;
|
|
1124
|
-
|
|
1125
|
-
export { EElementType, ELogicScope, ELogicType, EVarType, _default as LSettingsStoryWrapper, LogicType, LogicUtil, type Static, type TAnyLogic, type TApplication, type TBasePlugin, type TComponent, type TDatabaseCondition, type TElementPanel, type TElementPanelAction, type TElementPanelProps, type TEnv, type TFile, type TFileComponent, type TFileConfig, type TFileCron, type TFileDatabase, type TFileMedia, type TFileRoute, type TFileScript, type TFileStore, type TFileText, type TFileType, type TFolder, type THookParams, type THost, type TInterface, type TInterfaceEditorProps, type TLayoutSchema, type TLogic, type TLogicMain, type TLogicNode, type TOption, type TPanels, type TPlugin, type TProxyPlugin, type TRouteGuard, type TSchema, type TSlot, type TTemplate, type TToken, makeLogicNode };
|
|
1204
|
+
export { EDBCondition, EDBOperation, EElementType, ELogicScope, ELogicType, ETokenType, EVarType, _default as LSettingsStoryWrapper, LogicType, LogicUtil, type Static, type TAnyLogic, type TAnyLogicExport, type TApplication, type TApplicationExport, type TBasePlugin, type TComponent, type TDBCondition, type TDBOperation, type TElementPanel, type TElementPanelAction, type TElementPanelProps, type TEnv, type TFile, type TFileComponent, type TFileComponentExport, type TFileConfig, type TFileConfigExport, type TFileCron, type TFileCronExport, type TFileDatabase, type TFileDatabaseExport, type TFileExport, type TFileMedia, type TFileMediaExport, type TFileRoute, type TFileRouteExport, type TFileScript, type TFileScriptExport, type TFileStore, type TFileStoreExport, type TFileText, type TFileTextExport, type TFileType, type TFileTypeExport, type TFolder, type TFolderExport, type THookParams, type THost, type TInterface, type TInterfaceEditorProps, type TLayoutSchema, type TLayoutSchemaExport, type TLogic, type TLogicExport, type TLogicMain, type TLogicMainExport, type TLogicNode, type TOption, type TPanels, type TPlugin, type TPluginElement, type TProxyPlugin, type TRouteGuard, type TSchema, type TSlot, type TTemplate, type TToken, makeLogicNode };
|