spoko-design-system 1.27.2 → 1.27.3
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.
|
@@ -13,17 +13,17 @@ jobs:
|
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout code
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v6
|
|
17
17
|
|
|
18
18
|
- name: Setup pnpm
|
|
19
19
|
uses: pnpm/action-setup@v4
|
|
20
20
|
with:
|
|
21
|
-
version: 10.
|
|
21
|
+
version: 10.30.3
|
|
22
22
|
|
|
23
23
|
- name: Setup Node.js
|
|
24
24
|
uses: actions/setup-node@v5
|
|
25
25
|
with:
|
|
26
|
-
node-version: '
|
|
26
|
+
node-version: '24'
|
|
27
27
|
cache: 'pnpm'
|
|
28
28
|
|
|
29
29
|
- name: Install dependencies
|
|
@@ -44,19 +44,19 @@ jobs:
|
|
|
44
44
|
|
|
45
45
|
steps:
|
|
46
46
|
- name: Checkout code
|
|
47
|
-
uses: actions/checkout@
|
|
47
|
+
uses: actions/checkout@v6
|
|
48
48
|
with:
|
|
49
49
|
fetch-depth: 0 # Shallow clones should be disabled for better analysis
|
|
50
50
|
|
|
51
51
|
- name: Setup pnpm
|
|
52
52
|
uses: pnpm/action-setup@v4
|
|
53
53
|
with:
|
|
54
|
-
version: 10.
|
|
54
|
+
version: 10.30.3
|
|
55
55
|
|
|
56
56
|
- name: Setup Node.js
|
|
57
57
|
uses: actions/setup-node@v5
|
|
58
58
|
with:
|
|
59
|
-
node-version: '
|
|
59
|
+
node-version: '24'
|
|
60
60
|
cache: 'pnpm'
|
|
61
61
|
|
|
62
62
|
- name: Install dependencies
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
|
|
22
22
|
steps:
|
|
23
23
|
- name: Checkout
|
|
24
|
-
uses: actions/checkout@
|
|
24
|
+
uses: actions/checkout@v6
|
|
25
25
|
with:
|
|
26
26
|
fetch-depth: 0
|
|
27
27
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -29,12 +29,12 @@ jobs:
|
|
|
29
29
|
- name: Setup pnpm
|
|
30
30
|
uses: pnpm/action-setup@v4
|
|
31
31
|
with:
|
|
32
|
-
version: 10.
|
|
32
|
+
version: 10.30.3
|
|
33
33
|
|
|
34
34
|
- name: Setup Node.js
|
|
35
35
|
uses: actions/setup-node@v5
|
|
36
36
|
with:
|
|
37
|
-
node-version:
|
|
37
|
+
node-version: 24
|
|
38
38
|
registry-url: 'https://registry.npmjs.org'
|
|
39
39
|
cache: 'pnpm'
|
|
40
40
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [1.27.3](https://github.com/polo-blue/sds/compare/v1.27.2...v1.27.3) (2026-03-04)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **ButtonCopy:** prevent double-click race condition and View Transitions duplicate listeners ([3a3456d](https://github.com/polo-blue/sds/commit/3a3456d4a267330a2090801260ab0ccbea704a38))
|
|
6
|
+
|
|
1
7
|
## [1.27.2](https://github.com/polo-blue/sds/compare/v1.27.1...v1.27.2) (2026-03-03)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoko-design-system",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"unocss": "^0.65.0",
|
|
143
143
|
"vite": "^7.3.1"
|
|
144
144
|
},
|
|
145
|
-
"packageManager": "pnpm@10.
|
|
145
|
+
"packageManager": "pnpm@10.30.3",
|
|
146
146
|
"pnpm": {
|
|
147
147
|
"default": "9.15.3",
|
|
148
148
|
"overrides": {
|
|
@@ -33,12 +33,11 @@ const COPY_ICON = `url("data:image/svg+xml;utf8,${encodeURIComponent(
|
|
|
33
33
|
class ClipboardButton {
|
|
34
34
|
private static readonly COPY_TIMEOUT = 2000;
|
|
35
35
|
private static readonly ANALYTICS_EVENT = 'product_code_copy';
|
|
36
|
+
private readonly originalText: string;
|
|
37
|
+
private resetTimer: ReturnType<typeof setTimeout> | null = null;
|
|
36
38
|
|
|
37
39
|
constructor(private button: HTMLButtonElement) {
|
|
38
|
-
this.
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private init(): void {
|
|
40
|
+
this.originalText = this.tooltip?.dataset.text || 'Copy';
|
|
42
41
|
this.button.addEventListener('click', () => this.handleCopy());
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -54,10 +53,6 @@ const COPY_ICON = `url("data:image/svg+xml;utf8,${encodeURIComponent(
|
|
|
54
53
|
return this.button.dataset.category || '';
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
private get originalText(): string {
|
|
58
|
-
return this.tooltip.dataset.text || 'Copy';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
56
|
private get copiedText(): string {
|
|
62
57
|
return this.tooltip.dataset.copiedText || 'Copied';
|
|
63
58
|
}
|
|
@@ -93,9 +88,11 @@ const COPY_ICON = `url("data:image/svg+xml;utf8,${encodeURIComponent(
|
|
|
93
88
|
}
|
|
94
89
|
|
|
95
90
|
private updateTooltip(): void {
|
|
91
|
+
if (this.resetTimer) clearTimeout(this.resetTimer);
|
|
96
92
|
this.tooltip.dataset.text = this.copiedText;
|
|
97
|
-
setTimeout(() => {
|
|
93
|
+
this.resetTimer = setTimeout(() => {
|
|
98
94
|
this.tooltip.dataset.text = this.originalText;
|
|
95
|
+
this.resetTimer = null;
|
|
99
96
|
}, ClipboardButton.COPY_TIMEOUT);
|
|
100
97
|
}
|
|
101
98
|
|
|
@@ -118,10 +115,11 @@ const COPY_ICON = `url("data:image/svg+xml;utf8,${encodeURIComponent(
|
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
117
|
|
|
121
|
-
// Initialize copy buttons on page load
|
|
118
|
+
// Initialize copy buttons on page load (skip already-initialized for View Transitions)
|
|
122
119
|
document.addEventListener('astro:page-load', () => {
|
|
123
120
|
document.querySelectorAll('.btn-copy').forEach(button => {
|
|
124
|
-
if (button instanceof HTMLButtonElement) {
|
|
121
|
+
if (button instanceof HTMLButtonElement && !button.dataset.copyInit) {
|
|
122
|
+
button.dataset.copyInit = '1';
|
|
125
123
|
new ClipboardButton(button);
|
|
126
124
|
}
|
|
127
125
|
});
|