@kupcad/ui 0.1.11 → 0.1.13
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 +5 -2
- package/package.json +7 -7
- package/src/ViewerPane.svelte +5 -1
- package/src/controls.css +26 -0
package/README.md
CHANGED
|
@@ -168,8 +168,9 @@ webview and the desktop app to the language server.
|
|
|
168
168
|
`actions` snippet (a host's own buttons, the Export menu), the Panel button, and a `toggles`
|
|
169
169
|
snippet after it (a host's toggles of its own panes beside the pane, the Parameters button;
|
|
170
170
|
`.kc-control` with `aria-expanded` gives one the Panel button's look). Below, a status
|
|
171
|
-
line from `status` (`runStatusOf(header)` makes it of a frame's header: Running…,
|
|
172
|
-
|
|
171
|
+
line from `status` (`runStatusOf(header)` makes it of a frame's header: Running…, by a turning
|
|
172
|
+
ring (`.kc-spinner`, controls.css's), still where the system asks for less motion, then Ready or Failed, with the run's time and
|
|
173
|
+
its warnings) over the run's problems from `problems`
|
|
173
174
|
(`problemsOf(header)`: why it failed, then its warnings), a few lines high; one with a line,
|
|
174
175
|
clicked, goes to `onproblem`, for the host to show the script there.
|
|
175
176
|
By the pointer a tooltip says what is under it: the part, its copies, volume and size (the
|
|
@@ -285,6 +286,8 @@ webview and the desktop app to the language server.
|
|
|
285
286
|
A range input is a `.kc-range` and a checkbox a `.kc-check`, drawn the same in each browser
|
|
286
287
|
and webview: a range's track is filled to its thumb by its `--kc-range-fill`, which a host
|
|
287
288
|
sets from its value with `fillOf(value, min, max)` (WebKit and Blink fill none themselves).
|
|
289
|
+
Work under way beside a status line's words is a `.kc-spinner`, a small ring that turns (still
|
|
290
|
+
where the system asks for less motion): the pane's Running…, the desktop app's build.
|
|
288
291
|
|
|
289
292
|
## Tests
|
|
290
293
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kupcad/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "KupCAD's UI: a three.js viewer of a model the core made, for any host (@kupcad/ui/viewer), and the Svelte panels around it (the viewer's pane, parameters, console, a language server's preview), styled by --kc-* tokens.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@kupcad/protocol": "0.1.
|
|
39
|
+
"@kupcad/protocol": "0.1.13",
|
|
40
40
|
"three": "^0.187.0",
|
|
41
|
-
"three-mesh-bvh": "^0.9.
|
|
41
|
+
"three-mesh-bvh": "^0.9.18"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@kupcad/wasm": "0.1.
|
|
45
|
-
"@playwright/test": "^1.
|
|
44
|
+
"@kupcad/wasm": "0.1.13",
|
|
45
|
+
"@playwright/test": "^1.65.0",
|
|
46
46
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
47
47
|
"@testing-library/svelte": "^5.4.2",
|
|
48
48
|
"@types/node": "^26.6.6",
|
|
49
49
|
"@types/three": "~0.187.0",
|
|
50
|
-
"jsdom": "^
|
|
50
|
+
"jsdom": "^31.0.0",
|
|
51
51
|
"svelte": "^5.57.3",
|
|
52
52
|
"svelte-check": "^4.7.8",
|
|
53
|
-
"vite": "^8.3.
|
|
53
|
+
"vite": "^8.3.6",
|
|
54
54
|
"vitest": "^5.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
package/src/ViewerPane.svelte
CHANGED
|
@@ -466,7 +466,11 @@
|
|
|
466
466
|
<div class="line">
|
|
467
467
|
{#if status}
|
|
468
468
|
<div class="status" role="status">
|
|
469
|
-
|
|
469
|
+
{#if status.state === 'running'}
|
|
470
|
+
<span class="kc-spinner"></span>
|
|
471
|
+
{:else}
|
|
472
|
+
<span class="dot {status.state}"></span>
|
|
473
|
+
{/if}
|
|
470
474
|
{statusText}
|
|
471
475
|
</div>
|
|
472
476
|
{/if}
|
package/src/controls.css
CHANGED
|
@@ -181,3 +181,29 @@ button.kc-control.kc-primary:hover:not(:disabled) {
|
|
|
181
181
|
.kc-check:checked::before {
|
|
182
182
|
visibility: visible;
|
|
183
183
|
}
|
|
184
|
+
|
|
185
|
+
/*
|
|
186
|
+
Work under way (a run, a build): a small ring that turns, by a status line's words; a still
|
|
187
|
+
one where the person asks for less motion.
|
|
188
|
+
*/
|
|
189
|
+
.kc-spinner {
|
|
190
|
+
display: inline-block;
|
|
191
|
+
flex: none;
|
|
192
|
+
box-sizing: border-box;
|
|
193
|
+
width: 8px;
|
|
194
|
+
height: 8px;
|
|
195
|
+
border: 1.5px solid var(--kc-muted);
|
|
196
|
+
border-top-color: transparent;
|
|
197
|
+
border-radius: 50%;
|
|
198
|
+
animation: kc-turn 0.8s linear infinite;
|
|
199
|
+
}
|
|
200
|
+
@media (prefers-reduced-motion: reduce) {
|
|
201
|
+
.kc-spinner {
|
|
202
|
+
animation: none;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
@keyframes kc-turn {
|
|
206
|
+
to {
|
|
207
|
+
transform: rotate(1turn);
|
|
208
|
+
}
|
|
209
|
+
}
|