Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lit

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lit - npm Package Compare versions

Comparing version 2.0.0-rc.1 to 2.0.0-rc.2

6

CHANGELOG.md

@@ -20,2 +20,8 @@ # Change Log

## [2.0.0-rc.2] - 2021-05-07
### Changed
- Updated dependencies
## [2.0.0-rc.1] - 2021-04-20

@@ -22,0 +28,0 @@

2

index.js

@@ -1,2 +0,2 @@

import"lit-html";import"@lit/reactive-element";export*from"lit-element/lit-element.js";
import"@lit/reactive-element";import"lit-html";export*from"lit-element/lit-element.js";
//# sourceMappingURL=index.js.map
{
"name": "lit",
"version": "2.0.0-rc.1",
"version": "2.0.0-rc.2",
"publishConfig": {

@@ -84,5 +84,5 @@ "access": "public"

"dependencies": {
"@lit/reactive-element": "^1.0.0-rc.1",
"lit-element": "^3.0.0-rc.1",
"lit-html": "^2.0.0-rc.1"
"@lit/reactive-element": "^1.0.0-rc.2",
"lit-element": "^3.0.0-rc.2",
"lit-html": "^2.0.0-rc.3"
},

@@ -89,0 +89,0 @@ "devDependencies": {

@@ -1,5 +0,10 @@

# Lit
<img src="./logo.svg" alt="Lit" width="300" height="141">
## Simple. Fast. Web Components.
### Simple. Fast. Web Components.
[![Build Status](https://github.com/lit/lit/actions/workflows/tests.yml/badge.svg)](https://github.com/lit/lit/actions/workflows/tests.yml)
[![Published on npm](https://img.shields.io/npm/v/lit.svg?logo=npm)](https://www.npmjs.com/package/lit)
[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-4a154b.svg?logo=slack)](https://lit.dev/slack-invite/)
[![Mentioned in Awesome Lit](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit)
Lit is a simple library for building fast, lightweight web components.

@@ -9,19 +14,55 @@

## About this package
## Documentation
The `lit` package contains everything needed to build Lit components: the LitElement base class, Lit templates, and all first-party Lit directives.
See the full documentation for Lit at [lit.dev](https://lit.dev)
Modules:
## About this release
- `lit`: The main module exports the core pieces needed for component development, including `LitElement`, `html`, and `css`
- `lit/decorators.js`: Exports all the TypeScript/Babel decorators from one module.
- `lit/decorators/...`: The `decorators/` folder contains a module for each decorator (`@customElement()`, `@property()`, etc.) for optimal pay-as-you-go module loading.
- `lit/html.js`: Just the exports needed for standalone `lit-html` usage: `render()`, `html`, `svg`, etc.
- `lit/static-html.js`: The lit-html `static.js` module
- `lit/directives.js`: Contains the `Directive` base class for implementing directives.
- `lit/directive-helpers.js`: Optional helper utilities for implementing directives.
- `lit/async-directive.js`: A directive base class that supports disconnection and reconnection.
- `lit/directives/...`: The `directives/` folder contains all of the first-party lit-html directives, like `repeat`, `classMap`, etc.
- `lit/polyfill-support.js`: A module that connects Lit to the web components polyfills where necessary to support older browsers.
- `lit/experimental-hydrate.js`: A module for hydrating `lit-html` templates that were server-rendered with `@lit-labs/ssr`. Note this module is experimental and subject to breaking changes.
- `lit/experimental-hydrate-support.js`: A module that adds hydration support to LitElement. Note this module is experimental and subject to breaking changes.
This release candidate of Lit 2.0 is intended to be feature complete and API stable. Please note the minor breaking changes from lit-element 2.0 and lit-html 1.0 in the [lit.dev upgrade guide](https://lit.dev/docs/releases/upgrade/).
## Overview
Lit provides developers with just the right tools to build fast web components:
- A fast declarative HTML template system
- Reactive property declarations
- A customizable reactive update lifecycle
- Easy to use scoped CSS styling
Lit builds on top of standard web components, and makes them easier to write:
```ts
import {LitElement, html, css} from 'lit';
import {customElement, property} from 'lit/decorators.js';
// Registers the element
@customElement('my-element')
export class MyElement extends LitElement {
// Styles are applied to the shadow root and scoped to this element
static styles = css`
span {
color: green;
}
`;
// Creates a reactive property that triggers rendering
@property()
mood = 'great';
// Render the component's DOM by returning a Lit template
render() {
return html`Web Components are <span>${this.mood}</span>!`;
}
}
```
Once you've defined your component, you can use it anywhere you use HTML:
```html
<my-element mood="awesome"></my-element>
```
## Contributing
Please see [CONTRIBUTING.md](./CONTRIBUTING.md).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc