@arcgis/lumina-compiler 4.31.0-next.98 → 4.32.0-next.2

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 (56) hide show
  1. package/dist/chunk-6XNX5V4L.js +1 -0
  2. package/dist/context/index.d.ts +10 -1
  3. package/dist/dependencies/discover.d.ts +2 -2
  4. package/dist/dependencies/index.d.ts +2 -1
  5. package/dist/dependencies/loaders.d.ts +2 -1
  6. package/dist/dependencies/updateLumina.d.ts +1 -1
  7. package/dist/dependencies/utils.d.ts +1 -0
  8. package/dist/index.d.ts +3 -2
  9. package/dist/index.js +83 -77
  10. package/dist/jsxToLitHtml/config.d.ts +59 -7
  11. package/dist/jsxToLitHtml/imports.d.ts +1 -0
  12. package/dist/jsxToLitHtml/inferPropType.d.ts +1 -1
  13. package/dist/jsxToLitHtml/insertRepeatCall.d.ts +1 -0
  14. package/dist/jsxToLitHtml/templateParts.d.ts +2 -2
  15. package/dist/jsxToLitHtml/types.d.ts +14 -25
  16. package/dist/jsxToLitHtml/utils.d.ts +0 -1
  17. package/dist/manifests/complexTypes/addComponentMetadata.d.ts +3 -0
  18. package/dist/manifests/complexTypes/transformUtils.d.ts +1 -19
  19. package/dist/manifests/vsCodeCustomData/index.d.ts +16 -0
  20. package/dist/manifests/vsCodeCustomData/types.d.ts +44 -0
  21. package/dist/manifests/vsCodeCustomData/utils.d.ts +3 -0
  22. package/dist/manifests/webTypes/description.d.ts +8 -0
  23. package/dist/manifests/webTypes/index.d.ts +20 -0
  24. package/dist/manifests/webTypes/types.d.ts +79 -0
  25. package/dist/manifests/webTypes/utils.d.ts +6 -0
  26. package/dist/plugins/configureVite.d.ts +1 -0
  27. package/dist/plugins/loadLitCss.d.ts +1 -1
  28. package/dist/publicTypes.d.ts +16 -7
  29. package/dist/{puppeteer-testing → puppeteerTesting}/globalSetup.d.ts +1 -0
  30. package/dist/puppeteerTesting/globalSetup.js +11 -0
  31. package/dist/puppeteerTesting/index.d.ts +14 -0
  32. package/dist/puppeteerTesting/index.js +6 -0
  33. package/dist/{puppeteer-testing → puppeteerTesting}/puppeteer/element.d.ts +6 -6
  34. package/dist/{puppeteer-testing → puppeteerTesting}/puppeteer/events.d.ts +7 -7
  35. package/dist/{puppeteer-testing → puppeteerTesting}/puppeteer/page.d.ts +1 -1
  36. package/dist/{puppeteer-testing → puppeteerTesting}/puppeteer/types.d.ts +29 -5
  37. package/dist/{puppeteer-testing → puppeteerTesting}/vitest/matchers/index.d.ts +2 -9
  38. package/dist/{puppeteer-testing → puppeteerTesting}/vitest/runner.d.ts +6 -5
  39. package/dist/puppeteerTesting/vitest/runner.js +1 -0
  40. package/dist/puppeteerTesting/vitest/types.d.ts +5 -0
  41. package/dist/testing/index.js +1 -1
  42. package/dist/testing/mount.d.ts +2 -2
  43. package/dist/types/liftSetterTypes.d.ts +1 -1
  44. package/dist/utils/packageJson.d.ts +3 -3
  45. package/package.json +22 -23
  46. package/dist/puppeteer-testing/globalSetup.js +0 -11
  47. package/dist/puppeteer-testing/index.d.ts +0 -9
  48. package/dist/puppeteer-testing/index.js +0 -6
  49. /package/dist/{puppeteer-testing → puppeteerTesting}/injected.d.ts +0 -0
  50. /package/dist/{puppeteer-testing → puppeteerTesting}/puppeteer/browser.d.ts +0 -0
  51. /package/dist/{puppeteer-testing → puppeteerTesting}/vitest/matchers/attributes.d.ts +0 -0
  52. /package/dist/{puppeteer-testing → puppeteerTesting}/vitest/matchers/classList.d.ts +0 -0
  53. /package/dist/{puppeteer-testing → puppeteerTesting}/vitest/matchers/events.d.ts +0 -0
  54. /package/dist/{puppeteer-testing → puppeteerTesting}/vitest/matchers/text.d.ts +0 -0
  55. /package/dist/{puppeteer-testing → puppeteerTesting}/vitest/matchers/utils.d.ts +0 -0
  56. /package/dist/{puppeteer-testing → puppeteerTesting}/vitest/setupFile.d.ts +0 -0
@@ -0,0 +1 @@
1
+ import{inject as t}from"vitest";var n=new Proxy({},{get(r,e){return t(e)},set(){throw new Error("Injected object is read-only")}});var s=globalThis;export{n as a,s as b};
@@ -38,9 +38,18 @@ export declare class CompilerContext {
38
38
  private _typeScriptSourceFiles;
39
39
  /**
40
40
  * Whether minification is enabled for transformed JSX (lit-html templates)
41
- * and generated component code
41
+ * and generated component code.
42
42
  */
43
43
  shouldMinify: boolean;
44
+ /**
45
+ * Like this.shouldMinifyStrict, but true when in test mode. Reasons:
46
+ * - If accessing .textContent, the whitespace amount differs between minified
47
+ * and non-minified lit-html templates. In Stencil's JSX this was not the
48
+ * case. To ease migration of tests, we minify lit-html in tests too.
49
+ * - From the above, you can see that minification does change semantics in
50
+ * some cases. To have tests be truer to the real world, we minify in tests.
51
+ */
52
+ shouldMinifyStrict: boolean;
44
53
  /**
45
54
  *
46
55
  * A vite plugin that sets the initial context information based on Vite
@@ -1,6 +1,6 @@
1
1
  import type { Package } from "custom-elements-manifest/schema";
2
- import type { WebTypesJson } from "../jsxToLitHtml/types";
3
2
  import type { ModulePath } from "../manifests/complexTypes/transformUtils";
3
+ import type { WebTypes } from "../manifests/webTypes/types";
4
4
  export type ResolvedDependencyComponents = {
5
5
  readonly packageName: string;
6
6
  readonly type: "@arcgis/lumina" | "stencil" | "unknown";
@@ -55,7 +55,7 @@ export declare function findPackageComponents(packageName: string, cwd?: string)
55
55
  export declare const manifestToDependencyComponents: (manifest: Package, dependency: Omit<ModulePath, "moduleName"> & {
56
56
  readonly getImportPath: (tagName: string) => string;
57
57
  }) => ResolvedDependencyComponents["components"];
58
- export declare const webTypesToDependencyComponents: (webTypes: WebTypesJson, dependency: Omit<ModulePath, "moduleName"> & {
58
+ export declare const webTypesToDependencyComponents: (webTypes: Partial<WebTypes>, dependency: Omit<ModulePath, "moduleName"> & {
59
59
  readonly packageRoot: string | undefined;
60
60
  readonly getImportPath: (tagName: string) => string;
61
61
  }) => ResolvedDependencyComponents["components"];
@@ -1,5 +1,6 @@
1
- import type { Plugin } from "vite";
1
+ import type { IndexHtmlTransformContext, Plugin } from "vite";
2
2
  import type { CompilerContext } from "../context";
3
+ export declare const doLoadersApply: (context: CompilerContext, htmlContext?: IndexHtmlTransformContext) => boolean;
3
4
  /**
4
5
  * In serve mode, augment index.html by adding the necessary script tags for
5
6
  * each web component dependency.
@@ -1,8 +1,9 @@
1
1
  import type { CompilerContext } from "../context";
2
2
  import { type ResolvedDependencyComponents } from "./discover";
3
3
  import type { DependencyInjectionResult } from "./utils";
4
- export declare const serveOnlyDependencies: WeakMap<CompilerContext, Promise<readonly ResolvedDependencyComponents[]>>;
5
4
  export declare function makeLoaders(context: CompilerContext): Promise<DependencyInjectionResult[]>;
6
5
  export declare const silenceLitWarnings: {
6
+ optimizableImports: never[];
7
7
  javascriptCode: string[];
8
8
  };
9
+ export declare function computeServeOnlyDependencies(context: CompilerContext): Promise<readonly ResolvedDependencyComponents[]>;
@@ -1,6 +1,6 @@
1
1
  import type { ResolvedDependencyComponents } from "./discover";
2
2
  import type { BrowserConfigOptions } from "vitest/node";
3
- export declare function updateLuminaTs(dependencies: readonly ResolvedDependencyComponents[], srcDir: string, hasCore: boolean, browserProvider?: BrowserConfigOptions["provider"]): Promise<void>;
3
+ export declare function updateLuminaTs(dependencies: readonly ResolvedDependencyComponents[], srcDir: string, hasCore: boolean, browserProvider?: BrowserConfigOptions["provider"], packageJson?: import("../utils/packageJson").MiniPackageJson): Promise<void>;
4
4
  declare function produceLuminaTs(dependencies: readonly ResolvedDependencyComponents[], hasCore: boolean, browserProvider?: BrowserConfigOptions["provider"], packageJson?: import("../utils/packageJson").MiniPackageJson): string;
5
5
  export declare const exportsForTests: {
6
6
  produceLuminaTs: typeof produceLuminaTs;
@@ -4,6 +4,7 @@ export type DependencyInjectionResult = HtmlTagDescriptor | {
4
4
  cssHref: string;
5
5
  id?: string;
6
6
  } | {
7
+ optimizableImports: string[];
7
8
  javascriptCode: string[];
8
9
  };
9
10
  /**
package/dist/index.d.ts CHANGED
@@ -15,8 +15,9 @@ export declare const exportsForCodemod: {
15
15
  initializeComponentDependencies: typeof initializeComponentDependencies;
16
16
  updateLuminaTs: typeof updateLuminaTs;
17
17
  propertyToAttributeMappings: {
18
- common: import("./jsxToLitHtml/config").ElementPropertyToAttributeMappings;
19
- perElement: Record<string, import("./jsxToLitHtml/config").ElementPropertyToAttributeMappings | undefined>;
18
+ readonly common: import("./jsxToLitHtml/config").ElementPropertyToAttributeMappings;
19
+ readonly perElement: Record<string, import("./jsxToLitHtml/config").ElementPropertyToAttributeMappings | undefined>;
20
+ readonly ambiguousReflectedProperties: ["value", "defaultValue"];
20
21
  };
21
22
  findDeclaredComponents: typeof findDeclaredComponents;
22
23
  nativeEvents: Set<string>;