element-vir 16.1.1 → 16.2.0

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.
@@ -29,6 +29,7 @@ export declare abstract class DeclarativeElement<TagName extends CustomElementTa
29
29
  static readonly init: StaticDeclarativeElementProperties<CustomElementTagName, PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, BaseCssPropertyName<CustomElementTagName>, BaseCssPropertyName<CustomElementTagName>, unknown>['init'];
30
30
  static readonly hostClasses: StaticDeclarativeElementProperties<CustomElementTagName, PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, BaseCssPropertyName<CustomElementTagName>, BaseCssPropertyName<CustomElementTagName>, unknown>['hostClasses'];
31
31
  static readonly cssVars: StaticDeclarativeElementProperties<CustomElementTagName, PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, BaseCssPropertyName<CustomElementTagName>, BaseCssPropertyName<CustomElementTagName>, unknown>['cssVars'];
32
+ abstract lastRenderError: Error | undefined;
32
33
  abstract lastRenderedProps: Pick<RenderParams<any, Inputs, StateInit, any, any, any>, 'inputs' | 'state'>;
33
34
  abstract render(): unknown;
34
35
  abstract readonly instanceState: FlattenElementVirStateSetup<StateInit>;
@@ -103,6 +103,7 @@ export function defineElementNoInputs(initInput) {
103
103
  catch (caught) {
104
104
  const error = ensureError(caught);
105
105
  error.message = `Failed to render '${initInput.tagName}': ${error.message}`;
106
+ this.lastRenderError = error;
106
107
  throw error;
107
108
  }
108
109
  }
@@ -131,6 +132,7 @@ export function defineElementNoInputs(initInput) {
131
132
  }
132
133
  constructor() {
133
134
  super();
135
+ this.lastRenderError = undefined;
134
136
  this.initCalled = false;
135
137
  this.hasRendered = false;
136
138
  this.lastRenderedProps = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "16.1.1",
3
+ "version": "16.2.0",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",