@rxdi/lit-html 0.7.177 → 0.7.178
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/dist/async.d.ts +2 -2
- package/dist/async.js +4 -4
- package/dist/decorators/component.decorator.d.ts +2 -1
- package/dist/decorators/component.decorator.js +3 -3
- package/dist/index.d.ts +27 -27
- package/dist/index.js +27 -27
- package/package.json +4 -5
package/dist/async.d.ts
CHANGED
package/dist/async.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.async = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const directive_1 = require("lit-html/directive");
|
|
5
|
+
const async_directive_1 = require("lit-html/async-directive");
|
|
6
|
+
const lit_html_1 = require("lit-html");
|
|
7
7
|
class ObserveDirective extends async_directive_1.AsyncDirective {
|
|
8
8
|
// When the observable changes, unsubscribe to the old one and
|
|
9
9
|
// subscribe to the new one
|
|
@@ -19,7 +19,7 @@ class ObserveDirective extends async_directive_1.AsyncDirective {
|
|
|
19
19
|
this.subscribe(asyncResult);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return lit_html_1.noChange;
|
|
23
23
|
}
|
|
24
24
|
// Subscribes to the observable, calling the directive's asynchronous
|
|
25
25
|
// setValue API each time the value changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSResult } from 'lit-element';
|
|
2
|
+
import { TemplateResult } from 'lit-html';
|
|
2
3
|
export interface CustomAttributeRegistry {
|
|
3
4
|
define(name: string, modifier: Function | Modifier): void;
|
|
4
5
|
get(element: HTMLElement, attrName: string): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Component = void 0;
|
|
4
|
-
const
|
|
4
|
+
const lit_html_1 = require("lit-html");
|
|
5
5
|
const legacyCustomElement = (tagName, clazz, options) => {
|
|
6
6
|
window.customElements.define(tagName, clazz, options);
|
|
7
7
|
return clazz;
|
|
@@ -40,7 +40,7 @@ const customElement = (tag, config = {}) => (Base) => {
|
|
|
40
40
|
const firstUpdated = Base.prototype.firstUpdated || function () { };
|
|
41
41
|
let registry;
|
|
42
42
|
if (!config.template) {
|
|
43
|
-
config.template = Base.prototype.render || (() => (0,
|
|
43
|
+
config.template = Base.prototype.render || (() => (0, lit_html_1.html) ``);
|
|
44
44
|
}
|
|
45
45
|
if (config.style) {
|
|
46
46
|
config.styles.push(config.style);
|
|
@@ -54,7 +54,7 @@ const customElement = (tag, config = {}) => (Base) => {
|
|
|
54
54
|
}
|
|
55
55
|
OnInit() {
|
|
56
56
|
if (config.container) {
|
|
57
|
-
(0,
|
|
57
|
+
(0, lit_html_1.render)(config.template.call(this), config.container);
|
|
58
58
|
if (config.style) {
|
|
59
59
|
const style = document.createElement('style');
|
|
60
60
|
style.type = 'text/css';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export * from './decorators/index';
|
|
2
2
|
export * from './async';
|
|
3
|
-
export * from 'lit';
|
|
4
|
-
export * from 'lit/directive';
|
|
5
|
-
export * from 'lit/experimental-hydrate';
|
|
6
|
-
export * from 'lit/experimental-hydrate-support';
|
|
7
|
-
export * from 'lit/polyfill-support';
|
|
8
|
-
export * from 'lit/directive-helpers';
|
|
9
|
-
export * from 'lit/async-directive';
|
|
3
|
+
export * from 'lit-html';
|
|
4
|
+
export * from 'lit-html/directive';
|
|
5
|
+
export * from 'lit-html/experimental-hydrate';
|
|
6
|
+
export * from 'lit-element/experimental-hydrate-support';
|
|
7
|
+
export * from 'lit-html/polyfill-support';
|
|
8
|
+
export * from 'lit-html/directive-helpers';
|
|
9
|
+
export * from 'lit-html/async-directive';
|
|
10
10
|
export * from 'lit-element';
|
|
11
|
-
export * from 'lit/directives/class-map';
|
|
12
|
-
export * from 'lit/directives/async-append';
|
|
13
|
-
export * from 'lit/directives/async-replace';
|
|
14
|
-
export * from 'lit/directives/cache';
|
|
15
|
-
export * from 'lit/directives/guard';
|
|
16
|
-
export * from 'lit/directives/if-defined';
|
|
17
|
-
export * from 'lit/directives/live';
|
|
18
|
-
export * from 'lit/directives/ref';
|
|
19
|
-
export * from 'lit/directives/repeat';
|
|
20
|
-
export * from 'lit/directives/style-map';
|
|
21
|
-
export * from 'lit/directives/template-content';
|
|
22
|
-
export * from 'lit/directives/unsafe-html';
|
|
23
|
-
export * from 'lit/directives/unsafe-svg';
|
|
24
|
-
export * from 'lit/directives/until';
|
|
25
|
-
export * from 'lit/directives/choose';
|
|
26
|
-
export * from 'lit/directives/join';
|
|
27
|
-
export * from 'lit/directives/keyed';
|
|
28
|
-
export * from 'lit/directives/map';
|
|
29
|
-
export * from 'lit/directives/range';
|
|
30
|
-
export * from 'lit/directives/when';
|
|
11
|
+
export * from 'lit-html/directives/class-map';
|
|
12
|
+
export * from 'lit-html/directives/async-append';
|
|
13
|
+
export * from 'lit-html/directives/async-replace';
|
|
14
|
+
export * from 'lit-html/directives/cache';
|
|
15
|
+
export * from 'lit-html/directives/guard';
|
|
16
|
+
export * from 'lit-html/directives/if-defined';
|
|
17
|
+
export * from 'lit-html/directives/live';
|
|
18
|
+
export * from 'lit-html/directives/ref';
|
|
19
|
+
export * from 'lit-html/directives/repeat';
|
|
20
|
+
export * from 'lit-html/directives/style-map';
|
|
21
|
+
export * from 'lit-html/directives/template-content';
|
|
22
|
+
export * from 'lit-html/directives/unsafe-html';
|
|
23
|
+
export * from 'lit-html/directives/unsafe-svg';
|
|
24
|
+
export * from 'lit-html/directives/until';
|
|
25
|
+
export * from 'lit-html/directives/choose';
|
|
26
|
+
export * from 'lit-html/directives/join';
|
|
27
|
+
export * from 'lit-html/directives/keyed';
|
|
28
|
+
export * from 'lit-html/directives/map';
|
|
29
|
+
export * from 'lit-html/directives/range';
|
|
30
|
+
export * from 'lit-html/directives/when';
|
package/dist/index.js
CHANGED
|
@@ -12,31 +12,31 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./decorators/index"), exports);
|
|
14
14
|
__exportStar(require("./async"), exports);
|
|
15
|
-
__exportStar(require("lit"), exports);
|
|
16
|
-
__exportStar(require("lit/directive"), exports);
|
|
17
|
-
__exportStar(require("lit/experimental-hydrate"), exports);
|
|
18
|
-
__exportStar(require("lit/experimental-hydrate-support"), exports);
|
|
19
|
-
__exportStar(require("lit/polyfill-support"), exports);
|
|
20
|
-
__exportStar(require("lit/directive-helpers"), exports);
|
|
21
|
-
__exportStar(require("lit/async-directive"), exports);
|
|
15
|
+
__exportStar(require("lit-html"), exports);
|
|
16
|
+
__exportStar(require("lit-html/directive"), exports);
|
|
17
|
+
__exportStar(require("lit-html/experimental-hydrate"), exports);
|
|
18
|
+
__exportStar(require("lit-element/experimental-hydrate-support"), exports);
|
|
19
|
+
__exportStar(require("lit-html/polyfill-support"), exports);
|
|
20
|
+
__exportStar(require("lit-html/directive-helpers"), exports);
|
|
21
|
+
__exportStar(require("lit-html/async-directive"), exports);
|
|
22
22
|
__exportStar(require("lit-element"), exports);
|
|
23
|
-
__exportStar(require("lit/directives/class-map"), exports);
|
|
24
|
-
__exportStar(require("lit/directives/async-append"), exports);
|
|
25
|
-
__exportStar(require("lit/directives/async-replace"), exports);
|
|
26
|
-
__exportStar(require("lit/directives/cache"), exports);
|
|
27
|
-
__exportStar(require("lit/directives/guard"), exports);
|
|
28
|
-
__exportStar(require("lit/directives/if-defined"), exports);
|
|
29
|
-
__exportStar(require("lit/directives/live"), exports);
|
|
30
|
-
__exportStar(require("lit/directives/ref"), exports);
|
|
31
|
-
__exportStar(require("lit/directives/repeat"), exports);
|
|
32
|
-
__exportStar(require("lit/directives/style-map"), exports);
|
|
33
|
-
__exportStar(require("lit/directives/template-content"), exports);
|
|
34
|
-
__exportStar(require("lit/directives/unsafe-html"), exports);
|
|
35
|
-
__exportStar(require("lit/directives/unsafe-svg"), exports);
|
|
36
|
-
__exportStar(require("lit/directives/until"), exports);
|
|
37
|
-
__exportStar(require("lit/directives/choose"), exports);
|
|
38
|
-
__exportStar(require("lit/directives/join"), exports);
|
|
39
|
-
__exportStar(require("lit/directives/keyed"), exports);
|
|
40
|
-
__exportStar(require("lit/directives/map"), exports);
|
|
41
|
-
__exportStar(require("lit/directives/range"), exports);
|
|
42
|
-
__exportStar(require("lit/directives/when"), exports);
|
|
23
|
+
__exportStar(require("lit-html/directives/class-map"), exports);
|
|
24
|
+
__exportStar(require("lit-html/directives/async-append"), exports);
|
|
25
|
+
__exportStar(require("lit-html/directives/async-replace"), exports);
|
|
26
|
+
__exportStar(require("lit-html/directives/cache"), exports);
|
|
27
|
+
__exportStar(require("lit-html/directives/guard"), exports);
|
|
28
|
+
__exportStar(require("lit-html/directives/if-defined"), exports);
|
|
29
|
+
__exportStar(require("lit-html/directives/live"), exports);
|
|
30
|
+
__exportStar(require("lit-html/directives/ref"), exports);
|
|
31
|
+
__exportStar(require("lit-html/directives/repeat"), exports);
|
|
32
|
+
__exportStar(require("lit-html/directives/style-map"), exports);
|
|
33
|
+
__exportStar(require("lit-html/directives/template-content"), exports);
|
|
34
|
+
__exportStar(require("lit-html/directives/unsafe-html"), exports);
|
|
35
|
+
__exportStar(require("lit-html/directives/unsafe-svg"), exports);
|
|
36
|
+
__exportStar(require("lit-html/directives/until"), exports);
|
|
37
|
+
__exportStar(require("lit-html/directives/choose"), exports);
|
|
38
|
+
__exportStar(require("lit-html/directives/join"), exports);
|
|
39
|
+
__exportStar(require("lit-html/directives/keyed"), exports);
|
|
40
|
+
__exportStar(require("lit-html/directives/map"), exports);
|
|
41
|
+
__exportStar(require("lit-html/directives/range"), exports);
|
|
42
|
+
__exportStar(require("lit-html/directives/when"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdi/lit-html",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.178",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"author": "Kristiyan Tachev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,10 +12,9 @@
|
|
|
12
12
|
"build": "npx tsc || true"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"lit": "
|
|
16
|
-
"
|
|
17
|
-
"lit-
|
|
18
|
-
"lit-html": "^2.5.0"
|
|
15
|
+
"@lit/reactive-element": "1.5.0",
|
|
16
|
+
"lit-element": "3.2.2",
|
|
17
|
+
"lit-html": "2.5.0"
|
|
19
18
|
},
|
|
20
19
|
"devDependencies": {
|
|
21
20
|
"@types/node": "^12.0.10",
|