@luna-park/plugin 1.4.1 → 1.5.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/bin/preview.js +50 -0
- package/dist/{dist-hc-SHkAg.mjs → dist-JzydDdZn.mjs} +97 -95
- package/dist/extractor.d.mts +6 -8
- package/dist/extractor.mjs +3 -4
- package/dist/{index-X3hhfmWd.d.mts → index-DwEOlEBY.d.mts} +75 -44
- package/dist/index.d.mts +616 -524
- package/dist/index.mjs +124 -70
- package/dist/preview.d.mts +2 -3
- package/package.json +26 -26
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as LogicUtil, c as TObject, d as makeLogicNode, f as CVector, h as TVector, i as LogicType, l as TSchema, m as MaybePromise, n as ELogicType, o as Static, p as DeepPartial, r as EVarType, s as TLogicNode, t as ELogicScope, u as TVoid } from "./index-
|
|
2
|
-
import
|
|
1
|
+
import { a as LogicUtil, c as TObject, d as makeLogicNode, f as CVector, h as TVector, i as LogicType, l as TSchema, m as MaybePromise, n as ELogicType, o as Static, p as DeepPartial, r as EVarType, s as TLogicNode, t as ELogicScope, u as TVoid } from "./index-DwEOlEBY.mjs";
|
|
2
|
+
import "typescript";
|
|
3
3
|
import { Component, ComputedRef } from "vue";
|
|
4
|
+
import "@sinclair/typebox";
|
|
4
5
|
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
5
|
-
import { PGliteWorker } from "@electric-sql/pglite/worker";
|
|
6
6
|
import { Cron } from "lite-cron";
|
|
7
|
-
|
|
7
|
+
import { PGliteWorker } from "@electric-sql/pglite/worker";
|
|
8
8
|
//#region src/components/LSettingsStoryWrapper.vue.d.ts
|
|
9
9
|
declare var __VLS_1: {};
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
11
11
|
default?: (props: typeof __VLS_1) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
16
16
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -24,7 +24,7 @@ type TSlot = TSchema<TObject> | TSchema<TVoid>;
|
|
|
24
24
|
type StaticOfProps<T extends Record<string, TSchema>> = { [K in keyof T]: {
|
|
25
25
|
schema: TSchema;
|
|
26
26
|
value: Static<T[K]>;
|
|
27
|
-
} };
|
|
27
|
+
}; };
|
|
28
28
|
type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>, TInternals = unknown> = {
|
|
29
29
|
build?: {
|
|
30
30
|
imports?: Array<{
|
|
@@ -42,10 +42,11 @@ type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>
|
|
|
42
42
|
emits?: Record<string, TSchema>;
|
|
43
43
|
icon?: IconDefinition | string;
|
|
44
44
|
internals?: TInternals;
|
|
45
|
+
llm?: string;
|
|
45
46
|
models?: Record<string, TSchema>;
|
|
46
47
|
name: string;
|
|
47
48
|
preview?: {
|
|
48
|
-
properties?: Partial<{ [TKey in keyof TProps]: Static<TProps[TKey]
|
|
49
|
+
properties?: Partial<{ [TKey in keyof TProps]: Static<TProps[TKey]>; }>;
|
|
49
50
|
slots?: Record<string, string>;
|
|
50
51
|
style?: string;
|
|
51
52
|
};
|
|
@@ -55,8 +56,27 @@ type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>
|
|
|
55
56
|
}) => Record<string, TSlot>);
|
|
56
57
|
};
|
|
57
58
|
//#endregion
|
|
59
|
+
//#region src/types/guard.d.ts
|
|
60
|
+
type TRouteGuard = {
|
|
61
|
+
build: {
|
|
62
|
+
generate: (config: Record<string, unknown>) => string;
|
|
63
|
+
imports?: Array<{
|
|
64
|
+
name: string;
|
|
65
|
+
target: string;
|
|
66
|
+
}>;
|
|
67
|
+
};
|
|
68
|
+
check: (params: {
|
|
69
|
+
config: Record<string, unknown>;
|
|
70
|
+
context: Record<string, unknown>;
|
|
71
|
+
}) => MaybePromise<void>;
|
|
72
|
+
config?: TSchema<TObject>;
|
|
73
|
+
description?: string;
|
|
74
|
+
id: string;
|
|
75
|
+
label: string;
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
58
78
|
//#region src/types/hooks.d.ts
|
|
59
|
-
declare enum EPluginHooks {
|
|
79
|
+
export declare enum EPluginHooks {
|
|
60
80
|
BackendMiddleware = "backend/middleware",
|
|
61
81
|
BackendInputNode = "backend/input-node"
|
|
62
82
|
}
|
|
@@ -73,37 +93,6 @@ type THookParams = {
|
|
|
73
93
|
};
|
|
74
94
|
};
|
|
75
95
|
//#endregion
|
|
76
|
-
//#region ../shared/dist/layout-w4K7EDPE.d.mts
|
|
77
|
-
declare enum ELayoutElement {
|
|
78
|
-
input = "input",
|
|
79
|
-
div = "div",
|
|
80
|
-
media = "media",
|
|
81
|
-
customText = "customText",
|
|
82
|
-
component = "component",
|
|
83
|
-
package = "package",
|
|
84
|
-
customHtml = "customHtml",
|
|
85
|
-
slot = "slot",
|
|
86
|
-
template = "template",
|
|
87
|
-
variable = "variable",
|
|
88
|
-
link = "link"
|
|
89
|
-
}
|
|
90
|
-
declare enum ELayoutEvent {
|
|
91
|
-
click = "click",
|
|
92
|
-
keydown = "keydown",
|
|
93
|
-
mouseenter = "mouseenter",
|
|
94
|
-
mouseleave = "mouseleave",
|
|
95
|
-
mousedown = "mousedown",
|
|
96
|
-
mouseup = "mouseup",
|
|
97
|
-
mousemove = "mousemove",
|
|
98
|
-
wheel = "wheel"
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/layout/template.d.ts
|
|
102
|
-
declare enum EElementTemplate {
|
|
103
|
-
If = "if",
|
|
104
|
-
For = "for"
|
|
105
|
-
} //#endregion
|
|
106
|
-
//#endregion
|
|
107
96
|
//#region ../logic-dts/dist/nodes.d.ts
|
|
108
97
|
type TExportNodeFunction = {
|
|
109
98
|
name?: string;
|
|
@@ -120,89 +109,13 @@ type TExportNodeResult = {
|
|
|
120
109
|
types: Record<string, TSchema>;
|
|
121
110
|
};
|
|
122
111
|
//#endregion
|
|
123
|
-
//#region ../shared/dist/index.d.mts
|
|
112
|
+
//#region ../shared/dist/index-DloGTzVR.d.mts
|
|
124
113
|
//#endregion
|
|
125
|
-
//#region src/types/editor/node.d.ts
|
|
126
|
-
type TBaseNode = {
|
|
127
|
-
id: string;
|
|
128
|
-
data?: object;
|
|
129
|
-
dbNode: TGeneratedNode;
|
|
130
|
-
inputs: Record<string, CNodeAnchor>;
|
|
131
|
-
location: TVector;
|
|
132
|
-
outputs: Record<string, CNodeAnchor>;
|
|
133
|
-
};
|
|
134
|
-
type TGeneratedNode<TLogic extends TLogicNode = TLogicNode> = TLogic & {
|
|
135
|
-
node?: CNode;
|
|
136
|
-
origin: TLogic;
|
|
137
|
-
proxy: any;
|
|
138
|
-
};
|
|
139
|
-
type TNodeData = {
|
|
140
|
-
config?: Record<string, unknown>;
|
|
141
|
-
multiple?: {
|
|
142
|
-
isArray?: boolean;
|
|
143
|
-
number: number;
|
|
144
|
-
};
|
|
145
|
-
optionals?: Record<string, boolean>;
|
|
146
|
-
size?: TVector;
|
|
147
|
-
} & Record<string, unknown>;
|
|
148
|
-
declare class CNode {
|
|
149
|
-
id: string;
|
|
150
|
-
dbNode: TGeneratedNode;
|
|
151
|
-
element?: HTMLElement;
|
|
152
|
-
invert: boolean;
|
|
153
|
-
parent?: TAnyLogic;
|
|
154
|
-
config: {
|
|
155
|
-
animate: boolean;
|
|
156
|
-
processing: boolean;
|
|
157
|
-
};
|
|
158
|
-
inputs: Record<string, CNodeAnchor>;
|
|
159
|
-
outputs: Record<string, CNodeAnchor>;
|
|
160
|
-
cache: {
|
|
161
|
-
location?: CVector;
|
|
162
|
-
relativeLocation?: CVector;
|
|
163
|
-
reloadKey: number;
|
|
164
|
-
size?: CVector;
|
|
165
|
-
};
|
|
166
|
-
_data: TNodeData;
|
|
167
|
-
constructor(node: TBaseNode);
|
|
168
|
-
get orderedInputs(): Array<CNodeAnchor>;
|
|
169
|
-
get orderedOutputs(): Array<CNodeAnchor>;
|
|
170
|
-
set location(location: TVector);
|
|
171
|
-
get location(): TVector;
|
|
172
|
-
reload(): void;
|
|
173
|
-
getSafeInputs(): Record<string, CNodeAnchor>;
|
|
174
|
-
getSafeOutputs(): Record<string, CNodeAnchor>;
|
|
175
|
-
set data(data: Record<string, unknown>);
|
|
176
|
-
get data(): TNodeData;
|
|
177
|
-
reset(): void;
|
|
178
|
-
setLocation(location: TVector): CNode;
|
|
179
|
-
getAnchorLocation(anchor: CNodeAnchor): CVector;
|
|
180
|
-
getRelativeAnchorLocation(anchor: CNodeAnchor): CVector;
|
|
181
|
-
getRelativeAnchorLocation_internal(anchor: CNodeAnchor): CVector;
|
|
182
|
-
getLocation(): CVector;
|
|
183
|
-
getSize(): TVector;
|
|
184
|
-
execute(outputKey: string, stack?: TStack): MaybePromise<void>;
|
|
185
|
-
get isAsync(): boolean;
|
|
186
|
-
getInput(inputKey: string, stack?: TStack): unknown;
|
|
187
|
-
setOutput(outputKey: string, value: unknown, stack?: TStack): void;
|
|
188
|
-
}
|
|
189
|
-
type TNode<TExport extends boolean = false> = TExport extends true ? {
|
|
190
|
-
data?: Record<string, unknown>;
|
|
191
|
-
internal?: {
|
|
192
|
-
inputs?: Record<string, unknown>;
|
|
193
|
-
outputs?: Record<string, unknown>;
|
|
194
|
-
};
|
|
195
|
-
location: TVector;
|
|
196
|
-
logic: string;
|
|
197
|
-
} : CNode; //#endregion
|
|
198
114
|
//#region src/types/editor/wire.d.ts
|
|
199
115
|
declare class CPathPoint {
|
|
200
116
|
direction: CVector;
|
|
201
117
|
location: CVector;
|
|
202
|
-
constructor({
|
|
203
|
-
direction,
|
|
204
|
-
location
|
|
205
|
-
}: {
|
|
118
|
+
constructor({ direction, location }: {
|
|
206
119
|
direction: TVector;
|
|
207
120
|
location: TVector;
|
|
208
121
|
});
|
|
@@ -210,7 +123,7 @@ declare class CPathPoint {
|
|
|
210
123
|
reverse: boolean;
|
|
211
124
|
}): CPathPoint;
|
|
212
125
|
}
|
|
213
|
-
type
|
|
126
|
+
type TPath = Array<CPathPoint>;
|
|
214
127
|
declare class CWire {
|
|
215
128
|
id: string;
|
|
216
129
|
from: CAnchor;
|
|
@@ -225,7 +138,7 @@ declare class CWire {
|
|
|
225
138
|
get type(): TSchema;
|
|
226
139
|
get toType(): TSchema;
|
|
227
140
|
getPoints(): string;
|
|
228
|
-
registerRibbon(path:
|
|
141
|
+
registerRibbon(path: TPath): void;
|
|
229
142
|
}
|
|
230
143
|
type TWire<TExport extends boolean = false> = TExport extends true ? {
|
|
231
144
|
from: {
|
|
@@ -236,65 +149,8 @@ type TWire<TExport extends boolean = false> = TExport extends true ? {
|
|
|
236
149
|
key: string;
|
|
237
150
|
node: string;
|
|
238
151
|
};
|
|
239
|
-
} : CWire;
|
|
240
|
-
//#
|
|
241
|
-
type TDBAnchor = {
|
|
242
|
-
id?: string;
|
|
243
|
-
schema: TSchema;
|
|
244
|
-
};
|
|
245
|
-
declare enum EAnchorDirection {
|
|
246
|
-
input = "input",
|
|
247
|
-
output = "output",
|
|
248
|
-
none = "none"
|
|
249
|
-
}
|
|
250
|
-
declare class CAnchor {
|
|
251
|
-
connections: Array<CWire>;
|
|
252
|
-
dbAnchor: TDBAnchor;
|
|
253
|
-
padding?: number;
|
|
254
|
-
protected constructor(anchor: {
|
|
255
|
-
connections?: Array<CWire>;
|
|
256
|
-
dbAnchor: TDBAnchor;
|
|
257
|
-
padding?: number;
|
|
258
|
-
});
|
|
259
|
-
getLocation(): TVector;
|
|
260
|
-
getPadding(): number;
|
|
261
|
-
get schema(): TSchema;
|
|
262
|
-
get schemaRaw(): TSchema;
|
|
263
|
-
get toSchema(): TSchema;
|
|
264
|
-
}
|
|
265
|
-
declare class CNodeAnchor extends CAnchor {
|
|
266
|
-
key: string;
|
|
267
|
-
index: number;
|
|
268
|
-
node: CNode;
|
|
269
|
-
direction: EAnchorDirection;
|
|
270
|
-
value: unknown;
|
|
271
|
-
element?: HTMLElement;
|
|
272
|
-
cache: {
|
|
273
|
-
preview?: unknown;
|
|
274
|
-
relativeLocation?: CVector;
|
|
275
|
-
};
|
|
276
|
-
constructor(anchor: {
|
|
277
|
-
connections?: Array<CWire>;
|
|
278
|
-
dbAnchor: TDBAnchor;
|
|
279
|
-
direction: EAnchorDirection;
|
|
280
|
-
element?: HTMLElement;
|
|
281
|
-
index: number;
|
|
282
|
-
key: string;
|
|
283
|
-
node: CNode;
|
|
284
|
-
padding?: number;
|
|
285
|
-
});
|
|
286
|
-
get schema(): TSchema;
|
|
287
|
-
get toSchema(): TSchema;
|
|
288
|
-
get schemaRaw(): TSchema;
|
|
289
|
-
getLocation(): CVector;
|
|
290
|
-
getRelativeLocation(): CVector;
|
|
291
|
-
resetCache(): void;
|
|
292
|
-
getPadding(): number;
|
|
293
|
-
isDisabled(): boolean;
|
|
294
|
-
errorMessage(): string | undefined;
|
|
295
|
-
setValue(value: string | number | boolean): void;
|
|
296
|
-
resetValue(): void;
|
|
297
|
-
} //#endregion
|
|
152
|
+
} : CWire;
|
|
153
|
+
//#endregion
|
|
298
154
|
//#region src/types/file.d.ts
|
|
299
155
|
declare enum EElementType {
|
|
300
156
|
Script = "script",
|
|
@@ -312,46 +168,34 @@ declare enum EElementType {
|
|
|
312
168
|
Cron = "cron",
|
|
313
169
|
Media = "media"
|
|
314
170
|
}
|
|
315
|
-
/**
|
|
316
|
-
* Check if the source scope is compatible with the target scope
|
|
317
|
-
* @param source - The source scope (from)
|
|
318
|
-
* @param target - The target scope (to)
|
|
319
|
-
*/
|
|
320
171
|
//#endregion
|
|
321
|
-
//#region src/types/files/
|
|
322
|
-
type
|
|
323
|
-
type: EElementType.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
type TFileState = {
|
|
329
|
-
expand?: boolean;
|
|
330
|
-
isEditing?: boolean;
|
|
331
|
-
logic?: {
|
|
332
|
-
location: TVector;
|
|
333
|
-
zoom: number;
|
|
334
|
-
};
|
|
335
|
-
opened?: boolean;
|
|
336
|
-
panel?: string;
|
|
172
|
+
//#region src/types/files/config.d.ts
|
|
173
|
+
type TFileConfig<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
174
|
+
type: EElementType.Config;
|
|
175
|
+
content: unknown;
|
|
176
|
+
display: EConfigDisplay;
|
|
177
|
+
schema: TSchema;
|
|
178
|
+
scope: ELogicScope;
|
|
337
179
|
};
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
} &
|
|
351
|
-
|
|
180
|
+
declare enum EConfigDisplay {
|
|
181
|
+
Smart = "smart",
|
|
182
|
+
Performance = "performance"
|
|
183
|
+
}
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/types/files/cron.d.ts
|
|
186
|
+
type TFileCron<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
187
|
+
type: EElementType.Cron;
|
|
188
|
+
active: boolean;
|
|
189
|
+
editorTrigger: boolean;
|
|
190
|
+
logics: Record<string, TAnyLogic<TExport>>;
|
|
191
|
+
time: string;
|
|
192
|
+
} & TRuntimeOnly<TExport, {
|
|
193
|
+
cron?: Cron;
|
|
352
194
|
scope: ELogicScope.Backend;
|
|
353
|
-
}
|
|
195
|
+
}>;
|
|
196
|
+
//#endregion
|
|
354
197
|
//#region src/types/editor/database.d.ts
|
|
198
|
+
type TDatabaseRow = Record<string, unknown>;
|
|
355
199
|
type TQueryValue = string | number | boolean;
|
|
356
200
|
type TQueryOperation = Record<string, {
|
|
357
201
|
$eq?: TQueryValue;
|
|
@@ -387,283 +231,61 @@ declare class CDatabase {
|
|
|
387
231
|
exist: boolean;
|
|
388
232
|
constructor(file: TFileDatabase);
|
|
389
233
|
init(): Promise<void>;
|
|
390
|
-
findById(id: string): Promise<
|
|
391
|
-
find(filter:
|
|
392
|
-
findWithQuery(query: TQuery, options?: TQueryOptions): Promise<Array<
|
|
393
|
-
updateById(id: string, data:
|
|
394
|
-
update(filter:
|
|
395
|
-
updateWithQuery(query: TQuery, data:
|
|
396
|
-
deleteById(id: string): Promise<
|
|
397
|
-
delete(filter:
|
|
398
|
-
deleteWithQuery(query: TQuery): Promise<
|
|
399
|
-
insert(data:
|
|
400
|
-
toRealKey(row:
|
|
401
|
-
toSchemaKey(row:
|
|
234
|
+
findById(id: string): Promise<TDatabaseRow | undefined>;
|
|
235
|
+
find(filter: TDatabaseRow): Promise<Array<TDatabaseRow>>;
|
|
236
|
+
findWithQuery(query: TQuery, options?: TQueryOptions): Promise<Array<TDatabaseRow>>;
|
|
237
|
+
updateById(id: string, data: TDatabaseRow): Promise<void>;
|
|
238
|
+
update(filter: TDatabaseRow, data: TDatabaseRow): Promise<void>;
|
|
239
|
+
updateWithQuery(query: TQuery, data: TDatabaseRow): Promise<void>;
|
|
240
|
+
deleteById(id: string): Promise<TDatabaseRow | undefined>;
|
|
241
|
+
delete(filter: TDatabaseRow): Promise<TDatabaseRow | undefined>;
|
|
242
|
+
deleteWithQuery(query: TQuery): Promise<TDatabaseRow | undefined>;
|
|
243
|
+
insert(data: TDatabaseRow): Promise<TDatabaseRow | undefined>;
|
|
244
|
+
toRealKey(row: TDatabaseRow): TDatabaseRow;
|
|
245
|
+
toSchemaKey(row: TDatabaseRow): TDatabaseRow;
|
|
402
246
|
updateColumns(init: boolean): Promise<void>;
|
|
403
|
-
save(): Promise<Array<
|
|
247
|
+
save(): Promise<Array<TDatabaseRow>>;
|
|
404
248
|
load(): Promise<void>;
|
|
405
|
-
getUpdate(data:
|
|
406
|
-
getQueryFilter(filter:
|
|
249
|
+
getUpdate(data: TDatabaseRow): unknown;
|
|
250
|
+
getQueryFilter(filter: TDatabaseRow): unknown;
|
|
407
251
|
getQueryOptions(options?: TQueryOptions): unknown;
|
|
408
252
|
getQuery(query: TQuery): unknown;
|
|
409
253
|
getOperation(query: TQueryOperation): unknown;
|
|
410
|
-
}
|
|
411
|
-
//#
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/types/files/database.d.ts
|
|
257
|
+
type TFileDatabase<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
258
|
+
type: EElementType.Database;
|
|
259
|
+
data: Array<TDatabaseRow>;
|
|
260
|
+
schema: TSchema<TObject>;
|
|
261
|
+
} & TRuntimeOnly<TExport, {
|
|
262
|
+
db: CDatabase;
|
|
263
|
+
scope: ELogicScope.Backend;
|
|
264
|
+
}>;
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/types/files/media.d.ts
|
|
267
|
+
type TFileMedia<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
268
|
+
type: EElementType.Media;
|
|
269
|
+
mimeType: string;
|
|
270
|
+
target: string;
|
|
271
|
+
previewUrl?: string;
|
|
416
272
|
};
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
//#region src/types/logic.d.ts
|
|
425
|
-
declare enum ELogicMode {
|
|
426
|
-
Pure = "pure",
|
|
427
|
-
Macro = "macro",
|
|
428
|
-
Code = "code"
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/types/files/route.d.ts
|
|
275
|
+
declare enum ERouteMethod {
|
|
276
|
+
Get = "get",
|
|
277
|
+
Post = "post",
|
|
278
|
+
Put = "put",
|
|
279
|
+
Delete = "delete"
|
|
429
280
|
}
|
|
430
|
-
type
|
|
431
|
-
name: string;
|
|
432
|
-
type: EElementType;
|
|
433
|
-
graph: TGraph<TExport>;
|
|
434
|
-
values: {
|
|
435
|
-
variables: Record<string, TValue<TExport>>;
|
|
436
|
-
};
|
|
437
|
-
} & (TExport extends false ? {
|
|
281
|
+
type TRouteGuardRef = {
|
|
438
282
|
id: string;
|
|
439
|
-
|
|
440
|
-
isEditing?: boolean;
|
|
441
|
-
parent: TFile<TExport>;
|
|
442
|
-
} : {});
|
|
443
|
-
type TLogic<TExport extends boolean = false> = TLogicBase<TExport> & {
|
|
444
|
-
type: EElementType.Logic | EElementType.Standalone;
|
|
445
|
-
async: boolean;
|
|
446
|
-
code?: string;
|
|
447
|
-
export: boolean;
|
|
448
|
-
inputs: Record<string, TAnchor<TExport>>;
|
|
449
|
-
mode: ELogicMode;
|
|
450
|
-
outputs: Record<string, TAnchor<TExport>>;
|
|
451
|
-
packages?: Array<string>;
|
|
452
|
-
} & (TExport extends false ? {
|
|
453
|
-
id: string;
|
|
454
|
-
} : {});
|
|
455
|
-
type TLogicMain<TExport extends boolean = false> = TLogicBase<TExport> & {
|
|
456
|
-
name: "Main";
|
|
457
|
-
type: EElementType.MainLogic;
|
|
458
|
-
} & (TExport extends false ? {
|
|
459
|
-
id: "main";
|
|
460
|
-
} : {});
|
|
461
|
-
type TCanvas = {
|
|
462
|
-
location: TVector;
|
|
463
|
-
zoom: number;
|
|
464
|
-
};
|
|
465
|
-
type TGraph<TExport extends boolean = false> = {
|
|
466
|
-
canvas: TCanvas;
|
|
467
|
-
nodes: Record<string, TNode<TExport>>;
|
|
468
|
-
wires: Record<string, TWire<TExport>>;
|
|
469
|
-
};
|
|
470
|
-
type TAnchor<TExport extends boolean = false> = TExport extends true ? TSchema : {
|
|
471
|
-
id: string;
|
|
472
|
-
parent?: TLogic<TExport>;
|
|
473
|
-
schema: TSchema;
|
|
474
|
-
};
|
|
475
|
-
type TAnyLogic<TExport extends boolean = false> = TLogic<TExport> | TLogicMain<TExport>; //#endregion
|
|
476
|
-
//#region src/types/value.d.ts
|
|
477
|
-
declare enum ELayoutValueType {
|
|
478
|
-
variable = "variable",
|
|
479
|
-
property = "property",
|
|
480
|
-
attribute = "attribute",
|
|
481
|
-
context = "context",
|
|
482
|
-
computed = "computed",
|
|
483
|
-
event = "event",
|
|
484
|
-
file = "file",
|
|
485
|
-
model = "model",
|
|
486
|
-
logic = "logic"
|
|
487
|
-
}
|
|
488
|
-
type TContextValue = {
|
|
489
|
-
schema: TSchema;
|
|
490
|
-
value: unknown;
|
|
491
|
-
};
|
|
492
|
-
type TLayoutContext = Record<string, TContextValue>;
|
|
493
|
-
type TLayoutValue<TExport extends boolean = false> = {
|
|
494
|
-
id: string;
|
|
495
|
-
type?: ELayoutValueType;
|
|
496
|
-
baseType?: ELayoutValueType;
|
|
497
|
-
child: Array<string>;
|
|
498
|
-
component: TFileComponent<TExport>;
|
|
499
|
-
context: TLayoutContext;
|
|
500
|
-
stackId: string;
|
|
501
|
-
get value(): unknown;
|
|
502
|
-
set value(value: unknown);
|
|
503
|
-
get schema(): TSchema;
|
|
504
|
-
get baseSchema(): TSchema;
|
|
505
|
-
}; //#endregion
|
|
506
|
-
//#region src/types/variable.d.ts
|
|
507
|
-
declare enum EDynamicVariableType {
|
|
508
|
-
Constant = "constant",
|
|
509
|
-
Dynamic = "dynamic",
|
|
510
|
-
Token = "token"
|
|
511
|
-
}
|
|
512
|
-
declare enum EDynamicVariableOperation {
|
|
513
|
-
Equal = "equal",
|
|
514
|
-
Greater = "greater",
|
|
515
|
-
Less = "less",
|
|
516
|
-
StartsWith = "starts-with",
|
|
517
|
-
EndsWith = "ends-with",
|
|
518
|
-
Contains = "contains"
|
|
519
|
-
}
|
|
520
|
-
type TBaseDynamicVariable<TExport extends boolean = false> = {
|
|
521
|
-
type: EDynamicVariableType;
|
|
522
|
-
_dynamic: true;
|
|
523
|
-
access: Array<string>;
|
|
524
|
-
target: {
|
|
525
|
-
invert?: boolean;
|
|
526
|
-
operation: EDynamicVariableOperation;
|
|
527
|
-
variable?: TDynamicVariable<TExport>;
|
|
528
|
-
};
|
|
529
|
-
token: string;
|
|
530
|
-
value: unknown;
|
|
531
|
-
};
|
|
532
|
-
type TDynamicVariable<TExport extends boolean = false> = (TExport extends true ? TBaseDynamicVariable<TExport> : TBaseDynamicVariable<TExport> & {
|
|
533
|
-
getComputed(component: TFileComponent, options: {
|
|
534
|
-
context?: TLayoutContext;
|
|
535
|
-
stackId?: string;
|
|
536
|
-
}): ComputedRef<TContextValue | TLayoutValue>;
|
|
537
|
-
getValue(component: TFileComponent, options: {
|
|
538
|
-
base?: boolean;
|
|
539
|
-
context?: TLayoutContext;
|
|
540
|
-
stackId?: string;
|
|
541
|
-
}): TContextValue;
|
|
542
|
-
getRawValue(): unknown;
|
|
543
|
-
toJSON(): unknown;
|
|
544
|
-
}) | unknown;
|
|
545
|
-
type TValue<TExport extends boolean = false> = TExport extends false ? {
|
|
546
|
-
id: string;
|
|
547
|
-
isEditing?: boolean;
|
|
548
|
-
parent?: TLogic<TExport>;
|
|
549
|
-
schema: TSchema;
|
|
550
|
-
} : TSchema; //#endregion
|
|
551
|
-
//#region src/types/layout.d.ts
|
|
552
|
-
type TTextBlock = {
|
|
553
|
-
content: string;
|
|
554
|
-
key: string;
|
|
555
|
-
};
|
|
556
|
-
type TLayoutContentType<TElement extends ELayoutElement, TExport extends boolean = false> = TElement extends ELayoutElement.variable ? {
|
|
557
|
-
var: TDynamicVariable | unknown;
|
|
558
|
-
} : TElement extends ELayoutElement.component ? {
|
|
559
|
-
id: string;
|
|
560
|
-
slot: boolean;
|
|
561
|
-
slots: Record<string, TLayoutSchema<TElement, TExport>>;
|
|
562
|
-
} : TElement extends ELayoutElement.customText ? {
|
|
563
|
-
text: TTextBlock;
|
|
564
|
-
variables: Array<string>;
|
|
565
|
-
} : TElement extends ELayoutElement.customHtml ? {
|
|
566
|
-
html: string;
|
|
567
|
-
variables: Array<string>;
|
|
568
|
-
} : TElement extends ELayoutElement.template ? {
|
|
569
|
-
preview: string;
|
|
570
|
-
template: EElementTemplate;
|
|
571
|
-
var: TDynamicVariable | unknown;
|
|
572
|
-
} : TElement extends ELayoutElement.package ? {
|
|
573
|
-
slot: boolean;
|
|
574
|
-
slots: Record<string, TLayoutSchema<TElement, TExport>>;
|
|
575
|
-
target: Array<string>;
|
|
576
|
-
} : Record<string, unknown>;
|
|
577
|
-
type TLayoutSchema<TElement extends ELayoutElement = ELayoutElement, TExport extends boolean = false> = { [TInnerElement in TElement]: {
|
|
578
|
-
id: string;
|
|
579
|
-
name: string;
|
|
580
|
-
children: Array<TLayoutSchema<ELayoutElement, TExport>>;
|
|
581
|
-
classes: Array<TDynamicVariable<TExport>>;
|
|
582
|
-
collapsed?: boolean;
|
|
583
|
-
component: TFileComponent<TExport>;
|
|
584
|
-
content: TLayoutContentType<TInnerElement>;
|
|
585
|
-
element: TInnerElement;
|
|
586
|
-
events: Array<ELayoutEvent | string>;
|
|
587
|
-
model?: Array<string>;
|
|
588
|
-
properties: Record<string, TDynamicVariable<TExport>>;
|
|
589
|
-
style: { [key in "base" | string]: { [key in "default" | "hover"]: { [key in string]: TDynamicVariable<TExport> } } } & {
|
|
590
|
-
quick?: Array<string>;
|
|
591
|
-
};
|
|
592
|
-
tag?: string;
|
|
593
|
-
} }[TElement] & (TExport extends false ? {
|
|
594
|
-
parent?: TLayoutSchema<ELayoutElement, TExport>;
|
|
595
|
-
} : {}); //#endregion
|
|
596
|
-
//#region src/types/files/component.d.ts
|
|
597
|
-
declare enum EComponentType {
|
|
598
|
-
Component = "component",
|
|
599
|
-
Page = "page"
|
|
600
|
-
}
|
|
601
|
-
declare enum EComponentPreview {
|
|
602
|
-
Compact = "compact",
|
|
603
|
-
Stretch = "stretch",
|
|
604
|
-
Full = "full"
|
|
605
|
-
}
|
|
606
|
-
type TComponentOptions = {
|
|
607
|
-
type: EComponentType;
|
|
608
|
-
path: string;
|
|
609
|
-
preview: EComponentPreview;
|
|
610
|
-
previewSize: string;
|
|
611
|
-
};
|
|
612
|
-
type TFileComponent<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
613
|
-
type: EElementType.Component;
|
|
614
|
-
collapsed?: boolean;
|
|
615
|
-
layout: TLayoutSchema<ELayoutElement, TExport>;
|
|
616
|
-
logics: Record<string, TLogic<TExport> | TLogicMain<TExport>>;
|
|
617
|
-
options: TComponentOptions;
|
|
618
|
-
values: {
|
|
619
|
-
computed: Record<string, TValue<TExport>>;
|
|
620
|
-
events: Record<string, TValue<TExport>>;
|
|
621
|
-
model?: TSchema;
|
|
622
|
-
properties: Record<string, TValue<TExport>>;
|
|
623
|
-
variables: Record<string, TValue<TExport>>;
|
|
624
|
-
};
|
|
625
|
-
} & (TExport extends false ? {
|
|
626
|
-
flat: Record<string, TLayoutSchema>;
|
|
627
|
-
} : {}); //#endregion
|
|
628
|
-
//#region src/types/files/config.d.ts
|
|
629
|
-
type TFileConfig<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
630
|
-
type: EElementType.Config;
|
|
631
|
-
content: unknown;
|
|
632
|
-
display: EConfigDisplay;
|
|
633
|
-
schema: TSchema;
|
|
634
|
-
scope: ELogicScope;
|
|
283
|
+
config: Record<string, unknown>;
|
|
635
284
|
};
|
|
636
|
-
declare enum EConfigDisplay {
|
|
637
|
-
Smart = "smart",
|
|
638
|
-
Performance = "performance"
|
|
639
|
-
} //#endregion
|
|
640
|
-
//#region src/types/files/cron.d.ts
|
|
641
|
-
type TFileCron<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
642
|
-
type: EElementType.Cron;
|
|
643
|
-
active: boolean;
|
|
644
|
-
editorTrigger: boolean;
|
|
645
|
-
logics: Record<string, TAnyLogic<TExport>>;
|
|
646
|
-
time: string;
|
|
647
|
-
} & (TExport extends false ? {
|
|
648
|
-
cron?: Cron;
|
|
649
|
-
scope: ELogicScope.Backend;
|
|
650
|
-
} : {}); //#endregion
|
|
651
|
-
//#region src/types/files/media.d.ts
|
|
652
|
-
type TFileMedia<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
653
|
-
type: EElementType.Media;
|
|
654
|
-
mimeType: string;
|
|
655
|
-
target: string;
|
|
656
|
-
}; //#endregion
|
|
657
|
-
//#region src/types/files/route.d.ts
|
|
658
|
-
declare enum ERouteMethod {
|
|
659
|
-
Get = "get",
|
|
660
|
-
Post = "post",
|
|
661
|
-
Put = "put",
|
|
662
|
-
Delete = "delete"
|
|
663
|
-
}
|
|
664
285
|
type TFileRoute<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
665
286
|
type: EElementType.Route;
|
|
666
287
|
dev?: boolean;
|
|
288
|
+
guards?: Array<TRouteGuardRef>;
|
|
667
289
|
input: {
|
|
668
290
|
body: TSchema;
|
|
669
291
|
headers: TSchema;
|
|
@@ -673,9 +295,10 @@ type TFileRoute<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
|
673
295
|
method: ERouteMethod;
|
|
674
296
|
output: TSchema;
|
|
675
297
|
path: string;
|
|
676
|
-
} &
|
|
298
|
+
} & TRuntimeOnly<TExport, {
|
|
677
299
|
scope: ELogicScope.Backend;
|
|
678
|
-
}
|
|
300
|
+
}>;
|
|
301
|
+
//#endregion
|
|
679
302
|
//#region src/types/files/script.d.ts
|
|
680
303
|
type TFileScript<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
681
304
|
type: EElementType.Script;
|
|
@@ -684,7 +307,8 @@ type TFileScript<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
|
684
307
|
autoReload?: boolean;
|
|
685
308
|
};
|
|
686
309
|
scope: ELogicScope;
|
|
687
|
-
};
|
|
310
|
+
};
|
|
311
|
+
//#endregion
|
|
688
312
|
//#region src/types/files/store.d.ts
|
|
689
313
|
declare enum EStoreType {
|
|
690
314
|
Memory = "memory",
|
|
@@ -700,29 +324,100 @@ type TFileStore<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
|
700
324
|
logics: Record<string, TLogic<TExport>>;
|
|
701
325
|
options: TStoreOptions;
|
|
702
326
|
schema: TSchema;
|
|
703
|
-
} &
|
|
327
|
+
} & TRuntimeOnly<TExport, {
|
|
704
328
|
proxy: TSchema;
|
|
705
329
|
scope: ELogicScope.Frontend;
|
|
706
330
|
value: Record<string, unknown>;
|
|
707
|
-
}
|
|
331
|
+
}>;
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/layout/template.d.ts
|
|
334
|
+
declare enum EElementTemplate {
|
|
335
|
+
If = "if",
|
|
336
|
+
For = "for"
|
|
337
|
+
}
|
|
338
|
+
declare enum ETemplatePreview {
|
|
339
|
+
Display = "display",
|
|
340
|
+
Hide = "hide",
|
|
341
|
+
Real = "real",
|
|
342
|
+
Once = "once",
|
|
343
|
+
All = "all"
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region src/types/layout.d.ts
|
|
347
|
+
type TTextBlock = {
|
|
348
|
+
content: string;
|
|
349
|
+
key: string;
|
|
350
|
+
};
|
|
351
|
+
type TLayoutContentType<TElement extends ELayoutElement, TExport extends boolean = false> = TElement extends ELayoutElement.variable ? {
|
|
352
|
+
var: TMaybeDynamicVariable<TExport>;
|
|
353
|
+
} : TElement extends ELayoutElement.component ? {
|
|
354
|
+
id: string;
|
|
355
|
+
slots: Record<string, TLayoutSchema<ELayoutElement, TExport>>;
|
|
356
|
+
} : TElement extends ELayoutElement.customText ? {
|
|
357
|
+
text: TTextBlock;
|
|
358
|
+
variables: Array<string>;
|
|
359
|
+
} : TElement extends ELayoutElement.customHtml ? {
|
|
360
|
+
html: string;
|
|
361
|
+
variables: Array<string>;
|
|
362
|
+
} : TElement extends ELayoutElement.template ? {
|
|
363
|
+
preview: ETemplatePreview;
|
|
364
|
+
template: EElementTemplate;
|
|
365
|
+
var: TMaybeDynamicVariable<TExport>;
|
|
366
|
+
} : TElement extends ELayoutElement.package ? {
|
|
367
|
+
slots: Record<string, TLayoutSchema<ELayoutElement, TExport>>;
|
|
368
|
+
target: Array<string>;
|
|
369
|
+
} : Record<string, unknown>;
|
|
370
|
+
/**
|
|
371
|
+
* Style rules by category, then by property
|
|
372
|
+
*/
|
|
373
|
+
type TLayoutStyleRules<TExport extends boolean = false> = Record<string, Record<string, TMaybeDynamicVariable<TExport>>>;
|
|
374
|
+
type TLayoutStyleStates<TExport extends boolean = false> = {
|
|
375
|
+
default?: TLayoutStyleRules<TExport>;
|
|
376
|
+
hover?: TLayoutStyleRules<TExport>;
|
|
377
|
+
};
|
|
378
|
+
type TLayoutStyle<TExport extends boolean = false> = {
|
|
379
|
+
base?: TLayoutStyleStates<TExport>;
|
|
380
|
+
quick?: Array<string>;
|
|
381
|
+
[media: `${number}`]: TLayoutStyleStates<TExport> | undefined;
|
|
382
|
+
};
|
|
383
|
+
type TLayoutEventParameter<TExport extends boolean = false> = {
|
|
384
|
+
schema: TSchema;
|
|
385
|
+
value: TMaybeDynamicVariable<TExport>;
|
|
386
|
+
};
|
|
387
|
+
type TLayoutSchema<TElement extends ELayoutElement = ELayoutElement, TExport extends boolean = false> = { [TInnerElement in TElement]: {
|
|
388
|
+
id: string;
|
|
389
|
+
name: string;
|
|
390
|
+
children: Array<TLayoutSchema<ELayoutElement, TExport>>;
|
|
391
|
+
classes: Array<TMaybeDynamicVariable<TExport>>;
|
|
392
|
+
collapsed?: boolean;
|
|
393
|
+
content: TLayoutContentType<TInnerElement, TExport>;
|
|
394
|
+
element: TInnerElement;
|
|
395
|
+
events: Record<string, Record<string, TLayoutEventParameter<TExport>>>;
|
|
396
|
+
model?: Array<string>;
|
|
397
|
+
properties: Record<string, TMaybeDynamicVariable<TExport>>;
|
|
398
|
+
style: TLayoutStyle<TExport>;
|
|
399
|
+
tag?: string;
|
|
400
|
+
}; }[TElement] & TRuntimeOnly<TExport, {
|
|
401
|
+
component: TFileComponent<TExport>;
|
|
402
|
+
parent?: TLayoutSchema<ELayoutElement, TExport>;
|
|
403
|
+
}>;
|
|
404
|
+
//#endregion
|
|
708
405
|
//#region src/types/files/text.d.ts
|
|
709
406
|
type TFileText<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
710
407
|
type: EElementType.Text;
|
|
711
|
-
blocks: Array<
|
|
712
|
-
|
|
713
|
-
key: string;
|
|
714
|
-
}>;
|
|
715
|
-
} & (TExport extends false ? {
|
|
408
|
+
blocks: Array<TTextBlock>;
|
|
409
|
+
} & TRuntimeOnly<TExport, {
|
|
716
410
|
scope: ELogicScope.Frontend;
|
|
717
|
-
}
|
|
411
|
+
}>;
|
|
412
|
+
//#endregion
|
|
718
413
|
//#region src/types/files/type.d.ts
|
|
719
414
|
type TFileType<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
720
|
-
name: string;
|
|
721
415
|
type: EElementType.Type;
|
|
722
416
|
schemas: Record<string, TSchema>;
|
|
723
|
-
} &
|
|
417
|
+
} & TRuntimeOnly<TExport, {
|
|
724
418
|
scope: ELogicScope.Shared;
|
|
725
|
-
}
|
|
419
|
+
}>;
|
|
420
|
+
//#endregion
|
|
726
421
|
//#region src/types/files/index.d.ts
|
|
727
422
|
type TApplication<TExport extends boolean = false> = {
|
|
728
423
|
name: string;
|
|
@@ -743,14 +438,25 @@ declare enum EFileSortStrategy {
|
|
|
743
438
|
Name = "name",
|
|
744
439
|
Type = "type"
|
|
745
440
|
}
|
|
441
|
+
type TApplicationToken = {
|
|
442
|
+
id: string;
|
|
443
|
+
name: string;
|
|
444
|
+
value: string;
|
|
445
|
+
};
|
|
446
|
+
type TApplicationFontToken = TApplicationToken & {
|
|
447
|
+
default?: boolean;
|
|
448
|
+
cdn?: string;
|
|
449
|
+
};
|
|
450
|
+
type TApplicationTokens = {
|
|
451
|
+
colors: Array<TApplicationToken>;
|
|
452
|
+
fonts: Array<TApplicationFontToken>;
|
|
453
|
+
lengths: Array<TApplicationToken>;
|
|
454
|
+
};
|
|
746
455
|
type TApplicationConfig = {
|
|
747
456
|
backend: {
|
|
748
457
|
proxy: string;
|
|
749
458
|
salt: string;
|
|
750
459
|
};
|
|
751
|
-
database: {
|
|
752
|
-
type: string;
|
|
753
|
-
};
|
|
754
460
|
description?: string;
|
|
755
461
|
desktop: {
|
|
756
462
|
fullscreen: boolean;
|
|
@@ -774,23 +480,7 @@ type TApplicationConfig = {
|
|
|
774
480
|
html: string;
|
|
775
481
|
js: string;
|
|
776
482
|
};
|
|
777
|
-
tokens:
|
|
778
|
-
colors: Array<{
|
|
779
|
-
id: string;
|
|
780
|
-
name: string;
|
|
781
|
-
value: string;
|
|
782
|
-
}>;
|
|
783
|
-
fonts: Array<{
|
|
784
|
-
id: string;
|
|
785
|
-
name: string;
|
|
786
|
-
value: string;
|
|
787
|
-
}>;
|
|
788
|
-
lengths: Array<{
|
|
789
|
-
id: string;
|
|
790
|
-
name: string;
|
|
791
|
-
value: string;
|
|
792
|
-
}>;
|
|
793
|
-
};
|
|
483
|
+
tokens: TApplicationTokens;
|
|
794
484
|
};
|
|
795
485
|
plugins: Record<string, {
|
|
796
486
|
config?: unknown;
|
|
@@ -810,9 +500,408 @@ type TApplicationConfig = {
|
|
|
810
500
|
pwa: boolean;
|
|
811
501
|
};
|
|
812
502
|
};
|
|
813
|
-
type TFile<TExport extends boolean = false> =
|
|
503
|
+
type TFile<TExport extends boolean = false> = TFolder<TExport> | TFileComponent<TExport> | TFileConfig<TExport> | TFileCron<TExport> | TFileDatabase<TExport> | TFileRoute<TExport> | TFileScript<TExport> | TFileStore<TExport> | TFileText<TExport> | TFileType<TExport> | TFileMedia<TExport>;
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region src/types/files/folder.d.ts
|
|
506
|
+
type TFolderArtboardView = {
|
|
507
|
+
name: string;
|
|
508
|
+
location: TVector;
|
|
509
|
+
properties: Record<string, unknown>;
|
|
510
|
+
};
|
|
511
|
+
type TFolderArtboard = {
|
|
512
|
+
location: TVector;
|
|
513
|
+
views: Record<string, TFolderArtboardView>;
|
|
514
|
+
};
|
|
515
|
+
type TFolder<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
516
|
+
type: EElementType.Folder;
|
|
517
|
+
artboards?: Record<string, TFolderArtboard>;
|
|
518
|
+
children: Record<string, TFile<TExport>>;
|
|
519
|
+
color?: string;
|
|
520
|
+
};
|
|
521
|
+
//#endregion
|
|
522
|
+
//#region src/types/files/common.d.ts
|
|
523
|
+
/**
|
|
524
|
+
* Fields that only exist on the in-memory (non-export) shape
|
|
525
|
+
*/
|
|
526
|
+
type TRuntimeOnly<TExport extends boolean, T> = TExport extends false ? T : Record<never, never>;
|
|
527
|
+
type TFileState = {
|
|
528
|
+
expand?: boolean;
|
|
814
529
|
isEditing?: boolean;
|
|
530
|
+
logic?: TCanvas;
|
|
531
|
+
opened?: boolean;
|
|
532
|
+
panel?: string;
|
|
815
533
|
};
|
|
534
|
+
type TFileBase<TExport extends boolean = false> = {
|
|
535
|
+
name: string;
|
|
536
|
+
state: TFileState;
|
|
537
|
+
} & TRuntimeOnly<TExport, {
|
|
538
|
+
id: string;
|
|
539
|
+
parent?: TFolder<TExport>;
|
|
540
|
+
}>;
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region src/types/logic.d.ts
|
|
543
|
+
declare enum ELogicMode {
|
|
544
|
+
Pure = "pure",
|
|
545
|
+
Macro = "macro",
|
|
546
|
+
Code = "code"
|
|
547
|
+
}
|
|
548
|
+
type TLogicBase<TExport extends boolean = false> = {
|
|
549
|
+
name: string;
|
|
550
|
+
graph: TGraph<TExport>;
|
|
551
|
+
values: {
|
|
552
|
+
variables: Record<string, TValue<TExport>>;
|
|
553
|
+
};
|
|
554
|
+
} & TRuntimeOnly<TExport, {
|
|
555
|
+
id: string;
|
|
556
|
+
db: Record<string, TLogicNode>;
|
|
557
|
+
isEditing?: boolean;
|
|
558
|
+
parent: TFile<TExport>;
|
|
559
|
+
}>;
|
|
560
|
+
type TLogic<TExport extends boolean = false> = TLogicBase<TExport> & {
|
|
561
|
+
type: EElementType.Logic | EElementType.Standalone;
|
|
562
|
+
async: boolean;
|
|
563
|
+
code?: string;
|
|
564
|
+
export: boolean;
|
|
565
|
+
inputs: Record<string, TAnchor<TExport>>;
|
|
566
|
+
mode: ELogicMode;
|
|
567
|
+
outputs: Record<string, TAnchor<TExport>>;
|
|
568
|
+
packages?: Array<string>;
|
|
569
|
+
};
|
|
570
|
+
type TLogicMain<TExport extends boolean = false> = TLogicBase<TExport> & {
|
|
571
|
+
name: "Main";
|
|
572
|
+
type: EElementType.MainLogic;
|
|
573
|
+
} & TRuntimeOnly<TExport, {
|
|
574
|
+
id: "main";
|
|
575
|
+
}>;
|
|
576
|
+
type TCanvas = {
|
|
577
|
+
location: TVector;
|
|
578
|
+
zoom: number;
|
|
579
|
+
};
|
|
580
|
+
type TGraph<TExport extends boolean = false> = {
|
|
581
|
+
canvas: TCanvas;
|
|
582
|
+
nodes: Record<string, TNode<TExport>>;
|
|
583
|
+
wires: Record<string, TWire<TExport>>;
|
|
584
|
+
};
|
|
585
|
+
type TAnchor<TExport extends boolean = false> = TExport extends true ? TSchema : {
|
|
586
|
+
id: string;
|
|
587
|
+
parent?: TLogic<TExport>;
|
|
588
|
+
schema: TSchema;
|
|
589
|
+
};
|
|
590
|
+
type TAnyLogic<TExport extends boolean = false> = TLogic<TExport> | TLogicMain<TExport>;
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region src/types/editor/stack.d.ts
|
|
593
|
+
type TStackParent = {
|
|
594
|
+
logic?: TLogic;
|
|
595
|
+
node?: CNode;
|
|
596
|
+
stack: TStack;
|
|
597
|
+
};
|
|
598
|
+
type TStack = {
|
|
599
|
+
id: string;
|
|
600
|
+
config?: Record<string, unknown>;
|
|
601
|
+
context: object;
|
|
602
|
+
parent?: TStackParent;
|
|
603
|
+
variables: Record<string, unknown>;
|
|
604
|
+
};
|
|
605
|
+
//#endregion
|
|
606
|
+
//#region src/types/editor/node.d.ts
|
|
607
|
+
type TBaseNode = {
|
|
608
|
+
id: string;
|
|
609
|
+
data?: object;
|
|
610
|
+
dbNode: TGeneratedNode;
|
|
611
|
+
inputs: Record<string, CNodeAnchor>;
|
|
612
|
+
location: TVector;
|
|
613
|
+
outputs: Record<string, CNodeAnchor>;
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Proxy bound to a stack, exposing the node inputs, outputs and context by key
|
|
617
|
+
*/
|
|
618
|
+
type TNodeProxy = {
|
|
619
|
+
[key: string]: unknown;
|
|
620
|
+
with(stack?: TStack): TNodeProxy;
|
|
621
|
+
};
|
|
622
|
+
type TGeneratedNode<TLogic extends TLogicNode = TLogicNode> = TLogic & {
|
|
623
|
+
node?: CNode;
|
|
624
|
+
origin: TLogic;
|
|
625
|
+
proxy: TNodeProxy;
|
|
626
|
+
};
|
|
627
|
+
type TNodeData = {
|
|
628
|
+
config?: Record<string, unknown>;
|
|
629
|
+
multiple?: {
|
|
630
|
+
isArray?: boolean;
|
|
631
|
+
number: number;
|
|
632
|
+
};
|
|
633
|
+
optionals?: Record<string, boolean>;
|
|
634
|
+
size?: TVector;
|
|
635
|
+
} & Record<string, unknown>;
|
|
636
|
+
declare class CNode {
|
|
637
|
+
id: string;
|
|
638
|
+
dbNode: TGeneratedNode;
|
|
639
|
+
element?: HTMLElement;
|
|
640
|
+
invert: boolean;
|
|
641
|
+
parent?: TAnyLogic;
|
|
642
|
+
config: {
|
|
643
|
+
animate: boolean;
|
|
644
|
+
processing: boolean;
|
|
645
|
+
};
|
|
646
|
+
inputs: Record<string, CNodeAnchor>;
|
|
647
|
+
outputs: Record<string, CNodeAnchor>;
|
|
648
|
+
cache: {
|
|
649
|
+
location?: CVector;
|
|
650
|
+
relativeLocation?: CVector;
|
|
651
|
+
reloadKey: number;
|
|
652
|
+
size?: CVector;
|
|
653
|
+
};
|
|
654
|
+
_data: TNodeData;
|
|
655
|
+
constructor(node: TBaseNode);
|
|
656
|
+
get orderedInputs(): Array<CNodeAnchor>;
|
|
657
|
+
get orderedOutputs(): Array<CNodeAnchor>;
|
|
658
|
+
set location(location: TVector);
|
|
659
|
+
get location(): TVector;
|
|
660
|
+
reload(): void;
|
|
661
|
+
getSafeInputs(): Record<string, CNodeAnchor>;
|
|
662
|
+
getSafeOutputs(): Record<string, CNodeAnchor>;
|
|
663
|
+
set data(data: Record<string, unknown>);
|
|
664
|
+
get data(): TNodeData;
|
|
665
|
+
reset(): void;
|
|
666
|
+
setLocation(location: TVector): CNode;
|
|
667
|
+
getAnchorLocation(anchor: CNodeAnchor): CVector;
|
|
668
|
+
getRelativeAnchorLocation(anchor: CNodeAnchor): CVector;
|
|
669
|
+
getRelativeAnchorLocation_internal(anchor: CNodeAnchor): CVector;
|
|
670
|
+
getLocation(): CVector;
|
|
671
|
+
getSize(): TVector;
|
|
672
|
+
execute(outputKey: string, stack?: TStack): MaybePromise<void>;
|
|
673
|
+
get isAsync(): boolean;
|
|
674
|
+
getInput(inputKey: string, stack?: TStack): unknown;
|
|
675
|
+
setOutput(outputKey: string, value: unknown, stack?: TStack): void;
|
|
676
|
+
}
|
|
677
|
+
type TNode<TExport extends boolean = false> = TExport extends true ? {
|
|
678
|
+
data?: Record<string, unknown>;
|
|
679
|
+
internal?: {
|
|
680
|
+
inputs?: Record<string, unknown>;
|
|
681
|
+
outputs?: Record<string, unknown>;
|
|
682
|
+
};
|
|
683
|
+
location: TVector;
|
|
684
|
+
logic: string;
|
|
685
|
+
} : CNode;
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/types/editor/anchor.d.ts
|
|
688
|
+
type TDBAnchor = {
|
|
689
|
+
id?: string;
|
|
690
|
+
schema: TSchema;
|
|
691
|
+
};
|
|
692
|
+
declare enum EAnchorDirection {
|
|
693
|
+
Input = "input",
|
|
694
|
+
Output = "output",
|
|
695
|
+
None = "none"
|
|
696
|
+
}
|
|
697
|
+
declare class CAnchor {
|
|
698
|
+
connections: Array<CWire>;
|
|
699
|
+
dbAnchor: TDBAnchor;
|
|
700
|
+
padding?: number;
|
|
701
|
+
protected constructor(anchor: {
|
|
702
|
+
connections?: Array<CWire>;
|
|
703
|
+
dbAnchor: TDBAnchor;
|
|
704
|
+
padding?: number;
|
|
705
|
+
});
|
|
706
|
+
getLocation(): TVector;
|
|
707
|
+
getPadding(): number;
|
|
708
|
+
get schema(): TSchema;
|
|
709
|
+
get schemaRaw(): TSchema;
|
|
710
|
+
get toSchema(): TSchema;
|
|
711
|
+
}
|
|
712
|
+
declare class CNodeAnchor extends CAnchor {
|
|
713
|
+
key: string;
|
|
714
|
+
index: number;
|
|
715
|
+
node: CNode;
|
|
716
|
+
direction: EAnchorDirection;
|
|
717
|
+
value: unknown;
|
|
718
|
+
element?: HTMLElement;
|
|
719
|
+
cache: {
|
|
720
|
+
preview?: unknown;
|
|
721
|
+
relativeLocation?: CVector;
|
|
722
|
+
};
|
|
723
|
+
constructor(anchor: {
|
|
724
|
+
connections?: Array<CWire>;
|
|
725
|
+
dbAnchor: TDBAnchor;
|
|
726
|
+
direction: EAnchorDirection;
|
|
727
|
+
element?: HTMLElement;
|
|
728
|
+
index: number;
|
|
729
|
+
key: string;
|
|
730
|
+
node: CNode;
|
|
731
|
+
padding?: number;
|
|
732
|
+
});
|
|
733
|
+
get schema(): TSchema;
|
|
734
|
+
get toSchema(): TSchema;
|
|
735
|
+
get schemaRaw(): TSchema;
|
|
736
|
+
getLocation(): CVector;
|
|
737
|
+
getRelativeLocation(): CVector;
|
|
738
|
+
resetCache(): void;
|
|
739
|
+
getPadding(): number;
|
|
740
|
+
isDisabled(): boolean;
|
|
741
|
+
errorMessage(): string | undefined;
|
|
742
|
+
setValue(value: string | number | boolean): void;
|
|
743
|
+
resetValue(): void;
|
|
744
|
+
}
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region src/types/value.d.ts
|
|
747
|
+
declare enum ELayoutValueType {
|
|
748
|
+
Variable = "variable",
|
|
749
|
+
Property = "property",
|
|
750
|
+
Attribute = "attribute",
|
|
751
|
+
Context = "context",
|
|
752
|
+
Computed = "computed",
|
|
753
|
+
Event = "event",
|
|
754
|
+
File = "file",
|
|
755
|
+
Model = "model",
|
|
756
|
+
Logic = "logic"
|
|
757
|
+
}
|
|
758
|
+
type TContextValue = {
|
|
759
|
+
schema: TSchema;
|
|
760
|
+
value: unknown;
|
|
761
|
+
};
|
|
762
|
+
type TLayoutContext = Record<string, TContextValue>;
|
|
763
|
+
/**
|
|
764
|
+
* Runtime-only reactive value (never exported)
|
|
765
|
+
*/
|
|
766
|
+
type TLayoutValue = {
|
|
767
|
+
id: string;
|
|
768
|
+
type?: ELayoutValueType;
|
|
769
|
+
baseType?: ELayoutValueType;
|
|
770
|
+
child: Array<string>;
|
|
771
|
+
component?: TFileComponent;
|
|
772
|
+
context: TLayoutContext;
|
|
773
|
+
stackId: string;
|
|
774
|
+
get value(): unknown;
|
|
775
|
+
set value(value: unknown);
|
|
776
|
+
get schema(): TSchema;
|
|
777
|
+
get baseSchema(): TSchema;
|
|
778
|
+
};
|
|
779
|
+
declare enum ELayoutElement {
|
|
780
|
+
input = "input",
|
|
781
|
+
div = "div",
|
|
782
|
+
media = "media",
|
|
783
|
+
customText = "customText",
|
|
784
|
+
component = "component",
|
|
785
|
+
package = "package",
|
|
786
|
+
customHtml = "customHtml",
|
|
787
|
+
slot = "slot",
|
|
788
|
+
template = "template",
|
|
789
|
+
variable = "variable",
|
|
790
|
+
link = "link"
|
|
791
|
+
}
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region src/types/files/component.d.ts
|
|
794
|
+
declare enum EComponentType {
|
|
795
|
+
Component = "component",
|
|
796
|
+
Page = "page"
|
|
797
|
+
}
|
|
798
|
+
declare enum EComponentPreview {
|
|
799
|
+
Compact = "compact",
|
|
800
|
+
Stretch = "stretch",
|
|
801
|
+
Full = "full"
|
|
802
|
+
}
|
|
803
|
+
type TComponentOptions = {
|
|
804
|
+
type: EComponentType;
|
|
805
|
+
path: string;
|
|
806
|
+
preview: EComponentPreview;
|
|
807
|
+
previewSize: string;
|
|
808
|
+
};
|
|
809
|
+
type TFileComponent<TExport extends boolean = false> = TFileBase<TExport> & {
|
|
810
|
+
type: EElementType.Component;
|
|
811
|
+
collapsed?: boolean;
|
|
812
|
+
layout: TLayoutSchema<ELayoutElement, TExport>;
|
|
813
|
+
logics: Record<string, TAnyLogic<TExport>>;
|
|
814
|
+
options: TComponentOptions;
|
|
815
|
+
values: {
|
|
816
|
+
computed: Record<string, TValue<TExport>>;
|
|
817
|
+
events: Record<string, TValue<TExport>>;
|
|
818
|
+
model?: TSchema;
|
|
819
|
+
properties: Record<string, TValue<TExport>>;
|
|
820
|
+
variables: Record<string, TValue<TExport>>;
|
|
821
|
+
};
|
|
822
|
+
} & TRuntimeOnly<TExport, {
|
|
823
|
+
flat: Record<string, TLayoutSchema>;
|
|
824
|
+
}>;
|
|
825
|
+
//#endregion
|
|
826
|
+
//#region src/types/variable.d.ts
|
|
827
|
+
declare enum EDynamicVariableType {
|
|
828
|
+
Constant = "constant",
|
|
829
|
+
Dynamic = "dynamic",
|
|
830
|
+
Token = "token"
|
|
831
|
+
}
|
|
832
|
+
declare enum EDynamicVariableOperation {
|
|
833
|
+
Identity = "identity",
|
|
834
|
+
Equal = "equal",
|
|
835
|
+
NotEqual = "not-equal",
|
|
836
|
+
Greater = "greater",
|
|
837
|
+
Less = "less",
|
|
838
|
+
GreaterEqual = "greater-equal",
|
|
839
|
+
LessEqual = "less-equal",
|
|
840
|
+
StartsWith = "starts-with",
|
|
841
|
+
EndsWith = "ends-with",
|
|
842
|
+
Includes = "includes",
|
|
843
|
+
Ternary = "ternary",
|
|
844
|
+
Cast = "cast",
|
|
845
|
+
At = "at",
|
|
846
|
+
Join = "join"
|
|
847
|
+
}
|
|
848
|
+
declare enum EDynamicVariableChain {
|
|
849
|
+
Add = "add",
|
|
850
|
+
Subtract = "subtract",
|
|
851
|
+
Multiply = "multiply",
|
|
852
|
+
Divide = "divide",
|
|
853
|
+
Modulo = "modulo",
|
|
854
|
+
And = "and",
|
|
855
|
+
Or = "or"
|
|
856
|
+
}
|
|
857
|
+
type TDynamicVariableTarget = {
|
|
858
|
+
chainMode?: EVarType;
|
|
859
|
+
chainVariables?: Array<{
|
|
860
|
+
operation: EDynamicVariableChain;
|
|
861
|
+
value: TMaybeDynamicVariable<true>;
|
|
862
|
+
}>;
|
|
863
|
+
mode?: EVarType;
|
|
864
|
+
operation: EDynamicVariableOperation;
|
|
865
|
+
variables: Array<TMaybeDynamicVariable<true>>;
|
|
866
|
+
};
|
|
867
|
+
/**
|
|
868
|
+
* Serializable data of a dynamic variable. Runtime variables extend it with methods, so they stay assignable to it.
|
|
869
|
+
*/
|
|
870
|
+
type TBaseDynamicVariable = {
|
|
871
|
+
type: EDynamicVariableType;
|
|
872
|
+
_dynamic: true;
|
|
873
|
+
access: Array<string>;
|
|
874
|
+
target?: TDynamicVariableTarget;
|
|
875
|
+
token: string;
|
|
876
|
+
value: unknown;
|
|
877
|
+
};
|
|
878
|
+
type TDynamicVariable<TExport extends boolean = false> = TExport extends true ? TBaseDynamicVariable : TBaseDynamicVariable & {
|
|
879
|
+
getComputed(component: TFileComponent, options?: {
|
|
880
|
+
context?: TLayoutContext;
|
|
881
|
+
stackId?: string;
|
|
882
|
+
}): ComputedRef<TContextValue | TLayoutValue>;
|
|
883
|
+
getValue(component: TFileComponent, options?: {
|
|
884
|
+
base?: boolean;
|
|
885
|
+
context?: TLayoutContext;
|
|
886
|
+
stackId?: string;
|
|
887
|
+
}): TContextValue;
|
|
888
|
+
getRawValue(): unknown;
|
|
889
|
+
toJSON(): unknown;
|
|
890
|
+
};
|
|
891
|
+
/**
|
|
892
|
+
* A raw constant stored in place of a dynamic variable (constants are unwrapped on load).
|
|
893
|
+
* Arrays and objects may still contain dynamic variables.
|
|
894
|
+
*/
|
|
895
|
+
type TRawValue<TExport extends boolean = false> = string | number | boolean | null | undefined | Array<TMaybeDynamicVariable<TExport>> | {
|
|
896
|
+
[key: string]: TMaybeDynamicVariable<TExport>;
|
|
897
|
+
};
|
|
898
|
+
type TMaybeDynamicVariable<TExport extends boolean = false> = TDynamicVariable<TExport> | TRawValue<TExport>;
|
|
899
|
+
type TValue<TExport extends boolean = false> = TExport extends false ? {
|
|
900
|
+
id: string;
|
|
901
|
+
isEditing?: boolean;
|
|
902
|
+
parent?: TLogic<TExport>;
|
|
903
|
+
schema: TSchema;
|
|
904
|
+
} : TSchema;
|
|
816
905
|
//#endregion
|
|
817
906
|
//#region src/types/interface.d.ts
|
|
818
907
|
type TInterface = {
|
|
@@ -834,7 +923,7 @@ type TTemplate = {
|
|
|
834
923
|
};
|
|
835
924
|
//#endregion
|
|
836
925
|
//#region src/types/token.d.ts
|
|
837
|
-
declare enum ETokenType {
|
|
926
|
+
export declare enum ETokenType {
|
|
838
927
|
Color = "color",
|
|
839
928
|
FontSize = "font-size",
|
|
840
929
|
FontWeight = "font-weight",
|
|
@@ -850,7 +939,7 @@ type TToken = {
|
|
|
850
939
|
};
|
|
851
940
|
//#endregion
|
|
852
941
|
//#region src/types/plugin.d.ts
|
|
853
|
-
declare enum EInjectionKey {
|
|
942
|
+
export declare enum EInjectionKey {
|
|
854
943
|
ViteImport = "viteImport",
|
|
855
944
|
VitePlugin = "vitePlugin",
|
|
856
945
|
AppImport = "appImport",
|
|
@@ -882,6 +971,8 @@ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
882
971
|
description?: string;
|
|
883
972
|
editor?: {
|
|
884
973
|
components?: Array<TComponent>;
|
|
974
|
+
guards?: Array<TRouteGuard>;
|
|
975
|
+
inputs?: Record<string, Component>;
|
|
885
976
|
interfaces?: Array<TInterface>;
|
|
886
977
|
nodes?: Array<TLogicNode>;
|
|
887
978
|
templates?: Array<TTemplate>;
|
|
@@ -890,7 +981,7 @@ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
890
981
|
attributes?: Record<string, unknown>;
|
|
891
982
|
};
|
|
892
983
|
};
|
|
893
|
-
hooks?: { [THook in EPluginHooks]?: (params: THookParams[THook]) => MaybePromise<void
|
|
984
|
+
hooks?: { [THook in EPluginHooks]?: (params: THookParams[THook]) => MaybePromise<void>; };
|
|
894
985
|
icon: string;
|
|
895
986
|
id: string;
|
|
896
987
|
inject?: {
|
|
@@ -904,6 +995,7 @@ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
904
995
|
unmount?: (env: TEnv<TConfig, TInternals>) => Promise<void> | void;
|
|
905
996
|
update?: (env: TEnv<TConfig, TInternals>) => Promise<void> | void;
|
|
906
997
|
};
|
|
998
|
+
llm?: string;
|
|
907
999
|
name: string;
|
|
908
1000
|
settings?: Array<{
|
|
909
1001
|
component: Component;
|
|
@@ -912,8 +1004,8 @@ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
912
1004
|
}>;
|
|
913
1005
|
windows?: Record<string, Component>;
|
|
914
1006
|
};
|
|
915
|
-
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]
|
|
916
|
-
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]
|
|
1007
|
+
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]>; }; };
|
|
1008
|
+
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]>; }; };
|
|
917
1009
|
type TEnv<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
918
1010
|
addFile: (file: DeepPartial<TFile<true>> & {
|
|
919
1011
|
type: EElementType;
|
|
@@ -933,9 +1025,9 @@ type TEnv<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
933
1025
|
type TOption<TParams = unknown, TResult = unknown> = TResult | ((env: TParams) => Promise<TResult> | TResult);
|
|
934
1026
|
//#endregion
|
|
935
1027
|
//#region src/index.d.ts
|
|
936
|
-
declare function makePlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>): TPlugin<TConfig, TInternal>;
|
|
937
|
-
declare function makeComponent<TProps extends Record<string, TSchema>>(component: TComponent<TProps>): TComponent<TProps>;
|
|
938
|
-
declare function loadPlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>, env: Partial<TEnv>): Promise<TBasePlugin<TConfig, TInternal>>;
|
|
939
|
-
declare function getPluginParam<T>(target: TOption<TEnv, T>, env: Partial<TEnv>): Promise<T>;
|
|
1028
|
+
export declare function makePlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>): TPlugin<TConfig, TInternal>;
|
|
1029
|
+
export declare function makeComponent<TProps extends Record<string, TSchema>>(component: TComponent<TProps>): TComponent<TProps>;
|
|
1030
|
+
export declare function loadPlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>, env: Partial<TEnv>): Promise<TBasePlugin<TConfig, TInternal>>;
|
|
1031
|
+
export declare function getPluginParam<T>(target: TOption<TEnv, T>, env: Partial<TEnv>): Promise<T>;
|
|
940
1032
|
//#endregion
|
|
941
|
-
export { EElementType,
|
|
1033
|
+
export { EElementType, ELogicScope, ELogicType, EVarType, _default as LSettingsStoryWrapper, LogicType, LogicUtil, type Static, type TAnyLogic, type TApplication, type TBasePlugin, type TComponent, 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 TLogic, type TLogicMain, type TLogicNode, type TOption, type TPlugin, type TProxyPlugin, type TRouteGuard, type TSchema, type TSlot, type TTemplate, type TToken, makeLogicNode };
|