lit

Lit is a simple library for building fast, lightweight web components.

BSD-3-CLAUSE License

Downloads
46.4M
Stars
18.6K
Committers
190

Bot releases are hidden (Show)

lit - [email protected]

Published by aomarks almost 3 years ago

Minor Changes

  • #2337 fcc2b3d0 - Add a keyed(key, value) directive that clears a part if the key changes.

  • #2327 49ecf623 - Add queryAssignedElements decorator for a declarative API that calls HTMLSlotElement.assignedElements() on a specified slot. selector option allows filtering returned elements with a CSS selector.

  • #2341 1d563e83 - Add choose() directive

Patch Changes

lit - @lit-labs/[email protected]

Published by aomarks almost 3 years ago

Minor Changes

  • #2336 48394303 - Tasks with no arguments now run by default. When a task runs can be customized by passing a canRun function.

  • #2336 48394303 - Tasks now run whenever their arguments change. Disable this by setting autoRun to false, either on the task config or on the task itself. Tasks can be explicitly run by calling run and optionally passing custom args.

Patch Changes

lit - @lit-labs/[email protected]

Published by aomarks almost 3 years ago

Major Changes

  • #2288 b42f6f0f - Refactor the import-module into a class-based ModuleLoader API. Adds a module cache that tracks dependencies between modules.

Minor Changes

  • #2294 dcab56b0 - Add customElementRendered callback to RenderInfo so that callers can know what elements were rendered.

Patch Changes

lit - @lit-labs/[email protected]

Published by aomarks almost 3 years ago

Major Changes

  • #2340 e1c88265 - A set of reactive controllers that facilitate using the platform observer objects, including MutationObserver, ResizeObserver, IntersectionObserver, and PerformanceObserver.

Patch Changes

lit - [email protected]

Published by aomarks about 3 years ago

Patch Changes

  • #2234 de17a7d4 - Fix repository.directory field in lit package.json
lit - [email protected]

Published by aomarks about 3 years ago

Patch Changes

lit - @lit/[email protected]

Published by aomarks about 3 years ago

Patch Changes

  • #2152 ba5e1391 - Replace dynamic name lookups for polyfill support functions with static names.
lit - @lit/[email protected]

Published by aomarks about 3 years ago

Minor Changes

  • #2188 9fc5a039 - Support emitting generated modules as .js files. Adds a new
    output.language setting for runtime mode locale generation, and automatically
    detects the filetype based on the file extension when using
    output.localeCodesModule.

Patch Changes

lit - @lit/[email protected]

Published by aomarks about 3 years ago

Minor Changes

  • #2188 9fc5a039 - Added output.outputDir setting for transform mode. Required if tsConfig is not specified.
  • #2188 9fc5a039 - Add inputFiles field, and make tsConfig field optional when inputFiles is specified. If both are set, inputFiles takes precedence over the input files from tsConfig. When tsConfig is not specified, a default config is used that will include .js files.

Patch Changes

lit - @lit-labs/[email protected]

Published by aomarks about 3 years ago

Patch Changes

  • #2155 55cc9df4 - Fix displayName of components created with "createComponent"
lit - @lit-labs/[email protected]

Published by aomarks about 3 years ago

Patch Changes

  • #2186 59acf89a - Ensures *.d.ts files are included in production output.
lit - [email protected]

Published by aomarks about 3 years ago

Patch Changes

  • #2152 ba5e1391 - Replace dynamic name lookups for polyfill support functions with static names.
lit - [email protected]

Published by aomarks about 3 years ago

Patch Changes

  • #2152 ba5e1391 - Replace dynamic name lookups for polyfill support functions with static names.
lit - [email protected]

Published by kevinpschaaf about 3 years ago

Major Changes

  • New package serving as the main entry point for all users of Lit (including LitElement, ReactiveElement, and lit-html). See the Migration Guide for more details.
lit - @lit/[email protected]

Published by kevinpschaaf about 3 years ago

Patch Changes

  • #2113 5b2f3642 - Dependency upgrades including TypeScript 4.4.2
lit - @lit/[email protected]

Published by kevinpschaaf about 3 years ago

Major Changes

  • @lit/reactive-element is a new package that factors out the base class that provides the reactive update lifecycle based on property/attribute changes to LitElement (what was previously called UpdatingElement) into a separate package. LitElement now extends ReactiveElement to add lit-html rendering via the render() callback. See ReactiveElement API for more details.
  • UpdatingElement has been renamed to ReactiveElement.
  • The updating-element package has been renamed to @lit/reactive-element.
  • The @internalProperty decorator has been renamed to @state.
  • For consistency, renamed _getUpdateComplete to getUpdateComplete.
  • When a property declaration is reflect: true and its toAttribute function returns undefined the attribute is now removed where previously it was left unchanged (#872).
  • Errors that occur during the update cycle were previously squelched to allow subsequent updates to proceed normally. Now errors are re-fired asynchronously so they can be detected. Errors can be observed via an unhandledrejection event handler on window.
  • ReactiveElement's renderRoot is now created when the element's connectedCallback is initially run.
  • Removed requestUpdateInternal. The requestUpdate method is now identical to this method and should be used instead.
  • The initialize method has been removed. This work is now done in the element constructor.

Minor Changes

  • Adds static addInitializer for adding a function which is called with the element instance when is created. This can be used, for example, to create decorators which hook into element lifecycle by creating a reactive controller (#1663).
  • Added ability to add a controller to an element. A controller can implement callbacks that tie into element lifecycle, including hostConnected, hostDisconnected, hostUpdate, and hostUpdated. To ensure it has access to the element lifecycle, a controller should be added in the element's constructor. To add a controller to the element, call addController(controller).
  • Added removeController(controller) which can be used to remove a controller from a ReactiveElement.
  • Added willUpdate(changedProperties) lifecycle method to UpdatingElement. This is called before the update method and can be used to compute derived state needed for updating. This method is intended to be called during server side rendering and should not manipulate element DOM.
lit - @lit/[email protected]

Published by kevinpschaaf about 3 years ago

lit - @lit/[email protected]

Published by kevinpschaaf about 3 years ago

Patch Changes

  • #2113 5b2f3642 - Dependency upgrades including TypeScript 4.4.2
lit - @lit-labs/[email protected]

Published by kevinpschaaf about 3 years ago

Patch Changes

  • #1942 c8fe1d4 - For minified class fields on classes in lit libraries, added prefix to stable properties to avoid collisions with user properties.
  • #2113 5b2f3642 - Dependency upgrades including TypeScript 4.4.2
lit - @lit-labs/[email protected]

Published by kevinpschaaf about 3 years ago

Patch Changes

  • #2034 5768cc60 - Reverts the change in Lit 2 to pause ReactiveElement's update cycle while the element is disconnected. The update cycle for elements will now run while disconnected as in Lit 1, however AsyncDirectives must now check the this.isConnected flag during update to ensure that e.g. subscriptions that could lead to memory leaks are not made when AsyncDirectives update while disconnected.
  • #2113 5b2f3642 - Dependency upgrades including TypeScript 4.4.2
  • #2141 d8ff5901 - Add LICENSE files to public packages without one.
  • #2120 2043eb0f - Don't assign DOM shim window.global (and hence globalThis.global) to window

    This means that globalThis.global will retain its Node built-ins, whereas
    before it would lose anything we didn't explicitly set on window.

    Fixes https://github.com/lit/lit/issues/2118

  • #1881 a83f616 - Add demo for using global DOM shim instead of isolated VM contexts