@a11d/lit 0.14.0 → 0.14.1
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.14.1 (2026-10-07)
|
|
2
|
+
- **🐛 Fix**: Run `@property({ updated })` hooks with Lit's hydration support loaded ([52b35bc](https://github.com/a11delavar/lit/commit/52b35bc93974f87e7e5e3237e86dd51a0a75df63))
|
|
3
|
+
|
|
1
4
|
## 0.14.0 (2026-10-07)
|
|
2
5
|
- **🚀 Feature**: Make hydration write the attributes the browser renders differently from the server ([58d6b39](https://github.com/a11delavar/lit/commit/58d6b397782bce86749001431dbc56b10a6cfce7))
|
|
3
6
|
- **🚀 Feature**: Add `Component.hydrating`, true during a server-rendered component's first render in the browser ([58d6b39](https://github.com/a11delavar/lit/commit/58d6b397782bce86749001431dbc56b10a6cfce7))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdatedController.d.ts","sourceRoot":"","sources":["../../updated/UpdatedController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAQ,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"UpdatedController.d.ts","sourceRoot":"","sources":["../../updated/UpdatedController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAQ,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAqBpD,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAA;AAEhE,qBAAa,iBAAiB,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,MAAM,CAAC,CAAE,SAAQ,UAAU;IAG/E,QAAQ,CAAC,OAAO,EAAE,CAAC;IAAE,QAAQ,CAAC,WAAW,EAAE,CAAC;IAAE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAFlG,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAa;gBAE3B,OAAO,EAAE,CAAC,EAAW,WAAW,EAAE,CAAC,EAAW,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAKlG,OAAO,KAAK,KAAK,GAA4C;IAEpD,WAAW;CAMpB"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { ReactiveElement } from 'lit';
|
|
1
|
+
import { LitElement, ReactiveElement } from 'lit';
|
|
2
2
|
import { Controller } from '../Controller/index.js';
|
|
3
3
|
import { host } from '../host.js';
|
|
4
4
|
import { getChangedPropertyKey } from './getChangedPropertyKey.js';
|
|
5
5
|
const changedPropertiesKey = Symbol('changedProperties');
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const recordChangedProperties = (prototype) => {
|
|
7
|
+
const update = prototype['update'];
|
|
8
|
+
prototype['update'] = function (changedProperties) {
|
|
9
|
+
this[changedPropertiesKey] = changedProperties;
|
|
10
|
+
return update.call(this, changedProperties);
|
|
11
|
+
};
|
|
10
12
|
};
|
|
13
|
+
recordChangedProperties(ReactiveElement.prototype);
|
|
14
|
+
// Lit's hydration support replaces LitElement's update with one calling the ReactiveElement update it captured before this module ran
|
|
15
|
+
recordChangedProperties(LitElement.prototype);
|
|
11
16
|
export class UpdatedController extends Controller {
|
|
12
17
|
constructor(context, propertyKey, callback) {
|
|
13
18
|
super(context[host]);
|