@hy-bricks/core 0.1.1 → 0.2.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/index.d.ts CHANGED
@@ -98,6 +98,8 @@ export declare interface ComponentInstanceHandle {
98
98
  __dispose(): void;
99
99
  }
100
100
 
101
+ export declare type ComponentKindRaw = 'visual' | 'layout' | 'data';
102
+
101
103
  export declare interface ComponentMeta {
102
104
  name?: {
103
105
  value?: string;
@@ -107,6 +109,7 @@ export declare interface ComponentMeta {
107
109
  style: Record<string, string>;
108
110
  customDecl: Record<string, CustomDecl>;
109
111
  methodNames: string[];
112
+ slotsDecl: SlotDeclMeta[];
110
113
  }
111
114
 
112
115
  export declare interface ComponentSource {
@@ -126,6 +129,12 @@ export declare interface CustomDecl {
126
129
  description?: string;
127
130
  }
128
131
 
132
+ export declare interface DataDirectionDecl {
133
+ key: string;
134
+ type?: string;
135
+ label?: string;
136
+ }
137
+
129
138
  export declare function debugScopedCssRefs(): Array<{
130
139
  scopeId: string;
131
140
  componentId: string;
@@ -194,12 +203,27 @@ export declare interface MethodDecl {
194
203
  params: string[];
195
204
  }
196
205
 
197
- export declare function parseComponentSource(jsSource: unknown): ParsedSource;
206
+ export declare interface ModelDecl {
207
+ key: string;
208
+ prop?: string;
209
+ event?: string;
210
+ type?: string;
211
+ defaultValue?: unknown;
212
+ }
213
+
214
+ export declare function parseComponentSource(jsSource: unknown, htmlSource?: unknown): ParsedSource;
198
215
 
199
216
  export declare interface ParsedSource {
217
+ ok: boolean;
218
+ parseError?: string;
200
219
  methodsDecl: MethodDecl[];
201
220
  emitsDecl: EmitDecl[];
202
221
  propsDecl: PropDecl[];
222
+ slotsDecl: SlotDeclRaw[];
223
+ modelDecl: ModelDecl[];
224
+ dataInputsDecl: DataDirectionDecl[];
225
+ dataOutputsDecl: DataDirectionDecl[];
226
+ kind: ComponentKindRaw;
203
227
  }
204
228
 
205
229
  export declare interface PropDecl {
@@ -237,6 +261,22 @@ customValues: Record<string, unknown>;
237
261
 
238
262
  export declare function scopeCss(rawCss: string, scopeId: string): string;
239
263
 
264
+ export declare interface SlotDeclMeta {
265
+ name: string;
266
+ multiple?: boolean;
267
+ accepts?: string[];
268
+ maxChildren?: number;
269
+ label?: string;
270
+ }
271
+
272
+ export declare interface SlotDeclRaw {
273
+ name: string;
274
+ multiple?: boolean;
275
+ accepts?: string[];
276
+ maxChildren?: number;
277
+ label?: string;
278
+ }
279
+
240
280
  export declare function unregister(instanceId: string, canvasId?: string): void;
241
281
 
242
282
  export declare const VERSION = "0.0.0-stage2b";