@loickit/shared 0.0.2
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 +10 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.mjs +1 -0
- package/package.json +27 -0
package/README.md
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare class Like {
|
|
2
|
+
createElement: () => HTMLElement;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
constructor(createElement: () => HTMLElement, { width, height }: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
});
|
|
9
|
+
play(x: number, y: number): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Like };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare class Like {
|
|
2
|
+
createElement: () => HTMLElement;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
constructor(createElement: () => HTMLElement, { width, height }: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
});
|
|
9
|
+
play(x: number, y: number): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Like };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{createElement;width;height;constructor(t,{width:e,height:i}){this.width=e,this.height=i,this.createElement=t}play(t,e){const i=this.createElement();i.style.position="fixed",i.style.width=this.width+"px",i.style.height=this.height+"px",i.style.left=t-parseInt(i.style.width)/2+"px",i.style.top=e-parseInt(i.style.height)-10+"px";const s=new KeyframeEffect(i,[{transform:"scale(1)",opacity:.5},{transform:`scale(1.5) translateY(${this.height/2}px)`,opacity:.9},{transform:`scale(1.5) translateY(${this.height/2+10}px)`,opacity:0}],{duration:600,iterations:1,easing:"linear"});document.body.appendChild(i);const h=new Animation(s,document.timeline);h.onfinish=()=>{i.remove()},h.play()}}export{t as Like};
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loickit/shared",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "loickit shared lib",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"loickit"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"license": "UNLICENSED",
|
|
23
|
+
"author": "licheung228",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "loickit-cli build:lib"
|
|
26
|
+
}
|
|
27
|
+
}
|