@leverege/tpi-viz 0.2.1 → 0.2.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/tpi-viz",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "3D scene viewer for TPI manufacturing data — renders blade geometry, PTZ cameras, defects, ply layers, and flows. Exports mountViewer()/destroy() for embedding (e.g. an Imaginarium React route); also runs standalone.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -7,27 +7,7 @@
7
7
  */
8
8
 
9
9
  :root {
10
- /* Surfaceslayered darks, cool-tinted */
11
- --bg-canvas: #0b0d14;
12
- --bg-sidebar: #11141d;
13
- --bg-panel: #161a26;
14
- --bg-panel-strong: #1c2030;
15
- --bg-hover: #1d2230;
16
- --bg-active: #232a3d;
17
- --bg-overlay: rgba(10, 12, 20, 0.88);
18
-
19
- /* Borders — barely-there to subtly-visible */
20
- --border-hairline: #1a1d28;
21
- --border-subtle: #232733;
22
- --border-strong: #2e3344;
23
-
24
- /* Text scale */
25
- --text-1: #e7e9ef; /* body / primary */
26
- --text-2: #aab1c0; /* labels */
27
- --text-3: #7b8294; /* secondary, counts */
28
- --text-4: #6b7488; /* hints, disabled — bumped from #535a6b for legibility on dark bg */
29
-
30
- /* Accents (paired w/ semantic uses across the app) */
10
+ /* Accents (semantic; theme-independent read on both light + dark) */
31
11
  --accent-blue: #7a9bff; /* elements / general info */
32
12
  --accent-blue-soft: #5063a8;
33
13
  --accent-pink: #ff95c2; /* flows */
@@ -46,8 +26,56 @@
46
26
  --r-sm: 4px;
47
27
  --r-md: 6px;
48
28
  --r-lg: 10px;
29
+ }
30
+
31
+ /* Surfaces / borders / text / shadows follow the host's light–dark theme.
32
+ Imaginarium toggles `.dark` on <html> (shadcn `darkMode:["class"]`), so the
33
+ embedded viewer tracks the app by keying off the SAME class. Light is the
34
+ default; standalone (index.html) forces `.dark` to keep its original look.
35
+ The 3D WebGL clear-color stays dark in both — a dark viewport reads best for
36
+ the varied-hue ply contours — so only the chrome re-themes. */
37
+ .tpi-viz {
38
+ /* Light surfaces — cool grays mirroring the dark scale */
39
+ --bg-canvas: #eceef3;
40
+ --bg-sidebar: #f5f6f9;
41
+ --bg-panel: #ffffff;
42
+ --bg-panel-strong: #eef0f4;
43
+ --bg-hover: #e9edf4;
44
+ --bg-active: #dde6f7;
45
+ --bg-overlay: rgba(244, 246, 250, 0.92);
46
+
47
+ --border-hairline: #e8eaef;
48
+ --border-subtle: #dde0e7;
49
+ --border-strong: #c7cdd8;
50
+
51
+ --text-1: #181b24; /* body / primary */
52
+ --text-2: #424a59; /* labels */
53
+ --text-3: #667083; /* secondary, counts */
54
+ --text-4: #8891a1; /* hints, disabled */
55
+
56
+ --shadow-soft: 0 2px 10px rgba(20, 28, 50, 0.10);
57
+ --shadow-med: 0 4px 18px rgba(20, 28, 50, 0.16);
58
+ }
59
+
60
+ .dark .tpi-viz {
61
+ /* Dark surfaces — the original palette */
62
+ --bg-canvas: #0b0d14;
63
+ --bg-sidebar: #11141d;
64
+ --bg-panel: #161a26;
65
+ --bg-panel-strong: #1c2030;
66
+ --bg-hover: #1d2230;
67
+ --bg-active: #232a3d;
68
+ --bg-overlay: rgba(10, 12, 20, 0.88);
69
+
70
+ --border-hairline: #1a1d28;
71
+ --border-subtle: #232733;
72
+ --border-strong: #2e3344;
73
+
74
+ --text-1: #e7e9ef;
75
+ --text-2: #aab1c0;
76
+ --text-3: #7b8294;
77
+ --text-4: #6b7488;
49
78
 
50
- /* Shadows */
51
79
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.35);
52
80
  --shadow-med: 0 4px 18px rgba(0, 0, 0, 0.45);
53
81
  }