element-vir 25.3.0 → 25.4.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.
Files changed (41) hide show
  1. package/dist/declarative-element/define-element-no-inputs.d.ts +6 -6
  2. package/dist/declarative-element/define-element-no-inputs.js +1 -0
  3. package/dist/declarative-element/define-element.d.ts +6 -6
  4. package/dist/declarative-element/directives/assign.directive.d.ts +3 -3
  5. package/dist/declarative-element/directives/async-prop.d.ts +2 -2
  6. package/dist/declarative-element/directives/attributes.directive.d.ts +30 -0
  7. package/dist/declarative-element/directives/attributes.directive.js +32 -0
  8. package/dist/declarative-element/directives/create-attribute-directive.d.ts +1 -1
  9. package/dist/declarative-element/directives/directive-helpers.d.ts +1 -1
  10. package/dist/declarative-element/directives/directive-helpers.js +1 -1
  11. package/dist/declarative-element/directives/listen.directive.d.ts +3 -3
  12. package/dist/declarative-element/directives/mutate.directive.d.ts +38 -0
  13. package/dist/declarative-element/directives/mutate.directive.js +45 -0
  14. package/dist/declarative-element/directives/on-dom-created.directive.d.ts +2 -2
  15. package/dist/declarative-element/directives/on-dom-rendered.directive.d.ts +2 -2
  16. package/dist/declarative-element/directives/on-intersect.directive.d.ts +2 -2
  17. package/dist/declarative-element/directives/on-resize.directive.d.ts +2 -2
  18. package/dist/declarative-element/directives/render-async.directive.d.ts +1 -1
  19. package/dist/declarative-element/is-declarative-element-definition.d.ts +1 -1
  20. package/dist/declarative-element/is-declarative-element.d.ts +1 -1
  21. package/dist/declarative-element/properties/css-properties.d.ts +1 -1
  22. package/dist/declarative-element/properties/css-vars.d.ts +4 -4
  23. package/dist/declarative-element/properties/element-events.d.ts +2 -2
  24. package/dist/declarative-element/properties/host-classes.d.ts +4 -4
  25. package/dist/declarative-element/slot-names.d.ts +1 -1
  26. package/dist/declarative-element/wrap-define-element.d.ts +7 -7
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.js +2 -0
  29. package/dist/template-transforms/minimal-element-definition.d.ts +2 -2
  30. package/dist/template-transforms/nested-mapped-templates.d.ts +1 -1
  31. package/dist/template-transforms/template-transform-type.d.ts +1 -1
  32. package/dist/template-transforms/transform-template.d.ts +1 -1
  33. package/dist/template-transforms/vir-css/css-transform.d.ts +3 -3
  34. package/dist/template-transforms/vir-css/vir-css.d.ts +2 -2
  35. package/dist/template-transforms/vir-html/html-interpolation.d.ts +1 -1
  36. package/dist/template-transforms/vir-html/html-transform.d.ts +3 -3
  37. package/dist/template-transforms/vir-html/vir-html.d.ts +2 -2
  38. package/dist/typed-event/typed-event.d.ts +1 -1
  39. package/dist/util/increment.d.ts +2 -2
  40. package/dist/util/lit-template.d.ts +1 -1
  41. package/package.json +9 -9
@@ -1,9 +1,9 @@
1
- import { CustomElementTagName } from './custom-tag-name.js';
2
- import { DeclarativeElementInit } from './declarative-element-init.js';
3
- import { DeclarativeElementDefinition } from './declarative-element.js';
4
- import { BaseCssPropertyName } from './properties/css-properties.js';
5
- import { EventsInitMap } from './properties/element-events.js';
6
- import { PropertyInitMapBase } from './properties/element-properties.js';
1
+ import { type CustomElementTagName } from './custom-tag-name.js';
2
+ import { type DeclarativeElementInit } from './declarative-element-init.js';
3
+ import { type DeclarativeElementDefinition } from './declarative-element.js';
4
+ import { type BaseCssPropertyName } from './properties/css-properties.js';
5
+ import { type EventsInitMap } from './properties/element-events.js';
6
+ import { type PropertyInitMapBase } from './properties/element-properties.js';
7
7
  /**
8
8
  * Defines an element without any inputs.
9
9
  *
@@ -180,6 +180,7 @@ export function defineElementNoInputs(init) {
180
180
  }
181
181
  this.destroy();
182
182
  this._initCalled = false;
183
+ this._stateCalled = false;
183
184
  }
184
185
  // this is set below in Object.defineProperties
185
186
  definition = {};
@@ -1,9 +1,9 @@
1
- import { CustomElementTagName } from './custom-tag-name.js';
2
- import { DeclarativeElementInit } from './declarative-element-init.js';
3
- import { DeclarativeElementDefinition } from './declarative-element.js';
4
- import { BaseCssPropertyName } from './properties/css-properties.js';
5
- import { EventsInitMap } from './properties/element-events.js';
6
- import { PropertyInitMapBase } from './properties/element-properties.js';
1
+ import { type CustomElementTagName } from './custom-tag-name.js';
2
+ import { type DeclarativeElementInit } from './declarative-element-init.js';
3
+ import { type DeclarativeElementDefinition } from './declarative-element.js';
4
+ import { type BaseCssPropertyName } from './properties/css-properties.js';
5
+ import { type EventsInitMap } from './properties/element-events.js';
6
+ import { type PropertyInitMapBase } from './properties/element-properties.js';
7
7
  /**
8
8
  * Verifies that the given `Inputs` type does not clash with built-in HTMLElement properties. This
9
9
  * is used within {@link defineElement}.
@@ -1,6 +1,6 @@
1
- import type { EmptyObject } from 'type-fest';
2
- import { DirectiveResult } from '../../lit-exports/all-lit-exports.js';
3
- import { PropertyInitMapBase } from '../properties/element-properties.js';
1
+ import { type EmptyObject } from 'type-fest';
2
+ import { type DirectiveResult } from '../../lit-exports/all-lit-exports.js';
3
+ import { type PropertyInitMapBase } from '../properties/element-properties.js';
4
4
  export type ElementDefinitionWithInputsType<InputsType extends PropertyInitMapBase = PropertyInitMapBase> = {
5
5
  InputsType: InputsType;
6
6
  };
@@ -1,5 +1,5 @@
1
- import type { Overwrite } from '@augment-vir/common';
2
- import { CallbackObservable, CallbackObservableInit, type AsyncValue } from 'observavir';
1
+ import { type Overwrite } from '@augment-vir/common';
2
+ import { CallbackObservable, type AsyncValue, type CallbackObservableInit } from 'observavir';
3
3
  export type { AsyncValue } from 'observavir';
4
4
  /**
5
5
  * The current state of an {@link AsyncProp}'s value.
@@ -0,0 +1,30 @@
1
+ import { type Primitive } from 'type-fest';
2
+ import { nothing } from '../../lit-exports/all-lit-exports.js';
3
+ /**
4
+ * Possible attribute values for {@link AttributeValues}.
5
+ *
6
+ * @category Internal
7
+ */
8
+ export type AttributeValue = Exclude<Primitive, symbol> | string | typeof nothing;
9
+ /**
10
+ * Parameters object for applying attributes to an HTML element via the {@link attributes} directive.
11
+ * Make sure that all keys (attribute names) are lowercase.
12
+ *
13
+ * @category Internal
14
+ */
15
+ export type AttributeValues = {
16
+ [LowercaseKey in Lowercase<string>]: AttributeValue;
17
+ };
18
+ /**
19
+ * A directive applies multiple HTML attributes to the parent element all at once.
20
+ *
21
+ * @category Directives
22
+ */
23
+ export declare const attributes: (values_0: AttributeValues) => import("lit-html/directive.js").DirectiveResult<{
24
+ new (partInfo: import("lit-html/directive.js").PartInfo): {
25
+ readonly element: HTMLElement;
26
+ render(params_0: AttributeValues): symbol;
27
+ readonly _$isConnected: boolean;
28
+ update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
29
+ };
30
+ }>;
@@ -0,0 +1,32 @@
1
+ import { getObjectTypedKeys, getOrSet } from '@augment-vir/common';
2
+ import { nothing } from '../../lit-exports/all-lit-exports.js';
3
+ import { createMutateDirective } from './mutate.directive.js';
4
+ /**
5
+ * A directive applies multiple HTML attributes to the parent element all at once.
6
+ *
7
+ * @category Directives
8
+ */
9
+ export const attributes = createMutateDirective('attributes', ({ element, params: [attributesToApply], directive: rawDirective }) => {
10
+ const directive = rawDirective;
11
+ const allAttributeNames = getOrSet(directive, 'allAttributesApplied', () => new Set());
12
+ getObjectTypedKeys(attributesToApply).forEach((attributeName) => {
13
+ if (attributeName.toLowerCase() !== attributeName) {
14
+ throw new Error(`Cannot assign attribute name with uppercase letters: ${attributeName}`);
15
+ }
16
+ allAttributeNames.add(attributeName);
17
+ });
18
+ allAttributeNames.forEach((attributeName) => {
19
+ const attributeValue = attributesToApply[attributeName];
20
+ if (attributeValue == undefined ||
21
+ attributeValue === false ||
22
+ attributeValue === nothing) {
23
+ element.removeAttribute(attributeName);
24
+ }
25
+ else if (attributeValue === '' || attributeValue === true) {
26
+ element.setAttribute(attributeName, '');
27
+ }
28
+ else {
29
+ element.setAttribute(attributeName, String(attributeValue));
30
+ }
31
+ });
32
+ });
@@ -1,4 +1,4 @@
1
- import { PartInfo } from '../../lit-exports/all-lit-exports.js';
1
+ import { type PartInfo } from '../../lit-exports/all-lit-exports.js';
2
2
  /**
3
3
  * Creates a lit directive that used simply for setting attributes on its parent element.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { ElementPartInfo, PartInfo } from '../../lit-exports/all-lit-exports.js';
1
+ import { type ElementPartInfo, type PartInfo } from '../../lit-exports/all-lit-exports.js';
2
2
  /**
3
3
  * The full type for `ElementPartInfo` because `lit`'s built-in type leaves out of most of its
4
4
  * interface.
@@ -1,4 +1,4 @@
1
- import { PartType } from '../../lit-exports/all-lit-exports.js';
1
+ import { PartType, } from '../../lit-exports/all-lit-exports.js';
2
2
  /**
3
3
  * Extracts the element from the given part info. Used in lit directives.
4
4
  *
@@ -1,6 +1,6 @@
1
- import { MaybePromise } from '@augment-vir/common';
2
- import { DirectiveResult } from '../../lit-exports/all-lit-exports.js';
3
- import { DefinedTypedEvent, TypedEvent } from '../../typed-event/typed-event.js';
1
+ import { type MaybePromise } from '@augment-vir/common';
2
+ import { type DirectiveResult } from '../../lit-exports/all-lit-exports.js';
3
+ import { type DefinedTypedEvent, type TypedEvent } from '../../typed-event/typed-event.js';
4
4
  /** We don't care at all what this returns, just allow anything! */
5
5
  type ListenCallbackReturn = MaybePromise<any>;
6
6
  /**
@@ -0,0 +1,38 @@
1
+ import { Directive, type PartInfo } from '../../lit-exports/all-lit-exports.js';
2
+ /**
3
+ * Parameters for the callback given to the {@link mutate} directive.
4
+ *
5
+ * @category Internal
6
+ */
7
+ export type MutateDirectiveParams<Params extends any[] = []> = {
8
+ directive: Directive;
9
+ element: HTMLElement;
10
+ params: Params;
11
+ };
12
+ /**
13
+ * A directive that allows arbitrary modifications to be made to the element that it's attached to.
14
+ *
15
+ * @category Directives
16
+ */
17
+ export declare const mutate: (callback: (params: Omit<MutateDirectiveParams, "params">) => void) => import("lit-html/directive.js").DirectiveResult<{
18
+ new (partInfo: PartInfo): {
19
+ readonly element: HTMLElement;
20
+ lastKey: string | undefined;
21
+ render(callback: (params: Omit<MutateDirectiveParams, "params">) => void): symbol;
22
+ readonly _$isConnected: boolean;
23
+ update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
24
+ };
25
+ }>;
26
+ /**
27
+ * A helper for making new directives.
28
+ *
29
+ * @category Internal
30
+ */
31
+ export declare function createMutateDirective<Params extends any[]>(directiveName: string, callback: (this: void, params: MutateDirectiveParams<Params>) => void): (...values: Params) => import("lit-html/directive.js").DirectiveResult<{
32
+ new (partInfo: PartInfo): {
33
+ readonly element: HTMLElement;
34
+ render(...params: Params): symbol;
35
+ readonly _$isConnected: boolean;
36
+ update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
37
+ };
38
+ }>;
@@ -0,0 +1,45 @@
1
+ import { assertWrap } from '@augment-vir/assert';
2
+ import { directive, Directive, noChange } from '../../lit-exports/all-lit-exports.js';
3
+ import { extractElement } from './directive-helpers.js';
4
+ /**
5
+ * A directive that allows arbitrary modifications to be made to the element that it's attached to.
6
+ *
7
+ * @category Directives
8
+ */
9
+ export const mutate = directive(class extends Directive {
10
+ element;
11
+ lastKey;
12
+ constructor(partInfo) {
13
+ super(partInfo);
14
+ this.element = assertWrap.instanceOf(extractElement(partInfo, 'modifyElement'), HTMLElement);
15
+ }
16
+ render(callback) {
17
+ callback({
18
+ directive: this,
19
+ element: this.element,
20
+ });
21
+ return noChange;
22
+ }
23
+ });
24
+ /**
25
+ * A helper for making new directives.
26
+ *
27
+ * @category Internal
28
+ */
29
+ export function createMutateDirective(directiveName, callback) {
30
+ return directive(class extends Directive {
31
+ element;
32
+ constructor(partInfo) {
33
+ super(partInfo);
34
+ this.element = assertWrap.instanceOf(extractElement(partInfo, directiveName), HTMLElement);
35
+ }
36
+ render(...params) {
37
+ callback({
38
+ params: params,
39
+ directive: this,
40
+ element: this.element,
41
+ });
42
+ return noChange;
43
+ }
44
+ });
45
+ }
@@ -1,5 +1,5 @@
1
- import type { MaybePromise } from '@augment-vir/common';
2
- import { PartInfo } from '../../lit-exports/all-lit-exports.js';
1
+ import { type MaybePromise } from '@augment-vir/common';
2
+ import { type PartInfo } from '../../lit-exports/all-lit-exports.js';
3
3
  /**
4
4
  * The callback / listener passed to {@link onDomCreated}. The `element` parameter is a reference to
5
5
  * the DOM element that the directive was attached to.
@@ -1,5 +1,5 @@
1
- import { MaybePromise } from '@augment-vir/common';
2
- import { PartInfo } from '../../lit-exports/all-lit-exports.js';
1
+ import { type MaybePromise } from '@augment-vir/common';
2
+ import { type PartInfo } from '../../lit-exports/all-lit-exports.js';
3
3
  /**
4
4
  * The callback / listener passed to {@link onDomRendered}. The `element` parameter is a reference to
5
5
  * the DOM element that the directive was attached to.
@@ -1,5 +1,5 @@
1
- import type { MaybePromise } from '@augment-vir/common';
2
- import { PartInfo } from '../../lit-exports/all-lit-exports.js';
1
+ import { type MaybePromise } from '@augment-vir/common';
2
+ import { type PartInfo } from '../../lit-exports/all-lit-exports.js';
3
3
  /**
4
4
  * Callback called by the {@link onIntersect} directive.
5
5
  *
@@ -1,5 +1,5 @@
1
- import type { MaybePromise } from '@augment-vir/common';
2
- import { PartInfo } from '../../lit-exports/all-lit-exports.js';
1
+ import { type MaybePromise } from '@augment-vir/common';
2
+ import { type PartInfo } from '../../lit-exports/all-lit-exports.js';
3
3
  /**
4
4
  * Callback called by the {@link onResize} directive.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { AsyncProp } from './async-prop.js';
1
+ import { type AsyncProp } from './async-prop.js';
2
2
  /**
3
3
  * Given a {@link AsyncProp} instance, call and return the output of the `resolutionRender` parameter
4
4
  * once the {@link AsyncProp} has been resolved, call and return the output of the `errorRender`
@@ -1,4 +1,4 @@
1
- import { DeclarativeElementDefinition } from './declarative-element.js';
1
+ import { type DeclarativeElementDefinition } from './declarative-element.js';
2
2
  /**
3
3
  * Asserts that the given input is a declarative element definition.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DeclarativeElement } from './declarative-element.js';
1
+ import { type DeclarativeElement } from './declarative-element.js';
2
2
  /**
3
3
  * Checks if the input is an instance of a DeclarativeElement, the super class of all custom
4
4
  * elements defined with element-vir.
@@ -1,4 +1,4 @@
1
- import { CustomElementTagName } from '../custom-tag-name.js';
1
+ import { type CustomElementTagName } from '../custom-tag-name.js';
2
2
  /**
3
3
  * Base requirement for all CSS property names (like CSS var names).
4
4
  *
@@ -1,7 +1,7 @@
1
- import { Values } from '@augment-vir/common';
2
- import { CssVarDefinitions, CssVarsSetup } from 'lit-css-vars';
3
- import { CustomElementTagName } from '../custom-tag-name.js';
4
- import { BaseCssPropertyName } from './css-properties.js';
1
+ import { type Values } from '@augment-vir/common';
2
+ import { type CssVarDefinitions, type CssVarsSetup } from 'lit-css-vars';
3
+ import { type CustomElementTagName } from '../custom-tag-name.js';
4
+ import { type BaseCssPropertyName } from './css-properties.js';
5
5
  /**
6
6
  * Base type for a declarative element definition's CSS vars.
7
7
  *
@@ -1,5 +1,5 @@
1
- import { DefinedTypedEvent, DefineEvent, TypedEvent } from '../../typed-event/typed-event.js';
2
- import { CustomElementTagName } from '../custom-tag-name.js';
1
+ import { type DefinedTypedEvent, type DefineEvent, type TypedEvent } from '../../typed-event/typed-event.js';
2
+ import { type CustomElementTagName } from '../custom-tag-name.js';
3
3
  /**
4
4
  * Base type for defining element events inside of an element definition.
5
5
  *
@@ -1,7 +1,7 @@
1
- import { CustomElementTagName } from '../custom-tag-name.js';
2
- import { BaseCssPropertyName } from './css-properties.js';
3
- import { PropertyInitMapBase } from './element-properties.js';
4
- import { WithTagName } from './tag-name.js';
1
+ import { type CustomElementTagName } from '../custom-tag-name.js';
2
+ import { type BaseCssPropertyName } from './css-properties.js';
3
+ import { type PropertyInitMapBase } from './element-properties.js';
4
+ import { type WithTagName } from './tag-name.js';
5
5
  /**
6
6
  * Base init map for defining host classes in an element definition.
7
7
  *
@@ -1,4 +1,4 @@
1
- import { ArrayElement } from '@augment-vir/common';
1
+ import { type ArrayElement } from '@augment-vir/common';
2
2
  /**
3
3
  * Type safe mapping of slot names to themselves.
4
4
  *
@@ -1,10 +1,10 @@
1
- import { PartialWithNullable } from '@augment-vir/common';
2
- import { CustomElementTagName } from './custom-tag-name.js';
3
- import { DeclarativeElementInit } from './declarative-element-init.js';
4
- import { DeclarativeElementInputErrorParams } from './define-element.js';
5
- import { BaseCssPropertyName } from './properties/css-properties.js';
6
- import { EventsInitMap } from './properties/element-events.js';
7
- import { PropertyInitMapBase } from './properties/element-properties.js';
1
+ import { type PartialWithNullable } from '@augment-vir/common';
2
+ import { type CustomElementTagName } from './custom-tag-name.js';
3
+ import { type DeclarativeElementInit } from './declarative-element-init.js';
4
+ import { type DeclarativeElementInputErrorParams } from './define-element.js';
5
+ import { type BaseCssPropertyName } from './properties/css-properties.js';
6
+ import { type EventsInitMap } from './properties/element-events.js';
7
+ import { type PropertyInitMapBase } from './properties/element-properties.js';
8
8
  /**
9
9
  * Options for {@link wrapDefineElement}.
10
10
  *
package/dist/index.d.ts CHANGED
@@ -6,9 +6,11 @@ export * from './declarative-element/define-element-no-inputs.js';
6
6
  export * from './declarative-element/define-element.js';
7
7
  export * from './declarative-element/definition-options.js';
8
8
  export * from './declarative-element/directives/async-prop.js';
9
+ export * from './declarative-element/directives/attributes.directive.js';
9
10
  export * from './declarative-element/directives/create-attribute-directive.js';
10
11
  export * from './declarative-element/directives/directive-helpers.js';
11
12
  export * from './declarative-element/directives/listen.directive.js';
13
+ export * from './declarative-element/directives/mutate.directive.js';
12
14
  export * from './declarative-element/directives/on-dom-created.directive.js';
13
15
  export * from './declarative-element/directives/on-dom-rendered.directive.js';
14
16
  export * from './declarative-element/directives/on-intersect.directive.js';
package/dist/index.js CHANGED
@@ -6,9 +6,11 @@ export * from './declarative-element/define-element-no-inputs.js';
6
6
  export * from './declarative-element/define-element.js';
7
7
  export * from './declarative-element/definition-options.js';
8
8
  export * from './declarative-element/directives/async-prop.js';
9
+ export * from './declarative-element/directives/attributes.directive.js';
9
10
  export * from './declarative-element/directives/create-attribute-directive.js';
10
11
  export * from './declarative-element/directives/directive-helpers.js';
11
12
  export * from './declarative-element/directives/listen.directive.js';
13
+ export * from './declarative-element/directives/mutate.directive.js';
12
14
  export * from './declarative-element/directives/on-dom-created.directive.js';
13
15
  export * from './declarative-element/directives/on-dom-rendered.directive.js';
14
16
  export * from './declarative-element/directives/on-intersect.directive.js';
@@ -1,5 +1,5 @@
1
- import { DeclarativeElementDefinitionOptions } from '../declarative-element/definition-options.js';
2
- import { PropertyInitMapBase } from '../declarative-element/properties/element-properties.js';
1
+ import { type DeclarativeElementDefinitionOptions } from '../declarative-element/definition-options.js';
2
+ import { type PropertyInitMapBase } from '../declarative-element/properties/element-properties.js';
3
3
  /**
4
4
  * A minimal element definition used for interpolating element definitions into HTML templates with
5
5
  * a more generic type (to prevent insane circular dependencies).
@@ -1,4 +1,4 @@
1
- import { TemplateTransform } from './template-transform-type.js';
1
+ import { type TemplateTransform } from './template-transform-type.js';
2
2
  export declare function getAlreadyMappedTemplate<PossibleValues>(templateStringsKey: TemplateStringsArray, values: PossibleValues[]): TemplateTransform | undefined;
3
3
  export declare function setMappedTemplate<PossibleValues>(templateStringsKey: TemplateStringsArray, values: PossibleValues[], valueToSet: TemplateTransform): {
4
4
  result: boolean;
@@ -1,4 +1,4 @@
1
- import { ArrayInsertion } from '../util/array.js';
1
+ import { type ArrayInsertion } from '../util/array.js';
2
2
  export type AllValueTransforms = {
3
3
  valueIndexDeletions: number[];
4
4
  valueInsertions: ArrayInsertion<unknown>[];
@@ -1,4 +1,4 @@
1
- import { TemplateTransform } from './template-transform-type.js';
1
+ import { type TemplateTransform } from './template-transform-type.js';
2
2
  export type ValueInsertion = {
3
3
  index: number;
4
4
  value: unknown;
@@ -1,4 +1,4 @@
1
- import { CSSResultGroup } from '../../lit-exports/all-lit-exports.js';
2
- import { MinimalElementDefinition } from '../minimal-element-definition.js';
3
- import { TemplateTransform } from '../template-transform-type.js';
1
+ import { type CSSResultGroup } from '../../lit-exports/all-lit-exports.js';
2
+ import { type MinimalElementDefinition } from '../minimal-element-definition.js';
3
+ import { type TemplateTransform } from '../template-transform-type.js';
4
4
  export declare function transformCssTemplate(inputTemplateStrings: TemplateStringsArray, inputValues: (number | CSSResultGroup | MinimalElementDefinition)[]): TemplateTransform;
@@ -1,5 +1,5 @@
1
- import { CSSResult, CSSResultGroup } from '../../lit-exports/all-lit-exports.js';
2
- import { MinimalElementDefinition } from '../minimal-element-definition.js';
1
+ import { type CSSResult, type CSSResultGroup } from '../../lit-exports/all-lit-exports.js';
2
+ import { type MinimalElementDefinition } from '../minimal-element-definition.js';
3
3
  /**
4
4
  * A template literal tag used to define styles for element definitions. In particular, this is used
5
5
  * for the `styles` property in an element definitions init object.
@@ -2,7 +2,7 @@ import { type AnyFunction, type Overwrite } from '@augment-vir/common';
2
2
  import { type CSSResult, type TemplateResult, type nothing } from 'lit';
3
3
  import { type EmptyObject, type HasRequiredKeys, type IsNever } from 'type-fest';
4
4
  import { type DeclarativeElementDefinition } from '../../declarative-element/declarative-element.js';
5
- import type { Decrement, Increment } from '../../util/increment.js';
5
+ import { type Decrement, type Increment } from '../../util/increment.js';
6
6
  import { type MinimalDefinitionWithInputs, type MinimalElementDefinition } from '../minimal-element-definition.js';
7
7
  /**
8
8
  * Unfortunately the type for `DirectiveResult` means it's just an empty object. So in order to
@@ -1,5 +1,5 @@
1
- import { HTMLTemplateResult } from '../../lit-exports/all-lit-exports.js';
2
- import { TemplateTransform } from '../template-transform-type.js';
3
- import { HtmlInterpolation } from './html-interpolation.js';
1
+ import { type HTMLTemplateResult } from '../../lit-exports/all-lit-exports.js';
2
+ import { type TemplateTransform } from '../template-transform-type.js';
3
+ import { type HtmlInterpolation } from './html-interpolation.js';
4
4
  export declare function mapHtmlValues(inputTemplateStrings: TemplateStringsArray, inputValues: HtmlInterpolation[]): HtmlInterpolation[];
5
5
  export declare function transformHtmlTemplate(litTemplate: HTMLTemplateResult): TemplateTransform;
@@ -1,5 +1,5 @@
1
- import { HTMLTemplateResult } from '../../lit-exports/all-lit-exports.js';
2
- import { HtmlInterpolation, VerifyHtmlValues } from './html-interpolation.js';
1
+ import { type HTMLTemplateResult } from '../../lit-exports/all-lit-exports.js';
2
+ import { type HtmlInterpolation, type VerifyHtmlValues } from './html-interpolation.js';
3
3
  /**
4
4
  * Interprets a template literal as an HTML template which is lazily rendered to the DOM.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { NonEmptyString } from '../util/type.js';
1
+ import { type NonEmptyString } from '../util/type.js';
2
2
  /**
3
3
  * A custom event with strict types for details and the event's `type` property.
4
4
  *
@@ -1,5 +1,5 @@
1
- import type { ArrayElement } from '@augment-vir/common';
2
- import type { IsNever } from 'type-fest';
1
+ import { type ArrayElement } from '@augment-vir/common';
2
+ import { type IsNever } from 'type-fest';
3
3
  /**
4
4
  * The largest number in this tuple is the largest number of nestings of the same element that
5
5
  * `element-vir` will support with types (in runtime it'll support any level of nesting the same
@@ -1,4 +1,4 @@
1
- import type { TemplateResult, unsafeHTML, unsafeSVG } from '../lit-exports/all-lit-exports.js';
1
+ import { type TemplateResult, type unsafeHTML, type unsafeSVG } from '../lit-exports/all-lit-exports.js';
2
2
  /**
3
3
  * Converts an HTML or SVG template into a raw string.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "25.3.0",
3
+ "version": "25.4.0",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",
@@ -38,19 +38,19 @@
38
38
  "test:docs": "virmator docs check"
39
39
  },
40
40
  "dependencies": {
41
- "@augment-vir/assert": "^31.11.0",
42
- "@augment-vir/common": "^31.11.0",
41
+ "@augment-vir/assert": "^31.18.0",
42
+ "@augment-vir/common": "^31.18.0",
43
43
  "date-vir": "^7.3.1",
44
44
  "lit": "^3.3.0",
45
45
  "lit-css-vars": "^3.0.11",
46
46
  "lit-html": "^3.3.0",
47
47
  "object-shape-tester": "^5.1.5",
48
48
  "observavir": "^2.0.5",
49
- "typed-event-target": "^4.0.3"
49
+ "typed-event-target": "^4.0.4"
50
50
  },
51
51
  "devDependencies": {
52
- "@augment-vir/test": "^31.11.0",
53
- "@augment-vir/web": "^31.11.0",
52
+ "@augment-vir/test": "^31.18.0",
53
+ "@augment-vir/web": "^31.18.0",
54
54
  "@web/dev-server-esbuild": "^1.0.4",
55
55
  "@web/test-runner": "^0.20.1",
56
56
  "@web/test-runner-commands": "^0.9.0",
@@ -59,10 +59,10 @@
59
59
  "html-spec-tags": "^2.2.2",
60
60
  "istanbul-smart-text-reporter": "^1.1.5",
61
61
  "markdown-code-example-inserter": "^3.0.3",
62
- "type-fest": "^4.40.0",
63
- "typedoc": "^0.28.2",
62
+ "type-fest": "^4.41.0",
63
+ "typedoc": "^0.28.4",
64
64
  "typescript": "5.8.3",
65
- "vite": "^6.2.6",
65
+ "vite": "^6.3.5",
66
66
  "vite-tsconfig-paths": "^5.1.4"
67
67
  },
68
68
  "engines": {