@arcgis/lumina-compiler 4.34.0-next.16 → 4.34.0-next.161
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/LICENSE.md +1 -1
- package/README.md +2 -10
- package/dist/context/index.d.ts +12 -2
- package/dist/dependencies/arcgisCore.d.ts +1 -1
- package/dist/dependencies/discover.d.ts +7 -2
- package/dist/dependencies/lumina.d.ts +1 -1
- package/dist/dependencies/stencil.d.ts +2 -2
- package/dist/dependencies/testSetupFiles.d.ts +1 -0
- package/dist/dependencies/updateLumina.d.ts +3 -3
- package/dist/entrypoints/resolveTagName.d.ts +2 -2
- package/dist/frameworkTypes/preact.d.ts +1 -0
- package/dist/frameworkTypes/preact10.d.ts +10 -0
- package/dist/index.js +2397 -2317
- package/dist/jsxToLitHtml/importsConfig.d.ts +10 -0
- package/dist/jsxToLitHtml/types.d.ts +4 -2
- package/dist/loader/{hideUntilHydrated.d.ts → css.d.ts} +6 -1
- package/dist/loader/index.d.ts +1 -1
- package/dist/loader/lazy.d.ts +1 -1
- package/dist/logger-hJvg0JOj.js +34 -0
- package/dist/plugins/buildCdn.d.ts +6 -0
- package/dist/plugins/loadLitCss.d.ts +52 -11
- package/dist/publicTypes.d.ts +70 -118
- package/dist/puppeteerTesting/globalSetup.d.ts +1 -1
- package/dist/puppeteerTesting/index.js +1 -1
- package/dist/puppeteerTesting/vitest/matchers/index.d.ts +12 -12
- package/dist/testing/failOnConsole.d.ts +6 -0
- package/dist/testing/index.js +79 -60
- package/dist/testing/mount.d.ts +2 -2
- package/dist/testing/vitestTypes.d.ts +8 -0
- package/dist/transformers/injectRuntimeOptions.d.ts +12 -2
- package/dist/transformers/internalTypeScriptApis.d.ts +4 -1
- package/dist/transformers/utils.d.ts +2 -7
- package/package.json +20 -18
- package/dist/jsxToLitHtml/escapeForTemplateLiteral.d.ts +0 -45
- package/dist/logger-KpGU2b3R.js +0 -28
- package/dist/plugins/buildStencilHydrate.d.ts +0 -16
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -8,14 +8,6 @@ It is not intended to be used directly, but rather used as a dependency by other
|
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
|
11
|
-
COPYRIGHT ©
|
|
11
|
+
COPYRIGHT © Esri
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
16
|
-
|
|
17
|
-
See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
|
|
18
|
-
|
|
19
|
-
For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
|
|
20
|
-
|
|
21
|
-
email: contracts@esri.com
|
|
13
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package.
|
package/dist/context/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { CustomElementInterdependencies } from '../entrypoints/config';
|
|
|
11
11
|
import { getCompilerOptionsForPrinter } from '../transformers';
|
|
12
12
|
import { getPrinter } from '../transformers/internalTypeScriptApis';
|
|
13
13
|
import { getLocalDefinedComponentsFromApiJson } from '../entrypoints/resolveTagName';
|
|
14
|
-
import { Deferred } from '@arcgis/
|
|
14
|
+
import { Deferred } from '@arcgis/toolkit/promise';
|
|
15
15
|
export declare class CompilerContext {
|
|
16
16
|
/**
|
|
17
17
|
* The path to the resolved TypeScript configuration
|
|
@@ -105,6 +105,15 @@ export declare class CompilerContext {
|
|
|
105
105
|
* JSDoc tag.
|
|
106
106
|
*/
|
|
107
107
|
privateApiJson: ApiJson;
|
|
108
|
+
/**
|
|
109
|
+
* Resolves once api.json is first generated.
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
readonly apiJsonDeferred: Deferred<void>;
|
|
113
|
+
/**
|
|
114
|
+
* In some test environments, api.json will never be produced.
|
|
115
|
+
*/
|
|
116
|
+
apiJsonEnabled: boolean;
|
|
108
117
|
/**
|
|
109
118
|
* @private
|
|
110
119
|
*/
|
|
@@ -267,7 +276,8 @@ export declare class CompilerContext {
|
|
|
267
276
|
*/
|
|
268
277
|
_globalHydratedCssString: string;
|
|
269
278
|
/**
|
|
270
|
-
* Contents of the bundled global CSS file
|
|
279
|
+
* Contents of the bundled global CSS file. The string is JSON-encoded so that
|
|
280
|
+
* it can be injected into a JavaScript file as a string literal.
|
|
271
281
|
*
|
|
272
282
|
* @private
|
|
273
283
|
*/
|
|
@@ -27,4 +27,4 @@ export declare const hasCore: boolean;
|
|
|
27
27
|
* - for external users, having both storybook and docs use the ESM CDN means
|
|
28
28
|
* they benefit from caching the ESM CDN across both sites
|
|
29
29
|
*/
|
|
30
|
-
export declare function produceArcgisCoreTags(baseUrl: string, mode: DependencyInjectionMode): Promise<DependencyInjectionResult[]>;
|
|
30
|
+
export declare function produceArcgisCoreTags(baseUrl: string, mode: DependencyInjectionMode, preferNext: boolean): Promise<DependencyInjectionResult[]>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { MiniPackageJson } from '@arcgis/components-build-utils';
|
|
1
2
|
import { ModulePath } from '../extractor/helpers/resolveType';
|
|
2
3
|
import { WebTypes } from '../docs/webTypes/types';
|
|
3
4
|
import { ApiJson } from '@arcgis/api-extractor';
|
|
5
|
+
import { LuminaOptions } from '../publicTypes';
|
|
4
6
|
export type ResolvedDependencyComponents = {
|
|
5
7
|
readonly packageName: string;
|
|
6
8
|
readonly type: "@arcgis/lumina" | "stencil" | "unknown";
|
|
7
9
|
readonly components: Readonly<Record<string, ResolvedDependencyComponent>>;
|
|
8
10
|
readonly cdnUrl?: string;
|
|
11
|
+
readonly packageLocation: string;
|
|
12
|
+
readonly packageJson: MiniPackageJson;
|
|
9
13
|
};
|
|
10
14
|
export type ResolvedDependencyComponent = ModulePath & {
|
|
11
15
|
/**
|
|
@@ -15,6 +19,7 @@ export type ResolvedDependencyComponent = ModulePath & {
|
|
|
15
19
|
* big deal as we will then play safe and leave jsx properties as properties.
|
|
16
20
|
*/
|
|
17
21
|
readonly propToAttribute: Readonly<Record<string, string>>;
|
|
22
|
+
requiredProperties?: Set<string>;
|
|
18
23
|
};
|
|
19
24
|
/**
|
|
20
25
|
* Read information about our web component dependencies. This will be used to:
|
|
@@ -45,7 +50,7 @@ export type ResolvedDependencyComponent = ModulePath & {
|
|
|
45
50
|
* If this does not work for one of your dependencies, provide a custom resolver
|
|
46
51
|
* to autoAddImports() or useLumina().
|
|
47
52
|
*/
|
|
48
|
-
export declare function initializeComponentDependencies(cwd?: string): Promise<readonly ResolvedDependencyComponents[]>;
|
|
53
|
+
export declare function initializeComponentDependencies(cwd?: string, options?: LuminaOptions): Promise<readonly ResolvedDependencyComponents[]>;
|
|
49
54
|
export declare function retrieveComponentDependencies(): readonly ResolvedDependencyComponents[];
|
|
50
55
|
export declare function retrieveFlatComponentDependencies(): ResolvedDependencyComponents["components"];
|
|
51
56
|
export declare let componentDependenciesPromise: Promise<readonly ResolvedDependencyComponents[]> | undefined;
|
|
@@ -55,7 +60,7 @@ export declare function findPackageComponents(packageName: string, cwd?: string)
|
|
|
55
60
|
*/
|
|
56
61
|
export declare function manifestToDependencyComponents(manifest: Partial<ApiJson>, dependency: Omit<ModulePath, "moduleName"> & {
|
|
57
62
|
readonly getImportPath: (tagName: string) => string;
|
|
58
|
-
}): ResolvedDependencyComponents["components"];
|
|
63
|
+
}, computeRequiredProperties?: boolean): ResolvedDependencyComponents["components"];
|
|
59
64
|
export declare const webTypesToDependencyComponents: (webTypes: Partial<WebTypes>, dependency: Omit<ModulePath, "moduleName"> & {
|
|
60
65
|
readonly packageRoot: string | undefined;
|
|
61
66
|
readonly getImportPath: (tagName: string) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DependencyInjectionMode, DependencyInjectionResult } from './utils';
|
|
2
2
|
import { ResolvedDependencyComponents } from './discover';
|
|
3
|
-
export declare function makeLuminaLoader(baseUrl: string, dependency: ResolvedDependencyComponents, mode: DependencyInjectionMode, index: number): Promise<DependencyInjectionResult>;
|
|
3
|
+
export declare function makeLuminaLoader(baseUrl: string, dependency: ResolvedDependencyComponents, mode: DependencyInjectionMode, index: number, preferNext: boolean): Promise<DependencyInjectionResult>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DependencyInjectionMode, DependencyInjectionResult } from './utils';
|
|
2
2
|
import { ResolvedDependencyComponents } from './discover';
|
|
3
|
-
export declare function makeStencilLoader(baseUrl: string, dependency: ResolvedDependencyComponents, mode: DependencyInjectionMode, index: number): Promise<DependencyInjectionResult[]>;
|
|
4
|
-
export declare function findCdnFiles(
|
|
3
|
+
export declare function makeStencilLoader(baseUrl: string, dependency: ResolvedDependencyComponents, mode: DependencyInjectionMode, index: number, preferNext: boolean): Promise<DependencyInjectionResult[]>;
|
|
4
|
+
export declare function findCdnFiles(packageDirectory: string): Promise<{
|
|
5
5
|
readonly cdnName: string;
|
|
6
6
|
readonly hasCss: boolean;
|
|
7
7
|
} | undefined>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CompilerContext } from '../context';
|
|
2
2
|
export declare const testSetupFileName = "/@arcgis/lumina-compiler/testSetupFile";
|
|
3
|
+
export declare const testSetupFileRegex: RegExp;
|
|
3
4
|
export declare const testSetupFileNames: string[];
|
|
4
5
|
/**
|
|
5
6
|
* Get the entrypoint code for lazy-loading all components and their
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResolvedDependencyComponents } from './discover';
|
|
2
|
-
import {
|
|
3
|
-
export declare function updateLuminaTs(dependencies: readonly ResolvedDependencyComponents[], srcDir: string, hasCore: boolean, browserProvider?:
|
|
4
|
-
declare function produceLuminaTs(dependencies: readonly ResolvedDependencyComponents[], hasCore: boolean, browserProvider?:
|
|
2
|
+
import { VitestBrowserModeProvider } from '../testing/vitestTypes';
|
|
3
|
+
export declare function updateLuminaTs(dependencies: readonly ResolvedDependencyComponents[], srcDir: string, hasCore: boolean, browserProvider?: VitestBrowserModeProvider, packageJson?: import('@arcgis/components-build-utils').MiniPackageJson): Promise<boolean>;
|
|
4
|
+
declare function produceLuminaTs(dependencies: readonly ResolvedDependencyComponents[], hasCore: boolean, browserProvider?: VitestBrowserModeProvider, packageJson?: import('@arcgis/components-build-utils').MiniPackageJson): string;
|
|
5
5
|
export declare const exportsForTests: {
|
|
6
6
|
produceLuminaTs: typeof produceLuminaTs;
|
|
7
7
|
};
|
|
@@ -5,9 +5,9 @@ import { CompilerContext } from '../context';
|
|
|
5
5
|
* Automatically add imports as appropriate for all referenced internally defined
|
|
6
6
|
* and externally defined custom elements
|
|
7
7
|
*/
|
|
8
|
-
export declare function resolveTagName(context: CompilerContext, tagName: string, fileName: string): ModulePath;
|
|
8
|
+
export declare function resolveTagName(context: CompilerContext, tagName: string, fileName: string): ModulePath | undefined;
|
|
9
9
|
export declare function modulePathToString(resolvedPath: ModulePath, distRelativeCwd: string): string;
|
|
10
|
-
export declare function getLocalDefinedComponentsFromApiJson(context: Pick<CompilerContext, "_localDefinedComponents" | "privateApiJson">): Readonly<Record<string, ResolvedDependencyComponent>>;
|
|
10
|
+
export declare function getLocalDefinedComponentsFromApiJson(context: Pick<CompilerContext, "_localDefinedComponents" | "privateApiJson" | "viteCommand">): Readonly<Record<string, ResolvedDependencyComponent>>;
|
|
11
11
|
export declare const exportsForTests: {
|
|
12
12
|
modulePathToString: typeof modulePathToString;
|
|
13
13
|
};
|
|
@@ -2,5 +2,6 @@ import { ApiCustomElementDeclaration } from '@arcgis/api-extractor';
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://github.com/preactjs/preact/issues/1180#issuecomment-643681851
|
|
4
4
|
* @see https://github.com/preactjs/preact/pull/1448/files
|
|
5
|
+
* @see https://github.com/esri/calcite-design-system/issues/9494
|
|
5
6
|
*/
|
|
6
7
|
export declare function generatePreactTypes(components: ApiCustomElementDeclaration[]): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApiCustomElementDeclaration } from '@arcgis/api-extractor';
|
|
2
|
+
/**
|
|
3
|
+
* Typings for Preact 10 and earlier.
|
|
4
|
+
* Preact 11 had a breaking change requiring separate typings.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/preactjs/preact/issues/4903
|
|
7
|
+
* @deprecated These are exposed for internal consumption only. Drop once Home App
|
|
8
|
+
* updates to Preact 11.
|
|
9
|
+
*/
|
|
10
|
+
export declare function generatePreact10Types(components: ApiCustomElementDeclaration[]): string;
|