gaugeit.js 0.1.0

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 (43) hide show
  1. package/CONTRIBUTING.md +36 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE.md +5 -0
  4. package/README.md +894 -0
  5. package/SECURITY.md +24 -0
  6. package/adapters/react/Gaugeit.d.ts +11 -0
  7. package/adapters/react/Gaugeit.js +66 -0
  8. package/adapters/react/Gaugeit.jsx +1 -0
  9. package/dist/gaugeit.cjs +4686 -0
  10. package/dist/gaugeit.cjs.map +7 -0
  11. package/dist/gaugeit.css +300 -0
  12. package/dist/gaugeit.d.ts +442 -0
  13. package/dist/gaugeit.esm.js +4683 -0
  14. package/dist/gaugeit.esm.js.map +7 -0
  15. package/dist/gaugeit.esm.min.js +2 -0
  16. package/dist/gaugeit.esm.min.js.map +7 -0
  17. package/dist/gaugeit.min.cjs +2 -0
  18. package/dist/gaugeit.min.cjs.map +7 -0
  19. package/dist/gaugeit.min.css +1 -0
  20. package/dist/gaugeit.standalone.js +4720 -0
  21. package/dist/gaugeit.standalone.js.map +7 -0
  22. package/dist/gaugeit.standalone.min.js +302 -0
  23. package/dist/gaugeit.standalone.min.js.map +7 -0
  24. package/dist/gaugeit.umd.js +4713 -0
  25. package/dist/gaugeit.umd.js.map +7 -0
  26. package/dist/gaugeit.umd.min.js +4 -0
  27. package/dist/gaugeit.umd.min.js.map +7 -0
  28. package/dist/manifest.json +24 -0
  29. package/docs/api.md +456 -0
  30. package/docs/architecture.md +224 -0
  31. package/docs/assets/arc_zones.png +0 -0
  32. package/docs/assets/center_zero.png +0 -0
  33. package/docs/assets/classic_instrument.png +0 -0
  34. package/docs/assets/classic_linear_center_zero.png +0 -0
  35. package/docs/assets/classic_linear_instrument.png +0 -0
  36. package/docs/assets/heritage_rolling_tape.png +0 -0
  37. package/docs/assets/heritage_round.png +0 -0
  38. package/docs/assets/line_scale.png +0 -0
  39. package/docs/assets/rose_balance.png +0 -0
  40. package/docs/creating-gauge-types.md +286 -0
  41. package/docs/development.md +56 -0
  42. package/docs/framework-integration.md +84 -0
  43. package/package.json +114 -0
@@ -0,0 +1,300 @@
1
+ /* Gaugeit.js baseline styles. Visual geometry is rendered by SVG; CSS only handles layout and integration. */
2
+ .gaugeit-host {
3
+ display: block;
4
+ min-width: 0;
5
+ width: var(--gaugeit-width, auto);
6
+ height: var(--gaugeit-height, auto);
7
+ aspect-ratio: var(--gaugeit-aspect-ratio, auto);
8
+ }
9
+
10
+ .gaugeit {
11
+ display: block;
12
+ width: 100%;
13
+ min-width: 0;
14
+ color: var(--gaugeit-text-color, inherit);
15
+ font-family: var(--gaugeit-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
16
+ contain: layout style;
17
+ }
18
+
19
+ .gaugeit__svg {
20
+ display: block;
21
+ width: 100%;
22
+ max-width: 100%;
23
+ height: auto;
24
+ overflow: hidden;
25
+ user-select: none;
26
+ -webkit-user-select: none;
27
+ touch-action: pan-y;
28
+ }
29
+
30
+ .gaugeit__pointer-rotating,
31
+ .gaugeit__linear-indicator-moving,
32
+ .gaugeit__tape-slot {
33
+ will-change: transform;
34
+ }
35
+
36
+ .gaugeit__pointer,
37
+ .gaugeit__pointer-cap,
38
+ .gaugeit__linear-indicator,
39
+ .gaugeit__linear-indicator-cap,
40
+ .gaugeit__tape-window,
41
+ .gaugeit__tape-window-inner,
42
+ .gaugeit__tape-indicator,
43
+ .gaugeit__zero-marker,
44
+ .gaugeit__ticks,
45
+ .gaugeit__zone,
46
+ .gaugeit__track {
47
+ shape-rendering: geometricPrecision;
48
+ }
49
+
50
+ .gaugeit__label,
51
+ .gaugeit__readout,
52
+ .gaugeit__tape-label {
53
+ paint-order: stroke fill;
54
+ font-variant-numeric: tabular-nums;
55
+ }
56
+
57
+ gauge-it {
58
+ display: block;
59
+ min-width: 0;
60
+ }
61
+
62
+ .gaugeit-element__mount {
63
+ display: block;
64
+ width: 100%;
65
+ }
66
+
67
+ @media (prefers-reduced-motion: reduce) {
68
+ .gaugeit__pointer-rotating,
69
+ .gaugeit__linear-indicator-moving,
70
+ .gaugeit__tape-slot {
71
+ will-change: auto;
72
+ }
73
+ }
74
+
75
+ @media (forced-colors: active) {
76
+ .gaugeit__pointer,
77
+ .gaugeit__pointer-cap,
78
+ .gaugeit__linear-indicator,
79
+ .gaugeit__linear-indicator-cap,
80
+ .gaugeit__tape-window,
81
+ .gaugeit__tape-window-inner,
82
+ .gaugeit__tape-indicator,
83
+ .gaugeit__zero-marker,
84
+ .gaugeit__ticks,
85
+ .gaugeit__label,
86
+ .gaugeit__readout,
87
+ .gaugeit__light {
88
+ forced-color-adjust: auto;
89
+ }
90
+ }
91
+
92
+ /* Intrinsic mode grows with the computed SVG viewBox; contain mode fits a fixed host box. */
93
+ .gaugeit--layout-intrinsic {
94
+ height: auto;
95
+ }
96
+
97
+ .gaugeit--layout-contain {
98
+ width: 100%;
99
+ height: 100%;
100
+ min-height: 0;
101
+ }
102
+
103
+ .gaugeit--layout-contain .gaugeit__svg {
104
+ width: 100%;
105
+ height: 100%;
106
+ max-height: 100%;
107
+ }
108
+
109
+ /* Shared SVG annunciator lamp. Colors are themeable through CSS variables or light.customColor. */
110
+ .gaugeit__light {
111
+ --gaugeit-light-core: #f59e0b;
112
+ --gaugeit-light-highlight: #fde68a;
113
+ --gaugeit-light-glow: #fbbf24;
114
+ --gaugeit-light-rim: #92400e;
115
+ --gaugeit-light-off: #3f2d12;
116
+ --gaugeit-light-opacity: 1;
117
+ pointer-events: none;
118
+ opacity: var(--gaugeit-light-opacity);
119
+ }
120
+
121
+ .gaugeit__light--red {
122
+ --gaugeit-light-core: #ef4444;
123
+ --gaugeit-light-highlight: #fecaca;
124
+ --gaugeit-light-glow: #f87171;
125
+ --gaugeit-light-rim: #7f1d1d;
126
+ --gaugeit-light-off: #3f1c1c;
127
+ }
128
+
129
+ .gaugeit__light--green {
130
+ --gaugeit-light-core: #22c55e;
131
+ --gaugeit-light-highlight: #bbf7d0;
132
+ --gaugeit-light-glow: #4ade80;
133
+ --gaugeit-light-rim: #14532d;
134
+ --gaugeit-light-off: #182c1e;
135
+ }
136
+
137
+ .gaugeit__light--blue {
138
+ --gaugeit-light-core: #3b82f6;
139
+ --gaugeit-light-highlight: #bfdbfe;
140
+ --gaugeit-light-glow: #60a5fa;
141
+ --gaugeit-light-rim: #1e3a8a;
142
+ --gaugeit-light-off: #1b2438;
143
+ }
144
+
145
+ .gaugeit__light--amber {
146
+ --gaugeit-light-core: #f59e0b;
147
+ --gaugeit-light-highlight: #fde68a;
148
+ --gaugeit-light-glow: #fbbf24;
149
+ --gaugeit-light-rim: #92400e;
150
+ --gaugeit-light-off: #3f2d12;
151
+ }
152
+
153
+ .gaugeit__light--yellow {
154
+ --gaugeit-light-core: #fde047;
155
+ --gaugeit-light-highlight: #fef9c3;
156
+ --gaugeit-light-glow: #facc15;
157
+ --gaugeit-light-rim: #a16207;
158
+ --gaugeit-light-off: #443a16;
159
+ }
160
+
161
+ .gaugeit__light--orange {
162
+ --gaugeit-light-core: #f97316;
163
+ --gaugeit-light-highlight: #fed7aa;
164
+ --gaugeit-light-glow: #fb923c;
165
+ --gaugeit-light-rim: #9a3412;
166
+ --gaugeit-light-off: #462515;
167
+ }
168
+
169
+ .gaugeit__light--white {
170
+ --gaugeit-light-core: #f8fafc;
171
+ --gaugeit-light-highlight: #ffffff;
172
+ --gaugeit-light-glow: #e2e8f0;
173
+ --gaugeit-light-rim: #64748b;
174
+ --gaugeit-light-off: #3f4955;
175
+ }
176
+
177
+ .gaugeit__light--halogen {
178
+ --gaugeit-light-core: #fff2bf;
179
+ --gaugeit-light-highlight: #fffdf0;
180
+ --gaugeit-light-glow: #ffe79a;
181
+ --gaugeit-light-rim: #9a7b24;
182
+ --gaugeit-light-off: #4d4326;
183
+ }
184
+
185
+ .gaugeit__light--cyan {
186
+ --gaugeit-light-core: #22d3ee;
187
+ --gaugeit-light-highlight: #cffafe;
188
+ --gaugeit-light-glow: #67e8f9;
189
+ --gaugeit-light-rim: #155e75;
190
+ --gaugeit-light-off: #18343a;
191
+ }
192
+
193
+ .gaugeit__light--brown {
194
+ --gaugeit-light-core: #a16207;
195
+ --gaugeit-light-highlight: #f5d0a1;
196
+ --gaugeit-light-glow: #d6a56b;
197
+ --gaugeit-light-rim: #5b3b10;
198
+ --gaugeit-light-off: #332617;
199
+ }
200
+
201
+ .gaugeit__light-emission {
202
+ pointer-events: none;
203
+ transition: opacity 150ms ease;
204
+ }
205
+
206
+ .gaugeit__light-emission--off {
207
+ opacity: var(--gaugeit-light-opacity, 1);
208
+ }
209
+
210
+ .gaugeit__light-emission--on {
211
+ opacity: 0;
212
+ }
213
+
214
+ .gaugeit__light-glow {
215
+ opacity: 0.76;
216
+ transform-box: fill-box;
217
+ transform-origin: center;
218
+ }
219
+
220
+ .gaugeit__light:not(.has-glow) .gaugeit__light-glow {
221
+ display: none;
222
+ }
223
+
224
+ .gaugeit__light-bezel,
225
+ .gaugeit__light-bezel-highlight,
226
+ .gaugeit__light-bulb,
227
+ .gaugeit__light-lens-shade,
228
+ .gaugeit__light-sparkle {
229
+ shape-rendering: geometricPrecision;
230
+ }
231
+
232
+ .gaugeit__light-bulb {
233
+ transform-box: fill-box;
234
+ transform-origin: center;
235
+ transition: filter 150ms ease;
236
+ }
237
+
238
+ .gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--off {
239
+ opacity: 0;
240
+ }
241
+
242
+ .gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--on {
243
+ opacity: var(--gaugeit-light-opacity, 1);
244
+ }
245
+
246
+ .gaugeit__light.is-on .gaugeit__light-bulb--on {
247
+ filter: saturate(1.08) brightness(1.05);
248
+ }
249
+
250
+ .gaugeit__light.is-pulsing .gaugeit__light-glow {
251
+ animation: gaugeit-light-pulse-glow var(--gaugeit-light-pulse-duration, 2600ms) ease-in-out infinite;
252
+ }
253
+
254
+ .gaugeit__light.is-pulsing .gaugeit__light-bulb--on {
255
+ animation: gaugeit-light-pulse-lens var(--gaugeit-light-pulse-duration, 2600ms) ease-in-out infinite;
256
+ }
257
+
258
+ .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on {
259
+ animation: gaugeit-light-blink-on var(--gaugeit-light-blink-duration, 1000ms) step-end infinite;
260
+ }
261
+
262
+ .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--off {
263
+ animation: gaugeit-light-blink-off var(--gaugeit-light-blink-duration, 1000ms) step-end infinite;
264
+ }
265
+
266
+ @keyframes gaugeit-light-pulse-glow {
267
+ 0%, 100% { opacity: 0.72; transform: scale(0.99); }
268
+ 50% { opacity: 0.8; transform: scale(1.015); }
269
+ }
270
+
271
+ @keyframes gaugeit-light-pulse-lens {
272
+ 0%, 100% { filter: saturate(1.06) brightness(1.04); }
273
+ 50% { filter: saturate(1.1) brightness(1.07); }
274
+ }
275
+
276
+ @keyframes gaugeit-light-blink-on {
277
+ 0%, 48% { opacity: var(--gaugeit-light-opacity, 1); }
278
+ 49%, 100% { opacity: 0; }
279
+ }
280
+
281
+ @keyframes gaugeit-light-blink-off {
282
+ 0%, 48% { opacity: 0; }
283
+ 49%, 100% { opacity: var(--gaugeit-light-opacity, 1); }
284
+ }
285
+
286
+ @media (prefers-reduced-motion: reduce) {
287
+ .gaugeit__light.is-blinking .gaugeit__light-emission,
288
+ .gaugeit__light.is-pulsing .gaugeit__light-glow,
289
+ .gaugeit__light.is-pulsing .gaugeit__light-bulb--on {
290
+ animation: none;
291
+ }
292
+
293
+ .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--off {
294
+ opacity: 0;
295
+ }
296
+
297
+ .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on {
298
+ opacity: var(--gaugeit-light-opacity, 1);
299
+ }
300
+ }