- #5218
be6b275035079db3239be4019c4f93c2b1f32428Thanks @louis-bompart! - Ensure therefdirective disconnect gracefuly when its internal ref isundefined.
-
#5044
0d0170e87b06edd8295a31893c820162d0f16a23Thanks @ava-cassiopeia! - Make ClassInfo mutable -
#4999
6c174c8d0ed0230ba765d699591d933d7ab5d4bb- Fix a bug in change detection with decorated standard private accessors.
-
#4988
6792b7efThanks @ADNolan! - Adjusted the comparison to use the name property of the _$resolve function and the resolveOverrideFn in private ssr support to prevent duplicated patching of the directive class. -
#4976
a126d8df- Fix minor regression in property converters. fromAttribute may return either null or undefined.
-
#4901
c9160405Thanks @maxpatiiuk! - Dev mode warnings are now emitted on the next microtask after package import, allowing for a wider opportunity to suppress the warnings by consumers. -
#4934
4824c4ce- Adds property option foruseDefault. When set, the initial default value is not considered a change and does not reflect whenreflectis set. In addition, when the attribute is removed, the default value is restored.
-
#4949
3e2f87f6- fixes inconsistent initial changed properties values -
#4956
0a9bc720Thanks @louis-bompart! - Import barrels explicitly for compatibility with modern Node resolution w/ ESM -
Updated dependencies [
c9160405,3e2f87f6,4824c4ce,0a9bc720]:- @lit/reactive-element@2.1.0
- lit-element@4.2.0
- lit-html@3.3.0
- #4782
99703a03- Revert the Terser plugin for Rollup torollup-plugin-terserfrom@rollup/plugin-terserdue to a bug that prevented our minified name prefixing from working.
- Updated dependencies [
feccc1ba]:- lit-html@3.2.0
- lit-element@4.1.0
- #4646
abf30b3e- The value provided by theref()directive will always beundefinedwhen the element is disconnected.
-
#4523
1a32b61e- Add a DEV_MODE error to catch duplicate attribute bindings that otherwise create silent errors. -
#4485
57b00630- Add "browser" export condition entrypoints to any package.json files with "node" export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the "node" entrypoints instead of the browser code. -
Updated dependencies [
1a32b61e,57b00630,dca963f7]:- lit-html@3.1.2
- @lit/reactive-element@2.0.4
- lit-element@4.0.4
-
#4409
1af7991c- asyncReplace correctly re-renders when value is unchanged (#4408) -
#4473
9a4d569f- Add a warning in dev mode when binding this.requestUpdate directly as an event listener. -
#4413
f60a3a2c- Remove unused internal parameters torequestUpdate()
- #4309
949a5467- Adds two new types: UncompiledTemplateResult and MaybeCompiledTemplateResult. Currently UncompiledTemplateResult is the same as TemplateResult, and MaybeCompiledTemplateResult is the union of the compiled and uncompiled types.
-
#4387
bf551b5b- EnsurerenderRootexists before first update (#4268) -
#4282
c7922a0cThanks @MaxArt2501! - Fix a bug where accessing a@querydecorated field with thecacheflag set before the first update would result innullbeing cached permanently.nullwill no longer be cached before the first update and inDEV_MODEnow raises a warning. -
#4388
839ca0f8- Fixes bug where adding or removing controllers during a reactive controller lifecycle would affect the execution of other controllers (#4266). Controllers can now be added/removed during lifecycle without affecting others. -
Updated dependencies [
949a5467]:- lit-html@3.1.0
- #4345
02b8d620- Add a dev mode warning if a static value such asliteralorunsafeStaticis detected within the non-statichtmltag function. These should only be used with the statichtmltag function imported fromlit-html/static.jsorlit/static-html.js.
-
#4240
edf998c9Thanks @remziatay! - Improved the type inferece of thechoose()directive to properly restrict the case type inferred from provided value. Note: If this change creates a type error in your code, there must have been an unreachable case that can be removed, or the type of yourvaluemight be missing a valid case in the union. -
#4310
8f674ab3Thanks @megheaiulian! - Thewhen()directive now calls the case functions with the provided condition value as an argument. This allows the narrowing of types for the condition value based on its truthiness when used as a parameter for the case function. -
#4284
89a5b088- Allownullto be in the type of@query()decorated fields
-
#4146
0f6878dc- Generated accessor for reactive properties now wrap user accessors and automatically callthis.requestUpdate()in the setter. As in previous versions, users can still specifynoAccessor: true, in which case they should callthis.requestUpdate()themselves in the setter if they want to trigger a reactive update. -
#3765
92cedaa2- Remove experimental hydrate modules. These are available from@lit-labs/ssr-client. -
#3850
7e8491d4- Delete deprecated queryAssignedNodes behavior and arguments.Migrate deprecated usage with a selector argument to use
@queryAssignedElements. E.g.:@queryAssignedNodes('list', true, '.item')to@queryAssignedElements({slot: '', flatten: false, selector: '.item'}). -
#4254
1040f758- Change the type ofReactiveElement.renderRootand return type ofReactiveElement.createRenderRoot()to beHTMLElement | DocumentFragmentto match each other and lit-html'srender()method. -
#3751
dfd747cf- Simplify lit-html attribute handling for standards-compliant browsers that iterate attributes in source order -
#3750
c3e473b4- Use toggleAttribute() to simplify boolean attribute parts
-
#4183
6470807f- Make the decorators work with theaccessorkeyword whenexperimentalDecoratorsis true. -
#3710
09949234- Addundefinedto the return type of PropertyValues.get() -
Updated dependencies:
- @lit/reactive-element@2.0.0
- lit-html@3.0.0
- lit-element@4.0.0
-
#4146
0f6878dc- Generated accessor for reactive properties now wrap user accessors and automatically callthis.requestUpdate()in the setter. As in previous versions, users can still specifynoAccessor: true, in which case they should callthis.requestUpdate()themselves in the setter if they want to trigger a reactive update.
-
#4183
6470807f- Make the decorators work with theaccessorkeyword whenexperimentalDecoratorsis true.
-
#3710
09949234- Addundefinedto the return type of PropertyValues.get() -
Updated dependencies [
6b515e43,0f6878dc,2a01471a,2eba6997,d27a77ec,6470807f,09949234]:- @lit/reactive-element@2.0.0-pre.1
- lit-element@4.0.0-pre.1
- lit-html@3.0.0-pre.1
-
#3751
dfd747cf- Simplify lit-html attribute handling for standards-compliant browsers that iterate attributes in source order -
#3750
c3e473b4- Use toggleAttribute() to simplify boolean attribute parts -
#3765
92cedaa2- Remove experimental hydrate modules. These are available from@lit-labs/ssr-client.
-
Updated dependencies [
be72f66b,dfd747cf,23c404fd,76795a18,1db01376,6f2833fd,c3e473b4,92cedaa2,7e8491d4,23326c6b,f06f7972,76795a18]:- @lit/reactive-element@2.0.0-pre.0
- lit-html@3.0.0-pre.0
- lit-element@4.0.0-pre.0
- #3993
e2c50569- Fix return type ofisTemplateResulthelper to include theCompiledTemplateResultand fix thecachedirective to work correctly withCompiledTemplateResults. Also add an explicitisCompiledTemplateResulthelper.
-
#4031
8057c78d- Rename ReactiveElement._initialize to __initialize, make it private, and remove the @internal annotation. This will help prevent collisions with subclasses that implement their own _initialize method, while using development builds. -
Updated dependencies [
e2c50569]:- lit-html@2.8.0
-
#3968
5bb40831- Allow undefined to be passed to the ref() directive -
#3987
bb2560f1- Change thehfield ofCompiledTemplates to aTemplateStringsArraypreventing the spoofing ofCompiledTemplates by JSON injection attacks. This should not be a breaking change for most users unless you're using CompiledTemplates. This is a necessary security fix, similar to #2307.
-
#3825
343187b1-static-htmlno longer adds an item toTemplateResult's value array for the last consumed static value. This fixes an error with server-side rendering of static html. -
#3766
4431cbb8- Fix styleMap initial render of mixed-case custom props
-
#3720
575fb578-lit-html/experimental-hydrate.jsandlit-element/experimental-hydrate-support.jshave been moved to@lit-labs/ssr-client.The modules in the original location have been marked deprecated and will be removed in a future version.
-
#3677
b95c86e5- [SSR only] Reflect ARIA attributes onto server rendered Lit elements with attached internals during SSR and remove them upon hydration. -
#3667
e00f6f52- [SSR only] Improved how nodes with attribute/property/event/element bindings are rendered in SSR, to avoid adding comments inside of "raw text elements" like<textarea>. Fixes #3663.Note:
@lit-labs/ssrandlit-htmlmust be updated together.
-
#3583
88a40177- [SSR only] Add more detail to some hydration errors -
Updated dependencies [
4d698430,b95c86e5,e00f6f52,88a40177]:- lit-html@2.7.0
- lit-element@3.3.0
-
#3526
65e56655- Disable ShadyDOM noPatch in Node dev build. This fixes the issue of throwing due to undefinedwindow. -
#3561
e5c254e9- Fix built-in shimming ofHTMLElementfor Node build ofreactive-elementto respect existingHTMLElementin global
-
#3522
72fcf0d7- When running in Node, Lit now automatically includes minimal DOM shims which are sufficient for most SSR (Server Side Rendering) use-cases, removing the need to import the global DOM shim from@lit-labs/ssr.The new
@lit-labs/ssr-dom-shimpackage has been introduced, which exports anHTMLElement,CustomElementRegistry, and defaultcustomElementssingleton.The existing
@lit-labs/ssrglobal DOM shim can still be used, and is compatible with the new package, because@lit-labs/ssrimports from@lit-labs/ssr-dom-shim. Importing the global DOM shim adds more APIs to the global object, such as a globalHTMLElement,TreeWalker,fetch, and other APIs. It is recommended that users try to remove usage of the@lit-labs/ssrDOM shim, and instead rely on the more minimal, automatic shimming that@lit/reactive-elementnow provides automatically.
- Updated dependencies [
72fcf0d7]:- @lit/reactive-element@1.6.0
- lit-html@2.6.0
- #3507
b152db29-lit-htmlandreactive-elementnow include development Node builds with unminified code and dev warnings.
- Updated dependencies [
b152db29]:- lit-html@2.5.0
- @lit/reactive-element@1.5.0
- #3318
21313077- Adds anisServervariable export tolitandlit-html/is-server.jswhich will betruein Node andfalsein the browser. This can be used when authoring components to change behavior based on whether or not the component is executing in an SSR context.
-
#3320
305852d4- Thelitpackage now specifies and "types" export condition allowing TypeScriptmoduleResolutionto benodenext. -
Updated dependencies [
21313077]:- lit-html@2.4.0
-
#3222
486739ec- FixCSSStyleSheet is not definederror that would occur when importing a Lit component in Node when both staticstylesand the@propertydecorator were used.
- #3156
ae6f6808- Lit and its underlying libraries can now be imported directly from Node without crashing, without the need to load the @lit-labs/ssr dom-shim library. Note that actually rendering from a Node context still requires the @lit-labs/ssr dom-shim, and the appropriate integration between @lit-labs/ssr and your framework/tool.
-
#3003
daddeb34- Lit'sasync-directivenow re-exports everything from thedirectivemodule. -
#3120
6361a4b4- Bindthisto custom attribute converter methods -
Updated dependencies [
daddeb34,0725fdb4,3766ae4c,6361a4b4,ae6f6808]:- lit-html@2.3.0
- @lit/reactive-element@1.4.0
-
#3130
1f0567f1- Export the underlying type of thekeyeddirective. -
#3132
2fe2053f- Added "types" entry to package exports. This tells newer versions of TypeScript where to look for typings for each module.
- #2978
634d4560- Changed the caching behavior of the css`` template literal tag so that same-text styles do not share a CSSStyleSheet. Note that this may be a breaking change in some very unusual scenarios on Chromium and Firefox > 101 only.
- #2952
a78cc3b7- Fix SSR hydration bug relating to and other void elements having attribute bindings.
-
#2828
b3b6bc33- Remove private Lit 2 migration helpers:INTERNALandclearContainerForLit2MigrationOnly. This logic is no longer depended on.
-
#2732
3e181bcb- Enforce use of file extensions in imports. Fixes an issue with older TypeScript compilers. -
#2688
ef178ef6- Add explicit types to the jsdoc code samples forquery,queryAll, andqueryAsync.
-
#2657
a6069c40- Remove readonly restriction fromStyleInfointerface as addition, deletion, and updating of styles is valid. ExpandedstyleMapdocumentation with links to lit.dev. -
#2642
badc532c- Add an additional security brand check to StaticValues; Similar to #2307 -
#2691
171143bd- Fixesrefbug when auto-bound class method used as a callback could incorrectly receiveundefined. -
#2661
9a3a38cd- Give a clearer error message when rendering into null/undefined -
#2646
365cd09a- Clarify that hacking around the template strings array brand error can create security vulnerabilities.
- #2635
ae358703- Make the event debug logger lazier, doing even less work (with no side effects) even in dev mode unless the page has opted in.
- #2401
2c9d0008- Added a devlog events system that may be used for debugging and visualizing Lit's internals.
- Updated dependencies [
2c9d0008]:- lit-element@3.2.0
- lit-html@2.2.0
- @lit/reactive-element@1.3.0
-
#2518
bbbf21d4- Fix breaking change in the PropertyValues type. Make PropertyValues compatible with Map<string, string> and other Map types. -
#2526
a50d188a- Export PropertyValueMap such that JavaScript generated by Google Closure Compiler can reference this type. Do not directly import thePropertyValueMapinterface.
-
#2498
2a1dc7a1- Replace 'rare' with 'invalid' in svg tag function JSDocs. -
#2482
6ea3d6c4- Update the definition of the PropertyValues type to give better types to.get(k)..get(k)is now defined to return the correct type when usingPropertyValues<this>and a parameter that's a key of the element class. -
#2464
df4e1a46- Fix type signature in queryAssignedNodes JSDoc code example. -
#2479
89560520- Expand JSDocs for thesvgtagged template literal (TTL). The new documentation makes it more clear that thesvgtag function should only be used for SVG fragments, and not for the<svg>HTML element. -
#2457
48d69184- Add JSDoc to thewillUpdatelifecycle callback. Expand the docs forfirstUpdated, andattributeChangedCallback. Minor code sample fixes.
-
#2399
5ac025bf- Correct typo inasync-directivemodule comment -
#2370
7453e365- Replace square bracket links with thelinkcodeJSDoc tag. Editors will create a jump to definition hyperlink for the linkcode tag if the identifier is in scope. -
#2410
b9a6962b- Correct the link path of CONTRIBUTING.md in README.md files
- #2327
49ecf623- AddqueryAssignedElementsdecorator for a declarative API that callsHTMLSlotElement.assignedElements()on a specified slot.selectoroption allows filtering returned elements with a CSS selector.
- Updated dependencies [
08e7fc56,fcc2b3d0,eb5c5d2b,49ecf623,26e3fb7b,d319cf5f,1d563e83,221cb0a9]:- @lit/reactive-element@1.1.0
- lit-html@2.1.0
- lit-element@3.1.0
- New package serving as the main entry point for all users of Lit (including
LitElement,ReactiveElement, andlit-html). See the Migration Guide for more details.
-
#2103
15a8356d- Updates theexportsfield ofpackage.jsonfiles to replace the subpath folder mapping syntax with an explicit list of all exported files.The
/-suffixed syntax for subpath folder mapping originally used in these files is deprecated. Rather than update to the new syntax, this change replaces these mappings with individual entries for all exported files so that (a) users must import using extensions and (b) bundlers or other tools that don't resolve subpath folder mapping exactly as Node.js does won't break these packages' expectations around how they're imported.
- #1942
c8fe1d4- For minified class fields on classes in lit libraries, added prefix to stable properties to avoid collisions with user properties.
- #1959
6938995- Changed prefix used for minifying class field names on lit libraries to stay within ASCII subset, to avoid needing to explicitly set the charset for scripts in some browsers.
-
Updated dependencies [
ff0d1556,5768cc60,69389958,5fabe2b5,52a47c7e,5fabe2b5,5fabe2b5,5fabe2b5,f05be301,5fabe2b5,56e8efd3,662209c3,a791514b,5fabe2b5]:- lit-html@2.0.0-rc.4
Changes below were based on the Keep a Changelog format. All changes above are generated automatically by Changesets.
- Updated dependencies
- (Since 2.0.0-pre.1) Renamed
hydrateandhydrate-supportmodules toexperimental-hydrateandexperimental-hydrate-support, respectively, to reflect their experimental nature. Experimental modules may undergo breaking changes within otherwise non-major releases.
- Updated dependencies
Initial release