@luna-park/plugin 1.0.7 → 1.0.9

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +15 -4
  2. package/package.json +3 -3
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,8 +349,12 @@ 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;
354
+ documentation?: {
355
+ description?: string;
356
+ link?: string;
357
+ };
347
358
  emits?: Record<string, TSchema>;
348
359
  import?: Array<{
349
360
  name: string;
@@ -351,8 +362,8 @@ export declare type TComponent = {
351
362
  }>;
352
363
  models?: Record<string, TSchema>;
353
364
  name: string;
354
- properties?: Record<string, TSchema>;
355
- slots?: Record<string, TSlot> | ((attributes: Record<string, unknown>) => Record<string, TSlot>);
365
+ properties?: TProps;
366
+ slots?: Record<string, TSlot> | ((attributes: StaticOfProps<TProps>) => Record<string, TSlot>);
356
367
  };
357
368
 
358
369
  declare type TComponentExport = {
@@ -818,7 +829,7 @@ declare type TScriptExport = {
818
829
  state: TStateExport;
819
830
  };
820
831
 
821
- declare type TSlot = TSchema<TObject> | TSchema<TVoid>;
832
+ export declare type TSlot = TSchema<TObject> | TSchema<TVoid>;
822
833
 
823
834
  declare type TStateExport = Record<string, unknown>;
824
835
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna-park/plugin",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "description": "Plugin helper for Luna Park.",
6
6
  "homepage": "https://luna-park.app",
@@ -50,9 +50,9 @@
50
50
  "vite": "^7.2.4",
51
51
  "vitest": "^4.0.12",
52
52
  "vue": "^3.5.24",
53
+ "@luna-park/utils": "^2.0.0",
53
54
  "@luna-park/logicnodes": "^2.0.0",
54
- "@luna-park/shared": "^1.0.0",
55
- "@luna-park/utils": "^2.0.0"
55
+ "@luna-park/shared": "^1.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@fastify/cors": "^11.1.0",