Skip to content

Commit

Permalink
Prepare for 2.x interface.
Browse files Browse the repository at this point in the history
Changes:
* Adding `??attr` binding syntax.
* Chaning `ifDefined` to delete attr on `null` as well as `undefined`.
* Deprecating `ifDefined` / `nullish` in favor of `??attr` binding.
* Deprecating `repeat` in favor of `map`.
* Updating documentation.

Closes #204.
  • Loading branch information
theengineear committed Nov 14, 2024
1 parent e975ecc commit e0a5e14
Show file tree
Hide file tree
Showing 5 changed files with 809 additions and 228 deletions.
32 changes: 25 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- You can now bind attributes with `??foo="${bar}"` syntax. This is functionally
equivalent to the `nullish` updater and will replace that functionality later.

### Changed

- Template errors now include approximate line numbers from the offending
template. They also print the registered custom element tag name (#201).

### Deprecated

- The `ifDefined` and `nullish` updaters are deprecated, update templates to use
syntax like `??foo="${bar}"`.
- The `repeat` updater is deprecated, use `map` instead.

### Fixed

- Transitions from different content values should all now work. For example,
you previously could not change from a text value to an array. Additionally,
state is properly cleared when going from one value type to another — e.g.,
when going from `unsafeHTML` back to `null`.

## [1.1.1] - 2024-11-09

### Fixed
Expand All @@ -27,20 +45,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New support for static `styles` getter for `adoptedStyleSheets` ergonomics
(#52).

### Fixed

- The `map` function now works with properties / attributes bound across
template contexts (#179).
- The `x-element.d.ts` file now reflects the actual interface. Previously, it
has some issues (e.g., improper module export).

### Changed

- The `x-element.js` file is now “typed” via JSDoc. The validity of the JSDoc
comments are linted alongside the rest of the code and the annotations there
are exported into a generated `x-element.d.ts` file. Previously, that file was
hand-curated.

### Fixed

- The `map` function now works with properties / attributes bound across
template contexts (#179).
- The `x-element.d.ts` file now reflects the actual interface. Previously, it
has some issues (e.g., improper module export).

## [1.0.0] - 2024-02-29

### Added
Expand Down
Loading

0 comments on commit e0a5e14

Please sign in to comment.