@luna-park/plugin 1.0.6 → 1.0.8
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/index.d.ts +12 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -203,6 +203,13 @@ declare type StaticObject<T extends TProperties> = {
|
|
|
203
203
|
[K in OptionalKeys<T>]?: Static<T[K]>;
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
+
declare type StaticOfProps<T extends Record<string, TSchema>> = {
|
|
207
|
+
[K in keyof T]: {
|
|
208
|
+
schema: TSchema;
|
|
209
|
+
value: Static<T[K]>;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
|
|
206
213
|
declare type StaticRecord<TKey extends TSchema, TValue extends TSchema> = Record<Static<TKey>, Static<TValue>>;
|
|
207
214
|
|
|
208
215
|
declare type StaticUnion<T extends Array<TSchema>> = {
|
|
@@ -342,11 +349,8 @@ declare type TCanvasExport = {
|
|
|
342
349
|
zoom: number;
|
|
343
350
|
};
|
|
344
351
|
|
|
345
|
-
export declare type TComponent = {
|
|
352
|
+
export declare type TComponent<TProps extends Record<string, TSchema> = Record<string, TSchema>> = {
|
|
346
353
|
component: Component;
|
|
347
|
-
custom?: {
|
|
348
|
-
slots: (attributes: Record<string, unknown>) => Record<string, false | TSchema>;
|
|
349
|
-
};
|
|
350
354
|
emits?: Record<string, TSchema>;
|
|
351
355
|
import?: Array<{
|
|
352
356
|
name: string;
|
|
@@ -354,8 +358,8 @@ export declare type TComponent = {
|
|
|
354
358
|
}>;
|
|
355
359
|
models?: Record<string, TSchema>;
|
|
356
360
|
name: string;
|
|
357
|
-
properties?:
|
|
358
|
-
slots?: Record<string,
|
|
361
|
+
properties?: TProps;
|
|
362
|
+
slots?: Record<string, TSlot> | ((attributes: StaticOfProps<TProps>) => Record<string, TSlot>);
|
|
359
363
|
};
|
|
360
364
|
|
|
361
365
|
declare type TComponentExport = {
|
|
@@ -821,6 +825,8 @@ declare type TScriptExport = {
|
|
|
821
825
|
state: TStateExport;
|
|
822
826
|
};
|
|
823
827
|
|
|
828
|
+
export declare type TSlot = TSchema<TObject> | TSchema<TVoid>;
|
|
829
|
+
|
|
824
830
|
declare type TStateExport = Record<string, unknown>;
|
|
825
831
|
|
|
826
832
|
declare type TStoreExport = {
|