@arcgis/lumina-compiler 5.0.0-next.8 → 5.0.0-next.81

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.
Files changed (93) hide show
  1. package/dist/context/index.d.ts +11 -14
  2. package/dist/context/typeScript.d.ts +1 -1
  3. package/dist/dependencies/arcgisCore.d.ts +1 -1
  4. package/dist/dependencies/discover.d.ts +3 -3
  5. package/dist/dependencies/index.d.ts +1 -1
  6. package/dist/dependencies/loaders.d.ts +3 -3
  7. package/dist/dependencies/lumina.d.ts +2 -2
  8. package/dist/dependencies/stencil.d.ts +12 -2
  9. package/dist/dependencies/testSetupFiles.d.ts +1 -1
  10. package/dist/dependencies/updateLumina.d.ts +5 -4
  11. package/dist/docs/config.d.ts +1 -1
  12. package/dist/docs/index.d.ts +1 -1
  13. package/dist/docs/stencilDocsJson.d.ts +1 -1
  14. package/dist/docs/vsCodeCustomData/index.d.ts +1 -1
  15. package/dist/docs/vsCodeCustomData/utils.d.ts +1 -1
  16. package/dist/docs/webTypes/index.d.ts +1 -1
  17. package/dist/docs/webTypes/utils.d.ts +1 -1
  18. package/dist/entrypoints/addNonLazyImports.d.ts +1 -1
  19. package/dist/entrypoints/config.d.ts +0 -1
  20. package/dist/entrypoints/dtsUtils.d.ts +2 -2
  21. package/dist/entrypoints/findUtils.d.ts +1 -1
  22. package/dist/entrypoints/handleComponentImports.d.ts +1 -1
  23. package/dist/entrypoints/pathMapping.d.ts +1 -1
  24. package/dist/entrypoints/resolveTagName.d.ts +3 -3
  25. package/dist/extractor/LuminaApiExtractor.d.ts +63 -0
  26. package/dist/extractor/apiJsonUtils.d.ts +2 -1
  27. package/dist/extractor/declaration.d.ts +3 -3
  28. package/dist/extractor/helpers/event.d.ts +1 -2
  29. package/dist/extractor/helpers/method.d.ts +1 -8
  30. package/dist/extractor/helpers/property.d.ts +2 -7
  31. package/dist/extractor/helpers/resolveType.d.ts +1 -1
  32. package/dist/extractor/index.d.ts +4 -2
  33. package/dist/frameworkTypes/index.d.ts +1 -1
  34. package/dist/frameworkTypes/utils.d.ts +1 -1
  35. package/dist/index.d.ts +11 -11
  36. package/dist/index.js +1508 -1556
  37. package/dist/jsxToLitHtml/autoAddNothing.d.ts +2 -2
  38. package/dist/jsxToLitHtml/comments.d.ts +2 -2
  39. package/dist/jsxToLitHtml/convertProps.d.ts +4 -4
  40. package/dist/jsxToLitHtml/imports.d.ts +4 -9
  41. package/dist/jsxToLitHtml/importsConfig.d.ts +8 -1
  42. package/dist/jsxToLitHtml/index.d.ts +1 -1
  43. package/dist/jsxToLitHtml/inferPropType.d.ts +1 -1
  44. package/dist/jsxToLitHtml/insertRepeatCall.d.ts +1 -1
  45. package/dist/jsxToLitHtml/jsxVisitor.d.ts +2 -2
  46. package/dist/jsxToLitHtml/templateParts.d.ts +1 -1
  47. package/dist/jsxToLitHtml/throwOnImportingExternalized.d.ts +1 -1
  48. package/dist/jsxToLitHtml/types.d.ts +2 -2
  49. package/dist/loader/css.d.ts +3 -3
  50. package/dist/loader/index.d.ts +1 -1
  51. package/dist/loader/lazy.d.ts +3 -3
  52. package/dist/plugins/buildCdn.d.ts +2 -2
  53. package/dist/plugins/buildWebApp.d.ts +1 -1
  54. package/dist/plugins/buildWrappers.d.ts +1 -1
  55. package/dist/plugins/configureVite.d.ts +2 -2
  56. package/dist/plugins/externalizeDependencies.d.ts +1 -1
  57. package/dist/plugins/handleDynamicAssets.d.ts +1 -1
  58. package/dist/plugins/handleStaticAssets.d.ts +1 -1
  59. package/dist/plugins/loadLitCss.d.ts +1 -1
  60. package/dist/plugins/printTotalBuildSize.d.ts +1 -1
  61. package/dist/plugins/provideAssets.d.ts +3 -3
  62. package/dist/plugins/setAssetsPath.d.ts +1 -1
  63. package/dist/plugins/updatePackageJson.d.ts +1 -1
  64. package/dist/publicTypes.d.ts +14 -10
  65. package/dist/puppeteerTesting/globalSetup.d.ts +2 -2
  66. package/dist/puppeteerTesting/index.d.ts +7 -7
  67. package/dist/puppeteerTesting/index.js +11 -11
  68. package/dist/puppeteerTesting/puppeteer/element.d.ts +4 -4
  69. package/dist/puppeteerTesting/puppeteer/events.d.ts +2 -2
  70. package/dist/puppeteerTesting/puppeteer/page.d.ts +1 -1
  71. package/dist/puppeteerTesting/puppeteer/types.d.ts +3 -3
  72. package/dist/puppeteerTesting/vitest/types.d.ts +1 -1
  73. package/dist/testing/index.d.ts +4 -4
  74. package/dist/testing/index.js +69 -67
  75. package/dist/testing/mount.d.ts +1 -1
  76. package/dist/tests/utils.d.ts +2 -2
  77. package/dist/transformers/index.d.ts +1 -1
  78. package/dist/transformers/injectRuntimeOptions.d.ts +1 -1
  79. package/dist/transformers/members.d.ts +1 -1
  80. package/dist/transformers/property.d.ts +2 -2
  81. package/dist/transformers/propertyOptions.d.ts +2 -2
  82. package/dist/transformers/utils.d.ts +2 -2
  83. package/dist/types/astTransformers.d.ts +1 -1
  84. package/dist/types/hideInternalLitElement.d.ts +1 -1
  85. package/dist/types/index.d.ts +1 -1
  86. package/dist/types/liftSetterTypes.d.ts +1 -1
  87. package/dist/types/textTransformers.d.ts +1 -1
  88. package/dist/types/transformComponentMembers.d.ts +1 -1
  89. package/dist/useLumina.d.ts +1 -1
  90. package/package.json +9 -9
  91. package/dist/extractor/extractor.d.ts +0 -54
  92. package/dist/testing/vitestTypes.d.ts +0 -8
  93. package/dist/transformers/internalTypeScriptApis.d.ts +0 -31
@@ -1,5 +1,5 @@
1
- import { TemplatePart } from './templateParts';
2
- import { JsxContext } from './types';
1
+ import { TemplatePart } from './templateParts.ts';
2
+ import { JsxContext } from './types.ts';
3
3
  /**
4
4
  * If JSX prop value could possibly be `undefined`, we add `?? nothing` to it.
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import { default as ts } from 'typescript';
2
- import { JsxContext } from './types';
3
- import { TemplatePart } from './templateParts';
2
+ import { JsxContext } from './types.ts';
3
+ import { TemplatePart } from './templateParts.ts';
4
4
  /**
5
5
  * Extract comments and whitespace from a node (called "trivia" in TypeScript)
6
6
  */
@@ -1,8 +1,8 @@
1
1
  import { default as ts } from 'typescript';
2
- import { TemplatePart } from './templateParts';
3
- import { JsxContext } from './types';
4
- import { JsxPropType } from './inferPropType';
5
- import { dynamicHtmlSymbol, dynamicSvgSymbol } from './config';
2
+ import { TemplatePart } from './templateParts.ts';
3
+ import { JsxContext } from './types.ts';
4
+ import { JsxPropType } from './inferPropType.ts';
5
+ import { dynamicHtmlSymbol, dynamicSvgSymbol } from './config.ts';
6
6
  /**
7
7
  * Handle the conversion for each JSX prop type
8
8
  */
@@ -1,5 +1,5 @@
1
1
  import { default as ts } from 'typescript';
2
- import { JsxContext } from './types';
2
+ import { JsxContext } from './types.ts';
3
3
  /**
4
4
  * This runs before we know what imports will be needed.
5
5
  *
@@ -9,20 +9,15 @@ import { JsxContext } from './types';
9
9
  * imports, if we see that e.x "html" is not present in the "lit" import, we
10
10
  * might import it again and fail to check that it might be imported further
11
11
  * down from "lit-html".
12
+ * 3. Drop compiler-only imports that exist as runtime imports only for
13
+ * type checking or as compiler hints.
12
14
  */
13
- export declare function trackExistingImports(context: JsxContext, importDeclaration: ts.ImportDeclaration): ts.ImportDeclaration;
15
+ export declare function trackExistingImports(context: JsxContext, importDeclaration: ts.ImportDeclaration): ts.ImportDeclaration | undefined;
14
16
  /**
15
17
  * After we know what imports will be needed, if there already are some imports
16
18
  * from the places we are looking for, augment those import declarations.
17
19
  *
18
20
  * In a step after this, if any imports will still be needed, we will add them.
19
- *
20
- * @remarks
21
- * We don't bother removing `@arcgis/lumina` "h" and "Fragment" imports as those
22
- * would be removed by rollup if there are no usages outside of JSX. If
23
- * those are explicitly called outside of jsx, Rollup will throw a build time
24
- * error (since `@arcgis/lumina` does not actually define h and Fragment but only
25
- * declare their typings).
26
21
  */
27
22
  export declare function augmentExistingImports(this: JsxContext, node: ts.Statement): ts.Statement;
28
23
  /**
@@ -1,4 +1,4 @@
1
- import { JsxImportName } from './types';
1
+ import { JsxImportName } from './types.ts';
2
2
  /**
3
3
  * Most Lit API's are re-exported from multiple packages. Because only Lit
4
4
  * package is declared as an explicit dependency, Lumina's auto-inserted imports
@@ -8,3 +8,10 @@ import { JsxImportName } from './types';
8
8
  * that export these APIs (the 2nd+ items in the lists below).
9
9
  */
10
10
  export declare const dynamicallyInsertedImportsByName: Record<JsxImportName, string[]>;
11
+ /**
12
+ * These runtime imports exist only for type checking or as compiler hints.
13
+ * The compiler refactors out their usages. Thus, we should also remove out
14
+ * their imports. This does not happen automatically if using TypeScript's
15
+ * strict verbatimModuleSyntax setting.
16
+ */
17
+ export declare const compilerOnlyLuminaImports: Set<string>;
@@ -1,4 +1,4 @@
1
- import { FileTransformer } from '../publicTypes';
1
+ import { FileTransformer } from '../publicTypes.ts';
2
2
  /**
3
3
  * Let developers author components in JSX for better type checking and developer
4
4
  * experience, but convert JSX to lit-html at build time for better performance.
@@ -1,5 +1,5 @@
1
1
  import { default as ts } from 'typescript';
2
- import { dynamicHtmlSymbol, dynamicSvgSymbol } from './config';
2
+ import { dynamicHtmlSymbol, dynamicSvgSymbol } from './config.ts';
3
3
  /**
4
4
  * Check if prop initializer has bindProperty(), bindAttribute(),
5
5
  * bindBooleanAttribute() or bindEvent() call - these explicitly indicate the
@@ -1,5 +1,5 @@
1
1
  import { default as ts } from 'typescript';
2
- import { JsxContext } from './types';
2
+ import { JsxContext } from './types.ts';
3
3
  /**
4
4
  * By default, when we see a `key=""` prop, we convert it like this:
5
5
  * ```tsx
@@ -1,6 +1,6 @@
1
1
  import { default as ts } from 'typescript';
2
- import { TemplatePart } from './templateParts';
3
- import { JsxHost, JsxContext } from './types';
2
+ import { TemplatePart } from './templateParts.ts';
3
+ import { JsxHost, JsxContext } from './types.ts';
4
4
  /**
5
5
  * Recursively traverse the entire AST top-down, converting JSX to lit-html.
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { default as ts } from 'typescript';
2
- import { JsxContext, LitTag, ambiguousSvgTag } from './types';
2
+ import { JsxContext, LitTag, ambiguousSvgTag } from './types.ts';
3
3
  /**
4
4
  * Template part is a convenient intermediate representation for template
5
5
  * literal expressions.
@@ -1,4 +1,4 @@
1
- import { JsxContext } from './types';
1
+ import { JsxContext } from './types.ts';
2
2
  /**
3
3
  * Throw if encountered an explicit non-type-only import for a Calcite component
4
4
  * or some `@arcgis/*` component package - such packages should be externalized,
@@ -1,6 +1,6 @@
1
1
  import { default as ts } from 'typescript';
2
- import { ResolvedDependencyComponents } from '../dependencies/discover';
3
- import { CompilerContext } from '../context';
2
+ import { ResolvedDependencyComponents } from '../dependencies/discover.ts';
3
+ import { CompilerContext } from '../context/index.ts';
4
4
  export type JsxContext = {
5
5
  readonly compiler: CompilerContext;
6
6
  /** Source file before the _JSX to lit-html_ transformation */
@@ -1,5 +1,5 @@
1
- import { CompilerContext } from '../context';
2
- export declare function addGlobalCss(context: CompilerContext): string;
1
+ import { CompilerContext } from '../context/index.ts';
2
+ export declare function addGlobalCss(context: Pick<CompilerContext, "_globalHydratedCssString" | "apiJsonComponents" | "dir" | "isInStorybook" | "options" | "shouldMinify" | "viteCommand">): string;
3
3
  export declare const defaultHydratedAttribute = "hydrated";
4
4
  /**
5
5
  * Auto-inject the CSS when in dev server or when building for CDN to remove the
@@ -8,7 +8,7 @@ export declare const defaultHydratedAttribute = "hydrated";
8
8
  *
9
9
  * @see https://discord.com/channels/1012791295170859069/1274527043614150708
10
10
  */
11
- export declare function getGlobalCssInjectionCode(globalCssString: string | undefined, context: CompilerContext): string;
11
+ export declare function getGlobalCssInjectionCode(globalCssString: string | undefined, context: Pick<CompilerContext, "_globalHydratedCssString" | "shouldMinify">): string;
12
12
  /**a
13
13
  * Get a CSS string that can be printed into a .css file
14
14
  *
@@ -1,5 +1,5 @@
1
1
  import { Plugin as VitePlugin } from 'vite';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  /**
4
4
  * Generate virtual files:
5
5
  * - loader.ts (for lazy loading components)
@@ -1,4 +1,4 @@
1
- import { CompilerContext } from '../context';
1
+ import { CompilerContext } from '../context/index.ts';
2
2
  import { HmrComponentMeta } from '@arcgis/lumina/hmrSupport';
3
3
  import { ApiCustomElementDeclaration } from '@arcgis/api-extractor';
4
4
  /**
@@ -8,8 +8,8 @@ import { ApiCustomElementDeclaration } from '@arcgis/api-extractor';
8
8
  * generate a small metadata structure for each component. This will be
9
9
  * inserted into the root index.ts file in the package
10
10
  */
11
- export declare function buildLoaderJs(context: CompilerContext): string;
12
- export declare const loaderDts = "import \"./index\";\nexport declare const defineCustomElements: import(\"@arcgis/lumina\").DefineCustomElements;";
11
+ export declare function buildLoaderJs(context: Pick<CompilerContext, "_globalHydratedCssString" | "apiJson" | "apiJsonComponents" | "dir" | "hmrEnabled" | "isInStorybook" | "options" | "privateApiJson" | "shouldMinify" | "viteCommand">): string;
12
+ export declare const loaderDts = "import \"./index.js\";\nexport declare const defineCustomElements: import(\"@arcgis/lumina\").DefineCustomElements;";
13
13
  /**
14
14
  * For each component, build as compact definition as possible of all the public
15
15
  * properties, attributes, asynchronous methods and synchronous methods.
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
- import { CompilerContext } from '../context';
3
- import { CdnChunk } from '../publicTypes';
2
+ import { CompilerContext } from '../context/index.ts';
3
+ import { CdnChunk } from '../publicTypes.ts';
4
4
  /**
5
5
  * Restricted due to collisions with Lumina's dist/ folder names or
6
6
  * Stencil's dist/ folder names
@@ -1,3 +1,3 @@
1
- import { CompilerContext } from '../context';
1
+ import { CompilerContext } from '../context/index.ts';
2
2
  /** @deprecated */
3
3
  export declare function buildWebApp(context: CompilerContext, rawDestination: string, cdnEntryName: string): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  import { Plugin } from 'vite';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  export declare function buildWrappers(context: CompilerContext): Plugin;
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from 'vite';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  import { InlineConfig } from 'vitest/node';
4
- import { PuppeteerTestingOptions } from '../publicTypes';
4
+ import { PuppeteerTestingOptions } from '../publicTypes.ts';
5
5
  export type PuppeteerVitestConfigOptions = InlineConfig & {
6
6
  puppeteerLaunchOptions?: PuppeteerTestingOptions["launchOptions"];
7
7
  puppeteerWaitForChangesDelay?: number;
@@ -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
  * By default, Rollup will bundle-in all dependencies.
5
5
  *
@@ -1,3 +1,3 @@
1
1
  import { Plugin } from 'vite';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  export declare const handleDynamicAssets: (context: CompilerContext) => Plugin;
@@ -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
  * This is similar to Stencil's assets hosting, but to improve DX, the assets
5
5
  * belonging to each component are moved into a folder named after the component
@@ -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
  * CSS extension list taken from https://github.com/vitejs/vite/blob/a8c7083a3d7d7fe2e83e994ff008f39ee4f298f8/packages/vite/src/node/constants.ts#L50
5
5
  */
@@ -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
  * Augmenting vite's default reporter to not just report bundle sizes, but to
5
5
  * also print the total size
@@ -1,6 +1,6 @@
1
- import { CompilerContext } from '../context';
2
- import { AssetSpec, AssetTransformer } from '../publicTypes';
3
- import { ContextDirectories } from '../context/types';
1
+ import { CompilerContext } from '../context/index.ts';
2
+ import { AssetSpec, AssetTransformer } from '../publicTypes.ts';
3
+ import { ContextDirectories } from '../context/types.ts';
4
4
  export declare function serveAssets(context: CompilerContext, assets: AssetSpec[], transformers?: AssetTransformer[]): void;
5
5
  export declare function writeAssets(context: CompilerContext, assets: AssetSpec[], transformers?: AssetTransformer[]): Promise<void>;
6
6
  /**
@@ -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
  * Plugin to set the base URL for assets in the package
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { MiniPackageJson } from '@arcgis/components-build-utils';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  import { Plugin } from 'vite';
4
4
  export declare const updatePackageJson: (context: CompilerContext) => Plugin;
5
5
  declare function doPackageJsonUpdate(packageJson: MiniPackageJson, context: Pick<CompilerContext, "_documentationFileNames" | "dir" | "options">): MiniPackageJson | undefined;
@@ -1,13 +1,13 @@
1
1
  import { default as ts } from 'typescript';
2
2
  import { Plugin } from 'vite';
3
3
  import { build as esbuildBuild } from 'esbuild';
4
- import { CompilerContext } from './context';
4
+ import { CompilerContext } from './context/index.ts';
5
5
  import { PluginOptions as VitePluginDtsOptions } from 'vite-plugin-dts';
6
- import { WebTypesOptions } from './docs/webTypes/types';
7
- import { VsCodeDocOptions } from './docs/vsCodeCustomData/types';
6
+ import { WebTypesOptions } from './docs/webTypes/types.ts';
7
+ import { VsCodeDocOptions } from './docs/vsCodeCustomData/types.ts';
8
8
  import { DependencyManagementOptions as BaseDependencyManagementOptions } from '@arcgis/components-build-utils';
9
9
  import { ApiJson, ApiModule, CopyDocDefinitions } from '@arcgis/api-extractor';
10
- import { LuminaApiExtractor } from './extractor/extractor';
10
+ import { LuminaApiExtractor } from './extractor/LuminaApiExtractor.ts';
11
11
  /**
12
12
  * `useLumina()` returns an array of Vite plugins. The array additionally
13
13
  * has a `context` property for accessing the compiler context.
@@ -39,7 +39,7 @@ export type LuminaOptions = {
39
39
  *
40
40
  * @deprecated
41
41
  * For new projects, use Vitest browser mode instead of Puppeteer.
42
- * See documentation: https://qawebgis.esri.com/components/lumina/testing
42
+ * See documentation: https://webgis.esri.com/references/lumina/testing
43
43
  */
44
44
  readonly puppeteerTesting?: PuppeteerTestingOptions;
45
45
  /**
@@ -190,7 +190,7 @@ export type WrappersOptions = React18WrapperOptions;
190
190
  /**
191
191
  * Options for creating React 18 wrapper.
192
192
  *
193
- * Documentation: https://qawebgis.esri.com/components/lumina/build#build-wrappers
193
+ * Documentation: https://webgis.esri.com/references/lumina/build#build-wrappers
194
194
  */
195
195
  export type React18WrapperOptions = {
196
196
  readonly type: "react18";
@@ -262,14 +262,14 @@ export type DetailedExtraDependency = {
262
262
  /**
263
263
  * @deprecated
264
264
  * For new projects, use Vitest browser mode instead of Puppeteer.
265
- * See documentation: https://qawebgis.esri.com/components/lumina/testing
265
+ * See documentation: https://webgis.esri.com/references/lumina/testing
266
266
  */
267
267
  export type PuppeteerTestingOptions = {
268
268
  /**
269
269
  * @default false
270
270
  * @deprecated
271
271
  * For new projects, use Vitest browser mode instead of Puppeteer.
272
- * See documentation: https://qawebgis.esri.com/components/lumina/testing
272
+ * See documentation: https://webgis.esri.com/references/lumina/testing
273
273
  */
274
274
  readonly enabled?: boolean;
275
275
  /**
@@ -318,7 +318,7 @@ export type GenerateDocumentationOptions = {
318
318
  * Set this to "https://developers.arcgis.com/javascript/latest/storybook/map-components/".
319
319
  * This will produce URLs like
320
320
  * "https://developers.arcgis.com/javascript/latest/storybook/map-components/?path=/story/arcgis-area-measurement-2d--demo&singleStory=true"
321
- * @see https://qawebgis.esri.com/components/lumina/storybook
321
+ * @see https://webgis.esri.com/references/support-packages/storybook
322
322
  */
323
323
  readonly publicStoryUrlPrefix?: string;
324
324
  /**
@@ -486,6 +486,10 @@ export type CssHandlingOptions = {
486
486
  * do not need a separate `<link>` tag. In the NPM build, users will need to
487
487
  * manually apply these styles as appropriate in their bundler (either via
488
488
  * import statement, or via `<link>` tag or etc).
489
+ *
490
+ * @example
491
+ * // If relative path is provided, it is relative to the root directory.
492
+ * "./src/styles/global.css"
489
493
  */
490
494
  globalStylesPath?: string;
491
495
  /**
@@ -687,7 +691,7 @@ export type LintingOptions = {
687
691
  * technical limitations. Instead, this rule exists to enforce them at
688
692
  * build-time.
689
693
  *
690
- * [Documentation](https://qawebgis.esri.com/components/lumina/properties#string-properties)
694
+ * [Documentation](https://webgis.esri.com/references/lumina/properties#string-properties)
691
695
  */
692
696
  mustIncludeAllRequiredProperties?: string[];
693
697
  };
@@ -1,4 +1,4 @@
1
- import { GlobalSetupContext } from 'vitest/dist/node.js';
1
+ import { TestProject } from 'vitest/node';
2
2
  import { ConnectOptions } from 'puppeteer';
3
3
  declare module "vitest" {
4
4
  interface ProvidedContext {
@@ -60,7 +60,7 @@ declare module "vitest" {
60
60
  * to provide Puppeteer integration only temporary to ease the Stencil
61
61
  * migration, so optimizing it too much is not a goal.
62
62
  */
63
- export declare function setup(context: GlobalSetupContext): Promise<() => Promise<void>>;
63
+ export declare function setup(context: TestProject): Promise<() => Promise<void>>;
64
64
  export type PuppeteerViteGlobals = {
65
65
  /**
66
66
  * Helps lumina-compiler dev server know that is it running for Puppeteer
@@ -1,10 +1,10 @@
1
- import { PuppeteerMatchers } from './vitest/matchers';
2
- export type * from './puppeteer/types';
3
- export type { NewE2EPageOptions } from './puppeteer/page';
4
- export { newE2EPage } from './puppeteer/page';
5
- export type { E2EElement } from './puppeteer/element';
6
- export type { EventSpy } from './puppeteer/events';
7
- export { setupPuppeteerTest } from './vitest/setupFile';
1
+ import { PuppeteerMatchers } from './vitest/matchers/index.ts';
2
+ export type * from './puppeteer/types.ts';
3
+ export type { NewE2EPageOptions } from './puppeteer/page.ts';
4
+ export { newE2EPage } from './puppeteer/page.ts';
5
+ export type { E2EElement } from './puppeteer/element.ts';
6
+ export type { EventSpy } from './puppeteer/events.ts';
7
+ export { setupPuppeteerTest } from './vitest/setupFile.ts';
8
8
  declare module "vitest" {
9
9
  interface Assertion<T = any> extends PuppeteerMatchers<T> {
10
10
  }
@@ -1,5 +1,5 @@
1
- import { expect as p, afterEach as V } from "vitest";
2
- import { toSystemPathSeparators as L, isPosix as S } from "@arcgis/components-build-utils";
1
+ import { expect as p, afterEach as S } from "vitest";
2
+ import { toSystemPathSeparators as V, isPosix as L } from "@arcgis/components-build-utils";
3
3
  import { p as T, i as h } from "../types-C3YmWTVv.js";
4
4
  import { l as y } from "../logger-hJvg0JOj.js";
5
5
  async function D(s) {
@@ -35,7 +35,7 @@ async function $(s, e, t) {
35
35
  }
36
36
  class C {
37
37
  constructor(e) {
38
- this.eventName = e, this.events = [], this._cursor = 0, this._queuedHandler = [];
38
+ this.events = [], this._cursor = 0, this._queuedHandler = [], this.eventName = e;
39
39
  }
40
40
  get length() {
41
41
  return this.events.length;
@@ -135,7 +135,7 @@ const M = globalThis.HTMLElement ?? function() {
135
135
  };
136
136
  class d extends M {
137
137
  constructor(e = d._page, t = d._handle) {
138
- super(), this._page = e, this.handle = t, this._queuedActions = [], this._temporaryDisableValidation = !1, e._e2eElements.push(this);
138
+ super(), this._queuedActions = [], this._temporaryDisableValidation = !1, this._page = e, this.handle = t, e._e2eElements.push(this);
139
139
  const n = this.classList.add, a = this.classList.remove, i = this.classList.toggle;
140
140
  this.classList.add = (...r) => {
141
141
  this._temporaryDisableValidation = !0;
@@ -810,8 +810,8 @@ async function k(s, e) {
810
810
  }), a.on("pageerror", (o) => {
811
811
  if (t.push({
812
812
  type: "pageerror",
813
- message: o.message,
814
- location: o.stack
813
+ message: String(o),
814
+ location: typeof o == "object" && o !== null && "stack" in o ? String(o.stack) : ""
815
815
  }), a._isWaitingForAllReady) {
816
816
  a._unhandledError = o;
817
817
  return;
@@ -975,12 +975,12 @@ function K(s) {
975
975
  if (s?.url) {
976
976
  const t = s.url.indexOf(_);
977
977
  e = ` ${decodeURIComponent(
978
- t === -1 ? s.url : L(s.url.slice(t + _.length))
978
+ t === -1 ? s.url : V(s.url.slice(t + _.length))
979
979
  )}`, s.lineNumber && (e += `:${s.lineNumber}`), s.columnNumber && (e += `:${s.columnNumber}`);
980
980
  }
981
981
  return e;
982
982
  }
983
- const _ = S ? "/@fs" : "/@fs/";
983
+ const _ = L ? "/@fs" : "/@fs/";
984
984
  function f(s, e) {
985
985
  if (typeof s != "object" || s === null)
986
986
  throw new Error(`${e} expect called with non-element value`);
@@ -1022,14 +1022,14 @@ const Q = (s, e, t) => {
1022
1022
  message: () => `expected to ${t ? "not " : ""}have css class "${e}"`,
1023
1023
  pass: t
1024
1024
  };
1025
- }, F = (s, e) => {
1025
+ }, F = ((s, e) => {
1026
1026
  f(s, "toHaveClasses");
1027
1027
  const t = e.every((n) => s.classList.contains(n));
1028
1028
  return {
1029
1029
  message: () => `expected to ${t ? "not " : ""}have css classes "${e.join(" ")}", but className is "${s.className}"`,
1030
1030
  pass: t
1031
1031
  };
1032
- }, te = (s, e) => {
1032
+ }), te = (s, e) => {
1033
1033
  f(s, "toMatchClasses");
1034
1034
  let { pass: t } = F(s, e);
1035
1035
  return t && (t = e.length === s.classList.length), {
@@ -1122,7 +1122,7 @@ const ne = (s, e) => {
1122
1122
  toHaveNthReceivedEventDetail: oe
1123
1123
  };
1124
1124
  function pe() {
1125
- p.extend(ce), V(() => {
1125
+ p.extend(ce), S(() => {
1126
1126
  document.body.childNodes.forEach(R);
1127
1127
  });
1128
1128
  }
@@ -1,6 +1,6 @@
1
1
  import { ClickOptions, ElementHandle, KeyInput } from 'puppeteer';
2
- import { EventSpy } from './events';
3
- import { E2EPage, FindSelector, SerializedEvent } from './types';
2
+ import { EventSpy } from './events.ts';
3
+ import { E2EPage, FindSelector, SerializedEvent } from './types.ts';
4
4
  /**
5
5
  * This file is part of the puppeteerTesting bundle. That bundle may be
6
6
  * imported even before happy-dom is setup.
@@ -10,8 +10,6 @@ declare const Superclass: {
10
10
  prototype: HTMLElement;
11
11
  };
12
12
  export declare class E2EElement extends Superclass {
13
- private _page;
14
- handle: ElementHandle;
15
13
  /**
16
14
  * The '2500' value that we default to is the value of `jasmine.DEFAULT_TIMEOUT_INTERVAL` (5000) divided by 2.
17
15
  */
@@ -26,6 +24,8 @@ export declare class E2EElement extends Superclass {
26
24
  static create(page: E2EPage, handle: ElementHandle): E2EElement;
27
25
  private _queuedActions;
28
26
  private _temporaryDisableValidation;
27
+ private _page;
28
+ handle: ElementHandle;
29
29
  constructor(_page?: E2EPage, handle?: ElementHandle);
30
30
  /**
31
31
  * Find a child element that matches the selector, which is the same as
@@ -1,13 +1,13 @@
1
1
  import { ElementHandle, JSHandle } from 'puppeteer';
2
- import { E2EPage, SerializedEvent } from './types';
2
+ import { E2EPage, SerializedEvent } from './types.ts';
3
3
  export declare function initPageEvents(page: E2EPage): Promise<void>;
4
4
  export declare function pageSpyOnEvent(page: E2EPage, eventName: string, selector?: "document" | "window"): Promise<EventSpy>;
5
5
  export declare function waitForEvent<Detail = unknown>(page: E2EPage, eventName: string, elementHandle: ElementHandle): Promise<SerializedEvent<Detail>>;
6
6
  export declare class EventSpy<Detail = unknown> {
7
- eventName: string;
8
7
  events: SerializedEvent<Detail>[];
9
8
  private _cursor;
10
9
  private _queuedHandler;
10
+ eventName: string;
11
11
  constructor(eventName: string);
12
12
  get length(): number;
13
13
  get firstEvent(): SerializedEvent<Detail> | undefined;
@@ -1,4 +1,4 @@
1
- import { E2EPage } from './types';
1
+ import { E2EPage } from './types.ts';
2
2
  export type NewE2EPageOptions = {
3
3
  html?: string;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { HTTPResponse, Page, WaitForOptions } from 'puppeteer';
2
- import { EventSpy } from './events';
3
- import { E2EElement } from './element';
2
+ import { EventSpy } from './events.ts';
3
+ import { E2EElement } from './element.ts';
4
4
  export interface PageDiagnostic {
5
5
  type: "error" | "pageerror" | "requestfailed";
6
6
  message?: string;
@@ -105,7 +105,7 @@ export interface E2EPage extends Page {
105
105
  /** @private */
106
106
  _isWaitingForAllReady: boolean;
107
107
  /** @private */
108
- _unhandledError: Error | undefined;
108
+ _unhandledError: unknown;
109
109
  }
110
110
  export interface SerializedEvent<Detail = unknown> {
111
111
  bubbles: boolean;
@@ -1,4 +1,4 @@
1
- import { default as PuppeteerTestRunner } from './runner';
1
+ import { default as PuppeteerTestRunner } from './runner.ts';
2
2
  export type PuppeteerGlobalThis = typeof globalThis & {
3
3
  runner: PuppeteerTestRunner;
4
4
  };
@@ -5,7 +5,7 @@
5
5
  * Thus, make sure to not import anything from the rest of the lumina-compiler
6
6
  * in this bundle.
7
7
  */
8
- export type { RenderOptions, RenderResult } from './mount';
9
- export { mount } from './mount';
10
- export { setupLuminaTest } from './setupFile';
11
- export { wrapController } from './wrapController';
8
+ export type { RenderOptions, RenderResult } from './mount.ts';
9
+ export { mount } from './mount.ts';
10
+ export { setupLuminaTest } from './setupFile.ts';
11
+ export { wrapController } from './wrapController.ts';