react-kofi-overlay 0.1.0 → 0.1.1
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 +8 -8
- package/dist/Donate.d.ts +10 -9
- package/dist/Donate.js +2 -2
- package/dist/Donate.js.map +1 -1
- package/dist/bundle.js +2 -11496
- package/dist/bundle.js.LICENSE.txt +5 -0
- package/package.json +4 -3
- package/webpack.config.js +39 -5
- package/dist/main.css +0 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-kofi-overlay",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "React component for accepting donations though Ko-fi without leaving your website",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,9 +25,10 @@
|
|
|
25
25
|
"@types/react": "^18.2.45",
|
|
26
26
|
"babel-loader": "^9.1.3",
|
|
27
27
|
"css-loader": "^6.8.1",
|
|
28
|
-
"mini-css-extract-plugin": "^2.7.6",
|
|
29
28
|
"node-sass": "^9.0.0",
|
|
30
|
-
"sass-loader": "^13.3.
|
|
29
|
+
"sass-loader": "^13.3.3",
|
|
30
|
+
"style-loader": "^3.3.3",
|
|
31
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
31
32
|
"typescript": "^5.3.3",
|
|
32
33
|
"webpack": "^5.89.0",
|
|
33
34
|
"webpack-cli": "^5.1.4"
|
package/webpack.config.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const webpack = require('webpack')
|
|
2
|
+
const TerserPlugin = require('terser-webpack-plugin')
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
entry: './src/index.tsx',
|
|
5
|
-
mode: '
|
|
6
|
+
mode: 'production',
|
|
6
7
|
module: {
|
|
7
8
|
rules: [
|
|
8
9
|
{
|
|
@@ -20,22 +21,55 @@ module.exports = {
|
|
|
20
21
|
},
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
|
-
test: /\.
|
|
24
|
-
use: [
|
|
24
|
+
test: /\.s[ac]ss$/i,
|
|
25
|
+
use: [
|
|
26
|
+
// Creates `style` nodes from JS strings
|
|
27
|
+
'style-loader',
|
|
28
|
+
// Translates CSS into CommonJS
|
|
29
|
+
'css-loader',
|
|
30
|
+
// Compiles Sass to CSS
|
|
31
|
+
'sass-loader',
|
|
32
|
+
],
|
|
25
33
|
},
|
|
26
34
|
],
|
|
27
35
|
},
|
|
28
36
|
resolve: {
|
|
29
37
|
extensions: ['.tsx', '.ts', '.js'],
|
|
30
38
|
},
|
|
39
|
+
optimization: {
|
|
40
|
+
minimize: true,
|
|
41
|
+
minimizer: [
|
|
42
|
+
new TerserPlugin({
|
|
43
|
+
terserOptions: {
|
|
44
|
+
compress: {
|
|
45
|
+
// preserve "use client" directive (inserted below w/ BannerPlugin)
|
|
46
|
+
// https://github.com/terser/terser?tab=readme-ov-file#compress-options
|
|
47
|
+
directives: false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
],
|
|
52
|
+
},
|
|
31
53
|
output: {
|
|
32
54
|
filename: 'bundle.js',
|
|
33
55
|
path: __dirname + '/dist',
|
|
34
56
|
libraryTarget: 'umd',
|
|
35
57
|
library: 'KofiDonate',
|
|
36
58
|
umdNamedDefine: true,
|
|
59
|
+
globalObject: 'this'
|
|
37
60
|
},
|
|
38
|
-
plugins: [
|
|
61
|
+
plugins: [
|
|
62
|
+
// Inject a "use client" at the top of the bundle so frameworks like
|
|
63
|
+
// Next.js see it as a boundary between client and server.
|
|
64
|
+
// This feels a little hacky so hopefully this can be improved with better
|
|
65
|
+
// webpack support in the future.
|
|
66
|
+
new webpack.BannerPlugin({
|
|
67
|
+
// https://webpack.js.org/plugins/banner-plugin/#options
|
|
68
|
+
banner: "'use client';",
|
|
69
|
+
raw: true,
|
|
70
|
+
include: [/\.(ts|tsx|js)$/]
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
39
73
|
externals: {
|
|
40
74
|
react: 'react',
|
|
41
75
|
'react-dom': 'react-dom',
|
package/dist/main.css
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
@keyframes kF0g9az8fVG6kOqOMufc {
|
|
2
|
-
from {
|
|
3
|
-
translate: 0 200%;
|
|
4
|
-
opacity: 0; }
|
|
5
|
-
to {
|
|
6
|
-
translate: 0;
|
|
7
|
-
opacity: 1; } }
|
|
8
|
-
|
|
9
|
-
.QSEpZEcKR0JDQr2RBSst {
|
|
10
|
-
display: inline-block;
|
|
11
|
-
background-color: #29abe0;
|
|
12
|
-
color: white;
|
|
13
|
-
padding: 0.5em 1em;
|
|
14
|
-
border-radius: 2em;
|
|
15
|
-
font-weight: bold; }
|
|
16
|
-
.QSEpZEcKR0JDQr2RBSst:hover {
|
|
17
|
-
background-color: #3eb3e3; }
|
|
18
|
-
.QSEpZEcKR0JDQr2RBSst:active {
|
|
19
|
-
background-color: #259aca; }
|
|
20
|
-
|
|
21
|
-
.OUfEeoWEwJM1UiF9qYa6 {
|
|
22
|
-
position: fixed;
|
|
23
|
-
z-index: 100;
|
|
24
|
-
width: calc(min(320px, 100%));
|
|
25
|
-
height: calc(min(580px, 95%));
|
|
26
|
-
bottom: 0;
|
|
27
|
-
right: 2em;
|
|
28
|
-
animation: kF0g9az8fVG6kOqOMufc 1s forwards ease-in-out;
|
|
29
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
|
|
30
|
-
.OUfEeoWEwJM1UiF9qYa6 iframe {
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
border: 0;
|
|
34
|
-
border-radius: 1em 1em 0 0;
|
|
35
|
-
background-color: white; }
|
|
36
|
-
.OUfEeoWEwJM1UiF9qYa6 .IBUCc6fCjyxRl3Ek8DQA {
|
|
37
|
-
position: absolute;
|
|
38
|
-
right: 0;
|
|
39
|
-
top: 0;
|
|
40
|
-
background-color: white;
|
|
41
|
-
border-color: #ddd;
|
|
42
|
-
border-width: 1px;
|
|
43
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
|
44
|
-
aspect-ratio: 1;
|
|
45
|
-
translate: 33% -33%;
|
|
46
|
-
border-radius: 100%;
|
|
47
|
-
line-height: 0; }
|
|
48
|
-
.OUfEeoWEwJM1UiF9qYa6 .IBUCc6fCjyxRl3Ek8DQA:hover {
|
|
49
|
-
background-color: #e6e6e6; }
|
|
50
|
-
.OUfEeoWEwJM1UiF9qYa6 .IBUCc6fCjyxRl3Ek8DQA:active {
|
|
51
|
-
background-color: #cccccc; }
|
|
52
|
-
.OUfEeoWEwJM1UiF9qYa6 .XH4Q6flr1ggDa4pjIu7O {
|
|
53
|
-
color: gray;
|
|
54
|
-
width: 1.5rem;
|
|
55
|
-
height: 1.5rem; }
|
|
56
|
-
.OUfEeoWEwJM1UiF9qYa6 .efoQ9WoiKsTaNnaKB03U {
|
|
57
|
-
position: absolute;
|
|
58
|
-
bottom: 0;
|
|
59
|
-
left: 0;
|
|
60
|
-
width: 100%;
|
|
61
|
-
background-color: white;
|
|
62
|
-
text-align: center;
|
|
63
|
-
padding: 0.75rem;
|
|
64
|
-
font-size: 0.9rem;
|
|
65
|
-
border-top: 1px solid #ddd;
|
|
66
|
-
font-weight: 600;
|
|
67
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); }
|
|
68
|
-
.OUfEeoWEwJM1UiF9qYa6 .efoQ9WoiKsTaNnaKB03U a {
|
|
69
|
-
color: black;
|
|
70
|
-
text-shadow: none;
|
|
71
|
-
text-decoration: none; }
|
|
72
|
-
.OUfEeoWEwJM1UiF9qYa6 .efoQ9WoiKsTaNnaKB03U a:hover {
|
|
73
|
-
color: #29abe0; }
|
|
74
|
-
@media (max-width: 480px) {
|
|
75
|
-
.OUfEeoWEwJM1UiF9qYa6 {
|
|
76
|
-
right: 0;
|
|
77
|
-
width: 100%;
|
|
78
|
-
height: 100%; }
|
|
79
|
-
.OUfEeoWEwJM1UiF9qYa6 iframe {
|
|
80
|
-
border-radius: 0; }
|
|
81
|
-
.OUfEeoWEwJM1UiF9qYa6 .IBUCc6fCjyxRl3Ek8DQA {
|
|
82
|
-
translate: initial;
|
|
83
|
-
margin: 0.5rem; } }
|
|
84
|
-
|