@blockquote/create-wc 1.101.0 → 1.102.0
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/package.json +1 -1
- package/src/common-linting/templates/package.json +1 -1
- package/src/common-repo/templates/package.json +1 -1
- package/src/testing/templates/my-el.test.js +1 -1
- package/src/testing-ts/templates/my-el.test.ts +2 -2
- package/src/wc-lit-element/templates/MyEl.js +5 -5
- package/src/wc-lit-element/templates/index.js +1 -1
- package/src/wc-lit-element/templates/my-el.js +1 -1
- package/src/wc-lit-element/templates/static/demo/index.html +4 -4
- package/src/wc-lit-element-ts/templates/MyEl.ts +6 -6
- package/src/wc-lit-element-ts/templates/index.ts +1 -1
- package/src/wc-lit-element-ts/templates/my-el.ts +1 -1
- package/src/wc-lit-element-ts/templates/static/demo/index.html +4 -4
- package/src/wc-lit-element/templates/static/demo/favicon.svg +0 -12
- package/src/wc-lit-element-ts/templates/static/demo/favicon.svg +0 -12
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {html, fixture, assert, expect, fixtureCleanup} from '@open-wc/testing';
|
|
2
|
+
import {<%= className %>} from '../src/<%= className %>.js';
|
|
3
3
|
import '../define/<%= tagName %>.js';
|
|
4
4
|
|
|
5
5
|
suite('<%= className %>', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {html, LitElement} from 'lit';
|
|
2
|
+
import {styles} from './styles/<%= tagName %>-styles.css.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 
|
|
@@ -25,12 +25,12 @@ export class <%= className %> extends LitElement {
|
|
|
25
25
|
/**
|
|
26
26
|
* The heading to say "Hello" to.
|
|
27
27
|
*/
|
|
28
|
-
heading: {
|
|
28
|
+
heading: {type: String},
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* The number of times the button has been clicked.
|
|
32
32
|
*/
|
|
33
|
-
counter: {
|
|
33
|
+
counter: {type: Number},
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
constructor() {
|
|
@@ -53,7 +53,7 @@ export class <%= className %> extends LitElement {
|
|
|
53
53
|
|
|
54
54
|
#onClick() {
|
|
55
55
|
this.counter += 1;
|
|
56
|
-
this.dispatchEvent(new CustomEvent('counterchange', {
|
|
56
|
+
this.dispatchEvent(new CustomEvent('counterchange', {detail: this.counter}));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {<%= className %>} from './<%= className %>.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<title>Demo - <%= tagName %></title>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<link rel="icon" href="
|
|
7
|
+
<link rel="icon" href="data:image/x-icon;base64,B" />
|
|
8
8
|
<meta name="description" content="<%= tagName %>" />
|
|
9
9
|
<style>
|
|
10
10
|
html,
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
<div id="demo"></div>
|
|
20
20
|
|
|
21
21
|
<script type="module">
|
|
22
|
-
import {
|
|
22
|
+
import {html, render} from 'lit';
|
|
23
23
|
import '../define/<%= tagName %>.js';
|
|
24
24
|
|
|
25
25
|
const heading = 'World!';
|
|
26
26
|
render(
|
|
27
27
|
html`<<%= tagName %>
|
|
28
|
-
@counterchange="${ev => console.log('==>', ev.detail)}" .heading=${heading}
|
|
28
|
+
@counterchange="${(ev) => console.log('==>', ev.detail)}" .heading=${heading}
|
|
29
29
|
>some light-dom</<%= tagName %>
|
|
30
30
|
>`,
|
|
31
|
-
document.querySelector('#demo')
|
|
31
|
+
document.querySelector('#demo')
|
|
32
32
|
);
|
|
33
33
|
</script>
|
|
34
34
|
</body>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import {html, LitElement} from 'lit';
|
|
2
|
+
import {property} from 'lit/decorators.js';
|
|
3
|
+
import {styles} from './styles/<%= tagName %>-styles.css.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 
|
|
@@ -19,13 +19,13 @@ export class <%= className %> extends LitElement {
|
|
|
19
19
|
/**
|
|
20
20
|
* The heading to say "Hello" to.
|
|
21
21
|
*/
|
|
22
|
-
@property({
|
|
22
|
+
@property({type: String})
|
|
23
23
|
heading = 'Hey there';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* The number of times the button has been clicked.
|
|
27
27
|
*/
|
|
28
|
-
@property({
|
|
28
|
+
@property({type: Number})
|
|
29
29
|
counter = 5;
|
|
30
30
|
|
|
31
31
|
override render() {
|
|
@@ -39,7 +39,7 @@ export class <%= className %> extends LitElement {
|
|
|
39
39
|
|
|
40
40
|
#onClick() {
|
|
41
41
|
this.counter += 1;
|
|
42
|
-
this.dispatchEvent(new CustomEvent('counterchange', {
|
|
42
|
+
this.dispatchEvent(new CustomEvent('counterchange', {detail: this.counter}));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {<%= className %>} from './<%= className %>.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<title>Demo - <%= tagName %></title>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<link rel="icon" href="
|
|
7
|
+
<link rel="icon" href="data:image/x-icon;base64,B" />
|
|
8
8
|
<meta name="description" content="<%= tagName %>" />
|
|
9
9
|
<style>
|
|
10
10
|
html,
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
<div id="demo"></div>
|
|
20
20
|
|
|
21
21
|
<script type="module">
|
|
22
|
-
import {
|
|
22
|
+
import {html, render} from 'lit';
|
|
23
23
|
import '../define/<%= tagName %>.ts';
|
|
24
24
|
|
|
25
25
|
const heading = 'World!';
|
|
26
26
|
render(
|
|
27
27
|
html`<<%= tagName %>
|
|
28
|
-
@counterchange="${ev => console.log('==>', ev.detail)}" .heading=${heading}
|
|
28
|
+
@counterchange="${(ev) => console.log('==>', ev.detail)}" .heading=${heading}
|
|
29
29
|
>some light-dom</<%= tagName %>
|
|
30
30
|
>`,
|
|
31
|
-
document.querySelector('#demo')
|
|
31
|
+
document.querySelector('#demo')
|
|
32
32
|
);
|
|
33
33
|
</script>
|
|
34
34
|
</body>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<style>
|
|
3
|
-
.square1 { fill: #888888; }
|
|
4
|
-
.square2 { fill: #D2D2D2; }
|
|
5
|
-
@media (prefers-color-scheme: dark) {
|
|
6
|
-
.square1 { fill: #D2D2D2; }
|
|
7
|
-
.square2 { fill: #888888; }
|
|
8
|
-
}
|
|
9
|
-
</style>
|
|
10
|
-
<rect class="square1" x="24" y="24" width="48" height="48" />
|
|
11
|
-
<rect class="square2" x="33" y="33" width="30" height="30" />
|
|
12
|
-
</svg>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<style>
|
|
3
|
-
.square1 { fill: #888888; }
|
|
4
|
-
.square2 { fill: #D2D2D2; }
|
|
5
|
-
@media (prefers-color-scheme: dark) {
|
|
6
|
-
.square1 { fill: #D2D2D2; }
|
|
7
|
-
.square2 { fill: #888888; }
|
|
8
|
-
}
|
|
9
|
-
</style>
|
|
10
|
-
<rect class="square1" x="24" y="24" width="48" height="48" />
|
|
11
|
-
<rect class="square2" x="33" y="33" width="30" height="30" />
|
|
12
|
-
</svg>
|