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 +1 -1
- package/out/types.d.ts +50 -49
- package/package.json +4 -4
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
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
props: PropertyMeta[];
|
|
4
|
+
events: EventMeta[];
|
|
5
|
+
slots: SlotMeta[];
|
|
6
|
+
exposed: ExposeMeta[];
|
|
7
7
|
}
|
|
8
8
|
export interface PropertyMeta {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
rawType?: ts.Type;
|
|
26
|
+
signature: string;
|
|
27
|
+
schema?: PropertyMetaSchema[];
|
|
28
28
|
}
|
|
29
29
|
export interface SlotMeta {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
name: string;
|
|
31
|
+
type: string;
|
|
32
|
+
rawType?: ts.Type;
|
|
33
|
+
description: string;
|
|
34
|
+
schema?: PropertyMetaSchema;
|
|
35
35
|
}
|
|
36
36
|
export interface ExposeMeta {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
type: string;
|
|
40
|
+
rawType?: ts.Type;
|
|
41
|
+
schema?: PropertyMetaSchema;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
export type PropertyMetaSchema = string | {
|
|
44
|
+
kind: 'enum';
|
|
45
|
+
type: string;
|
|
46
|
+
schema?: PropertyMetaSchema[];
|
|
46
47
|
} | {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
kind: 'array';
|
|
49
|
+
type: string;
|
|
50
|
+
schema?: PropertyMetaSchema[];
|
|
50
51
|
} | {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
kind: 'event';
|
|
53
|
+
type: string;
|
|
54
|
+
schema?: PropertyMetaSchema[];
|
|
54
55
|
} | {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
kind: 'object';
|
|
57
|
+
type: string;
|
|
58
|
+
schema?: Record<string, PropertyMeta>;
|
|
58
59
|
};
|
|
59
|
-
export
|
|
60
|
-
|
|
60
|
+
export type MetaCheckerSchemaOptions = boolean | {
|
|
61
|
+
ignore?: string[];
|
|
61
62
|
};
|
|
62
63
|
export interface MetaCheckerOptions {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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-
|
|
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-
|
|
17
|
-
"@volar/vue-language-core": "1.0.0-
|
|
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": "
|
|
22
|
+
"gitHead": "e93a2cf6e614f6c8fa9b8a61e314c123cbe9a95a"
|
|
23
23
|
}
|