@blockquote-web-components/blockquote-controller-rxjs 1.0.15 → 1.0.17
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/README.md +24 -24
- package/package.json +5 -11
package/README.md
CHANGED
|
@@ -22,43 +22,43 @@ assign values to and the Observable we want to subscribe.
|
|
|
22
22
|
```js
|
|
23
23
|
class BlockquoteControllerRxjsDemo extends LitElement {
|
|
24
24
|
static get is() {
|
|
25
|
-
|
|
25
|
+
return 'blockquote-controller-rxjs-demo';
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
static get properties() {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
return {
|
|
30
|
+
_pos: {
|
|
31
|
+
type: Object,
|
|
32
|
+
attribute: false,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
constructor() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
super();
|
|
39
|
+
this.rx = new BlockquoteControllerRxjs(this);
|
|
40
|
+
this._pos = { x: 0, y: 0 };
|
|
41
|
+
this.values$ = fromEvent(window, 'mousemove').pipe(
|
|
42
|
+
map(({ clientX, clientY }) => ({ x: clientX, y: clientY })),
|
|
43
|
+
);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
connectedCallback() {
|
|
47
|
-
|
|
47
|
+
super.connectedCallback();
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
// Property and Observable.
|
|
50
|
+
this.rx.subscribe('_pos', this.values$);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
render() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
return html`
|
|
55
|
+
<p>The mouse is at:</p>
|
|
56
|
+
<pre>
|
|
57
|
+
x: ${this._pos.x}
|
|
58
|
+
y: ${this._pos.y}
|
|
59
|
+
</pre
|
|
60
|
+
>
|
|
61
|
+
`;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-controller-rxjs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Webcomponent blockquote-controller-rxjs following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -48,16 +48,9 @@
|
|
|
48
48
|
"sass:watch": "sass-style-template",
|
|
49
49
|
"sort:package": "npx sort-package-json",
|
|
50
50
|
"start": "concurrently -k -r \"npm:sass:watch\" \"npm:vite\"",
|
|
51
|
-
"start:wds": "concurrently -k -r \"npm:sass:watch\" \"npm:wds\"",
|
|
52
51
|
"test": "wtr --coverage",
|
|
53
52
|
"test:watch": "wtr --watch",
|
|
54
|
-
"vite": "vite"
|
|
55
|
-
"wds": "web-dev-server"
|
|
56
|
-
},
|
|
57
|
-
"husky": {
|
|
58
|
-
"hooks": {
|
|
59
|
-
"pre-commit": "lint-staged"
|
|
60
|
-
}
|
|
53
|
+
"vite": "vite"
|
|
61
54
|
},
|
|
62
55
|
"lint-staged": {
|
|
63
56
|
"**/*.{js,ts,html}": [
|
|
@@ -131,11 +124,12 @@
|
|
|
131
124
|
"rxjs": "^7.5.5"
|
|
132
125
|
},
|
|
133
126
|
"devDependencies": {
|
|
134
|
-
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.
|
|
127
|
+
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.4.1",
|
|
128
|
+
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.3.2"
|
|
135
129
|
},
|
|
136
130
|
"publishConfig": {
|
|
137
131
|
"access": "public"
|
|
138
132
|
},
|
|
139
133
|
"customElements": "custom-elements.json",
|
|
140
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "6d26bf3d347428ed85111a48d89152e34197d4cf"
|
|
141
135
|
}
|