@arcgis/lumina-compiler 5.2.0-next.4 → 5.2.0-next.40

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 (103) hide show
  1. package/dist/context/index.d.ts +158 -296
  2. package/dist/context/types.d.ts +18 -34
  3. package/dist/defaultAssetsUrl.d.ts +6 -6
  4. package/dist/dependencies/discover.d.ts +43 -35
  5. package/dist/dependencies/updateLumina.d.ts +10 -11
  6. package/dist/docs/vsCodeCustomData/types.d.ts +5 -42
  7. package/dist/docs/webTypes/types.d.ts +5 -76
  8. package/dist/index.d.ts +20 -20
  9. package/dist/index.js +1404 -1412
  10. package/dist/jsxToLitHtml/config.d.ts +93 -121
  11. package/dist/{logger-C9XakOcA.js → logger-edpIalAo.js} +1 -1
  12. package/dist/options.d.ts +675 -0
  13. package/dist/puppeteerTesting/index.d.ts +18 -11
  14. package/dist/puppeteerTesting/index.js +105 -8
  15. package/dist/puppeteerTesting/puppeteer/element.d.ts +250 -217
  16. package/dist/puppeteerTesting/puppeteer/events.d.ts +15 -21
  17. package/dist/puppeteerTesting/puppeteer/page.d.ts +8 -5
  18. package/dist/puppeteerTesting/puppeteer/types.d.ts +130 -132
  19. package/dist/puppeteerTesting/vitest/matchers/index.d.ts +33 -30
  20. package/dist/testing/index.d.ts +4 -11
  21. package/dist/testing/mount.d.ts +113 -93
  22. package/dist/testing/wrapController.d.ts +5 -11
  23. package/dist/useLumina.d.ts +5 -2
  24. package/package.json +20 -9
  25. package/dist/context/logger.d.ts +0 -8
  26. package/dist/context/typeScript.d.ts +0 -6
  27. package/dist/context/utils.d.ts +0 -4
  28. package/dist/dependencies/arcgisCore.d.ts +0 -30
  29. package/dist/dependencies/index.d.ts +0 -12
  30. package/dist/dependencies/loaders.d.ts +0 -5
  31. package/dist/dependencies/lumina.d.ts +0 -3
  32. package/dist/dependencies/stencil.d.ts +0 -17
  33. package/dist/dependencies/testSetupFiles.d.ts +0 -13
  34. package/dist/dependencies/utils.d.ts +0 -15
  35. package/dist/docs/config.d.ts +0 -9
  36. package/dist/docs/index.d.ts +0 -10
  37. package/dist/docs/stencilDocsJson.d.ts +0 -130
  38. package/dist/docs/types.d.ts +0 -1
  39. package/dist/docs/vsCodeCustomData/index.d.ts +0 -16
  40. package/dist/docs/vsCodeCustomData/utils.d.ts +0 -3
  41. package/dist/docs/webTypes/description.d.ts +0 -2
  42. package/dist/docs/webTypes/index.d.ts +0 -19
  43. package/dist/docs/webTypes/utils.d.ts +0 -6
  44. package/dist/entrypoints/addNonLazyImports.d.ts +0 -13
  45. package/dist/entrypoints/config.d.ts +0 -17
  46. package/dist/entrypoints/dtsUtils.d.ts +0 -19
  47. package/dist/entrypoints/findUtils.d.ts +0 -6
  48. package/dist/entrypoints/handleComponentImports.d.ts +0 -13
  49. package/dist/entrypoints/resolveTagName.d.ts +0 -18
  50. package/dist/jsxToLitHtml/autoAddNothing.d.ts +0 -8
  51. package/dist/jsxToLitHtml/comments.d.ts +0 -19
  52. package/dist/jsxToLitHtml/convertProps.d.ts +0 -10
  53. package/dist/jsxToLitHtml/imports.d.ts +0 -27
  54. package/dist/jsxToLitHtml/importsConfig.d.ts +0 -17
  55. package/dist/jsxToLitHtml/index.d.ts +0 -20
  56. package/dist/jsxToLitHtml/inferPropType.d.ts +0 -40
  57. package/dist/jsxToLitHtml/insertRepeatCall.d.ts +0 -51
  58. package/dist/jsxToLitHtml/jsxVisitor.d.ts +0 -15
  59. package/dist/jsxToLitHtml/templateParts.d.ts +0 -17
  60. package/dist/jsxToLitHtml/throwOnImportingExternalized.d.ts +0 -10
  61. package/dist/jsxToLitHtml/types.d.ts +0 -74
  62. package/dist/jsxToLitHtml/utils.d.ts +0 -14
  63. package/dist/loader/css.d.ts +0 -20
  64. package/dist/loader/extractor.d.ts +0 -2
  65. package/dist/loader/index.d.ts +0 -21
  66. package/dist/loader/lazy.d.ts +0 -21
  67. package/dist/loader/storybookApiJson.d.ts +0 -6
  68. package/dist/plugins/buildCdn.d.ts +0 -73
  69. package/dist/plugins/buildWebApp.d.ts +0 -3
  70. package/dist/plugins/buildWrappers.d.ts +0 -4
  71. package/dist/plugins/configureVite.d.ts +0 -20
  72. package/dist/plugins/externalizeDependencies.d.ts +0 -30
  73. package/dist/plugins/handleDynamicAssets.d.ts +0 -8
  74. package/dist/plugins/handleStaticAssets.d.ts +0 -9
  75. package/dist/plugins/loadLitCss.d.ts +0 -127
  76. package/dist/plugins/printTotalBuildSize.d.ts +0 -7
  77. package/dist/plugins/provideAssets.d.ts +0 -35
  78. package/dist/plugins/setAssetsPath.d.ts +0 -10
  79. package/dist/plugins/updatePackageJson.d.ts +0 -14
  80. package/dist/publicTypes.d.ts +0 -653
  81. package/dist/puppeteerTesting/globalSetup.d.ts +0 -73
  82. package/dist/puppeteerTesting/injected.d.ts +0 -8
  83. package/dist/puppeteerTesting/puppeteer/browser.d.ts +0 -6
  84. package/dist/puppeteerTesting/vitest/matchers/attributes.d.ts +0 -4
  85. package/dist/puppeteerTesting/vitest/matchers/classList.d.ts +0 -4
  86. package/dist/puppeteerTesting/vitest/matchers/events.d.ts +0 -7
  87. package/dist/puppeteerTesting/vitest/matchers/text.d.ts +0 -2
  88. package/dist/puppeteerTesting/vitest/matchers/utils.d.ts +0 -1
  89. package/dist/puppeteerTesting/vitest/runner.d.ts +0 -19
  90. package/dist/puppeteerTesting/vitest/setupFile.d.ts +0 -1
  91. package/dist/puppeteerTesting/vitest/types.d.ts +0 -6
  92. package/dist/testing/failOnConsole.d.ts +0 -6
  93. package/dist/testing/setupFile.d.ts +0 -1
  94. package/dist/testing/snapshotSerializer.d.ts +0 -12
  95. package/dist/tests/utils.d.ts +0 -4
  96. package/dist/transformers/customElementDeclaration.d.ts +0 -2
  97. package/dist/transformers/index.d.ts +0 -20
  98. package/dist/transformers/injectRuntimeOptions.d.ts +0 -18
  99. package/dist/transformers/liftDecorators.d.ts +0 -21
  100. package/dist/transformers/members.d.ts +0 -10
  101. package/dist/transformers/property.d.ts +0 -10
  102. package/dist/transformers/propertyOptions.d.ts +0 -110
  103. package/dist/transformers/utils.d.ts +0 -9
@@ -1,42 +1,25 @@
1
- export declare const fragmentName = "Fragment";
2
- export declare const dynamicHtmlTagName = "DynamicHtmlTag";
3
- export declare const dynamicSvgTagName = "DynamicSvgTag";
4
- /**
5
- * Using symbols rather than strings for these so that the type system forces us
6
- * to handle the dynamic tag name case.
7
- */
8
- export declare const dynamicHtmlSymbol: unique symbol;
9
- export declare const dynamicSvgSymbol: unique symbol;
10
- /**
11
- * When Stencil encounters a JSX prop like "onArcgisClick", it converts the
12
- * first letter of the event name ("ArcgisClick") to lower case, and takes the
13
- * rest as is ("arcgisClick").
14
- *
15
- * But, Preact, React 19 and Lit (Lit JSX in turn) don't do any case
16
- * conversion so you have to use "onarcgisClick" instead.
17
- *
18
- * This means, if you are consuming web component authored in Stencil, it's
19
- * JSX typings may wrongly include properties like "onArcgisClick" rather
20
- * than "onarcgisClick".
21
- *
22
- * When consuming Stencil typings in a Lit project, we are creating a mapped
23
- * type that fixes the casing difference. But just in case any place slips
24
- * through, this flag is used to normalize the casing.
25
- */
26
- export declare const shouldNormalizeCustomElementEventCasing = true;
27
1
  /**
28
2
  * Always set these properties as attributes on all elements
3
+ *
4
+ * @internal
29
5
  */
30
- export declare const alwaysAttributes: Set<string>;
6
+ export const alwaysAttributes: Set<string>;
7
+
31
8
  /**
32
9
  * Always set these properties as attributes on non-custom-elements
10
+ *
11
+ * @internal
33
12
  */
34
- export declare const nativeAlwaysAttributes: Set<string>;
13
+ export const nativeAlwaysAttributes: Set<string>;
14
+
35
15
  /**
36
16
  * These don't exist as a property, only as an attribute.
37
17
  * Or, the property is read-only, but the attribute is not.
18
+ *
19
+ * @internal
38
20
  */
39
- export declare const htmlAlwaysAttributes: Record<string, Set<string> | undefined>;
21
+ export const htmlAlwaysAttributes: Record<string, Set<string> | undefined>;
22
+
40
23
  /**
41
24
  * The mappings between native DOM property and the equivalent attribute it
42
25
  * reflects to.
@@ -44,81 +27,93 @@ export declare const htmlAlwaysAttributes: Record<string, Set<string> | undefine
44
27
  * This list was generated using the ./extractPropertyToAttributeMappings.js
45
28
  * script.
46
29
  *
30
+ * @internal
47
31
  */
48
- type PropertyToAttributeMappings = {
49
- /**
50
- * Mappings that are common to all HTML elements
51
- */
52
- readonly common: Required<ElementPropertyToAttributeMappings>;
53
- /**
54
- * Mappings that are specific to a given HTML element
55
- */
56
- readonly perElement: Record<string, ElementPropertyToAttributeMappings | undefined>;
57
- };
58
- export type ElementPropertyToAttributeMappings = {
59
- /**
60
- * This list is only used to apply an optional performance optimization.
61
- * If it gets out of date or is missing some properties, it's not a big deal.
62
- *
63
- * This list is used to convert JSX properties with static values to
64
- * an inlined HTML string that uses the equivalent attribute.
65
- *
66
- * Thus instead of `.property=${"1"}` final lit-html looks like `attribute=1`.
67
- *
68
- * Since static attributes are just part of the HTML string and not a special
69
- * binding, lit-html doesn't have to waste time diffing them on re-render.
70
- */
71
- reflected?: Readonly<Record<string, string | undefined>>;
72
- /**
73
- * Unfortunately, for many DOM **properties**, when set to undefined
74
- * (`el.autocapitalize = undefined`), rather than removing the attribute, they
75
- * set the attribute to an `"undefined"` string (this is never a desirable
76
- * outcome) or some other non-default value. This is the web platform
77
- * behavior.
78
- *
79
- * lit-html also has an anti-feature of rendering `undefined` **attribute**
80
- * values as `"undefined"` strings (they wanted to mirror the `.setAttribute()`
81
- * behavior).
82
- *
83
- * Thus, the only way to unset such attributes in lit-html is to use attribute
84
- * rather than property, and then add `?? nothing` to the attribute value.
85
- * `nothing` is a special magic value Lit had to invent to mean
86
- * "removeAttribute()"
87
- *
88
- * @see https://github.com/lit/lit/issues/4760
89
- * @see https://x.com/maxpatiiuk/status/1840567140354798003
90
- */
91
- stringifiedReflected?: Readonly<Record<string, string | undefined>>;
92
- /**
93
- * Properties that when set to `undefined` value are actually set to
94
- * `"undefined"` string.
95
- *
96
- * We cannot use `?? nothing` as `nothing` in property bindings acts the same
97
- * as `undefined`.
98
- *
99
- * At the moment, all of these happen to be reset to default value when set
100
- * to empty string, thus we add `?? ''` on these if potentially nullish value
101
- * was provided.
102
- */
103
- stringifiedNonReflected?: Readonly<Record<string, "" | undefined>>;
104
- };
105
- export declare const propertyToAttributeMappings: PropertyToAttributeMappings;
106
- export declare const htmlAlwaysBooleanAttributes: Set<string>;
32
+ export interface PropertyToAttributeMappings {
33
+ /**
34
+ * Mappings that are common to all HTML elements
35
+ *
36
+ * @internal
37
+ */
38
+ readonly common: Required<ElementPropertyToAttributeMappings>;
39
+ /**
40
+ * Mappings that are specific to a given HTML element
41
+ *
42
+ * @internal
43
+ */
44
+ readonly perElement: Record<string, ElementPropertyToAttributeMappings | undefined>;
45
+ }
46
+
47
+ /** @internal */
48
+ export interface ElementPropertyToAttributeMappings {
49
+ /**
50
+ * This list is only used to apply an optional performance optimization.
51
+ * If it gets out of date or is missing some properties, it's not a big deal.
52
+ *
53
+ * This list is used to convert JSX properties with static values to
54
+ * an inlined HTML string that uses the equivalent attribute.
55
+ *
56
+ * Thus instead of `.property=${"1"}` final lit-html looks like `attribute=1`.
57
+ *
58
+ * Since static attributes are just part of the HTML string and not a special
59
+ * binding, lit-html doesn't have to waste time diffing them on re-render.
60
+ *
61
+ * @internal
62
+ */
63
+ reflected?: Readonly<Record<string, string | undefined>>;
64
+ /**
65
+ * Unfortunately, for many DOM **properties**, when set to undefined
66
+ * (`el.autocapitalize = undefined`), rather than removing the attribute, they
67
+ * set the attribute to an `"undefined"` string (this is never a desirable
68
+ * outcome) or some other non-default value. This is the web platform
69
+ * behavior.
70
+ *
71
+ * lit-html also has an anti-feature of rendering `undefined` **attribute**
72
+ * values as `"undefined"` strings (they wanted to mirror the `.setAttribute()`
73
+ * behavior).
74
+ *
75
+ * Thus, the only way to unset such attributes in lit-html is to use attribute
76
+ * rather than property, and then add `?? nothing` to the attribute value.
77
+ * `nothing` is a special magic value Lit had to invent to mean
78
+ * "removeAttribute()"
79
+ *
80
+ * @internal
81
+ * @see https://github.com/lit/lit/issues/4760
82
+ * @see https://x.com/maxpatiiuk/status/1840567140354798003
83
+ */
84
+ stringifiedReflected?: Readonly<Record<string, string | undefined>>;
85
+ /**
86
+ * Properties that when set to `undefined` value are actually set to
87
+ * `"undefined"` string.
88
+ *
89
+ * We cannot use `?? nothing` as `nothing` in property bindings acts the same
90
+ * as `undefined`.
91
+ *
92
+ * At the moment, all of these happen to be reset to default value when set
93
+ * to empty string, thus we add `?? ''` on these if potentially nullish value
94
+ * was provided.
95
+ *
96
+ * @internal
97
+ */
98
+ stringifiedNonReflected?: Readonly<Record<string, "" | undefined>>;
99
+ }
100
+
101
+ /** @internal */
102
+ export const propertyToAttributeMappings: PropertyToAttributeMappings;
103
+
107
104
  /**
108
105
  * List of all DOM events settable in JSX. These event names are converted to
109
106
  * lowercase. All others are left as authored as we can't make assumptions about
110
107
  * what was the intended casing.
111
- */
112
- export declare const nativeEvents: Set<string>;
113
- /**
114
- * HTML elements that do not have children and closing tags
115
108
  *
116
- * Based on https://developer.mozilla.org/en-US/docs/Glossary/Void_element
109
+ * @internal
117
110
  */
118
- export declare const voidElements: Set<string>;
111
+ export const nativeEvents: Set<string>;
112
+
119
113
  /**
120
114
  * Elements for which the `svg` function needs to be used rather than `html`.
121
115
  *
116
+ * @internal
122
117
  * @example
123
118
  * ```tsx
124
119
  * <svg>
@@ -133,26 +128,12 @@ export declare const voidElements: Set<string>;
133
128
  *
134
129
  * (foreign elements in HTML can be self-closing)
135
130
  */
136
- export declare const svgElements: Set<string>;
137
- /**
138
- * As per the spec, some HTML elements are valid inside of `<svg>`, without
139
- * being escaped in `<foreignObject>`.
140
- *
141
- * For such, it can be ambigous whether `html` or `svg` tag should be used.
142
- * If ambiguous element has non-ambiguous siblings,
143
- * jsxChildToTemplateParts will get the tag from them. Otherwise,
144
- * templatePartsToLitExpression will default to htmlTag, which will
145
- * probably work fine in all cases.
146
- *
147
- * @see https://svgwg.org/svg2-draft/struct.html#SVGElement
148
- * @see https://github.com/w3c/svgwg/blob/6d756e8e7159822e3e3b723756de6a025190bc68/master/definitions.xml#L281-L282
149
- * @see https://discord.com/channels/1012791295170859069/1286427223712071692
150
- *
151
- */
152
- export declare const ambiguousHtmlSvgElements: Set<string>;
131
+ export const svgElements: Set<string>;
132
+
153
133
  /**
154
134
  * Elements for which the `math` function needs to be used rather than `html`
155
135
  *
136
+ * @internal
156
137
  * @example
157
138
  * ```tsx
158
139
  * <math>
@@ -167,13 +148,4 @@ export declare const ambiguousHtmlSvgElements: Set<string>;
167
148
  *
168
149
  * (foreign elements in HTML can be self-closing)
169
150
  */
170
- export declare const mathMlElements: Set<string>;
171
- /**
172
- * Although most native elements do not contain dashes inside, there are a
173
- * few exceptions. Explicitly declaring a custom element by this name is
174
- * forbidden
175
- *
176
- * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names
177
- */
178
- export declare const blockListedCustomElementNames: Set<string>;
179
- export {};
151
+ export const mathMlElements: Set<(string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string)>;
@@ -1,4 +1,4 @@
1
- import { toSystemPathSeparators as c, path as i } from "@arcgis/components-build-utils";
1
+ import { toSystemPathSeparators as c, path as i } from "@arcgis/node-toolkit/path";
2
2
  import { styleText as s } from "node:util";
3
3
  let n = {
4
4
  // Temporary logger to use until vite config is loaded and we have access to