three-slicer 0.1.5 → 0.1.6

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/viewer/styles.css CHANGED
@@ -18,12 +18,25 @@
18
18
  .tb-btn { display: inline-flex; align-items: center; gap: 5px; background: #20272f; border: 1px solid #2c353d;
19
19
  color: #cdd6dd; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
20
20
  .tb-btn img { width: 15px; height: 15px; }
21
- .tb-btn:hover { background: #28313a; }
21
+ .tb-btn:hover:not(:disabled) { background: #28313a; }
22
+ .tb-btn:disabled { color: #5a6570; cursor: not-allowed; opacity: .6; }
23
+ /* The button that is mid-export. It is disabled too, so it must override the greyed-out look — the running action
24
+ is the one thing on screen that should not look inert. The animation is CSS so it keeps running while the main
25
+ thread is inside the synchronous half of the write; it stalls only for that stretch, which is the honest signal. */
26
+ .tb-btn.tb-busy:disabled { color: #cdd6dd; opacity: 1; cursor: progress; border-color: #00ae42; animation: tb-pulse 1s ease-in-out infinite; }
27
+ @keyframes tb-pulse { 0%, 100% { background: #20272f; } 50% { background: #23402c; } }
22
28
  .tb-tabs { display: flex; border: 1px solid #2c353d; border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
23
29
  .tb-tabs button { padding: 6px 24px; border: 0; background: #1a2027; color: #9fb3c0; font-weight: 600; font-size: 13px; cursor: pointer; }
24
30
  .tb-tabs button.on { background: #00ae42; color: #fff; }
25
31
  .tb-tabs button:disabled { color: #5a6570; cursor: not-allowed; }
26
- .tb-icon { width: 28px; height: 28px; border: 1px solid #2c353d; background: #20272f; color: #7d8b96; border-radius: 6px; font-size: 15px; cursor: not-allowed; }
32
+ /* Undo/redo. Written while these two were permanent placeholders, so the BASE rule carried the disabled look —
33
+ dim text and cursor:not-allowed — and there was no enabled, hover or pressed state at all. Now that they work,
34
+ the base is the live look and :disabled carries the dim one, the same split .tb-btn above uses. */
35
+ .tb-icon { width: 28px; height: 28px; border: 1px solid #2c353d; background: #20272f; color: #cdd6dd;
36
+ border-radius: 6px; font-size: 15px; cursor: pointer; }
37
+ .tb-icon:hover:not(:disabled) { background: #28313a; color: #fff; border-color: #3a4550; }
38
+ .tb-icon:active:not(:disabled) { background: #171d23; }
39
+ .tb-icon:disabled { color: #5a6570; cursor: not-allowed; opacity: .6; }
27
40
 
28
41
  /* S3 left gizmo rail */
29
42
  .left-rail { flex: 0 0 48px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0;
@@ -143,7 +156,11 @@
143
156
  .fil-paint.on { background: #2b6cff; border-color: #2b6cff; }
144
157
 
145
158
  .obj-list2 { list-style: none; margin: 0 0 6px; padding: 0; }
146
- .obj-list2 li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; }
159
+
160
+ .obj-list2 li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; cursor: pointer; }
161
+ /* A row of the object list that is part of the current selection. The card is light and the row text is near-black
162
+ (.obj-name is #24282e), so the tint has to be a LIGHT green — a dark one swallows the name it is highlighting. */
163
+ .obj-list2 li.obj-selected { background: #e3f6ea; box-shadow: inset 2px 0 0 #00ae42; }
147
164
  .obj-list2 li.obj-hidden { opacity: .5; }
148
165
  .obj-eye { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 0; }
149
166
  .obj-list2 .obj-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #24282e; }
@@ -179,6 +196,12 @@
179
196
 
180
197
  .vp-canvas { position: absolute; inset: 0; }
181
198
  .vp-canvas canvas { display: block; }
199
+ /* The 3D view holds focus so Ctrl+Z can be scoped to this component instead of window — the focus itself stays,
200
+ only its ring is dropped. :focus-visible has to go with it: the focus is taken by a script (`focus()` in the
201
+ view's own pointerdown), and a scripted focus matches :focus-visible in Chrome even when the pointer caused it,
202
+ so a plain click drew the ring the :focus rule below was written to prevent. CSS cannot tell that click apart
203
+ from a Tab, so a keyboard user gets no ring here; the gizmo rail and the panels keep theirs. */
204
+ .vp-canvas:focus, .vp-canvas:focus-visible { outline: none; }
182
205
  .vp-canvas.fail { display: flex; align-items: center; justify-content: center; }
183
206
  .vp-fallback { color: #f0c9a8; padding: 24px; text-align: center; max-width: 560px; line-height: 1.5; }
184
207
  .vp-status { position: absolute; bottom: 8px; left: 12px; right: 12px; z-index: 1;