@arcgis/lumina-compiler 5.0.0-next.7 → 5.0.0-next.71
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/context/index.d.ts +11 -14
- package/dist/context/typeScript.d.ts +1 -1
- package/dist/dependencies/arcgisCore.d.ts +1 -1
- package/dist/dependencies/discover.d.ts +3 -3
- package/dist/dependencies/index.d.ts +1 -1
- package/dist/dependencies/loaders.d.ts +3 -3
- package/dist/dependencies/lumina.d.ts +2 -2
- package/dist/dependencies/stencil.d.ts +2 -2
- package/dist/dependencies/testSetupFiles.d.ts +1 -1
- package/dist/dependencies/updateLumina.d.ts +5 -4
- package/dist/docs/config.d.ts +1 -1
- package/dist/docs/index.d.ts +1 -1
- package/dist/docs/stencilDocsJson.d.ts +1 -1
- package/dist/docs/vsCodeCustomData/index.d.ts +1 -1
- package/dist/docs/vsCodeCustomData/utils.d.ts +1 -1
- package/dist/docs/webTypes/index.d.ts +1 -1
- package/dist/docs/webTypes/utils.d.ts +1 -1
- package/dist/entrypoints/addNonLazyImports.d.ts +1 -1
- package/dist/entrypoints/config.d.ts +0 -1
- package/dist/entrypoints/dtsUtils.d.ts +2 -2
- package/dist/entrypoints/findUtils.d.ts +1 -1
- package/dist/entrypoints/handleComponentImports.d.ts +1 -1
- package/dist/entrypoints/pathMapping.d.ts +1 -1
- package/dist/entrypoints/resolveTagName.d.ts +3 -3
- package/dist/extractor/LuminaApiExtractor.d.ts +63 -0
- package/dist/extractor/apiJsonUtils.d.ts +2 -1
- package/dist/extractor/declaration.d.ts +3 -3
- package/dist/extractor/helpers/event.d.ts +1 -2
- package/dist/extractor/helpers/method.d.ts +1 -8
- package/dist/extractor/helpers/property.d.ts +2 -7
- package/dist/extractor/helpers/resolveType.d.ts +1 -1
- package/dist/extractor/index.d.ts +4 -2
- package/dist/frameworkTypes/index.d.ts +1 -1
- package/dist/frameworkTypes/utils.d.ts +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +1609 -1671
- package/dist/jsxToLitHtml/autoAddNothing.d.ts +2 -2
- package/dist/jsxToLitHtml/comments.d.ts +2 -2
- package/dist/jsxToLitHtml/convertProps.d.ts +4 -4
- package/dist/jsxToLitHtml/imports.d.ts +4 -9
- package/dist/jsxToLitHtml/importsConfig.d.ts +8 -1
- package/dist/jsxToLitHtml/index.d.ts +1 -1
- package/dist/jsxToLitHtml/inferPropType.d.ts +1 -1
- package/dist/jsxToLitHtml/insertRepeatCall.d.ts +1 -1
- package/dist/jsxToLitHtml/jsxVisitor.d.ts +2 -2
- package/dist/jsxToLitHtml/templateParts.d.ts +1 -1
- package/dist/jsxToLitHtml/throwOnImportingExternalized.d.ts +1 -1
- package/dist/jsxToLitHtml/types.d.ts +2 -2
- package/dist/loader/css.d.ts +3 -3
- package/dist/loader/index.d.ts +1 -1
- package/dist/loader/lazy.d.ts +3 -3
- package/dist/plugins/buildCdn.d.ts +2 -2
- package/dist/plugins/buildWebApp.d.ts +1 -1
- package/dist/plugins/buildWrappers.d.ts +1 -1
- package/dist/plugins/configureVite.d.ts +2 -2
- package/dist/plugins/externalizeDependencies.d.ts +1 -1
- package/dist/plugins/handleDynamicAssets.d.ts +1 -1
- package/dist/plugins/handleStaticAssets.d.ts +1 -1
- package/dist/plugins/loadLitCss.d.ts +1 -1
- package/dist/plugins/printTotalBuildSize.d.ts +1 -1
- package/dist/plugins/provideAssets.d.ts +3 -3
- package/dist/plugins/setAssetsPath.d.ts +1 -1
- package/dist/plugins/updatePackageJson.d.ts +1 -1
- package/dist/publicTypes.d.ts +14 -10
- package/dist/puppeteerTesting/globalSetup.d.ts +2 -2
- package/dist/puppeteerTesting/index.d.ts +7 -7
- package/dist/puppeteerTesting/index.js +11 -11
- package/dist/puppeteerTesting/puppeteer/element.d.ts +4 -4
- package/dist/puppeteerTesting/puppeteer/events.d.ts +2 -2
- package/dist/puppeteerTesting/puppeteer/page.d.ts +1 -1
- package/dist/puppeteerTesting/puppeteer/types.d.ts +3 -3
- package/dist/puppeteerTesting/vitest/types.d.ts +1 -1
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/mount.d.ts +1 -1
- package/dist/tests/utils.d.ts +2 -2
- package/dist/transformers/index.d.ts +1 -1
- package/dist/transformers/injectRuntimeOptions.d.ts +1 -1
- package/dist/transformers/members.d.ts +1 -1
- package/dist/transformers/property.d.ts +2 -2
- package/dist/transformers/propertyOptions.d.ts +2 -2
- package/dist/transformers/utils.d.ts +2 -2
- package/dist/types/astTransformers.d.ts +1 -1
- package/dist/types/hideInternalLitElement.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/liftSetterTypes.d.ts +1 -1
- package/dist/types/textTransformers.d.ts +1 -1
- package/dist/types/transformComponentMembers.d.ts +1 -1
- package/dist/useLumina.d.ts +1 -1
- package/package.json +9 -9
- package/dist/extractor/extractor.d.ts +0 -54
- package/dist/testing/vitestTypes.d.ts +0 -8
- package/dist/transformers/internalTypeScriptApis.d.ts +0 -31
package/dist/context/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { ConfigEnv, Plugin, ResolvedConfig, ViteDevServer } from 'vite';
|
|
2
2
|
import { default as ts } from 'typescript';
|
|
3
|
-
import { ApiCssCustomProperty, ApiCustomElementDeclaration, ApiJson } from '@arcgis/api-extractor';
|
|
4
|
-
import { LuminaOptions, AssetSpec, AssetTransformer, DeclarationTextTransformer, ProvideAssetsOptions, LintingOptions } from '../publicTypes';
|
|
5
|
-
import { ComponentPathMapping } from '../entrypoints/pathMapping';
|
|
6
|
-
import { DocsType } from '../docs/types';
|
|
7
|
-
import { ContextDirectories } from './types';
|
|
8
|
-
import { makeLoaders, computeServeOnlyDependencies } from '../dependencies/loaders';
|
|
9
|
-
import { parseStoryFiles } from '../extractor/parseStoryFiles';
|
|
10
|
-
import { CustomElementInterdependencies } from '../entrypoints/config';
|
|
11
|
-
import { getCompilerOptionsForPrinter } from '../transformers';
|
|
12
|
-
import {
|
|
13
|
-
import { getLocalDefinedComponentsFromApiJson } from '../entrypoints/resolveTagName';
|
|
3
|
+
import { ApiCssCustomProperty, ApiCustomElementDeclaration, ApiJson, unsafeGetUndocumentedPrinter } from '@arcgis/api-extractor';
|
|
4
|
+
import { LuminaOptions, AssetSpec, AssetTransformer, DeclarationTextTransformer, ProvideAssetsOptions, LintingOptions } from '../publicTypes.ts';
|
|
5
|
+
import { ComponentPathMapping } from '../entrypoints/pathMapping.ts';
|
|
6
|
+
import { DocsType } from '../docs/types.ts';
|
|
7
|
+
import { ContextDirectories } from './types.ts';
|
|
8
|
+
import { makeLoaders, computeServeOnlyDependencies } from '../dependencies/loaders.ts';
|
|
9
|
+
import { parseStoryFiles } from '../extractor/parseStoryFiles.ts';
|
|
10
|
+
import { CustomElementInterdependencies } from '../entrypoints/config.ts';
|
|
11
|
+
import { getCompilerOptionsForPrinter } from '../transformers/index.ts';
|
|
12
|
+
import { getLocalDefinedComponentsFromApiJson } from '../entrypoints/resolveTagName.ts';
|
|
14
13
|
import { Deferred } from '@arcgis/toolkit/promise';
|
|
15
14
|
export declare class CompilerContext {
|
|
16
15
|
/**
|
|
@@ -316,7 +315,7 @@ export declare class CompilerContext {
|
|
|
316
315
|
*
|
|
317
316
|
* @private
|
|
318
317
|
*/
|
|
319
|
-
_typeScriptPrinter: ReturnType<typeof
|
|
318
|
+
_typeScriptPrinter: ReturnType<typeof unsafeGetUndocumentedPrinter>;
|
|
320
319
|
/**
|
|
321
320
|
* Cached RegExp for replacing occurrences of `ArcgisCounter["el"]` with
|
|
322
321
|
* `HtmlElementArcgisCounter`.
|
|
@@ -333,8 +332,6 @@ export declare class CompilerContext {
|
|
|
333
332
|
* @private
|
|
334
333
|
*/
|
|
335
334
|
_updateLuminaTsPromise?: Promise<void>;
|
|
336
|
-
normalizedDocumentationUrl: string;
|
|
337
|
-
alternativeDocumentationUrl: string;
|
|
338
335
|
private _didCallOptions;
|
|
339
336
|
/** @private */
|
|
340
337
|
_originalRollupInputOptions?: Record<string, string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
|
-
import { CompilerContext } from '.';
|
|
2
|
+
import { CompilerContext } from './index.ts';
|
|
3
3
|
/**
|
|
4
4
|
* In build mode, vite-plugin-dts already parses tsconfig. However, it
|
|
5
5
|
* overwrites the resolved tsconfig.target with ESNext, which is not what we
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DependencyInjectionMode, DependencyInjectionResult } from './utils';
|
|
1
|
+
import { DependencyInjectionMode, DependencyInjectionResult } from './utils.ts';
|
|
2
2
|
export declare const hasCore: boolean;
|
|
3
3
|
/**
|
|
4
4
|
* Thanks to Vite's dependency pre-bundling, we do not have to use the CDN
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MiniPackageJson } from '@arcgis/components-build-utils';
|
|
2
|
-
import { ModulePath } from '../extractor/helpers/resolveType';
|
|
3
|
-
import { WebTypes } from '../docs/webTypes/types';
|
|
2
|
+
import { ModulePath } from '../extractor/helpers/resolveType.ts';
|
|
3
|
+
import { WebTypes } from '../docs/webTypes/types.ts';
|
|
4
4
|
import { ApiJson } from '@arcgis/api-extractor';
|
|
5
|
-
import { LuminaOptions } from '../publicTypes';
|
|
5
|
+
import { LuminaOptions } from '../publicTypes.ts';
|
|
6
6
|
export type ResolvedDependencyComponents = {
|
|
7
7
|
readonly packageName: string;
|
|
8
8
|
readonly type: "@arcgis/lumina" | "stencil" | "unknown";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IndexHtmlTransformContext, Plugin } from 'vite';
|
|
2
|
-
import { CompilerContext } from '../context';
|
|
2
|
+
import { CompilerContext } from '../context/index.ts';
|
|
3
3
|
export declare const doLoadersApply: (context: CompilerContext, htmlContext?: IndexHtmlTransformContext) => boolean;
|
|
4
4
|
/**
|
|
5
5
|
* In serve mode, augment index.html by adding the necessary script tags for
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CompilerContext } from '../context';
|
|
2
|
-
import { ResolvedDependencyComponents } from './discover';
|
|
3
|
-
import { DependencyInjectionResult } from './utils';
|
|
1
|
+
import { CompilerContext } from '../context/index.ts';
|
|
2
|
+
import { ResolvedDependencyComponents } from './discover.ts';
|
|
3
|
+
import { DependencyInjectionResult } from './utils.ts';
|
|
4
4
|
export declare function makeLoaders(context: CompilerContext): Promise<DependencyInjectionResult[]>;
|
|
5
5
|
export declare function computeServeOnlyDependencies(context: CompilerContext): Promise<readonly ResolvedDependencyComponents[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DependencyInjectionMode, DependencyInjectionResult } from './utils';
|
|
2
|
-
import { ResolvedDependencyComponents } from './discover';
|
|
1
|
+
import { DependencyInjectionMode, DependencyInjectionResult } from './utils.ts';
|
|
2
|
+
import { ResolvedDependencyComponents } from './discover.ts';
|
|
3
3
|
export declare function makeLuminaLoader(baseUrl: string, dependency: ResolvedDependencyComponents, mode: DependencyInjectionMode, index: number, preferNext: boolean): Promise<DependencyInjectionResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DependencyInjectionMode, DependencyInjectionResult } from './utils';
|
|
2
|
-
import { ResolvedDependencyComponents } from './discover';
|
|
1
|
+
import { DependencyInjectionMode, DependencyInjectionResult } from './utils.ts';
|
|
2
|
+
import { ResolvedDependencyComponents } from './discover.ts';
|
|
3
3
|
export declare function makeStencilLoader(baseUrl: string, dependency: ResolvedDependencyComponents, mode: DependencyInjectionMode, index: number, preferNext: boolean): Promise<DependencyInjectionResult[]>;
|
|
4
4
|
export declare function findCdnFiles(packageDirectory: string): Promise<{
|
|
5
5
|
readonly cdnName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerContext } from '../context';
|
|
1
|
+
import { CompilerContext } from '../context/index.ts';
|
|
2
2
|
export declare const testSetupFileName = "/@arcgis/lumina-compiler/testSetupFile";
|
|
3
3
|
export declare const testSetupFileRegex: RegExp;
|
|
4
4
|
export declare const testSetupFileNames: string[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ResolvedDependencyComponents } from './discover';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ResolvedDependencyComponents } from './discover.ts';
|
|
2
|
+
export declare function updateLuminaTs(dependencies: readonly ResolvedDependencyComponents[], srcDir: string, hasCore: boolean,
|
|
3
|
+
/** Preserved positional argument for compatibility because codemod was passing it */
|
|
4
|
+
_unused?: never, packageJson?: import('@arcgis/components-build-utils').MiniPackageJson): Promise<boolean>;
|
|
5
|
+
declare function produceLuminaTs(dependencies: readonly ResolvedDependencyComponents[], hasCore: boolean, packageJson?: import('@arcgis/components-build-utils').MiniPackageJson): string;
|
|
5
6
|
export declare const exportsForTests: {
|
|
6
7
|
produceLuminaTs: typeof produceLuminaTs;
|
|
7
8
|
};
|
package/dist/docs/config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DocsType } from './types';
|
|
1
|
+
import { DocsType } from './types.ts';
|
|
2
2
|
export declare const defaultDocsFileNames: Record<DocsType, string>;
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiCustomElementDeclaration } from '@arcgis/api-extractor';
|
|
2
|
-
import { WebTypesAttribute, WebTypesCssProperty, WebTypesPseudoElement } from './types';
|
|
2
|
+
import { WebTypesAttribute, WebTypesCssProperty, WebTypesPseudoElement } from './types.ts';
|
|
3
3
|
export declare const getCssPropertyList: (components: ApiCustomElementDeclaration[]) => WebTypesCssProperty[];
|
|
4
4
|
export declare const getCssPartList: (components: ApiCustomElementDeclaration[]) => WebTypesPseudoElement[];
|
|
5
5
|
export declare const getComponentAttributes: (component: ApiCustomElementDeclaration) => WebTypesAttribute[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { CompilerContext } from '../context';
|
|
2
|
+
import { CompilerContext } from '../context/index.ts';
|
|
3
3
|
/**
|
|
4
4
|
* When component is imported in a non-lazy-loading way, we need to make sure
|
|
5
5
|
* the component file has explicit import statements for all web component it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeclarationTextTransformer } from '../publicTypes';
|
|
1
|
+
import { DeclarationTextTransformer } from '../publicTypes.ts';
|
|
2
2
|
import { path } from '@arcgis/components-build-utils';
|
|
3
|
-
import { CompilerContext } from '../context';
|
|
3
|
+
import { CompilerContext } from '../context/index.ts';
|
|
4
4
|
export declare const rewriteDtsComponentFileNames: DeclarationTextTransformer;
|
|
5
5
|
export declare const rePath: RegExp;
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
|
-
import { JsxContext } from '../jsxToLitHtml/types';
|
|
2
|
+
import { JsxContext } from '../jsxToLitHtml/types.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Instead of adding imports to the component source file, take note of imports
|
|
5
5
|
* that need to be added and have addNonLazyImports() add them to component's
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ResolvedDependencyComponent } from '../dependencies/discover';
|
|
2
|
-
import { ModulePath } from '../extractor/helpers/resolveType';
|
|
3
|
-
import { CompilerContext } from '../context';
|
|
1
|
+
import { ResolvedDependencyComponent } from '../dependencies/discover.ts';
|
|
2
|
+
import { ModulePath } from '../extractor/helpers/resolveType.ts';
|
|
3
|
+
import { CompilerContext } from '../context/index.ts';
|
|
4
4
|
/**
|
|
5
5
|
* Automatically add imports as appropriate for all referenced internally defined
|
|
6
6
|
* and externally defined custom elements
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { default as ts } from 'typescript';
|
|
2
|
+
import { ApiExtractor, ApiAttribute, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiCustomElementMember, ApiDeclaration, ApiEvent, ApiJson, ApiModule, ApiReference, CopyDocDefinitions } from '@arcgis/api-extractor';
|
|
3
|
+
import { CompilerContext } from '../context/index.ts';
|
|
4
|
+
export declare class LuminaApiExtractor extends ApiExtractor {
|
|
5
|
+
constructor(context: CompilerContext, isPatchOnly: boolean);
|
|
6
|
+
readonly context: CompilerContext;
|
|
7
|
+
protected readonly isPatchOnly: boolean;
|
|
8
|
+
protected localCssImports?: Set<string>;
|
|
9
|
+
protected localTagName: string | undefined;
|
|
10
|
+
protected localClassName: string | undefined;
|
|
11
|
+
protected pairedSetter: ts.SetAccessorDeclaration | undefined;
|
|
12
|
+
protected copyDocDefinitions: CopyDocDefinitions;
|
|
13
|
+
apiComponent: ApiCustomElementDeclaration;
|
|
14
|
+
indexedComponents: Map<string, ApiCustomElementDeclaration>;
|
|
15
|
+
moduleName: string;
|
|
16
|
+
resolveJsDocLink: (completeMatch: string, match: string) => string;
|
|
17
|
+
extract(files: readonly ts.SourceFile[]): ApiJson;
|
|
18
|
+
extractModules(files: readonly ts.SourceFile[]): ApiModule[];
|
|
19
|
+
extractModule(module: ts.SourceFile): ApiModule;
|
|
20
|
+
protected extractDeclaration(statement: ts.Statement): ApiDeclaration | undefined;
|
|
21
|
+
protected collectCssImports(node: ts.ImportDeclaration): void;
|
|
22
|
+
protected extractComponentDeclaration(node: ts.ClassDeclaration): ApiCustomElementDeclaration | undefined;
|
|
23
|
+
protected extractComponentMembers(node: ts.ClassDeclaration): ApiCustomElementMember[];
|
|
24
|
+
protected extractComponentMember(node: ts.ClassElement, name: string | undefined): ApiCustomElementMember | undefined;
|
|
25
|
+
protected extractComponentField(node: ts.AccessorDeclaration | ts.PropertyDeclaration, name: string): ApiCustomElementField | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Based on a `non-@property()` property, extract a public event if it is one.
|
|
28
|
+
*/
|
|
29
|
+
protected extractComponentEvent(node: ts.PropertyDeclaration, name: string): ApiEvent | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* When doing full API extraction, extract additional details for a field.
|
|
32
|
+
*/
|
|
33
|
+
protected extractComponentFieldDetails(node: ts.AccessorDeclaration | ts.PropertyDeclaration, property: ApiCustomElementField): void;
|
|
34
|
+
static loggedBooleanWarning: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Find the properties given to the `@property()` decorator.
|
|
37
|
+
*/
|
|
38
|
+
protected findPropertyOptions(member: ts.AccessorDeclaration | ts.PropertyDeclaration): readonly ts.ObjectLiteralElementLike[] | undefined;
|
|
39
|
+
protected extractComponentMethod(node: ts.MethodDeclaration, name: string): ApiClassMethod | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Infer attributes based on public component members.
|
|
42
|
+
*/
|
|
43
|
+
protected inferAttributes(members: ApiCustomElementMember[]): ApiAttribute[];
|
|
44
|
+
protected resolveInheritance(superClassModule: string, modules: ApiModule[]): false | {
|
|
45
|
+
inheritanceData: ApiReference;
|
|
46
|
+
declaration: import('@arcgis/api-extractor').ApiClassDeclaration | import('@arcgis/api-extractor').ApiMixinDeclaration;
|
|
47
|
+
hasSettableField: boolean;
|
|
48
|
+
indexedMembers: Map<string, import('@arcgis/api-extractor').ApiClassMember | ApiCustomElementMember | undefined> | undefined;
|
|
49
|
+
indexedEvents: Record<string, ApiEvent> | undefined;
|
|
50
|
+
indexedAttributes: Record<string, ApiAttribute> | undefined;
|
|
51
|
+
indexedSlots: Record<string, import('@arcgis/api-extractor').ApiSlot> | undefined;
|
|
52
|
+
indexedCssParts: Record<string, import('@arcgis/api-extractor').ApiCssPart> | undefined;
|
|
53
|
+
indexedCssProperties: Record<string, import('@arcgis/api-extractor').ApiCssCustomProperty> | undefined;
|
|
54
|
+
indexedCssStates: Record<string, import('@arcgis/api-extractor').ApiCssCustomState> | undefined;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Overwrite point
|
|
58
|
+
*
|
|
59
|
+
* FINAL: jsapi-extractor has a more efficient implementation because it
|
|
60
|
+
* has to deal with inheritance a lot. Unify it with Lumina.
|
|
61
|
+
*/
|
|
62
|
+
protected findSuperclassDeclaration(className: string, modules: ApiModule[]): readonly [string, ApiCustomElementDeclaration] | false;
|
|
63
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
2
|
import { ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiJson, ApiModule } from '@arcgis/api-extractor';
|
|
3
3
|
export declare function findMember(component: Pick<ApiCustomElementDeclaration, "members" | "name">, memberNode: ts.AccessorDeclaration | ts.MethodDeclaration | ts.PropertyDeclaration): ApiClassMethod | ApiCustomElementField | undefined;
|
|
4
|
-
export declare function findApiModule(filePath: string,
|
|
4
|
+
export declare function findApiModule(filePath: string, extractRootDir: string, apiJson: ApiJson): ApiModule | undefined;
|
|
5
|
+
export declare function apiMethodReturnsPromise(apiMethod: ApiClassMethod): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FileTransformer, DeclarationTextTransformer } from '../publicTypes';
|
|
1
|
+
import { FileTransformer, DeclarationTextTransformer } from '../publicTypes.ts';
|
|
2
2
|
export declare const removeDeclarationFromDts: DeclarationTextTransformer;
|
|
3
3
|
export declare const addCustomElementDecoratorTransformer: FileTransformer;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function findDeclaredComponent(code: string): readonly [tagName: string, className: string] | undefined;
|
|
5
5
|
export declare const exportsForTests: {
|
|
6
|
-
|
|
6
|
+
findDeclaredComponent: typeof findDeclaredComponent;
|
|
7
7
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
2
|
import { ApiEvent } from '@arcgis/api-extractor';
|
|
3
|
-
import { CompilerContext } from '../../context';
|
|
3
|
+
import { CompilerContext } from '../../context/index.ts';
|
|
4
4
|
/**
|
|
5
5
|
* If property is an event emitter, extract event payload type and event name.
|
|
6
6
|
* Even name is derived by converting property name to kebab-case.
|
|
7
7
|
*/
|
|
8
8
|
export declare function extractComponentEvent(propertyDeclaration: ts.PropertyDeclaration, name: string, context: CompilerContext, sourceFile: ts.SourceFile): ApiEvent | undefined;
|
|
9
|
-
export declare function extractBooleanInitializer(initializer: ts.Expression, sourceFile: ts.SourceFile): boolean;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
|
-
import { ContextDirectories } from '../../context/types';
|
|
2
|
+
import { ContextDirectories } from '../../context/types.ts';
|
|
3
3
|
import { ApiClassMethod } from '@arcgis/api-extractor';
|
|
4
4
|
export declare function extractComponentMethodDetails(node: ts.MethodDeclaration, method: ApiClassMethod, checker: ts.TypeChecker, sourceFile: ts.SourceFile, dirs: ContextDirectories): void;
|
|
5
|
-
/**
|
|
6
|
-
* Inspired by https://github.com/bennypowers/cem-plugins/blob/main/plugins/cem-plugin-async-function/index.js
|
|
7
|
-
*
|
|
8
|
-
* That package works, but uses outdated peerDependency and the author doesn't
|
|
9
|
-
* wish to update it. Refactoring it, and adding TypeScript typings
|
|
10
|
-
*/
|
|
11
|
-
export declare const isAsync: (nodeDeclaration: ts.MethodDeclaration) => boolean;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
|
-
import { ApiType
|
|
3
|
-
import { CompilerContext } from '../../context';
|
|
2
|
+
import { ApiType } from '@arcgis/api-extractor';
|
|
3
|
+
import { CompilerContext } from '../../context/index.ts';
|
|
4
4
|
export declare const getComplexPropertyType: (context: CompilerContext, typeContainerNode: ts.AccessorDeclaration | ts.PropertyDeclaration, isRequired: boolean, sourceFile: ts.SourceFile) => ApiType;
|
|
5
|
-
/**
|
|
6
|
-
* Associate a start and end index with each type reference. Drop unresolved
|
|
7
|
-
* references.
|
|
8
|
-
*/
|
|
9
|
-
export declare function findReferenceRanges(references: ApiTypeReference[], resolvedString: string): ApiTypeReference[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as ts } from 'typescript';
|
|
2
|
-
import { ContextDirectories } from '../../context/types';
|
|
2
|
+
import { ContextDirectories } from '../../context/types.ts';
|
|
3
3
|
import { ApiType } from '@arcgis/api-extractor';
|
|
4
4
|
export declare const addPropMetadataPluginName = "@arcgis/lumina:addPropMetadata";
|
|
5
5
|
export declare function resolveType(checker: ts.TypeChecker, type: ts.Type, sourceFile: ts.SourceFile, dirs: ContextDirectories, stripNullish?: boolean): ApiType;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CompilerContext } from '../context';
|
|
1
|
+
import { CompilerContext } from '../context/index.ts';
|
|
2
2
|
import { ApiCustomElementDeclaration, ApiJson } from '@arcgis/api-extractor';
|
|
3
|
+
import { LuminaApiExtractor } from './LuminaApiExtractor.ts';
|
|
3
4
|
/**
|
|
4
5
|
* Build the complete api.json, either once during build, or in serve mode if
|
|
5
6
|
* full-reload is needed.
|
|
@@ -9,4 +10,5 @@ export declare function buildApiJson(context: CompilerContext, reFetchComponentE
|
|
|
9
10
|
* Update the api.json for a single file on hot reload
|
|
10
11
|
*/
|
|
11
12
|
export declare function patchApiJson(context: CompilerContext, fileName: string, code: string): ApiCustomElementDeclaration[] | undefined;
|
|
12
|
-
export declare function postProcessComponent(component: ApiCustomElementDeclaration,
|
|
13
|
+
export declare function postProcessComponent(component: ApiCustomElementDeclaration, extractor: LuminaApiExtractor): void;
|
|
14
|
+
export declare const jsDocLinkToMarkdown: (extractor: LuminaApiExtractor) => (completeMatch: string, match: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiCustomElementMember } from '@arcgis/api-extractor';
|
|
2
|
-
import { CompilerContext } from '../context';
|
|
2
|
+
import { CompilerContext } from '../context/index.ts';
|
|
3
3
|
/** Generate a string for importing component types */
|
|
4
4
|
export declare const generateComponentTypeImports: (context: CompilerContext) => string;
|
|
5
5
|
export declare const isPropertyEscapeNeeded: (name: string) => boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { initializeComponentDependencies } from './dependencies/discover';
|
|
2
|
-
import { updateLuminaTs } from './dependencies/updateLumina';
|
|
3
|
-
import {
|
|
4
|
-
export { useLumina } from './useLumina';
|
|
5
|
-
export type * from './publicTypes';
|
|
6
|
-
export { inferCdnUrl } from './defaultAssetsUrl';
|
|
7
|
-
export type { CompilerContext } from './context';
|
|
8
|
-
export { LuminaApiExtractor } from './extractor/
|
|
1
|
+
import { initializeComponentDependencies } from './dependencies/discover.ts';
|
|
2
|
+
import { updateLuminaTs } from './dependencies/updateLumina.ts';
|
|
3
|
+
import { findDeclaredComponent } from './extractor/declaration.ts';
|
|
4
|
+
export { useLumina } from './useLumina.ts';
|
|
5
|
+
export type * from './publicTypes.ts';
|
|
6
|
+
export { inferCdnUrl } from './defaultAssetsUrl.ts';
|
|
7
|
+
export type { CompilerContext } from './context/index.ts';
|
|
8
|
+
export { LuminaApiExtractor } from './extractor/LuminaApiExtractor.ts';
|
|
9
9
|
/**
|
|
10
10
|
* These are exposed only for usage by the @arcgis/stencil-to-lumina codemod
|
|
11
11
|
*
|
|
@@ -15,10 +15,10 @@ export declare const exportsForCodemod: {
|
|
|
15
15
|
initializeComponentDependencies: typeof initializeComponentDependencies;
|
|
16
16
|
updateLuminaTs: typeof updateLuminaTs;
|
|
17
17
|
propertyToAttributeMappings: {
|
|
18
|
-
readonly common: Required<import('./jsxToLitHtml/config').ElementPropertyToAttributeMappings>;
|
|
19
|
-
readonly perElement: Record<string, import('./jsxToLitHtml/config').ElementPropertyToAttributeMappings | undefined>;
|
|
18
|
+
readonly common: Required<import('./jsxToLitHtml/config.ts').ElementPropertyToAttributeMappings>;
|
|
19
|
+
readonly perElement: Record<string, import('./jsxToLitHtml/config.ts').ElementPropertyToAttributeMappings | undefined>;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
findDeclaredComponent: typeof findDeclaredComponent;
|
|
22
22
|
nativeEvents: Set<string>;
|
|
23
23
|
svgElements: Set<string>;
|
|
24
24
|
mathMlElements: Set<string>;
|