@a11d/lit 0.13.3 โ†’ 0.13.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.13.4 (2026-10-06)
2
+ - **๐Ÿงน Chore**: Improve the package description and feature summaries ([285feac](https://github.com/a11delavar/lit/commit/285feac0f6a030647973e572344b168379227eb6))
3
+
1
4
  ## 0.13.3 (2026-09-28)
2
5
  - **๐Ÿงน Chore**: Ship the changelog and README with the package ([745c88f](https://github.com/a11delavar/lit/commit/745c88f9457ccbe3ad9ea927cbf2b48c3b106918))
3
6
 
@@ -96,4 +99,4 @@
96
99
  - **๐Ÿงน Chore**: Upgrade to Lit 3 ([f655b7f](https://github.com/a11delavar/lit/commit/f655b7ffcc83e69e06f4b336271093971fc35748))
97
100
 
98
101
  ## 0.4.0 (2023-10-10)
99
- - **๐Ÿš€ Feature**: Add the nothing constant to the html template string literal function ([fea9a9b](https://github.com/a11delavar/lit/commit/fea9a9b6a7d9e220496b432b9f08589ae564af8b))
102
+ - **๐Ÿš€ Feature**: Add the nothing constant to the html template string literal function ([fea9a9b](https://github.com/a11delavar/lit/commit/fea9a9b6a7d9e220496b432b9f08589ae564af8b))
@@ -1,6 +1,6 @@
1
1
  # `Component` class
2
2
 
3
- The `Component` class is the base class for all components.
3
+ The base class for components, extending `LitElement` with a `template` getter and additional lifecycle callbacks.
4
4
 
5
5
  In addition to [Lit's standard lifecycle](https://lit.dev/docs/components/lifecycle/), `Component` provides:
6
6
  - `template` getter - Define the component's template
@@ -1,6 +1,6 @@
1
1
  # `ComponentPart` class
2
2
 
3
- A `ComponentPart` is a part of a component, extracted into a class of its own **without introducing a component boundary**.
3
+ A part of a component, extracted into a class of its own **without introducing a component boundary**.
4
4
 
5
5
  A part contributes a `template` to its host and may declare its own state, queries, events and event listeners with the very same decorators a component uses. As a part shares the update lifecycle of its host, changing the state of a part re-renders the host as a whole โ€” no properties have to be passed down and no updates have to be propagated by hand.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # `Controller` class
2
2
 
3
- A base class for [reactive controllers](https://lit.dev/docs/composition/controllers/) which registers itself with its host, so implementations only define the callbacks they are interested in.
3
+ A base class for [reactive controllers](https://lit.dev/docs/composition/controllers/) that registers itself with its host. Implementations only define the callbacks they are interested in.
4
4
 
5
5
  ```ts
6
6
  import { Controller } from '@a11d/lit'
@@ -1,6 +1,6 @@
1
1
  # `ElementRef` / `ElementRefs` classes
2
2
 
3
- The element โ€” or the elements โ€” a template designates, with whatever it declares about them. Code gets the elements it works with from the template instead of querying for them.
3
+ The element or elements a template designates, with whatever it declares about them. Code gets the elements it works with from the template instead of querying for them.
4
4
 
5
5
  ```ts
6
6
  import { Component, component, ElementRef, html } from '@a11d/lit'
package/README.md CHANGED
@@ -13,10 +13,10 @@ npm install @a11d/lit
13
13
  <!-- features -->
14
14
  ## Features
15
15
 
16
- - **[`Component` class](https://github.com/a11delavar/lit/tree/main/packages/Lit/Component)** - The `Component` class is the base class for all components.
17
- - **[`ComponentPart` class](https://github.com/a11delavar/lit/tree/main/packages/Lit/ComponentPart)** - A `ComponentPart` is a part of a component, extracted into a class of its own **without introducing a component boundary**.
18
- - **[`Controller` class](https://github.com/a11delavar/lit/tree/main/packages/Lit/Controller)** - A base class for [reactive controllers](https://lit.dev/docs/composition/controllers/) which registers itself with its host, so implementations only define the callbacks they are interested in.
19
- - **[`ElementRef` / `ElementRefs` classes](https://github.com/a11delavar/lit/tree/main/packages/Lit/ElementRef)** - The element โ€” or the elements โ€” a template designates, with whatever it declares about them.
16
+ - **[`Component` class](https://github.com/a11delavar/lit/tree/main/packages/Lit/Component)** - The base class for components, extending `LitElement` with a `template` getter and additional lifecycle callbacks.
17
+ - **[`ComponentPart` class](https://github.com/a11delavar/lit/tree/main/packages/Lit/ComponentPart)** - A part of a component, extracted into a class of its own **without introducing a component boundary**.
18
+ - **[`Controller` class](https://github.com/a11delavar/lit/tree/main/packages/Lit/Controller)** - A base class for [reactive controllers](https://lit.dev/docs/composition/controllers/) that registers itself with its host.
19
+ - **[`ElementRef` / `ElementRefs` classes](https://github.com/a11delavar/lit/tree/main/packages/Lit/ElementRef)** - The element or elements a template designates, with whatever it declares about them.
20
20
  - **[`style` Directive](https://github.com/a11delavar/lit/tree/main/packages/Lit/style)** - Apply inline styles to elements with proper typing and reactivity.
21
21
  - **[`updated` Decorator](https://github.com/a11delavar/lit/tree/main/packages/Lit/updated)** - React to property changes with callbacks.
22
22
  - **[`eventListener` Decorator](https://github.com/a11delavar/lit/tree/main/packages/Lit/eventListener)** - Declaratively register event listeners on methods.
@@ -67,4 +67,4 @@ npm install @a11d/lit
67
67
  | `state` | const | |
68
68
  | `ElementRefLifecycle` | interface | The lifecycle of the element or elements a reference holds. |
69
69
  | `BindSource` | type | The source a binding can be established on. |
70
- <!-- /exports -->
70
+ <!-- /exports -->
@@ -1,7 +1,7 @@
1
1
  export const bindingIntegrations = new Set();
2
2
  export const bindingIntegration = () => {
3
3
  return (BindingIntegrationConstructor) => {
4
- bindingIntegrations.add(new BindingIntegrationConstructor);
4
+ bindingIntegrations.add(new BindingIntegrationConstructor());
5
5
  };
6
6
  };
7
7
  export class BindingIntegration {
@@ -13,7 +13,7 @@ export function event(options) {
13
13
  return this[`$${propertyKey}Event$`] ??= !isServer && element instanceof HTMLElement
14
14
  ? new HTMLElementEventDispatcher(element, options?.type ?? propertyKey, options)
15
15
  : new PureEventDispatcher();
16
- }
16
+ },
17
17
  });
18
18
  };
19
19
  }
@@ -29,7 +29,7 @@ export const eventListener = (...eventListenerOptions) => {
29
29
  ? descriptor.get
30
30
  : descriptor.value).call(context, event);
31
31
  }
32
- };
32
+ }();
33
33
  });
34
34
  };
35
35
  };
@@ -4,7 +4,7 @@ export const query = (selector) => {
4
4
  Object.defineProperty(prototype, propertyKey, {
5
5
  get() {
6
6
  return this[host]?.renderRoot?.querySelector(selector) ?? undefined;
7
- }
7
+ },
8
8
  });
9
9
  };
10
10
  };
@@ -4,7 +4,7 @@ export const queryAll = (selector) => {
4
4
  Object.defineProperty(prototype, propertyKey, {
5
5
  get() {
6
6
  return [...this[host]?.renderRoot?.querySelectorAll(selector) ?? []];
7
- }
7
+ },
8
8
  });
9
9
  };
10
10
  };
@@ -18,7 +18,7 @@ export function queryConnectedInstances() {
18
18
  Object.defineProperty(constructor, propertyName, { value: new Set() });
19
19
  constructor.addInitializer(element => element.addController({
20
20
  hostConnected: () => element.constructor[propertyName].add(element),
21
- hostDisconnected: () => element.constructor[propertyName].delete(element)
21
+ hostDisconnected: () => element.constructor[propertyName].delete(element),
22
22
  }));
23
23
  Object.defineProperty(constructor, propertyKey, {
24
24
  configurable: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@a11d/lit",
3
- "version": "0.13.3",
4
- "description": "A thin wrapper around the Lit library",
3
+ "version": "0.13.4",
4
+ "description": "A layer over Lit with a component base class, controllers, element references, two-way binding and typed events.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/a11delavar/lit.git",