vue-component-meta 1.0.0-alpha.5 → 1.0.0-beta.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/out/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as vue from '@volar/vue-language-core';
2
2
  import * as ts from 'typescript/lib/tsserverlibrary';
3
3
  import type { MetaCheckerOptions, ComponentMeta, EventMeta, ExposeMeta, MetaCheckerSchemaOptions, PropertyMeta, PropertyMetaSchema, SlotMeta } from './types';
4
4
  export type { MetaCheckerOptions, ComponentMeta, EventMeta, ExposeMeta, MetaCheckerSchemaOptions, PropertyMeta, PropertyMetaSchema, SlotMeta };
5
- export declare type ComponentMetaChecker = ReturnType<typeof createComponentMetaCheckerBase>;
5
+ export type ComponentMetaChecker = ReturnType<typeof createComponentMetaCheckerBase>;
6
6
  export declare function createComponentMetaCheckerByJsonConfig(root: string, json: any, checkerOptions?: MetaCheckerOptions): {
7
7
  getExportNames: (componentPath: string) => string[];
8
8
  getComponentMeta: (componentPath: string, exportName?: string) => ComponentMeta;
package/out/types.d.ts CHANGED
@@ -1,67 +1,68 @@
1
1
  import type * as ts from 'typescript/lib/tsserverlibrary';
2
2
  export interface ComponentMeta {
3
- props: PropertyMeta[];
4
- events: EventMeta[];
5
- slots: SlotMeta[];
6
- exposed: ExposeMeta[];
3
+ props: PropertyMeta[];
4
+ events: EventMeta[];
5
+ slots: SlotMeta[];
6
+ exposed: ExposeMeta[];
7
7
  }
8
8
  export interface PropertyMeta {
9
- name: string;
10
- default?: string;
11
- description: string;
12
- global: boolean;
13
- required: boolean;
14
- type: string;
15
- rawType?: ts.Type;
16
- tags: {
17
- name: string;
18
- text?: string;
19
- }[];
20
- schema?: PropertyMetaSchema;
9
+ name: string;
10
+ default?: string;
11
+ description: string;
12
+ global: boolean;
13
+ required: boolean;
14
+ type: string;
15
+ rawType?: ts.Type;
16
+ tags: {
17
+ name: string;
18
+ text?: string;
19
+ }[];
20
+ schema?: PropertyMetaSchema;
21
21
  }
22
22
  export interface EventMeta {
23
- name: string;
24
- type: string;
25
- rawType?: ts.Type;
26
- signature: string;
27
- schema?: PropertyMetaSchema[];
23
+ name: string;
24
+ type: string;
25
+ rawType?: ts.Type;
26
+ signature: string;
27
+ schema?: PropertyMetaSchema[];
28
28
  }
29
29
  export interface SlotMeta {
30
- name: string;
31
- type: string;
32
- rawType?: ts.Type;
33
- description: string;
34
- schema?: PropertyMetaSchema;
30
+ name: string;
31
+ type: string;
32
+ rawType?: ts.Type;
33
+ description: string;
34
+ schema?: PropertyMetaSchema;
35
35
  }
36
36
  export interface ExposeMeta {
37
- name: string;
38
- description: string;
39
- type: string;
40
- rawType?: ts.Type;
41
- schema?: PropertyMetaSchema;
37
+ name: string;
38
+ description: string;
39
+ type: string;
40
+ rawType?: ts.Type;
41
+ schema?: PropertyMetaSchema;
42
42
  }
43
- export declare type PropertyMetaSchema = {
44
- kind: 'const';
45
- displayString: string;
43
+ export type PropertyMetaSchema = string | {
44
+ kind: 'enum';
45
+ type: string;
46
+ schema?: PropertyMetaSchema[];
46
47
  } | {
47
- kind: 'enum';
48
- displayString: string;
49
- members: PropertyMetaSchema[];
48
+ kind: 'array';
49
+ type: string;
50
+ schema?: PropertyMetaSchema[];
50
51
  } | {
51
- kind: 'array';
52
- displayString: string;
53
- element: PropertyMetaSchema ;
52
+ kind: 'event';
53
+ type: string;
54
+ schema?: PropertyMetaSchema[];
54
55
  } | {
55
- kind: 'object';
56
- displayString: string;
57
- properties: Record<string, PropertyMetaSchema>;
56
+ kind: 'object';
57
+ type: string;
58
+ schema?: Record<string, PropertyMeta>;
58
59
  };
59
- export declare type MetaCheckerSchemaOptions = boolean | {
60
- ignore?: string[];
60
+ export type MetaCheckerSchemaOptions = boolean | {
61
+ ignore?: string[];
61
62
  };
62
63
  export interface MetaCheckerOptions {
63
- schema?: MetaCheckerSchemaOptions;
64
- forceUseTs?: boolean;
65
- printer?: import('typescript').PrinterOptions;
66
- rawType?: boolean;
64
+ schema?: MetaCheckerSchemaOptions;
65
+ forceUseTs?: boolean;
66
+ printer?: import('typescript').PrinterOptions;
67
+ rawType?: boolean;
67
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-component-meta",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-beta.0",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -13,11 +13,11 @@
13
13
  "directory": "packages/vue-component-meta"
14
14
  },
15
15
  "dependencies": {
16
- "@volar/language-core": "1.0.0-alpha.5",
17
- "@volar/vue-language-core": "1.0.0-alpha.5"
16
+ "@volar/language-core": "1.0.0-beta.0",
17
+ "@volar/vue-language-core": "1.0.0-beta.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "typescript": "*"
21
21
  },
22
- "gitHead": "dd3efd3f7458aca9ba5dcdf549ce80999cb7affd"
22
+ "gitHead": "e93a2cf6e614f6c8fa9b8a61e314c123cbe9a95a"
23
23
  }