@sailingrotevista/rotevista-dash 2.0.5 → 2.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/style.css +103 -38
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailingrotevista/rotevista-dash",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Public Wind Dashboard with navigation and course aids",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
package/style.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================================
2
- 1. BASE E STRUTTURA GENERALE
2
+ 1. BASE E STRUTTURA GENERALE (LIQUID GRID LAYOUT)
3
3
  ========================================================================== */
4
4
  body {
5
5
  background-color: #000;
@@ -8,7 +8,6 @@ body {
8
8
  margin: 0; padding: 0;
9
9
  height: 100vh; width: 100vw;
10
10
  overflow: hidden;
11
- /* BLOCCO TOTALE GESTI DI SISTEMA (Android/iOS) */
12
11
  -webkit-touch-callout: none;
13
12
  -webkit-user-select: none;
14
13
  user-select: none;
@@ -20,11 +19,29 @@ body {
20
19
  width: 100%; height: 100%;
21
20
  padding: 5px; box-sizing: border-box;
22
21
  gap: 8px;
23
- grid-template-columns: 1.7fr 3fr 1.7fr;
22
+
23
+ /*
24
+ LAYOUT LIQUIDO DEFINITIVO:
25
+ SX: Prende 1 frazione di tutto lo spazio libero, minimo 160px.
26
+ CENTRO: Prende ESATTAMENTE la larghezza che serve al cerchio SVG (auto).
27
+ DX: Prende 1 frazione di tutto lo spazio libero, minimo 160px.
28
+ */
29
+ grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
24
30
  grid-template-rows: 100%;
25
31
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
32
+
33
+ /* Assicura che la griglia usi tutto lo spazio orizzontale */
34
+ justify-content: stretch;
26
35
  }
27
36
 
37
+ /* Espansione colonne per schermi larghi (16:10) */
38
+ @media (min-aspect-ratio: 1.5) {
39
+ .main-container {
40
+ /* Aumentiamo il gap e il minimo vitale per schermi enormi */
41
+ grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
42
+ gap: 15px;
43
+ }
44
+ }
28
45
  /* ==========================================================================
29
46
  2. PANNELLI E DATA-BOX
30
47
  ========================================================================== */
@@ -49,54 +66,79 @@ body {
49
66
  touch-action: none;
50
67
  }
51
68
 
52
- /* Altezze Desktop */
69
+ /* Altezze Desktop (Validate) */
53
70
  .data-box:nth-child(1), .data-box:nth-child(2) { height: 25vh; }
54
71
  .data-box:nth-child(3), .data-box:nth-child(4), .data-box:nth-child(5) { height: 16.666vh; }
55
72
 
56
- /* Allineamento Speculare Data Box */
73
+ /* Allineamento Speculare Box */
57
74
  .left-panel .data-box { align-items: flex-start; text-align: left; }
58
75
  .right-panel .data-box { align-items: flex-end; text-align: right; }
59
76
 
60
77
  /* ==========================================================================
61
- 3. TACTICAL FOCUS MODE (ORIZZONTALE) E INGRANDIMENTI
78
+ 3. TACTICAL FOCUS MODE (AUTO-EXPANDING SPLIT)
62
79
  ========================================================================== */
63
- .focus-active { grid-template-columns: 1fr 1fr !important; }
80
+
81
+ /* Nascondi i pannelli laterali non interessati */
64
82
  .focus-active .side-panel:not(.has-focus) { display: none !important; }
83
+ .focus-active .side-panel.has-focus {
84
+ min-width: 400px !important;
85
+ }
65
86
 
66
- /* Simmetria Orizzontale */
87
+ /*
88
+ LOGICA POSIZIONE E LARGHEZZA:
89
+ Il Vento prende solo la larghezza del suo cerchio (auto).
90
+ Il Box focalizzato si prende TUTTO il resto dello schermo (1fr).
91
+ */
92
+ .focus-active.focus-side-left {
93
+ grid-template-columns: 1fr auto !important; /* Dati SX giganti, Vento DX compatto */
94
+ }
67
95
  .focus-active.focus-side-left .side-panel.has-focus { grid-column: 1 !important; }
68
- .focus-active.focus-side-left .center-panel { grid-column: 2 !important; }
69
- .focus-active.focus-side-right .center-panel { grid-column: 1 !important; }
96
+ .focus-active.focus-side-left .center-panel { grid-column: 2 !important; justify-content: flex-start; }
97
+
98
+ .focus-active.focus-side-right {
99
+ grid-template-columns: auto 1fr !important; /* Vento SX compatto, Dati DX giganti */
100
+ }
101
+ .focus-active.focus-side-right .center-panel { grid-column: 1 !important; justify-content: flex-start; }
70
102
  .focus-active.focus-side-right .side-panel.has-focus { grid-column: 2 !important; }
71
103
 
104
+ /* Gestione Box Focalizzato a tutto schermo */
72
105
  .focus-active .has-focus .data-box:not(.is-focused) { display: none !important; }
73
- .focus-active .has-focus .data-box.is-focused { height: 100vh !important; border: none; background: rgba(255, 255, 255, 0.05); padding: 20px; }
106
+ .focus-active .has-focus .data-box.is-focused {
107
+ height: 100vh !important;
108
+ border: none;
109
+ background: rgba(255, 255, 255, 0.05);
110
+ padding: 20px;
111
+ }
74
112
 
75
- /* Ingrandimenti in Focus Mode */
76
- .focus-active .is-focused .value { font-size: clamp(4rem, 25cqh, 10rem) !important; margin-top: 15px; }
77
- .focus-active .is-focused .scale-labels { font-size: 24px !important; min-width: 60px !important; line-height: 1.2; }
78
- .focus-active .is-focused .label-row .label { font-size: 1.5rem !important; }
79
- .focus-active .is-focused .label-row .unit { font-size: 1.5rem !important; }
113
+ /* Tipografia Extreme per Focus Mode */
114
+ .focus-active .is-focused .value { font-size: clamp(4rem, 25cqh, 4rem) !important; margin-top: 15px; }
115
+ .focus-active .is-focused .scale-labels { font-size: 32px !important; min-width: 80px !important; line-height: 1.2; }
116
+ .focus-active .is-focused .label-row .label { font-size: 2rem !important; }
117
+ .focus-active .is-focused .label-row .unit { font-size: 2rem !important; }
80
118
 
81
- /* Ingrandimento scritta Hercules */
119
+ /* Ingrandimento scritta Hercules in Focus */
82
120
  .focus-active .is-focused.box-hercules .unit::before,
83
121
  .focus-active .is-focused.box-hercules .unit::after,
84
122
  .focus-active .is-focused.box-hercules .label::before,
85
123
  .focus-active .is-focused.box-hercules .label::after {
86
- font-size: 14px !important;
87
- letter-spacing: 2px;
124
+ font-size: 1.5rem !important;
125
+ letter-spacing: 2px !important;
88
126
  }
89
127
 
90
- .focus-active .is-focused .sparkline path { stroke-width: 0.8px !important; }
128
+ .focus-active .is-focused .sparkline path { stroke-width: 1px !important; }
91
129
 
92
130
  /* ==========================================================================
93
- 4. TIPOGRAFIA DINAMICA E SIMMETRIA
131
+ 4. TIPOGRAFIA E LABEL-ROW (SIMMETRIA)
94
132
  ========================================================================== */
95
133
  .label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; width: 100%; }
96
134
 
97
- /* Simmetria Titoli/Unità */
98
- .left-panel .label-row { justify-content: space-between; }
135
+ /* SX: [Titolo] ... [Unità] */
136
+ .left-panel .label-row { justify-content: space-between; flex-direction: row; }
137
+
138
+ /* DX: [Unità] ... [Titolo] */
99
139
  .right-panel .label-row { justify-content: space-between; flex-direction: row; }
140
+
141
+ /* FIX: Spinge i titoli MEAN a destra nella colonna DX */
100
142
  .right-panel .label-row .label:only-child { margin-left: auto; }
101
143
 
102
144
  .label { color: #666; font-size: 0.65rem; font-weight: bold; text-transform: uppercase; }
@@ -106,32 +148,45 @@ body {
106
148
  .value-large, .dual-value-container, .value-with-compass { margin-top: auto; margin-bottom: auto; }
107
149
  .value-large { font-size: clamp(1.5rem, 35cqh, 4.5rem); line-height: 0.85; }
108
150
 
151
+ /* TACK Layout */
109
152
  .dual-value-container { display: flex; justify-content: space-between; width: 100%; }
110
153
  .dual-value-col { display: flex; flex-direction: column; width: 48%; }
111
154
  .dual-label { color: #666; font-size: 0.55rem; font-weight: bold; text-transform: uppercase; margin-bottom: 2px; }
112
155
  .value.dual-val { font-size: clamp(1rem, 22cqh, 2rem); padding-bottom: 0; line-height: 0.9; }
113
156
 
157
+ /* BUSSOLA TWD */
114
158
  .value-with-compass { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; }
115
- .mini-compass { width: clamp(40px, 60cqh, 120px); height: clamp(40px, 60cqh, 120px); background: #000; border-radius: 50%; flex-shrink: 0; border: 1.5px solid #333; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); }
159
+ .mini-compass { width: clamp(40px, 60cqh, 120px); height: clamp(40px, 60cqh, 120px); background: #000; border-radius: 50%; flex-shrink: 0; border: 1.5px solid #333; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); transition: all 0.4s ease; }
116
160
  .value-with-compass .value-large { margin: 0; flex-grow: 1; text-align: right; font-size: clamp(1.2rem, 35cqh, 4rem); }
117
161
 
118
162
  /* ==========================================================================
119
163
  5. GRAFICI E SCALE
120
164
  ========================================================================== */
121
- .graph-wrapper { position: relative; width: 100%; flex-grow: 1; min-height: 0; margin-top: 4px; display: flex; align-items: stretch; gap: 6px; }
122
- .sparkline { flex-grow: 1; height: 100%; background: rgba(255, 255, 255, 0.03); border-radius: 4px; }
165
+ .graph-wrapper {
166
+ position: relative; width: 100%; flex-grow: 1; min-height: 0; margin-top: 4px;
167
+ display: flex; align-items: stretch; background: rgba(255, 255, 255, 0.03);
168
+ border-radius: 4px; gap: 2px;
169
+ }
170
+
171
+ /* Spostamento verso il centro */
172
+ .left-panel .graph-wrapper { margin-right: -6px; }
173
+ .right-panel .graph-wrapper { margin-left: -6px; }
174
+
175
+ .sparkline { flex-grow: 1; height: 100%; background: transparent !important; display: block; }
123
176
  .sparkline path, .sparkline line { stroke-width: 1px !important; transition: all 0.3s ease; }
124
177
 
125
- .scale-labels { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: #777; font-weight: bold; min-width: 20px; height: 100%; line-height: 1; }
126
- .left-panel .scale-labels { order: 2; text-align: left; }
178
+ .scale-labels { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: #777; font-weight: bold; min-width: 18px; height: 100%; line-height: 1; padding: 2px 0; }
179
+
180
+ /* Simmetria Scale */
181
+ .left-panel .scale-labels { order: 2; text-align: left; padding-left: 4px; border-left: 1px solid rgba(255,255,255,0.08); }
127
182
  .left-panel .sparkline { order: 1; }
128
- .right-panel .scale-labels { order: 1; text-align: right; }
183
+ .right-panel .scale-labels { order: 1; text-align: right; padding-right: 4px; border-right: 1px solid rgba(255,255,255,0.08); }
129
184
  .right-panel .sparkline { order: 2; }
130
185
 
131
186
  #stw-graph { stroke: #2ecc71; fill: rgba(46, 204, 113, 0.12); }
132
187
  #sog-graph { stroke: #f39c12; fill: rgba(243, 156, 18, 0.12); }
133
188
  #depth-graph { stroke: #3498db; fill: rgba(52, 152, 219, 0.12); }
134
- #tws-graph { stroke: #f1c40f; fill: rgba(241, 196, 15, 0.12); }
189
+ #tws-graph { stroke: #ffffff; fill: rgba(255, 255, 255, 0.08); }
135
190
 
136
191
  /* ==========================================================================
137
192
  6. HERCULES MODE (LABEL TOP E SIMMETRIA)
@@ -139,13 +194,27 @@ body {
139
194
  .line-hercules { filter: drop-shadow(0 0 5px #ff0000); stroke-width: 1.8px !important; }
140
195
  .box-hercules { background: rgba(255, 0, 0, 0.08) !important; }
141
196
 
142
- /* Simmetria Scritta Hercules */
197
+ /* Ingrandimento Hercules in Focus Mode */
198
+ .focus-active .is-focused.box-hercules .unit::before,
199
+ .focus-active .is-focused.box-hercules .unit::after,
200
+ .focus-active .is-focused.box-hercules .label::before {
201
+ font-size: 16px !important; /* Raddoppiato in Focus */
202
+ letter-spacing: 2px;
203
+ }
204
+
205
+ /* Stile base Hercules */
143
206
  .box-hercules .unit::before, .box-hercules .unit::after,
144
- .box-hercules .label::before, .box-hercules .label::after {
207
+ .box-hercules .label::before {
145
208
  font-size: 7px; color: #ff4444; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
146
209
  }
210
+
211
+ /* Simmetria Hercules SX: "STW [HERCULES kts]" */
147
212
  .left-panel .box-hercules .unit::before { content: "HERCULES "; }
213
+
214
+ /* Simmetria Hercules DX: "[m HERCULES] DEPTH" */
148
215
  .right-panel .box-hercules .unit::after { content: " HERCULES"; }
216
+
217
+ /* Eccezione: Box MEAN colonna DX (Senza unità) -> "[HERCULES TWA]" */
149
218
  .right-panel .box-hercules .label:only-child::before { content: "HERCULES "; }
150
219
 
151
220
  /* ==========================================================================
@@ -154,7 +223,7 @@ body {
154
223
  #status { position: absolute; top: 5px; right: 15px; font-size: 0.5rem; text-transform: uppercase; z-index: 1000; }
155
224
  .online { color: #2ecc71; opacity: 0.5; }
156
225
  .offline { color: #e74c3c; font-weight: bold; }
157
- #awa-pointer, #twa-pointer, #track-pointer, #twd-arrow, #twd-boat-wrap {transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);}
226
+ #awa-pointer, #twa-pointer, #track-pointer, #twd-arrow, #twd-boat-wrap { transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
158
227
  #leeway-mask-rect { transition: none; }
159
228
  .alarm-warning { color: #f1c40f !important; }
160
229
  .alarm-danger { color: #e74c3c !important; font-weight: 900; animation: blink-unstable 1s infinite; }
@@ -166,11 +235,7 @@ body {
166
235
  8. RESPONSIVE (PORTRAIT)
167
236
  ========================================================================== */
168
237
  @media (max-aspect-ratio: 0.9 / 1) {
169
- .main-container {
170
- grid-template-columns: 1fr 1fr !important;
171
- grid-template-rows: 45vh 55vh !important;
172
- }
173
-
238
+ .main-container { grid-template-columns: 1fr 1fr !important; grid-template-rows: 45vh 55vh !important; }
174
239
  .center-panel { grid-row: 1 !important; grid-column: 1 / span 2 !important; padding: 5px 0; }
175
240
  .left-panel { grid-row: 2 !important; grid-column: 1 !important; }
176
241
  .right-panel { grid-row: 2 !important; grid-column: 2 !important; }