@arcgis/lumina-compiler 4.32.0-next.21 → 4.32.0-next.23
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/docs/stencilDocsJson.d.ts +108 -1
- package/dist/docs/steniclDocsJson.test.d.ts +1 -0
- package/dist/extractor/declaration.d.ts +3 -3
- package/dist/index.js +74 -71
- package/dist/loader/lazy.d.ts +1 -1
- package/dist/publicTypes.d.ts +3 -3
- package/dist/testing/mount.d.ts +1 -1
- package/dist/types/failOnJsonImport.d.ts +2 -0
- package/package.json +5 -5
|
@@ -1,5 +1,109 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentCompilerTypeReferences } from "@stencil/core/internal";
|
|
2
2
|
import type { CompilerContext } from "../context";
|
|
3
|
+
import { type ApiDocsTag } from "@arcgis/api-extractor";
|
|
4
|
+
/**
|
|
5
|
+
* To avoid having a dependency on Stencil, we inline Stencil types rather than
|
|
6
|
+
* importing them.
|
|
7
|
+
*/
|
|
8
|
+
export interface JsonDocs {
|
|
9
|
+
components: JsonDocsComponent[];
|
|
10
|
+
timestamp: string;
|
|
11
|
+
compiler: {
|
|
12
|
+
name: string;
|
|
13
|
+
version: string;
|
|
14
|
+
typescriptVersion: string;
|
|
15
|
+
};
|
|
16
|
+
typeLibrary: Record<string, never>;
|
|
17
|
+
}
|
|
18
|
+
interface JsonDocsComponent {
|
|
19
|
+
filePath?: string;
|
|
20
|
+
encapsulation: "none" | "scoped" | "shadow";
|
|
21
|
+
tag: string;
|
|
22
|
+
readme: string;
|
|
23
|
+
docs: string;
|
|
24
|
+
docsTags: ApiDocsTag[];
|
|
25
|
+
overview?: string;
|
|
26
|
+
usage: Record<string, string>;
|
|
27
|
+
props: JsonDocsProp[];
|
|
28
|
+
methods: JsonDocsMethod[];
|
|
29
|
+
events: JsonDocsEvent[];
|
|
30
|
+
listeners: never[];
|
|
31
|
+
styles: {
|
|
32
|
+
name: string;
|
|
33
|
+
docs: string;
|
|
34
|
+
annotation: string;
|
|
35
|
+
mode: string | undefined;
|
|
36
|
+
}[];
|
|
37
|
+
slots: {
|
|
38
|
+
name: string;
|
|
39
|
+
docs: string;
|
|
40
|
+
}[];
|
|
41
|
+
parts: {
|
|
42
|
+
name: string;
|
|
43
|
+
docs: string;
|
|
44
|
+
}[];
|
|
45
|
+
dependents: string[];
|
|
46
|
+
dependencies: string[];
|
|
47
|
+
dependencyGraph: Record<string, never>;
|
|
48
|
+
deprecation?: string;
|
|
49
|
+
}
|
|
50
|
+
interface JsonDocsEvent {
|
|
51
|
+
event: string;
|
|
52
|
+
bubbles: boolean;
|
|
53
|
+
cancelable: boolean;
|
|
54
|
+
composed: boolean;
|
|
55
|
+
complexType: ComplexType;
|
|
56
|
+
docs: string;
|
|
57
|
+
docsTags: ApiDocsTag[];
|
|
58
|
+
deprecation?: string;
|
|
59
|
+
detail: string;
|
|
60
|
+
}
|
|
61
|
+
interface ComponentCompilerMethodComplexType {
|
|
62
|
+
signature: string;
|
|
63
|
+
parameters: {
|
|
64
|
+
name: string;
|
|
65
|
+
type: string;
|
|
66
|
+
docs: string;
|
|
67
|
+
}[];
|
|
68
|
+
references: ComponentCompilerTypeReferences;
|
|
69
|
+
return: string;
|
|
70
|
+
}
|
|
71
|
+
interface JsonDocsMethod {
|
|
72
|
+
name: string;
|
|
73
|
+
docs: string;
|
|
74
|
+
docsTags: ApiDocsTag[];
|
|
75
|
+
deprecation?: string;
|
|
76
|
+
signature: string;
|
|
77
|
+
returns: {
|
|
78
|
+
type: string;
|
|
79
|
+
docs: string;
|
|
80
|
+
};
|
|
81
|
+
parameters: ComponentCompilerMethodComplexType["parameters"];
|
|
82
|
+
complexType: ComponentCompilerMethodComplexType;
|
|
83
|
+
}
|
|
84
|
+
interface ComplexType {
|
|
85
|
+
original: string;
|
|
86
|
+
resolved: string;
|
|
87
|
+
references: ComponentCompilerTypeReferences;
|
|
88
|
+
}
|
|
89
|
+
export interface JsonDocsProp {
|
|
90
|
+
name: string;
|
|
91
|
+
complexType?: ComplexType;
|
|
92
|
+
type: string;
|
|
93
|
+
mutable: boolean;
|
|
94
|
+
attr?: string;
|
|
95
|
+
reflectToAttr: boolean;
|
|
96
|
+
docs: string;
|
|
97
|
+
docsTags: ApiDocsTag[];
|
|
98
|
+
default?: string;
|
|
99
|
+
deprecation?: string;
|
|
100
|
+
values: {
|
|
101
|
+
value?: string;
|
|
102
|
+
type: string;
|
|
103
|
+
}[];
|
|
104
|
+
optional: boolean;
|
|
105
|
+
required: boolean;
|
|
106
|
+
}
|
|
3
107
|
/**
|
|
4
108
|
* Create a stencil-compatible docs.json file describing the library components.
|
|
5
109
|
*
|
|
@@ -9,6 +113,8 @@ import type { CompilerContext } from "../context";
|
|
|
9
113
|
* Since they are similar in content, generating a Stencil-compatible docs.json
|
|
10
114
|
* will smooth the migration path.
|
|
11
115
|
*
|
|
116
|
+
* REFACTOR: drop support for stencil compatible docs.json at some point
|
|
117
|
+
*
|
|
12
118
|
* @remarks
|
|
13
119
|
* To make it easier for people to diff the docs.json before and after migration
|
|
14
120
|
* to Lit, we make sure that the order of properties matches what Stencil
|
|
@@ -16,3 +122,4 @@ import type { CompilerContext } from "../context";
|
|
|
16
122
|
* https://github.com/ionic-team/stencil/blob/9f5f9cdd023b8c8dfb5417a1a970605ba724ae28/src/compiler/docs/generate-doc-data.ts#L98
|
|
17
123
|
*/
|
|
18
124
|
export declare const generateStencilDocsJson: (context: CompilerContext) => JsonDocs;
|
|
125
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
*
|
|
35
35
|
* FEATURE: for usages in tests, allow `static override tagName = "te-st";` to define a component? and adapt transformers and plugins to look for nested components too when context.isInTest
|
|
36
36
|
*/
|
|
37
|
-
import ts from "typescript";
|
|
38
37
|
import type { FileTransformer } from "../publicTypes";
|
|
39
38
|
import type { DeclarationTextTransformer } from "../publicTypes";
|
|
40
39
|
export declare const removeDeclarationFromDts: DeclarationTextTransformer;
|
|
41
40
|
export declare const addCustomElementDecoratorTransformer: FileTransformer;
|
|
42
|
-
export declare function findDeclaredComponentsInFile(
|
|
41
|
+
export declare function findDeclaredComponentsInFile(code: string, fileName: string): Map<string, string>;
|
|
43
42
|
type DeclaredComponents = readonly (readonly [string, string])[];
|
|
44
43
|
export declare function findDeclaredComponents(code: string): DeclaredComponents | undefined;
|
|
45
|
-
|
|
44
|
+
declare function validateTagName(tagName: string, className: string): void;
|
|
46
45
|
export declare const exportsForTests: {
|
|
47
46
|
findDeclaredComponents: typeof findDeclaredComponents;
|
|
47
|
+
validateTagName: typeof validateTagName;
|
|
48
48
|
};
|
|
49
49
|
export {};
|