@sparkelf/dsh-patch-state-dot-brand-blue 0.2.0-rc.51 → 0.2.1-alpha.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/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"file": "./patches/state-dot-brand-blue.patch",
|
|
9
9
|
"id": "state-dot-brand-blue",
|
|
10
10
|
"target": {
|
|
11
|
-
"baseRevision": "
|
|
11
|
+
"baseRevision": "5badb15009ae1756c3afe0ae0cef1faafc290ccc",
|
|
12
12
|
"kind": "dsh-source",
|
|
13
13
|
"paths": [
|
|
14
14
|
"packages/client/ui-primitives/src/"
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
|
|
36
36
|
},
|
|
37
37
|
"type": "module",
|
|
38
|
-
"version": "0.2.
|
|
38
|
+
"version": "0.2.1-alpha.1"
|
|
39
39
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/packages/client/ui-primitives/src/StateDot.module.css b/packages/client/ui-primitives/src/StateDot.module.css
|
|
2
|
-
index
|
|
2
|
+
index 1a692c6..3aa3186 100644
|
|
3
3
|
--- a/packages/client/ui-primitives/src/StateDot.module.css
|
|
4
4
|
+++ b/packages/client/ui-primitives/src/StateDot.module.css
|
|
5
5
|
@@ -1,4 +1,12 @@
|
|
@@ -105,10 +105,10 @@ index 1a692c6892..3aa3186b94 100644
|
|
|
105
105
|
+.step[data-state='warning'] { border-color: var(--dsw-alias-state-warn-primary); }
|
|
106
106
|
|
|
107
107
|
diff --git a/packages/client/ui-primitives/src/StateDot.tsx b/packages/client/ui-primitives/src/StateDot.tsx
|
|
108
|
-
index
|
|
108
|
+
index ec480c6..f54ebdd 100644
|
|
109
109
|
--- a/packages/client/ui-primitives/src/StateDot.tsx
|
|
110
110
|
+++ b/packages/client/ui-primitives/src/StateDot.tsx
|
|
111
|
-
@@ -3,
|
|
111
|
+
@@ -3,35 +3,15 @@ import css from './StateDot.module.css'
|
|
112
112
|
import { IconCheckOutlineRegular } from './icons/index.tsx'
|
|
113
113
|
|
|
114
114
|
/**
|
|
@@ -120,12 +120,23 @@ index ede3c6b98c..f54ebddf44 100644
|
|
|
120
120
|
|
|
121
121
|
-/**
|
|
122
122
|
- * Pin the loader's CSS animations to document time zero. A CSS animation starts
|
|
123
|
-
- * when its element is inserted
|
|
124
|
-
- *
|
|
123
|
+
- * when its element is inserted and restarts when the element is moved or shown
|
|
124
|
+
- * again, so loaders started at different moments rotate out of phase; one shared
|
|
125
|
+
- * start time keeps every visible loader in step. Mount pins the first start; the
|
|
126
|
+
- * element's own `animationstart` listener pins each restart.
|
|
125
127
|
- * @param element - the mounted loader, or null on unmount.
|
|
126
128
|
- */
|
|
127
129
|
-function syncSpinner(element: SVGSVGElement | null): void {
|
|
128
130
|
- if (element === null) return
|
|
131
|
+
- pinSpinner(element)
|
|
132
|
+
- element.addEventListener('animationstart', () => { pinSpinner(element) })
|
|
133
|
+
-}
|
|
134
|
+
-
|
|
135
|
+
-/**
|
|
136
|
+
- * Set every CSS animation in the loader's subtree to start at document time zero.
|
|
137
|
+
- * @param element - the mounted loader.
|
|
138
|
+
- */
|
|
139
|
+
-function pinSpinner(element: SVGSVGElement): void {
|
|
129
140
|
- // jsdom (the unit lane) implements no Web Animations despite lib.dom's
|
|
130
141
|
- // non-optional typing; the optional call leaves that lane unsynced.
|
|
131
142
|
- const spinner = element as { getAnimations?: SVGSVGElement['getAnimations'] }
|
|
@@ -138,7 +149,7 @@ index ede3c6b98c..f54ebddf44 100644
|
|
|
138
149
|
|
|
139
150
|
/**
|
|
140
151
|
* Render a state dot.
|
|
141
|
-
@@ -
|
|
152
|
+
@@ -51,18 +31,26 @@ export function StateDot({ state, size, className, appearance = 'dot' }: {
|
|
142
153
|
if (state === 'ongoing') {
|
|
143
154
|
return (
|
|
144
155
|
<svg
|