element-vir 6.1.5 → 6.1.6

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.
@@ -16,6 +16,7 @@ export declare abstract class DeclarativeElement<InputsGeneric extends PropertyI
16
16
  static readonly isStrictInstance: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['isStrictInstance'];
17
17
  static readonly renderCallback: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['renderCallback'];
18
18
  static readonly inputsType: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['inputsType'];
19
+ static readonly stateType: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['stateType'];
19
20
  static readonly events: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['events'];
20
21
  static readonly stateInit: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['stateInit'];
21
22
  static readonly init: StaticDeclarativeElementProperties<PropertyInitMapBase, PropertyInitMapBase, EventsInitMap, string, string>['init'];
@@ -30,14 +31,15 @@ export declare abstract class DeclarativeElement<InputsGeneric extends PropertyI
30
31
  abstract markInputsAsHavingBeenSet(): void;
31
32
  abstract readonly definition: DeclarativeElementDefinition<InputsGeneric, PropertyInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>;
32
33
  }
33
- export interface StaticDeclarativeElementProperties<InputsGeneric extends PropertyInitMapBase, PropertyInitGeneric extends PropertyInitMapBase, EventsInitGeneric extends EventsInitMap, HostClassKeys extends string, CssVarKeys extends string> {
34
+ export interface StaticDeclarativeElementProperties<InputsGeneric extends PropertyInitMapBase, StateInitGeneric extends PropertyInitMapBase, EventsInitGeneric extends EventsInitMap, HostClassKeys extends string, CssVarKeys extends string> {
34
35
  /** Pass through the render callback for direct unit testability */
35
- readonly renderCallback: RenderCallback<InputsGeneric, PropertyInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>;
36
+ readonly renderCallback: RenderCallback<InputsGeneric, StateInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>;
36
37
  events: EventDescriptorMap<EventsInitGeneric>;
37
- stateInit: ElementPropertyDescriptorMap<PropertyInitGeneric>;
38
- init: RequiredBy<DeclarativeElementInit<InputsGeneric, PropertyInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>, 'stateInit' | 'events'>;
38
+ stateInit: ElementPropertyDescriptorMap<StateInitGeneric>;
39
+ init: RequiredBy<DeclarativeElementInit<InputsGeneric, StateInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>, 'stateInit' | 'events'>;
39
40
  inputsType: InputsGeneric;
40
- isStrictInstance: (element: unknown) => element is DeclarativeElement<InputsGeneric, PropertyInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>;
41
+ stateType: StateInitGeneric;
42
+ isStrictInstance: (element: unknown) => element is DeclarativeElement<InputsGeneric, StateInitGeneric, EventsInitGeneric, HostClassKeys, CssVarKeys>;
41
43
  hostClasses: HostClassNamesMap<string, HostClassKeys>;
42
44
  cssVarNames: CssVarNameOrValueMap<CssVarKeys>;
43
45
  cssVarValues: CssVarNameOrValueMap<CssVarKeys>;
@@ -51,6 +51,9 @@ export function defineElementNoInputs(initInput) {
51
51
  static get inputsType() {
52
52
  throw new Error(`"inputsType" was called on ${initInput.tagName} as a value but it is only for types.`);
53
53
  }
54
+ static get stateType() {
55
+ throw new Error(`"stateType" was called on ${initInput.tagName} as a value but it is only for types.`);
56
+ }
54
57
  markInputsAsHavingBeenSet() {
55
58
  if (!this.haveInputsBeenSet) {
56
59
  this.haveInputsBeenSet = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "6.1.5",
3
+ "version": "6.1.6",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "augment-vir": "2.5.0",
40
- "lit": "2.3.1"
40
+ "lit": "2.4.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@open-wc/testing": "3.1.6",