be-hive 0.0.71 → 0.0.73
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/getLocalName.js +3 -2
- package/getLocalName.ts +6 -3
- package/package.json +5 -5
- package/types.d.ts +4 -0
package/getLocalName.js
CHANGED
|
@@ -14,8 +14,9 @@ export function getLocalName(peerCitizen, decoratorName) {
|
|
|
14
14
|
const controller = new AbortController();
|
|
15
15
|
bh.addEventListener('latest-behavior-changed', e => {
|
|
16
16
|
const detail = e.detail;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const { localName, ifWantsToBe } = detail.value;
|
|
18
|
+
if (localName === decoratorName) {
|
|
19
|
+
resolve(ifWantsToBe);
|
|
19
20
|
controller.abort();
|
|
20
21
|
}
|
|
21
22
|
});
|
package/getLocalName.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {LatestBehaviorEvent} from './types';
|
|
2
|
+
|
|
1
3
|
export function getLocalName(peerCitizen: Element, decoratorName: string): Promise<string>{
|
|
2
4
|
return new Promise((resolve, reject) => {
|
|
3
5
|
const rn = peerCitizen.getRootNode() as Element;
|
|
@@ -14,9 +16,10 @@ export function getLocalName(peerCitizen: Element, decoratorName: string): Promi
|
|
|
14
16
|
}
|
|
15
17
|
const controller = new AbortController();
|
|
16
18
|
bh.addEventListener('latest-behavior-changed', e => {
|
|
17
|
-
const detail = (e as CustomEvent).detail;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
const detail = (e as CustomEvent).detail as LatestBehaviorEvent;
|
|
20
|
+
const {localName, ifWantsToBe} = detail.value;
|
|
21
|
+
if(localName === decoratorName){
|
|
22
|
+
resolve(ifWantsToBe);
|
|
20
23
|
controller.abort();
|
|
21
24
|
}
|
|
22
25
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "be-hive",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"web-components",
|
|
6
6
|
"web-component",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"doc": "custom-elements-manifest analyze"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"trans-render": "0.0.
|
|
32
|
-
"be-decorated": "0.0.
|
|
31
|
+
"trans-render": "0.0.623",
|
|
32
|
+
"be-decorated": "0.0.169"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@playwright/test": "1.
|
|
35
|
+
"@playwright/test": "1.27.1",
|
|
36
36
|
"@skypack/package-check": "0.2.2",
|
|
37
|
-
"may-it-serve": "0.0.
|
|
37
|
+
"may-it-serve": "0.0.3",
|
|
38
38
|
"@custom-elements-manifest/analyzer": "0.6.4",
|
|
39
39
|
"xtal-editor": "0.0.196",
|
|
40
40
|
"xtal-shell": "0.0.27",
|
package/types.d.ts
CHANGED