@arcgis/lumina 4.33.0-next.6 → 4.33.0-next.61
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/dist/{chunk-6HCCSL5F.js → chunk-G6X7CCIS.js} +27 -20
- package/dist/hmrSupport.js +1 -1
- package/dist/index.js +1 -1
- package/dist/jsx/types.d.ts +1 -20
- package/package.json +3 -3
|
@@ -162,7 +162,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
162
162
|
if (ProxyClass._LitConstructor) {
|
|
163
163
|
this._initializeComponent({ a: ProxyClass._LitConstructor });
|
|
164
164
|
} else {
|
|
165
|
-
void ProxyClass._loadPromise.then(this._initializeComponent.bind(this)).catch((error) => {
|
|
165
|
+
void ProxyClass._loadPromise.then(awaitTopLevelPolyfill).then(this._initializeComponent.bind(this)).catch((error) => {
|
|
166
166
|
this._postLoaded.reject(error);
|
|
167
167
|
setTimeout(() => {
|
|
168
168
|
throw error;
|
|
@@ -320,25 +320,7 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
320
320
|
while (parentClass && !Object.hasOwn(parentClass, "lumina")) {
|
|
321
321
|
parentClass = Object.getPrototypeOf(parentClass);
|
|
322
322
|
}
|
|
323
|
-
|
|
324
|
-
const elementPrototype = Element.prototype;
|
|
325
|
-
const alreadyPatched = Object.hasOwn(litElementPrototype, "isConnected");
|
|
326
|
-
if (!alreadyPatched) {
|
|
327
|
-
litElementPrototype.setAttribute = function(qualifiedName, value) {
|
|
328
|
-
elementPrototype.setAttribute.call(this.el, qualifiedName, value);
|
|
329
|
-
};
|
|
330
|
-
litElementPrototype.removeAttribute = function(qualifiedName) {
|
|
331
|
-
elementPrototype.removeAttribute.call(this.el, qualifiedName);
|
|
332
|
-
};
|
|
333
|
-
defineProperty(litElementPrototype, "isConnected", {
|
|
334
|
-
get() {
|
|
335
|
-
return Reflect.get(elementPrototype, "isConnected", this.el);
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
340
|
-
devOnlyDetectIncorrectLazyUsages(parentClass);
|
|
341
|
-
}
|
|
323
|
+
patchLitElement(parentClass);
|
|
342
324
|
const isFirstInitialization = !ProxyClass._LitConstructor;
|
|
343
325
|
if (isFirstInitialization) {
|
|
344
326
|
ProxyClass._LitConstructor = LitConstructor;
|
|
@@ -406,6 +388,31 @@ var ProxyComponent = class extends HtmlElement {
|
|
|
406
388
|
function syncLitElement([key, value]) {
|
|
407
389
|
this[key] = value;
|
|
408
390
|
}
|
|
391
|
+
function patchLitElement(parentClass) {
|
|
392
|
+
const litElementPrototype = parentClass.prototype;
|
|
393
|
+
const elementPrototype = Element.prototype;
|
|
394
|
+
const alreadyPatched = Object.hasOwn(litElementPrototype, "isConnected");
|
|
395
|
+
if (!alreadyPatched) {
|
|
396
|
+
litElementPrototype.setAttribute = function(qualifiedName, value) {
|
|
397
|
+
elementPrototype.setAttribute.call(this.el, qualifiedName, value);
|
|
398
|
+
};
|
|
399
|
+
litElementPrototype.removeAttribute = function(qualifiedName) {
|
|
400
|
+
elementPrototype.removeAttribute.call(this.el, qualifiedName);
|
|
401
|
+
};
|
|
402
|
+
defineProperty(litElementPrototype, "isConnected", {
|
|
403
|
+
get() {
|
|
404
|
+
return Reflect.get(elementPrototype, "isConnected", this.el);
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
if (process.env.NODE_ENV !== "production" && isEsriInternalEnv()) {
|
|
409
|
+
devOnlyDetectIncorrectLazyUsages(parentClass);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
var awaitTopLevelPolyfill = async (module) => {
|
|
413
|
+
await module.$$;
|
|
414
|
+
return module;
|
|
415
|
+
};
|
|
409
416
|
|
|
410
417
|
// src/utils.ts
|
|
411
418
|
var noShadowRoot = {};
|
package/dist/hmrSupport.js
CHANGED
package/dist/index.js
CHANGED
package/dist/jsx/types.d.ts
CHANGED
|
@@ -372,27 +372,8 @@ type FixupStencilEventCasing<PropertyName extends PropertyKey> = PropertyName ex
|
|
|
372
372
|
* https://www.typescriptlang.org/docs/handbook/jsx.html
|
|
373
373
|
*/
|
|
374
374
|
export declare namespace LuminaJsx {
|
|
375
|
-
/**
|
|
376
|
-
* Whether to pick TemplateResult or JsxNode here is a compromise.
|
|
377
|
-
*
|
|
378
|
-
* - If I tell it Lit JSX type is JsxNode, then even <a /> expression will
|
|
379
|
-
* have a very broad JsxNode type (union of template results, null,
|
|
380
|
-
* undefined, false, and more). This may slow down type-checking and may be
|
|
381
|
-
* too-broad for certain use cases.
|
|
382
|
-
* - Since <a /> would be typed very broad, you won't be able to declare
|
|
383
|
-
* your function as receiving just TemplateResult
|
|
384
|
-
* - Also, this makes TypeScript not allow you to return undefined from
|
|
385
|
-
* your functional component
|
|
386
|
-
* - This is what React did and what I am going with
|
|
387
|
-
* - If I tell TypeScript that JSX type is TemplateResult, then my function
|
|
388
|
-
* component is no longer allowed to return undefined or string or etc.
|
|
389
|
-
*
|
|
390
|
-
* This is mainly a TypeScript limitation. Issues tracking this:
|
|
391
|
-
* - https://github.com/microsoft/TypeScript/issues/21699
|
|
392
|
-
* - https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18912
|
|
393
|
-
*
|
|
394
|
-
*/
|
|
395
375
|
export type Element = TemplateResult;
|
|
376
|
+
export type ElementType = JsxNode;
|
|
396
377
|
export interface ElementClass {
|
|
397
378
|
}
|
|
398
379
|
export interface ElementAttributesProperty {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
],
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@arcgis/components-controllers": "4.33.0-next.
|
|
24
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
23
|
+
"@arcgis/components-controllers": "4.33.0-next.61",
|
|
24
|
+
"@arcgis/components-utils": "4.33.0-next.61",
|
|
25
25
|
"@lit-labs/ssr": "^3.2.2",
|
|
26
26
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
27
27
|
"@lit/context": "^1.1.3",
|