@damian-buho/support-ukraine 2.0.0 → 2.0.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 +11 -8
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ SPDX-License-Identifier: MIT
|
|
|
20
20
|
[](https://api.reuse.software/info/github.com/damian-buho/support-ukraine)
|
|
21
21
|
|
|
22
22
|
- Browser library that adds a Ukraine-support charity banner to any website.
|
|
23
|
-
- Shows randomly selected Ukrainian charity localized to the visitor's language and
|
|
23
|
+
- Shows randomly selected Ukrainian charity localized to the visitor's language and respects RTL scripts.
|
|
24
24
|
- You can choose kinds of charities.
|
|
25
25
|
- Inspired by [hejny/Ukraine](https://github.com/hejny/Ukraine).
|
|
26
26
|
|
|
@@ -28,11 +28,11 @@ SPDX-License-Identifier: MIT
|
|
|
28
28
|
|
|
29
29
|
[Demo / Play with settings](https://damian-buho.github.io/support-ukraine/dev.html)
|
|
30
30
|
|
|
31
|
-

|
|
32
32
|
|
|
33
|
-

|
|
34
34
|
|
|
35
|
-

|
|
36
36
|
|
|
37
37
|
## Install
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ npm install @damian-buho/support-ukraine
|
|
|
46
46
|
|
|
47
47
|
```html
|
|
48
48
|
<script type="module">
|
|
49
|
-
import { supportUkraineBlock } from 'https://cdn.jsdelivr.net/npm/@damian-buho/support-ukraine@
|
|
49
|
+
import { supportUkraineBlock } from 'https://cdn.jsdelivr.net/npm/@damian-buho/support-ukraine@2/+esm'
|
|
50
50
|
|
|
51
51
|
await supportUkraineBlock()
|
|
52
52
|
</script>
|
|
@@ -56,7 +56,7 @@ For optimal Core Web Vitals, avoid the chained locale fetch by loading a pre-loc
|
|
|
56
56
|
|
|
57
57
|
```html
|
|
58
58
|
<script type="module">
|
|
59
|
-
import { supportUkraineBlock } from 'https://cdn.jsdelivr.net/npm/@damian-buho/support-ukraine@
|
|
59
|
+
import { supportUkraineBlock } from 'https://cdn.jsdelivr.net/npm/@damian-buho/support-ukraine@2/dist/es.js'
|
|
60
60
|
|
|
61
61
|
await supportUkraineBlock()
|
|
62
62
|
</script>
|
|
@@ -111,7 +111,7 @@ language tag and load the matching bundle:
|
|
|
111
111
|
const locale = supported.includes(base) ? base : 'en'
|
|
112
112
|
|
|
113
113
|
const { supportUkraineBlock } = await import(
|
|
114
|
-
`https://cdn.jsdelivr.net/npm/@damian-buho/support-ukraine@
|
|
114
|
+
`https://cdn.jsdelivr.net/npm/@damian-buho/support-ukraine@2/dist/${locale}.js`
|
|
115
115
|
)
|
|
116
116
|
|
|
117
117
|
await supportUkraineBlock()
|
|
@@ -156,6 +156,9 @@ The entire block is a clickable link to the charity's donation page.
|
|
|
156
156
|
| `dontRepeat` | `boolean` | `true` | Avoid repeating charities; seen ids stay in session memory by default |
|
|
157
157
|
| `persistSeen` | `boolean` | `false` | Persist seen charity ids in `localStorage` across visits (needs visitor consent) |
|
|
158
158
|
| `isInConsole` | `boolean` | `true` | Log the selected charity to the dev console |
|
|
159
|
+
| `showRefreshButton` | `boolean` | `false` | Show a refresh button that loads the next random charity |
|
|
160
|
+
| `autoRefreshInterval` | `number` | `0` | Auto-refresh interval in milliseconds; `0` disables automatic refresh |
|
|
161
|
+
| `showRefreshAnimation` | `boolean` | `false` | Show a fade animation when the charity changes (respects `prefers-reduced-motion`) |
|
|
159
162
|
| `locale` | `string` | _(auto-detected)_ | Override the auto-detected BCP 47 language tag |
|
|
160
163
|
|
|
161
164
|
### Filtering by category
|
|
@@ -287,4 +290,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
|
287
290
|
|
|
288
291
|
## License
|
|
289
292
|
|
|
290
|
-
MIT
|
|
293
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@damian-buho/support-ukraine",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Browser library that adds a Ukraine-support charity banner to any website.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"homepage": "https://github.com/damian-buho/support-ukraine#readme",
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"@eslint/js": "10.0.1",
|
|
126
|
-
"@size-limit/preset-small-lib": "14.0
|
|
126
|
+
"@size-limit/preset-small-lib": "14.1.0",
|
|
127
127
|
"@types/eslint": "9.6.1",
|
|
128
128
|
"@types/node": "26.6.3",
|
|
129
129
|
"esbuild": "0.28.2",
|
|
@@ -132,15 +132,15 @@
|
|
|
132
132
|
"eslint-plugin-import-x": "4.17.1",
|
|
133
133
|
"eslint-plugin-n": "18.4.0",
|
|
134
134
|
"eslint-plugin-promise": "7.3.0",
|
|
135
|
-
"eslint-plugin-tsdoc": "0.5.
|
|
135
|
+
"eslint-plugin-tsdoc": "0.5.4",
|
|
136
136
|
"eslint-plugin-unicorn": "76.0.0",
|
|
137
137
|
"globals": "17.12.0",
|
|
138
138
|
"prettier": "3.9.9",
|
|
139
|
-
"sass": "1.105.
|
|
140
|
-
"size-limit": "14.0
|
|
139
|
+
"sass": "1.105.1",
|
|
140
|
+
"size-limit": "14.1.0",
|
|
141
141
|
"tsup": "8.5.1",
|
|
142
142
|
"typescript": "6.0.3",
|
|
143
|
-
"typescript-eslint": "8.
|
|
143
|
+
"typescript-eslint": "8.71.0",
|
|
144
144
|
"yaml": "2.9.1"
|
|
145
145
|
},
|
|
146
146
|
"prettier": {
|