@arcgis/lumina-compiler 5.0.0-next.1 → 5.0.0-next.100

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 (94) hide show
  1. package/dist/context/index.d.ts +19 -17
  2. package/dist/context/typeScript.d.ts +1 -1
  3. package/dist/defaultAssetsUrl.d.ts +1 -7
  4. package/dist/dependencies/arcgisCore.d.ts +1 -1
  5. package/dist/dependencies/discover.d.ts +3 -3
  6. package/dist/dependencies/index.d.ts +1 -1
  7. package/dist/dependencies/loaders.d.ts +3 -3
  8. package/dist/dependencies/lumina.d.ts +2 -2
  9. package/dist/dependencies/stencil.d.ts +12 -2
  10. package/dist/dependencies/testSetupFiles.d.ts +1 -1
  11. package/dist/dependencies/updateLumina.d.ts +5 -4
  12. package/dist/docs/config.d.ts +1 -1
  13. package/dist/docs/index.d.ts +1 -1
  14. package/dist/docs/stencilDocsJson.d.ts +1 -1
  15. package/dist/docs/vsCodeCustomData/index.d.ts +1 -1
  16. package/dist/docs/vsCodeCustomData/utils.d.ts +1 -1
  17. package/dist/docs/webTypes/index.d.ts +1 -1
  18. package/dist/docs/webTypes/utils.d.ts +1 -1
  19. package/dist/entrypoints/addNonLazyImports.d.ts +1 -1
  20. package/dist/entrypoints/config.d.ts +0 -1
  21. package/dist/entrypoints/dtsUtils.d.ts +2 -2
  22. package/dist/entrypoints/findUtils.d.ts +5 -10
  23. package/dist/entrypoints/handleComponentImports.d.ts +1 -1
  24. package/dist/entrypoints/pathMapping.d.ts +1 -1
  25. package/dist/entrypoints/resolveTagName.d.ts +3 -3
  26. package/dist/extractor/LuminaApiExtractor.d.ts +63 -0
  27. package/dist/extractor/apiJsonUtils.d.ts +2 -1
  28. package/dist/extractor/declaration.d.ts +3 -3
  29. package/dist/extractor/helpers/event.d.ts +1 -2
  30. package/dist/extractor/helpers/method.d.ts +1 -8
  31. package/dist/extractor/helpers/property.d.ts +2 -7
  32. package/dist/extractor/helpers/resolveType.d.ts +1 -1
  33. package/dist/extractor/index.d.ts +5 -3
  34. package/dist/frameworkTypes/index.d.ts +1 -1
  35. package/dist/frameworkTypes/utils.d.ts +1 -1
  36. package/dist/index.d.ts +11 -11
  37. package/dist/index.js +1728 -1700
  38. package/dist/jsxToLitHtml/autoAddNothing.d.ts +2 -2
  39. package/dist/jsxToLitHtml/comments.d.ts +2 -2
  40. package/dist/jsxToLitHtml/convertProps.d.ts +4 -4
  41. package/dist/jsxToLitHtml/imports.d.ts +4 -9
  42. package/dist/jsxToLitHtml/importsConfig.d.ts +8 -1
  43. package/dist/jsxToLitHtml/index.d.ts +1 -1
  44. package/dist/jsxToLitHtml/inferPropType.d.ts +1 -1
  45. package/dist/jsxToLitHtml/insertRepeatCall.d.ts +1 -1
  46. package/dist/jsxToLitHtml/jsxVisitor.d.ts +2 -2
  47. package/dist/jsxToLitHtml/templateParts.d.ts +1 -1
  48. package/dist/jsxToLitHtml/throwOnImportingExternalized.d.ts +1 -1
  49. package/dist/jsxToLitHtml/types.d.ts +2 -2
  50. package/dist/loader/css.d.ts +3 -3
  51. package/dist/loader/index.d.ts +1 -1
  52. package/dist/loader/lazy.d.ts +3 -3
  53. package/dist/plugins/buildCdn.d.ts +2 -2
  54. package/dist/plugins/buildWebApp.d.ts +1 -1
  55. package/dist/plugins/buildWrappers.d.ts +1 -1
  56. package/dist/plugins/configureVite.d.ts +2 -2
  57. package/dist/plugins/externalizeDependencies.d.ts +1 -1
  58. package/dist/plugins/handleDynamicAssets.d.ts +1 -1
  59. package/dist/plugins/handleStaticAssets.d.ts +1 -1
  60. package/dist/plugins/loadLitCss.d.ts +1 -1
  61. package/dist/plugins/printTotalBuildSize.d.ts +1 -1
  62. package/dist/plugins/provideAssets.d.ts +3 -3
  63. package/dist/plugins/setAssetsPath.d.ts +1 -1
  64. package/dist/plugins/updatePackageJson.d.ts +1 -1
  65. package/dist/publicTypes.d.ts +14 -10
  66. package/dist/puppeteerTesting/globalSetup.d.ts +2 -2
  67. package/dist/puppeteerTesting/index.d.ts +7 -7
  68. package/dist/puppeteerTesting/index.js +11 -11
  69. package/dist/puppeteerTesting/puppeteer/element.d.ts +4 -4
  70. package/dist/puppeteerTesting/puppeteer/events.d.ts +2 -2
  71. package/dist/puppeteerTesting/puppeteer/page.d.ts +1 -1
  72. package/dist/puppeteerTesting/puppeteer/types.d.ts +3 -3
  73. package/dist/puppeteerTesting/vitest/types.d.ts +1 -1
  74. package/dist/testing/index.d.ts +4 -4
  75. package/dist/testing/index.js +77 -74
  76. package/dist/testing/mount.d.ts +1 -1
  77. package/dist/tests/utils.d.ts +2 -2
  78. package/dist/transformers/index.d.ts +1 -1
  79. package/dist/transformers/injectRuntimeOptions.d.ts +1 -1
  80. package/dist/transformers/members.d.ts +1 -1
  81. package/dist/transformers/property.d.ts +2 -2
  82. package/dist/transformers/propertyOptions.d.ts +2 -2
  83. package/dist/transformers/utils.d.ts +2 -2
  84. package/dist/types/astTransformers.d.ts +1 -1
  85. package/dist/types/hideInternalLitElement.d.ts +1 -1
  86. package/dist/types/index.d.ts +1 -1
  87. package/dist/types/liftSetterTypes.d.ts +1 -1
  88. package/dist/types/textTransformers.d.ts +1 -1
  89. package/dist/types/transformComponentMembers.d.ts +1 -1
  90. package/dist/useLumina.d.ts +1 -1
  91. package/package.json +9 -9
  92. package/dist/extractor/extractor.d.ts +0 -54
  93. package/dist/testing/vitestTypes.d.ts +0 -8
  94. package/dist/transformers/internalTypeScriptApis.d.ts +0 -31
@@ -1,109 +1,112 @@
1
1
  import { render as C } from "lit";
2
- import { unsafeStatic as m, html as w } from "lit/static-html.js";
3
- import { devOnly$getLitElementTagNameAndRuntime as x, LitElement as O } from "@arcgis/lumina";
2
+ import { unsafeStatic as m, html as b } from "lit/static-html.js";
3
+ import { devOnly$getLitElementTagNameAndRuntime as O, LitElement as x } from "@arcgis/lumina";
4
4
  import { camelToKebab as S } from "@arcgis/toolkit/string";
5
- import { onTestFinished as _, beforeEach as R, afterEach as D, expect as M } from "vitest";
6
- import b from "chalk";
7
- import j from "js-beautify";
5
+ import { onTestFinished as _, beforeEach as R, afterEach as j, expect as D } from "vitest";
6
+ import v from "chalk";
7
+ import M from "js-beautify";
8
8
  import { toFunction as z } from "@arcgis/lumina/controllers";
9
- async function X(e, { parent: t = document.body, afterConnect: o, dynamicComponents: f, cleanupAfterTest: r = !0 } = {}) {
10
- const n = document.createElement("div");
11
- n.style.display = "contents", t.append(n), r && _(() => F(n)), v(e);
12
- const l = f?.some(v);
13
- let i;
9
+ import { rethrowError as A } from "@arcgis/toolkit/log";
10
+ async function Z(e, { parent: t = document.body, afterConnect: n, dynamicComponents: f, cleanupAfterTest: r = !0 } = {}) {
11
+ const i = document.createElement("div");
12
+ i.style.display = "contents", t.append(i), r && _(() => P(i)), g(e);
13
+ const s = f?.some(g);
14
+ let o;
14
15
  if (typeof e == "string")
15
- i = w`<${m(e)}></${m(e)}>`;
16
+ o = b`<${m(e)}></${m(e)}>`;
16
17
  else if (typeof e == "function")
17
- if (p(e)) {
18
- const a = x(e).tagName;
19
- i = w`<${m(a)}></${m(a)}>`;
18
+ if (d(e)) {
19
+ const a = O(e).tagName;
20
+ o = b`<${m(a)}></${m(a)}>`;
20
21
  } else
21
- i = e();
22
+ o = e();
22
23
  else {
23
- if (l)
24
+ if (s)
24
25
  throw new Error(
25
26
  'When rendering a dynamically created custom element using Lit\'s html`` function, you must ensure that the custom element class name is unique in the test file, or the class should explicitly have the `static tagName = "some-tag-name";` property with a unique tag name within the test file'
26
27
  );
27
- i = e;
28
+ o = e;
28
29
  }
29
- const s = [];
30
- function c(a) {
31
- s.push(a.error), a.preventDefault(), a.stopPropagation();
30
+ const c = [];
31
+ function u(a) {
32
+ c.push(a.error), a.preventDefault(), a.stopPropagation();
32
33
  }
33
- if (window.addEventListener("error", c), C(i, n), window.removeEventListener("error", c), s.length === 1)
34
- throw s[0];
35
- if (s.length > 1)
36
- throw new AggregateError(s, "Multiple errors occurred while creating the custom element");
37
- const u = L(n), N = g, y = o?.(u);
38
- y?.then !== void 0 && await y;
39
- const d = u;
40
- typeof d?.componentOnReady == "function" && await d.componentOnReady();
41
- const h = d?.$component ?? N ?? u;
34
+ if (window.addEventListener("error", u), C(o, i), window.removeEventListener("error", u), c.length === 1)
35
+ throw c[0];
36
+ if (c.length > 1)
37
+ throw new AggregateError(c, "Multiple errors occurred while creating the custom element");
38
+ const l = L(i), N = y, w = n?.(l);
39
+ w?.then !== void 0 && await w;
40
+ const h = l;
41
+ typeof h?.componentOnReady == "function" && await h.componentOnReady();
42
+ const p = h?.$component ?? N ?? l;
42
43
  return {
43
- el: u,
44
- component: h,
44
+ el: l,
45
+ component: p,
45
46
  async reRender() {
46
- return typeof e == "function" && !p(e) && C(e(), t), h.requestUpdate(), await h.updateComplete;
47
+ return typeof e == "function" && !d(e) && C(e(), t), p.requestUpdate(), await p.updateComplete;
47
48
  },
48
- container: n
49
+ container: i
49
50
  };
50
51
  }
51
- let g;
52
- const A = globalThis;
53
- A.devOnly$luminaComponentRefCallback = (e) => {
54
- g = e;
52
+ let y;
53
+ const F = globalThis;
54
+ F.devOnly$luminaComponentRefCallback = (e) => {
55
+ y = e;
55
56
  };
56
- function F(e) {
57
+ function P(e) {
57
58
  for (; e.firstChild; )
58
59
  e.removeChild(e.firstChild);
59
60
  e instanceof HTMLElement && e.remove();
60
61
  }
61
- function v(e) {
62
- if (!p(e))
62
+ function g(e) {
63
+ if (!d(e))
63
64
  return !1;
64
- const { runtime: t, tagName: o = e.tagName } = x(e);
65
+ const { runtime: t, tagName: n = e.tagName } = O(e);
65
66
  if (t !== void 0)
66
67
  return !1;
67
- let r = !1, n = o;
68
- if (n === void 0) {
69
- const l = S(
68
+ const r = Object.getPrototypeOf(e);
69
+ r !== x && d(r) && g(r);
70
+ let i = !1, s = n;
71
+ if (s === void 0) {
72
+ const o = S(
70
73
  /*
71
74
  * If name is a single letter, it was probably minified - thus is not
72
75
  * stable, thus don't use it. Example: class produced by wrapController()
73
76
  */
74
77
  (e.name.length > 1 ? e.name.replaceAll(q, "") : "") || "Test"
75
- ), i = l === "test" ? "te-st" : l.includes("-") ? l : `${l}-`;
76
- n = i;
77
- for (let s = 2, c = customElements.get(n); c !== e && c !== void 0; s += 1)
78
- r = !0, n = `${i}-${s}`, c = customElements.get(n);
78
+ ), c = o === "test" ? "te-st" : o.includes("-") ? o : `${o}-`;
79
+ s = c;
80
+ for (let u = 2, l = customElements.get(s); l !== e && l !== void 0; u += 1)
81
+ i = !0, s = `${c}-${u}`, l = customElements.get(s);
79
82
  }
80
- return globalThis.devOnly$luminaRuntime?.customElement(n, e), Object.defineProperty(e.prototype, "tagName", { value: n.toUpperCase() }), r;
83
+ return globalThis.devOnly$luminaRuntime?.customElement(s, e), Object.defineProperty(e.prototype, "tagName", { value: s.toUpperCase() }), i;
81
84
  }
82
- const p = (e) => typeof e == "function" && "lumina" in e, q = /\d+$/gu;
85
+ const d = (e) => typeof e == "function" && "lumina" in e, q = /\d+$/gu;
83
86
  function L(e) {
84
87
  for (const t of e.children)
85
88
  if ("lumina" in t.constructor)
86
89
  return t;
87
90
  for (const t of e.children) {
88
- const o = L(t);
89
- if (o != null)
90
- return o;
91
+ const n = L(t);
92
+ if (n != null)
93
+ return n;
91
94
  }
92
- return e.firstElementChild ?? g?.el;
95
+ return e.firstElementChild ?? y?.el;
93
96
  }
94
97
  function H() {
95
98
  const e = $("warn"), t = $("error");
96
99
  R(() => {
97
100
  e.beforeEach(), t.beforeEach();
98
- }), D(() => {
101
+ }), j(() => {
99
102
  e.afterEach(), t.afterEach();
100
103
  });
101
104
  }
102
105
  function $(e) {
103
106
  let t = !1;
104
- const o = console[e];
107
+ const n = console[e];
105
108
  function f(...r) {
106
- o(...r), t = !0;
109
+ n(...r), t = !0;
107
110
  }
108
111
  return {
109
112
  beforeEach() {
@@ -111,23 +114,23 @@ function $(e) {
111
114
  },
112
115
  afterEach() {
113
116
  if (t)
114
- throw new Error(`[@arcgis/lumina:failOnConsole] Expected test not to call ${b.bold(`console.${e}()`)}.
117
+ throw new Error(`[@arcgis/lumina:failOnConsole] Expected test not to call ${v.bold(`console.${e}()`)}.
115
118
  If the ${e} is expected, test for it explicitly by mocking it out using:
116
- ${b.bold(`vi.spyOn(console, '${e}').mockImplementation(() => {}) `)}
119
+ ${v.bold(`vi.spyOn(console, '${e}').mockImplementation(() => {}) `)}
117
120
  and test that the ${e} occurs.`);
118
- console[e] = o;
121
+ console[e] = n;
119
122
  }
120
123
  };
121
124
  }
122
- function P() {
123
- M.addSnapshotSerializer({
125
+ function U() {
126
+ D.addSnapshotSerializer({
124
127
  // Using duck typing to detect ShadowRoot. Not using instanceof to keep test fast
125
128
  test(e) {
126
129
  return typeof e == "object" && e !== null && "innerHTML" in e && "onslotchange" in e;
127
130
  },
128
131
  serialize(e) {
129
- const t = e.innerHTML.replaceAll(U, "");
130
- return j.html(t, {
132
+ const t = e.innerHTML.replaceAll(I, "");
133
+ return M.html(t, {
131
134
  /* eslint-disable @typescript-eslint/naming-convention */
132
135
  indent_size: 2,
133
136
  indent_char: " ",
@@ -140,17 +143,17 @@ function P() {
140
143
  }
141
144
  });
142
145
  }
143
- const U = /<!--\??(?:lit\$\d+\$)?-->/gu;
144
- function Y() {
145
- T[E] || (T[E] = !0, H(), P());
146
+ const I = /<!--\??(?:lit\$\d+\$)?-->/gu;
147
+ function k() {
148
+ T[E] || (T[E] = !0, H(), U());
146
149
  }
147
150
  const E = Symbol.for("lumina:didSetupTest"), T = globalThis;
148
- function Z(e, t) {
149
- class o extends O {
151
+ function ee(e, t) {
152
+ class n extends x {
150
153
  constructor() {
151
154
  super();
152
155
  const r = "prototype" in e ? z(e) : e;
153
- this.controller = r(this), Promise.resolve(t?.(this)).catch(console.error);
156
+ this.controller = r(this), Promise.resolve(t?.(this)).catch(A(this));
154
157
  }
155
158
  /*
156
159
  * Emitting controller's exports here is useful to let controller tests
@@ -162,10 +165,10 @@ function Z(e, t) {
162
165
  );
163
166
  }
164
167
  }
165
- return o;
168
+ return n;
166
169
  }
167
170
  export {
168
- X as mount,
169
- Y as setupLuminaTest,
170
- Z as wrapController
171
+ Z as mount,
172
+ k as setupLuminaTest,
173
+ ee as wrapController
171
174
  };
@@ -82,7 +82,7 @@ export type RenderOptions<Component extends HTMLElement = HTMLElement> = {
82
82
  * Render Lit Element in a test environment.
83
83
  *
84
84
  * See documentation:
85
- * https://qawebgis.esri.com/components/lumina/testing
85
+ * https://webgis.esri.com/references/lumina/testing
86
86
  *
87
87
  * @example
88
88
  * ```tsx
@@ -1,4 +1,4 @@
1
- import { ContextDirectories } from '../context/types';
2
- import { CompilerContext } from '../context';
1
+ import { ContextDirectories } from '../context/types.ts';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  export declare const testDir: ContextDirectories;
4
4
  export declare const testContext: Pick<CompilerContext, "_documentationFileNames" | "dir" | "options">;
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  import { default as ts } from 'typescript';
4
4
  /**
5
5
  * A pipeline of transformers for .tsx files.
@@ -1,4 +1,4 @@
1
- import { CompilerContext } from '../context';
1
+ import { CompilerContext } from '../context/index.ts';
2
2
  import { Plugin } from 'vite';
3
3
  export declare const injectRuntimeOptions: (context: CompilerContext) => Plugin;
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { default as ts } from 'typescript';
2
- import { FileTransformContext, FileTransformer } from '../publicTypes';
2
+ import { FileTransformContext, FileTransformer } from '../publicTypes.ts';
3
3
  /**
4
4
  * - Remove `@Method()` decorators from the code. `@Method()` decorators are
5
5
  * only needed for the docs extraction.
@@ -1,6 +1,6 @@
1
1
  import { default as ts } from 'typescript';
2
- import { FileTransformContext } from '../publicTypes';
3
- import { LiftedDecorators } from './liftDecorators';
2
+ import { FileTransformContext } from '../publicTypes.ts';
3
+ import { LiftedDecorators } from './liftDecorators.ts';
4
4
  export declare function transformProperty(context: FileTransformContext, property: ts.AccessorDeclaration | ts.PropertyDeclaration, className: string | undefined, sourceFile: ts.SourceFile, liftedDecorators: LiftedDecorators): ts.ClassElement;
5
5
  export type ParsedPropertyDecorator = {
6
6
  decorator: ts.Decorator;
@@ -1,6 +1,6 @@
1
1
  import { default as ts } from 'typescript';
2
- import { FileTransformContext } from '../publicTypes';
3
- import { ParsedPropertyDecorator } from './property';
2
+ import { FileTransformContext } from '../publicTypes.ts';
3
+ import { ParsedPropertyDecorator } from './property.ts';
4
4
  import { ApiCustomElementField } from '@arcgis/api-extractor';
5
5
  /**
6
6
  * In Stencil, the compiler uses type checking to determine if the inferred
@@ -1,6 +1,6 @@
1
1
  import { default as ts } from 'typescript';
2
- import { FileTransformContext, FileTransformer } from '../publicTypes';
3
- import { CompilerContext } from '../context';
2
+ import { FileTransformContext, FileTransformer } from '../publicTypes.ts';
3
+ import { CompilerContext } from '../context/index.ts';
4
4
  /**
5
5
  * Run a chain of transformers on a TypeScript .tsx or .d.ts file and return
6
6
  * the resulting source file
@@ -1,3 +1,3 @@
1
- import { CompilerContext } from '../context';
1
+ import { CompilerContext } from '../context/index.ts';
2
2
  import { PluginOptions } from 'vite-plugin-dts';
3
3
  export declare function runAstDtsTransformers(context: CompilerContext): NonNullable<PluginOptions["resolvers"]>[number];
@@ -1,4 +1,4 @@
1
- import { FileTransformer } from '../publicTypes';
1
+ import { FileTransformer } from '../publicTypes.ts';
2
2
  /**
3
3
  * Modify the .d.ts to make it appear that components extend the
4
4
  * PublicLitElement rather than LitElement
@@ -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
  * Generate TypeScript definition files for the files in the project.
5
5
  * There is a corresponding .d.ts file emitted for each source .ts and .tsx file.
@@ -1,5 +1,5 @@
1
1
  import { PropertyDeclaration, default as ts } from 'typescript';
2
- import { CompilerContext } from '../context';
2
+ import { CompilerContext } from '../context/index.ts';
3
3
  export type LiftedSetter = {
4
4
  name: ts.PropertyName;
5
5
  type: ts.TypeNode;
@@ -1,4 +1,4 @@
1
- import { CompilerContext } from '../context';
1
+ import { CompilerContext } from '../context/index.ts';
2
2
  import { PluginOptions } from 'vite-plugin-dts';
3
3
  export declare const runTextDtsTransformers: (context: CompilerContext) => PluginOptions["beforeWriteFile"];
4
4
  export declare const isTestFile: (id: string) => boolean;
@@ -1,4 +1,4 @@
1
- import { FileTransformer } from '../publicTypes';
1
+ import { FileTransformer } from '../publicTypes.ts';
2
2
  /**
3
3
  * Cleanup public component typings:
4
4
  * - Hide all non-property, non-events, non-methods from public typings
@@ -1,4 +1,4 @@
1
- import { LuminaPlugins, LuminaOptions } from './publicTypes';
1
+ import { LuminaPlugins, LuminaOptions } from './publicTypes.ts';
2
2
  /**
3
3
  * Auto-configure Vite for a Lit web component project.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina-compiler",
3
- "version": "5.0.0-next.1",
3
+ "version": "5.0.0-next.100",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -18,11 +18,11 @@
18
18
  ],
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
- "@arcgis/api-extractor": "5.0.0-next.1",
22
- "@arcgis/components-build-utils": "5.0.0-next.1",
23
- "@arcgis/toolkit": "~5.0.0-next.1",
21
+ "@arcgis/api-extractor": "5.0.0-next.100",
22
+ "@arcgis/components-build-utils": "5.0.0-next.100",
23
+ "@arcgis/toolkit": "~5.0.0-next.100",
24
24
  "chalk": "^5.4.1",
25
- "esbuild": "^0.25.5",
25
+ "esbuild": "^0.25.12",
26
26
  "glob": "^11.0.3",
27
27
  "js-beautify": "^1.15.4",
28
28
  "mime-types": "^3.0.1",
@@ -30,11 +30,11 @@
30
30
  "vite-plugin-dts": "^4.5.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@arcgis/lumina": "~5.0.0-next.1",
33
+ "@arcgis/lumina": "~5.0.0-next.100",
34
34
  "lit": "^3.3.0",
35
- "typescript": "~5.8.3",
36
- "vite": "^7.0.0",
37
- "vitest": "^3.2.4"
35
+ "typescript": "~5.9.3",
36
+ "vite": "^7.2.2",
37
+ "vitest": "^4.0.8"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "vitest": {
@@ -1,54 +0,0 @@
1
- import { default as ts } from 'typescript';
2
- import { ApiExtractor, ApiAttribute, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiCustomElementMember, ApiDeclaration, ApiEvent, ApiExport, ApiJson, ApiModule, ApiReference, CopyDocDefinitions } from '@arcgis/api-extractor';
3
- import { CompilerContext } from '../context';
4
- export declare class LuminaApiExtractor extends ApiExtractor {
5
- context: CompilerContext;
6
- protected isPathOnly: boolean;
7
- constructor(context: CompilerContext, isPathOnly: boolean);
8
- protected localCssImports?: Set<string>;
9
- protected localDeclaredComponents: Map<string, string>;
10
- protected indexedComponents: Map<string, ApiCustomElementDeclaration>;
11
- protected apiComponent: ApiCustomElementDeclaration;
12
- protected pairedSetter: ts.SetAccessorDeclaration | undefined;
13
- protected copyDocDefinitions: CopyDocDefinitions | undefined;
14
- extract(files: readonly ts.SourceFile[]): ApiJson;
15
- protected extractModules(files: readonly ts.SourceFile[]): ApiModule[];
16
- protected extractDeclarations(module: ts.SourceFile): ApiDeclaration[];
17
- protected extractDeclaration(statement: ts.Statement): ApiDeclaration | undefined;
18
- protected collectCssImports(node: ts.ImportDeclaration): void;
19
- protected extractComponentDeclaration(node: ts.ClassDeclaration): ApiCustomElementDeclaration | undefined;
20
- protected extractComponentMembers(node: ts.ClassDeclaration): ApiCustomElementMember[];
21
- protected extractComponentMember(node: ts.ClassElement, name: string | undefined): ApiCustomElementMember | undefined;
22
- protected extractComponentField(node: ts.AccessorDeclaration | ts.PropertyDeclaration, name: string): ApiCustomElementField | undefined;
23
- /**
24
- * Based on a `non-@property()` property, extract a public event if it is one.
25
- */
26
- protected extractComponentEvent(node: ts.PropertyDeclaration, name: string): ApiEvent | undefined;
27
- /**
28
- * When doing full API extraction, extract additional details for a field.
29
- */
30
- protected extractComponentFieldDetails(node: ts.AccessorDeclaration | ts.PropertyDeclaration, property: ApiCustomElementField): void;
31
- static loggedBooleanWarning: boolean;
32
- /**
33
- * Find the properties given to the `@property()` decorator.
34
- */
35
- protected findPropertyOptions(member: ts.AccessorDeclaration | ts.PropertyDeclaration): readonly ts.ObjectLiteralElementLike[] | undefined;
36
- protected extractComponentMethod(node: ts.MethodDeclaration, name: string): ApiClassMethod | undefined;
37
- /**
38
- * Infer attributes based on public component members.
39
- */
40
- protected inferAttributes(members: ApiCustomElementMember[]): ApiAttribute[];
41
- protected inferExport(declaration: ApiDeclaration): ApiExport | undefined;
42
- protected inferCustomElementExport(declaration: ApiCustomElementDeclaration): ApiExport;
43
- /**
44
- * Inherit public members from a superclass. For this to work, the superclass
45
- * needs to be in a a file named like a component
46
- * (src/components/name/name.tsx), even if it is not a standalone component.
47
- */
48
- protected inheritMembers(component: ApiCustomElementDeclaration, modules: ApiModule[], superClass?: ApiReference, existingMembers?: Set<string>, existingAttributes?: Set<string>, existingEvents?: Set<string>): void;
49
- private _resolvedInheritance;
50
- /**
51
- * Based on the superclass name, find the actual declaration in the modules.
52
- */
53
- protected resolveInheritance(superClassName: string, modules: ApiModule[]): ApiCustomElementDeclaration | undefined;
54
- }
@@ -1,8 +0,0 @@
1
- export type VitestBrowserModeProvider = "playwright" | "preview" | "webdriverio" | (string & {}) | undefined;
2
- export type VitestPartialConfig = {
3
- globalSetup?: string[] | string;
4
- runner?: string;
5
- include?: string[];
6
- environment?: "edge-runtime" | "happy-dom" | "jsdom" | "node" | (Record<never, never> & string);
7
- forceRerunTriggers?: string[];
8
- };
@@ -1,31 +0,0 @@
1
- import { default as ts } from 'typescript';
2
- import { TransformResult } from 'vite';
3
- type SourceMap = Extract<NonNullable<TransformResult["map"]>, {
4
- file: string;
5
- }>;
6
- export type UndocumentedTypeScript = {
7
- readonly createSourceMapGenerator?: (host: ts.CompilerHost, basename: string, sourceRoot: string, dirname: string, compilerOptions: ts.CompilerOptions) => SourceMapGenerator;
8
- readonly createTextWriter?: (newLine: string) => EmitTextWriter;
9
- readonly getNewLineCharacter?: (options: ts.CompilerOptions) => string;
10
- readonly createPrinter: (
11
- /**
12
- * Printer has undocumented options for printing source maps:
13
- * https://github.com/microsoft/TypeScript/blob/7319968e90600102892a79142fb804bcbe384160/src/compiler/types.ts#L9689C18-L9707
14
- */
15
- options: ts.CompilerOptions & ts.PrinterOptions) => ReturnType<typeof ts.createPrinter> & UndocumentedPrinter;
16
- };
17
- type SourceMapGenerator = {
18
- readonly toJSON: () => SourceMap;
19
- };
20
- type UndocumentedPrinter = {
21
- readonly writeFile?: (writeFile: ts.SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined) => void;
22
- writeNode?(hint: ts.EmitHint, node: ts.TypeNode, sourceFile: undefined, output: EmitTextWriter): void;
23
- writeNode?(hint: ts.EmitHint, node: Node, sourceFile: ts.SourceFile, output: EmitTextWriter): void;
24
- };
25
- type EmitTextWriter = {
26
- readonly getText: () => string;
27
- readonly clear: () => void;
28
- };
29
- export declare const undocumentedTs: Required<UndocumentedTypeScript>;
30
- export declare function getPrinter(compilerOptions: ts.CompilerOptions): ReturnType<typeof ts.createPrinter> & UndocumentedPrinter;
31
- export {};