gaugeit.js 0.1.0 → 0.1.1
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 +51 -27
- package/SECURITY.md +2 -2
- package/dist/gaugeit.cjs +158 -104
- package/dist/gaugeit.cjs.map +3 -3
- package/dist/gaugeit.css +32 -20
- package/dist/gaugeit.d.ts +17 -0
- package/dist/gaugeit.esm.js +158 -104
- package/dist/gaugeit.esm.js.map +3 -3
- package/dist/gaugeit.esm.min.js +2 -2
- package/dist/gaugeit.esm.min.js.map +3 -3
- package/dist/gaugeit.min.cjs +2 -2
- package/dist/gaugeit.min.cjs.map +3 -3
- package/dist/gaugeit.min.css +1 -1
- package/dist/gaugeit.standalone.js +159 -105
- package/dist/gaugeit.standalone.js.map +3 -3
- package/dist/gaugeit.standalone.min.js +35 -23
- package/dist/gaugeit.standalone.min.js.map +3 -3
- package/dist/gaugeit.umd.js +158 -104
- package/dist/gaugeit.umd.js.map +3 -3
- package/dist/gaugeit.umd.min.js +2 -2
- package/dist/gaugeit.umd.min.js.map +3 -3
- package/dist/manifest.json +20 -20
- package/docs/ai/ai-full.md +5097 -0
- package/docs/ai/contributor-guide.md +928 -0
- package/docs/ai/index.md +73 -0
- package/docs/ai/integration-recipes.md +1117 -0
- package/docs/ai/library-usage.md +875 -0
- package/docs/ai/options-reference.md +1107 -0
- package/docs/ai/troubleshooting.md +1024 -0
- package/docs/api.md +34 -7
- package/docs/architecture.md +10 -2
- package/docs/creating-gauge-types.md +2 -1
- package/docs/development.md +2 -2
- package/docs/framework-integration.md +2 -2
- package/package.json +1 -1
package/docs/api.md
CHANGED
|
@@ -162,11 +162,14 @@ types that include `Gaugeit.layers.light`. It is disabled by default.
|
|
|
162
162
|
|
|
163
163
|
```js
|
|
164
164
|
light: {
|
|
165
|
-
visible:
|
|
166
|
-
x:
|
|
165
|
+
visible: false,
|
|
166
|
+
x: 93,
|
|
167
167
|
y: 110,
|
|
168
|
-
radius:
|
|
169
|
-
|
|
168
|
+
radius: 8,
|
|
169
|
+
glowRadius: 20,
|
|
170
|
+
glowSharpness: 0,
|
|
171
|
+
glowOpacity: 0.15,
|
|
172
|
+
color: 'red',
|
|
170
173
|
customColor: '',
|
|
171
174
|
offColor: '#f3ead6',
|
|
172
175
|
offEdgeColor: '#817768',
|
|
@@ -175,10 +178,15 @@ light: {
|
|
|
175
178
|
opacity: 1,
|
|
176
179
|
on: false,
|
|
177
180
|
glow: true,
|
|
178
|
-
pulse:
|
|
181
|
+
pulse: false,
|
|
179
182
|
pulseInterval: 2600,
|
|
180
|
-
blink:
|
|
183
|
+
blink: false,
|
|
181
184
|
blinkInterval: 1000,
|
|
185
|
+
flicker: true,
|
|
186
|
+
flickerIntensity: 0.1,
|
|
187
|
+
flickerGlowRadius: 0.1,
|
|
188
|
+
flickerMinInterval: 45,
|
|
189
|
+
flickerMaxInterval: 140,
|
|
182
190
|
trigger: { mode: 'below', source: 'target', value: 15, min: 0, max: 15 }
|
|
183
191
|
}
|
|
184
192
|
```
|
|
@@ -186,16 +194,23 @@ light: {
|
|
|
186
194
|
- `visible`: render or omit the component;
|
|
187
195
|
- `x`, `y`: logical SVG coordinates; linear Y values use the positive-up convention;
|
|
188
196
|
- `radius`: bulb radius in logical gauge units;
|
|
197
|
+
- `glowRadius`: active halo radius in logical gauge units, default `20`; set `null` to derive it from `radius * 1.82`;
|
|
198
|
+
- `glowSharpness`: halo blur from `0` (soft Gaussian glow) to `1` (no blur and a sharp edge), default `0`;
|
|
199
|
+
- `glowOpacity`: halo-only opacity from 0 to 1, default `0.15`; independent from the illuminated lens opacity;
|
|
189
200
|
- `color`: `red`, `green`, `blue`, `amber`, `yellow`, `orange`, `white`, `halogen`, `cyan`, or `brown`;
|
|
190
201
|
- `customColor`: optional CSS color overriding the selected active palette;
|
|
191
202
|
- `offColor`, `offEdgeColor`: unlit diffused-lens center and edge colors;
|
|
192
203
|
- `bezelColor`, `bezelHighlightColor`: panel-mount bezel colors;
|
|
193
|
-
- `opacity`:
|
|
204
|
+
- `opacity`: illuminated-lens opacity; does not fade the halo, unlit lamp, bezel, or physical hardware;
|
|
194
205
|
- `on`: manual state used by `trigger.mode: 'manual'`;
|
|
195
206
|
- `glow`: enable the active halo;
|
|
196
207
|
- `pulse`, `pulseInterval`: subtle steady-light breathing effect and period;
|
|
197
208
|
- `blink`: blink while the condition is active; the off half-cycle renders the full normal unlit-lens appearance instead of fading the whole lamp;
|
|
198
209
|
- `blinkInterval`: complete blink period in milliseconds, minimum 100;
|
|
210
|
+
- `flicker`: enable rapid randomized brightness variation, default `true`; it may run together with pulse or blink and remains invisible while the lamp is hidden or inactive;
|
|
211
|
+
- `flickerIntensity`: maximum randomized loss from full emitted light, from `0` (steady) to `1` (may reach the normal unlit-lens appearance), default `0.1`;
|
|
212
|
+
- `flickerGlowRadius`: maximum relative plus/minus variation of `glowRadius`, from 0 to 1, default `0.1`; with `glowRadius: 20`, the default produces 18–22;
|
|
213
|
+
- `flickerMinInterval`, `flickerMaxInterval`: randomized delay range in milliseconds, defaults `45` and `140`, minimum 16;
|
|
199
214
|
- `trigger.mode`: `manual`, `below`, `above`, or `between`;
|
|
200
215
|
- `trigger.value`: inclusive threshold for `below` and `above`;
|
|
201
216
|
- `trigger.min`, `trigger.max`: inclusive bounds for `between`.
|
|
@@ -206,6 +221,18 @@ pointer animation. Set `trigger.source` to `displayed` to follow the animated va
|
|
|
206
221
|
unresolved SVG custom-property references, keeping the lens rendering consistent across
|
|
207
222
|
browsers and DOM test environments.
|
|
208
223
|
|
|
224
|
+
Every built-in gauge type uses this same light configuration. Partial `light` objects are
|
|
225
|
+
deeply merged with the shared defaults, so `light: { visible: true }` is enough to enable
|
|
226
|
+
the standard lamp. Override `x` and `y` when a gauge layout needs another position.
|
|
227
|
+
|
|
228
|
+
Pulse and blink are alternative base effects: blink takes precedence if both are true.
|
|
229
|
+
Flicker is an independent overlay and therefore remains compatible with either one.
|
|
230
|
+
Flicker varies the illuminated lens and glow opacities from their independently configured
|
|
231
|
+
levels instead of applying a black brightness filter, so a zero light level is visually
|
|
232
|
+
identical to switching off. The glow is painted below the opaque lamp hardware and is
|
|
233
|
+
therefore visible only outside the lamp edges.
|
|
234
|
+
All motion effects are suppressed when the browser requests reduced motion.
|
|
235
|
+
|
|
209
236
|
## `face`
|
|
210
237
|
|
|
211
238
|
`face` controls the optional old-style instrument background.
|
package/docs/architecture.md
CHANGED
|
@@ -53,8 +53,16 @@ Built-in types are registered during module initialization. Applications may reg
|
|
|
53
53
|
layer owns only SVG nodes and CSS state classes. This lets any built-in or custom type
|
|
54
54
|
insert the same component at its preferred paint position without duplicating timers,
|
|
55
55
|
threshold logic, gradients, or responsive calculations. Thresholds may read the stable
|
|
56
|
-
target, animated display, or jittered pointer value. Blinking
|
|
57
|
-
|
|
56
|
+
target, animated display, or jittered pointer value. Blinking and pulsing are CSS-driven.
|
|
57
|
+
Flicker uses a single randomized timer per active lamp. It varies the illuminated SVG
|
|
58
|
+
group's inherited opacity over an always-opaque unlit base. The glow is a separate
|
|
59
|
+
opacity-controlled SVG group painted below the opaque bezel and lens, and flicker can
|
|
60
|
+
also vary its radius. The effect can be layered over blink or pulse, is cleaned up with
|
|
61
|
+
the layer controller, and respects `prefers-reduced-motion`.
|
|
62
|
+
|
|
63
|
+
The glow uses an SVG Gaussian blur filter. Its normalized sharpness scales the
|
|
64
|
+
blur deviation down continuously: zero preserves the soft default and one sets the
|
|
65
|
+
deviation to zero for a hard edge.
|
|
58
66
|
|
|
59
67
|
### Rendering layers
|
|
60
68
|
|
|
@@ -40,7 +40,8 @@ Layer order is paint order. Later SVG layers appear above earlier layers.
|
|
|
40
40
|
|
|
41
41
|
For a standard warning or status lamp, include `Gaugeit.layers.light` and provide a
|
|
42
42
|
normal `light` option block. The shared component already supplies threshold/range
|
|
43
|
-
conditions, realistic palettes,
|
|
43
|
+
conditions, realistic palettes, independent lamp/glow sizing and edge sharpness,
|
|
44
|
+
blinking, randomized flicker, custom colors, and responsive positioning.
|
|
44
45
|
A custom lamp layer is only necessary when the visual itself is fundamentally different.
|
|
45
46
|
|
|
46
47
|
Any custom radial type that includes `Gaugeit.layers.zones` automatically supports both
|
package/docs/development.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Development and release process
|
|
2
2
|
|
|
3
|
-
Gaugeit.js
|
|
4
|
-
|
|
3
|
+
Gaugeit.js uses the same canonical sources for every npm, Composer, GitHub, and
|
|
4
|
+
CDN-facing artifact.
|
|
5
5
|
Publishing remains an explicit maintainer action; CI validates but does not publish.
|
|
6
6
|
|
|
7
7
|
## Source of truth
|
|
@@ -25,7 +25,7 @@ destroys the instance on unmount.
|
|
|
25
25
|
Install the recommended prebuilt assets:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
vendor/bin/gaugeit-install-assets public/assets/vendor/gaugeit/0.1.
|
|
28
|
+
vendor/bin/gaugeit-install-assets public/assets/vendor/gaugeit/0.1.1
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
The default command installs `gaugeit.umd.min.js` and `gaugeit.min.css`. Pass
|
|
@@ -51,7 +51,7 @@ as `window.initGaugeitStatGauges(root)` for fragments inserted later.
|
|
|
51
51
|
A reusable initializer can keep instances in a `WeakMap`:
|
|
52
52
|
|
|
53
53
|
```js
|
|
54
|
-
import { createGauge } from './vendor/gaugeit/0.1.
|
|
54
|
+
import { createGauge } from './vendor/gaugeit/0.1.1/gaugeit.esm.js';
|
|
55
55
|
|
|
56
56
|
const instances = new WeakMap();
|
|
57
57
|
|