element-vir 20.0.1 → 20.0.3

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.
@@ -113,6 +113,7 @@ export function defineElementNoInputs(initInput) {
113
113
  }
114
114
  catch (caught) {
115
115
  const error = ensureErrorAndPrependMessage(caught, `Failed to render ${init.tagName}`);
116
+ console.error(error);
116
117
  this._lastRenderError = error;
117
118
  return extractErrorMessage(error);
118
119
  }
@@ -1,4 +1,4 @@
1
- export { LitElement, noChange, svg, unsafeCSS } from 'lit';
1
+ export { LitElement, noChange, nothing, svg, unsafeCSS } from 'lit';
2
2
  export type { CSSResult, CSSResultGroup, CompiledTemplate, CompiledTemplateResult, HTMLTemplateResult, SVGTemplateResult, TemplateResult, } from 'lit';
3
3
  export * from 'lit/async-directive.js';
4
4
  export * from 'lit/decorators.js';
@@ -1,4 +1,4 @@
1
- export { LitElement, noChange, svg, unsafeCSS } from 'lit';
1
+ export { LitElement, noChange, nothing, svg, unsafeCSS } from 'lit';
2
2
  export * from 'lit/async-directive.js';
3
3
  export * from 'lit/decorators.js';
4
4
  export * from 'lit/directive.js';
@@ -18,8 +18,8 @@ declare class RepeatDirective extends Directive {
18
18
  }
19
19
  export type ItemTemplate<T> = (item: T, index: number) => HtmlInterpolation;
20
20
  export interface RepeatDirectiveFn {
21
- <T>(items: Iterable<T>, keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>, template?: ItemTemplate<T>): HtmlInterpolation;
22
- <T>(items: Iterable<T>, template: ItemTemplate<T>): HtmlInterpolation;
23
- <T>(items: Iterable<T>, keyFn: KeyFn<T> | ItemTemplate<T>, template: ItemTemplate<T>): HtmlInterpolation;
21
+ <T>(items: Iterable<T>, keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>, template?: ItemTemplate<T>): HtmlInterpolation[];
22
+ <T>(items: Iterable<T>, template: ItemTemplate<T>): HtmlInterpolation[];
23
+ <T>(items: Iterable<T>, keyFn: KeyFn<T> | ItemTemplate<T>, template: ItemTemplate<T>): HtmlInterpolation[];
24
24
  }
25
25
  export declare const repeat: RepeatDirectiveFn;
@@ -1,5 +1,5 @@
1
1
  import { AnyFunction } from '@augment-vir/common';
2
- import { CSSResult, TemplateResult } from 'lit';
2
+ import { CSSResult, TemplateResult, nothing } from 'lit';
3
3
  import { EmptyObject } from 'type-fest';
4
4
  import { DeclarativeElementDefinition } from '../../declarative-element/declarative-element';
5
5
  import { MinimalDefinitionWithInputs } from '../minimal-element-definition';
@@ -12,4 +12,4 @@ export type DirectiveOutput = EmptyObject;
12
12
  * This is used in order to block accidental object interpolations into HTML, which get stringified
13
13
  * into `'[object Object]'`, which nobody ever wants that.
14
14
  */
15
- export type HtmlInterpolation = null | undefined | string | number | boolean | bigint | CSSResult | Element | TemplateResult | MinimalDefinitionWithInputs | DeclarativeElementDefinition | DirectiveOutput | AnyFunction | HtmlInterpolation[];
15
+ export type HtmlInterpolation = null | undefined | string | number | boolean | bigint | CSSResult | Readonly<CSSResult> | Element | Readonly<Element> | TemplateResult | Readonly<TemplateResult> | MinimalDefinitionWithInputs | Readonly<MinimalDefinitionWithInputs> | DeclarativeElementDefinition | Readonly<DeclarativeElementDefinition> | DirectiveOutput | Readonly<DirectiveOutput> | AnyFunction | typeof nothing | HtmlInterpolation[] | ReadonlyArray<HtmlInterpolation>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "20.0.1",
3
+ "version": "20.0.3",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",