@zeus-js/component-analyzer 0.1.0-beta.2 → 0.1.0-beta.4

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.
@@ -1,4 +1,4 @@
1
- export type ComponentPropType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'unknown';
1
+ export type ComponentPropType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'function' | 'unknown';
2
2
  export interface ComponentManifest {
3
3
  version: 1;
4
4
  components: ComponentRecord[];
@@ -8,14 +8,33 @@ export interface ComponentRecord {
8
8
  name: string;
9
9
  exportName: string;
10
10
  source: string;
11
+ /**
12
+ * Public props merged from runtime definitions, TypeScript types and metadata.
13
+ * Used by declarations, documentation and framework wrapper types.
14
+ */
11
15
  props: Record<string, ComponentProp>;
16
+ /**
17
+ * Exact runtime props extracted from defineElement(options.props).
18
+ * Lazy Proxy Elements must only consume this field.
19
+ */
20
+ runtimeProps?: Record<string, ComponentProp>;
21
+ /**
22
+ * Validation messages explaining why runtime props could not be analyzed.
23
+ */
24
+ runtimePropsDiagnostics?: string[];
12
25
  events: Record<string, ComponentEvent>;
26
+ methods?: Record<string, ComponentMethod>;
27
+ models?: ComponentModel[];
13
28
  slots: Record<string, ComponentSlot>;
14
29
  hostAttributes: string[];
15
30
  cssParts: string[];
16
- cssVars: string[];
31
+ cssVars: Record<string, ComponentCssVar>;
17
32
  description?: string;
18
- meta?: Record<string, unknown>;
33
+ meta?: {
34
+ shadow?: boolean;
35
+ formAssociated?: boolean;
36
+ [key: string]: unknown;
37
+ };
19
38
  }
20
39
  export interface ComponentProp {
21
40
  type: ComponentPropType;
@@ -24,13 +43,44 @@ export interface ComponentProp {
24
43
  default?: unknown;
25
44
  reflect?: boolean;
26
45
  attr?: string | false;
46
+ serialize?: boolean;
47
+ deserialize?: boolean;
27
48
  description?: string;
28
49
  }
29
50
  export interface ComponentEvent {
51
+ key?: string;
52
+ name?: string;
53
+ reactName?: string;
30
54
  detail?: Record<string, string>;
55
+ bubbles?: boolean;
56
+ composed?: boolean;
57
+ cancelable?: boolean;
31
58
  description?: string;
32
59
  }
60
+ export interface ComponentMethod {
61
+ name: string;
62
+ description?: string;
63
+ parameters?: ComponentMethodParameter[];
64
+ returns?: string;
65
+ async?: boolean;
66
+ }
67
+ export interface ComponentMethodParameter {
68
+ name: string;
69
+ type: string;
70
+ optional?: boolean;
71
+ rest?: boolean;
72
+ }
73
+ export interface ComponentModel {
74
+ prop: string;
75
+ event: string;
76
+ eventPath?: string;
77
+ }
33
78
  export interface ComponentSlot {
79
+ name?: string;
80
+ description?: string;
81
+ }
82
+ export interface ComponentCssVar {
83
+ name: string;
34
84
  description?: string;
35
85
  }
36
86
  export interface AnalyzeFileResult {