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.
@@ -1 +1 @@
1
- .gaugeit-host{display:block;min-width:0;width:var(--gaugeit-width, auto);height:var(--gaugeit-height, auto);aspect-ratio:var(--gaugeit-aspect-ratio, auto)}.gaugeit{display:block;width:100%;min-width:0;color:var(--gaugeit-text-color, inherit);font-family:var(--gaugeit-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);contain:layout style}.gaugeit__svg{display:block;width:100%;max-width:100%;height:auto;overflow:hidden;user-select:none;-webkit-user-select:none;touch-action:pan-y}.gaugeit__pointer-rotating,.gaugeit__linear-indicator-moving,.gaugeit__tape-slot{will-change:transform}.gaugeit__pointer,.gaugeit__pointer-cap,.gaugeit__linear-indicator,.gaugeit__linear-indicator-cap,.gaugeit__tape-window,.gaugeit__tape-window-inner,.gaugeit__tape-indicator,.gaugeit__zero-marker,.gaugeit__ticks,.gaugeit__zone,.gaugeit__track{shape-rendering:geometricPrecision}.gaugeit__label,.gaugeit__readout,.gaugeit__tape-label{paint-order:stroke fill;font-variant-numeric:tabular-nums}gauge-it{display:block;min-width:0}.gaugeit-element__mount{display:block;width:100%}@media(prefers-reduced-motion:reduce){.gaugeit__pointer-rotating,.gaugeit__linear-indicator-moving,.gaugeit__tape-slot{will-change:auto}}@media(forced-colors:active){.gaugeit__pointer,.gaugeit__pointer-cap,.gaugeit__linear-indicator,.gaugeit__linear-indicator-cap,.gaugeit__tape-window,.gaugeit__tape-window-inner,.gaugeit__tape-indicator,.gaugeit__zero-marker,.gaugeit__ticks,.gaugeit__label,.gaugeit__readout,.gaugeit__light{forced-color-adjust:auto}}.gaugeit--layout-intrinsic{height:auto}.gaugeit--layout-contain{width:100%;height:100%;min-height:0}.gaugeit--layout-contain .gaugeit__svg{width:100%;height:100%;max-height:100%}.gaugeit__light{--gaugeit-light-core: #f59e0b;--gaugeit-light-highlight: #fde68a;--gaugeit-light-glow: #fbbf24;--gaugeit-light-rim: #92400e;--gaugeit-light-off: #3f2d12;--gaugeit-light-opacity: 1;pointer-events:none;opacity:var(--gaugeit-light-opacity)}.gaugeit__light--red{--gaugeit-light-core: #ef4444;--gaugeit-light-highlight: #fecaca;--gaugeit-light-glow: #f87171;--gaugeit-light-rim: #7f1d1d;--gaugeit-light-off: #3f1c1c}.gaugeit__light--green{--gaugeit-light-core: #22c55e;--gaugeit-light-highlight: #bbf7d0;--gaugeit-light-glow: #4ade80;--gaugeit-light-rim: #14532d;--gaugeit-light-off: #182c1e}.gaugeit__light--blue{--gaugeit-light-core: #3b82f6;--gaugeit-light-highlight: #bfdbfe;--gaugeit-light-glow: #60a5fa;--gaugeit-light-rim: #1e3a8a;--gaugeit-light-off: #1b2438}.gaugeit__light--amber{--gaugeit-light-core: #f59e0b;--gaugeit-light-highlight: #fde68a;--gaugeit-light-glow: #fbbf24;--gaugeit-light-rim: #92400e;--gaugeit-light-off: #3f2d12}.gaugeit__light--yellow{--gaugeit-light-core: #fde047;--gaugeit-light-highlight: #fef9c3;--gaugeit-light-glow: #facc15;--gaugeit-light-rim: #a16207;--gaugeit-light-off: #443a16}.gaugeit__light--orange{--gaugeit-light-core: #f97316;--gaugeit-light-highlight: #fed7aa;--gaugeit-light-glow: #fb923c;--gaugeit-light-rim: #9a3412;--gaugeit-light-off: #462515}.gaugeit__light--white{--gaugeit-light-core: #f8fafc;--gaugeit-light-highlight: #ffffff;--gaugeit-light-glow: #e2e8f0;--gaugeit-light-rim: #64748b;--gaugeit-light-off: #3f4955}.gaugeit__light--halogen{--gaugeit-light-core: #fff2bf;--gaugeit-light-highlight: #fffdf0;--gaugeit-light-glow: #ffe79a;--gaugeit-light-rim: #9a7b24;--gaugeit-light-off: #4d4326}.gaugeit__light--cyan{--gaugeit-light-core: #22d3ee;--gaugeit-light-highlight: #cffafe;--gaugeit-light-glow: #67e8f9;--gaugeit-light-rim: #155e75;--gaugeit-light-off: #18343a}.gaugeit__light--brown{--gaugeit-light-core: #a16207;--gaugeit-light-highlight: #f5d0a1;--gaugeit-light-glow: #d6a56b;--gaugeit-light-rim: #5b3b10;--gaugeit-light-off: #332617}.gaugeit__light-emission{pointer-events:none;transition:opacity .15s ease}.gaugeit__light-emission--off{opacity:var(--gaugeit-light-opacity, 1)}.gaugeit__light-emission--on{opacity:0}.gaugeit__light-glow{opacity:.76;transform-box:fill-box;transform-origin:center}.gaugeit__light:not(.has-glow) .gaugeit__light-glow{display:none}.gaugeit__light-bezel,.gaugeit__light-bezel-highlight,.gaugeit__light-bulb,.gaugeit__light-lens-shade,.gaugeit__light-sparkle{shape-rendering:geometricPrecision}.gaugeit__light-bulb{transform-box:fill-box;transform-origin:center;transition:filter .15s ease}.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--off{opacity:0}.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--on{opacity:var(--gaugeit-light-opacity, 1)}.gaugeit__light.is-on .gaugeit__light-bulb--on{filter:saturate(1.08) brightness(1.05)}.gaugeit__light.is-pulsing .gaugeit__light-glow{animation:gaugeit-light-pulse-glow var(--gaugeit-light-pulse-duration, 2.6s) ease-in-out infinite}.gaugeit__light.is-pulsing .gaugeit__light-bulb--on{animation:gaugeit-light-pulse-lens var(--gaugeit-light-pulse-duration, 2.6s) ease-in-out infinite}.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on{animation:gaugeit-light-blink-on var(--gaugeit-light-blink-duration, 1s) step-end infinite}.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--off{animation:gaugeit-light-blink-off var(--gaugeit-light-blink-duration, 1s) step-end infinite}@keyframes gaugeit-light-pulse-glow{0%,to{opacity:.72;transform:scale(.99)}50%{opacity:.8;transform:scale(1.015)}}@keyframes gaugeit-light-pulse-lens{0%,to{filter:saturate(1.06) brightness(1.04)}50%{filter:saturate(1.1) brightness(1.07)}}@keyframes gaugeit-light-blink-on{0%,48%{opacity:var(--gaugeit-light-opacity, 1)}49%,to{opacity:0}}@keyframes gaugeit-light-blink-off{0%,48%{opacity:0}49%,to{opacity:var(--gaugeit-light-opacity, 1)}}@media(prefers-reduced-motion:reduce){.gaugeit__light.is-blinking .gaugeit__light-emission,.gaugeit__light.is-pulsing .gaugeit__light-glow,.gaugeit__light.is-pulsing .gaugeit__light-bulb--on{animation:none}.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--off{opacity:0}.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on{opacity:var(--gaugeit-light-opacity, 1)}}
1
+ .gaugeit-host{display:block;min-width:0;width:var(--gaugeit-width, auto);height:var(--gaugeit-height, auto);aspect-ratio:var(--gaugeit-aspect-ratio, auto)}.gaugeit{display:block;width:100%;min-width:0;color:var(--gaugeit-text-color, inherit);font-family:var(--gaugeit-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);contain:layout style}.gaugeit__svg{display:block;width:100%;max-width:100%;height:auto;overflow:hidden;user-select:none;-webkit-user-select:none;touch-action:pan-y}.gaugeit__pointer-rotating,.gaugeit__linear-indicator-moving,.gaugeit__tape-slot{will-change:transform}.gaugeit__pointer,.gaugeit__pointer-cap,.gaugeit__linear-indicator,.gaugeit__linear-indicator-cap,.gaugeit__tape-window,.gaugeit__tape-window-inner,.gaugeit__tape-indicator,.gaugeit__zero-marker,.gaugeit__ticks,.gaugeit__zone,.gaugeit__track{shape-rendering:geometricPrecision}.gaugeit__label,.gaugeit__readout,.gaugeit__tape-label{paint-order:stroke fill;font-variant-numeric:tabular-nums}gauge-it{display:block;min-width:0}.gaugeit-element__mount{display:block;width:100%}@media(prefers-reduced-motion:reduce){.gaugeit__pointer-rotating,.gaugeit__linear-indicator-moving,.gaugeit__tape-slot{will-change:auto}}@media(forced-colors:active){.gaugeit__pointer,.gaugeit__pointer-cap,.gaugeit__linear-indicator,.gaugeit__linear-indicator-cap,.gaugeit__tape-window,.gaugeit__tape-window-inner,.gaugeit__tape-indicator,.gaugeit__zero-marker,.gaugeit__ticks,.gaugeit__label,.gaugeit__readout,.gaugeit__light{forced-color-adjust:auto}}.gaugeit--layout-intrinsic{height:auto}.gaugeit--layout-contain{width:100%;height:100%;min-height:0}.gaugeit--layout-contain .gaugeit__svg{width:100%;height:100%;max-height:100%}.gaugeit__light{--gaugeit-light-core: #f59e0b;--gaugeit-light-highlight: #fde68a;--gaugeit-light-glow: #fbbf24;--gaugeit-light-rim: #92400e;--gaugeit-light-off: #3f2d12;--gaugeit-light-opacity: 1;pointer-events:none}.gaugeit__light--red{--gaugeit-light-core: #ef4444;--gaugeit-light-highlight: #fecaca;--gaugeit-light-glow: #f87171;--gaugeit-light-rim: #7f1d1d;--gaugeit-light-off: #3f1c1c}.gaugeit__light--green{--gaugeit-light-core: #22c55e;--gaugeit-light-highlight: #bbf7d0;--gaugeit-light-glow: #4ade80;--gaugeit-light-rim: #14532d;--gaugeit-light-off: #182c1e}.gaugeit__light--blue{--gaugeit-light-core: #3b82f6;--gaugeit-light-highlight: #bfdbfe;--gaugeit-light-glow: #60a5fa;--gaugeit-light-rim: #1e3a8a;--gaugeit-light-off: #1b2438}.gaugeit__light--amber{--gaugeit-light-core: #f59e0b;--gaugeit-light-highlight: #fde68a;--gaugeit-light-glow: #fbbf24;--gaugeit-light-rim: #92400e;--gaugeit-light-off: #3f2d12}.gaugeit__light--yellow{--gaugeit-light-core: #fde047;--gaugeit-light-highlight: #fef9c3;--gaugeit-light-glow: #facc15;--gaugeit-light-rim: #a16207;--gaugeit-light-off: #443a16}.gaugeit__light--orange{--gaugeit-light-core: #f97316;--gaugeit-light-highlight: #fed7aa;--gaugeit-light-glow: #fb923c;--gaugeit-light-rim: #9a3412;--gaugeit-light-off: #462515}.gaugeit__light--white{--gaugeit-light-core: #f8fafc;--gaugeit-light-highlight: #ffffff;--gaugeit-light-glow: #e2e8f0;--gaugeit-light-rim: #64748b;--gaugeit-light-off: #3f4955}.gaugeit__light--halogen{--gaugeit-light-core: #fff2bf;--gaugeit-light-highlight: #fffdf0;--gaugeit-light-glow: #ffe79a;--gaugeit-light-rim: #9a7b24;--gaugeit-light-off: #4d4326}.gaugeit__light--cyan{--gaugeit-light-core: #22d3ee;--gaugeit-light-highlight: #cffafe;--gaugeit-light-glow: #67e8f9;--gaugeit-light-rim: #155e75;--gaugeit-light-off: #18343a}.gaugeit__light--brown{--gaugeit-light-core: #a16207;--gaugeit-light-highlight: #f5d0a1;--gaugeit-light-glow: #d6a56b;--gaugeit-light-rim: #5b3b10;--gaugeit-light-off: #332617}.gaugeit__light-emission,.gaugeit__light-glow-emission{pointer-events:none;transition:opacity .15s ease}.gaugeit__light-emission--off{opacity:1}.gaugeit__light-emission--on,.gaugeit__light-glow-emission{opacity:0}.gaugeit__light-glow{opacity:1;transform-box:fill-box;transform-origin:center}.gaugeit__light:not(.has-glow) .gaugeit__light-glow-emission{display:none}.gaugeit__light-bezel,.gaugeit__light-bezel-highlight,.gaugeit__light-bulb,.gaugeit__light-lens-shade,.gaugeit__light-sparkle{shape-rendering:geometricPrecision}.gaugeit__light-bulb{transform-box:fill-box;transform-origin:center;transition:filter .15s ease}.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--on{opacity:var(--gaugeit-light-on-opacity, var(--gaugeit-light-opacity, 1))}.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-glow-emission{opacity:var(--gaugeit-light-glow-opacity, .15)}.gaugeit__light.is-on .gaugeit__light-bulb--on{filter:saturate(1.08) brightness(1.05)}.gaugeit__light.is-flickering .gaugeit__light-emission--on,.gaugeit__light.is-flickering .gaugeit__light-glow-emission{transition:opacity 24ms linear}.gaugeit__light.is-pulsing .gaugeit__light-glow{animation:gaugeit-light-pulse-glow var(--gaugeit-light-pulse-duration, 2.6s) ease-in-out infinite}.gaugeit__light.is-pulsing .gaugeit__light-bulb--on{animation:gaugeit-light-pulse-lens var(--gaugeit-light-pulse-duration, 2.6s) ease-in-out infinite}.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on{animation:gaugeit-light-blink-on var(--gaugeit-light-blink-duration, 1s) step-end infinite}.gaugeit__light.is-on.is-blinking .gaugeit__light-glow-emission{animation:gaugeit-light-blink-glow var(--gaugeit-light-blink-duration, 1s) step-end infinite}@keyframes gaugeit-light-pulse-glow{0%,to{opacity:.72;transform:scale(.99)}50%{opacity:.8;transform:scale(1.015)}}@keyframes gaugeit-light-pulse-lens{0%,to{filter:saturate(1.06) brightness(1.04)}50%{filter:saturate(1.1) brightness(1.07)}}@keyframes gaugeit-light-blink-on{0%,48%{opacity:var(--gaugeit-light-on-opacity, var(--gaugeit-light-opacity, 1))}49%,to{opacity:0}}@keyframes gaugeit-light-blink-glow{0%,48%{opacity:var(--gaugeit-light-glow-opacity, .15)}49%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.gaugeit__light.is-blinking .gaugeit__light-emission--on,.gaugeit__light.is-blinking .gaugeit__light-glow-emission,.gaugeit__light.is-flickering .gaugeit__light-emission--on,.gaugeit__light.is-flickering .gaugeit__light-glow-emission,.gaugeit__light.is-pulsing .gaugeit__light-glow,.gaugeit__light.is-pulsing .gaugeit__light-bulb--on{animation:none}.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on{opacity:var(--gaugeit-light-on-opacity, var(--gaugeit-light-opacity, 1))}.gaugeit__light.is-on.is-blinking .gaugeit__light-glow-emission{opacity:var(--gaugeit-light-glow-opacity, .15)}}
@@ -1,4 +1,4 @@
1
- /*! Gaugeit.js v0.1.0 | MIT License | https://github.com/kasperikoski/gaugeit.js#readme */
1
+ /*! Gaugeit.js v0.1.1 | MIT License | https://github.com/kasperikoski/gaugeit.js#readme */
2
2
  var Gaugeit = (() => {
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -40,7 +40,7 @@ var Gaugeit = (() => {
40
40
  });
41
41
 
42
42
  // src/gaugeit.css
43
- var gaugeit_default = '/* Gaugeit.js baseline styles. Visual geometry is rendered by SVG; CSS only handles layout and integration. */\n.gaugeit-host {\n display: block;\n min-width: 0;\n width: var(--gaugeit-width, auto);\n height: var(--gaugeit-height, auto);\n aspect-ratio: var(--gaugeit-aspect-ratio, auto);\n}\n\n.gaugeit {\n display: block;\n width: 100%;\n min-width: 0;\n color: var(--gaugeit-text-color, inherit);\n font-family: var(--gaugeit-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);\n contain: layout style;\n}\n\n.gaugeit__svg {\n display: block;\n width: 100%;\n max-width: 100%;\n height: auto;\n overflow: hidden;\n user-select: none;\n -webkit-user-select: none;\n touch-action: pan-y;\n}\n\n.gaugeit__pointer-rotating,\n.gaugeit__linear-indicator-moving,\n.gaugeit__tape-slot {\n will-change: transform;\n}\n\n.gaugeit__pointer,\n.gaugeit__pointer-cap,\n.gaugeit__linear-indicator,\n.gaugeit__linear-indicator-cap,\n.gaugeit__tape-window,\n.gaugeit__tape-window-inner,\n.gaugeit__tape-indicator,\n.gaugeit__zero-marker,\n.gaugeit__ticks,\n.gaugeit__zone,\n.gaugeit__track {\n shape-rendering: geometricPrecision;\n}\n\n.gaugeit__label,\n.gaugeit__readout,\n.gaugeit__tape-label {\n paint-order: stroke fill;\n font-variant-numeric: tabular-nums;\n}\n\ngauge-it {\n display: block;\n min-width: 0;\n}\n\n.gaugeit-element__mount {\n display: block;\n width: 100%;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .gaugeit__pointer-rotating,\n .gaugeit__linear-indicator-moving,\n .gaugeit__tape-slot {\n will-change: auto;\n }\n}\n\n@media (forced-colors: active) {\n .gaugeit__pointer,\n .gaugeit__pointer-cap,\n .gaugeit__linear-indicator,\n .gaugeit__linear-indicator-cap,\n .gaugeit__tape-window,\n .gaugeit__tape-window-inner,\n .gaugeit__tape-indicator,\n .gaugeit__zero-marker,\n .gaugeit__ticks,\n .gaugeit__label,\n .gaugeit__readout,\n .gaugeit__light {\n forced-color-adjust: auto;\n }\n}\n\n/* Intrinsic mode grows with the computed SVG viewBox; contain mode fits a fixed host box. */\n.gaugeit--layout-intrinsic {\n height: auto;\n}\n\n.gaugeit--layout-contain {\n width: 100%;\n height: 100%;\n min-height: 0;\n}\n\n.gaugeit--layout-contain .gaugeit__svg {\n width: 100%;\n height: 100%;\n max-height: 100%;\n}\n\n/* Shared SVG annunciator lamp. Colors are themeable through CSS variables or light.customColor. */\n.gaugeit__light {\n --gaugeit-light-core: #f59e0b;\n --gaugeit-light-highlight: #fde68a;\n --gaugeit-light-glow: #fbbf24;\n --gaugeit-light-rim: #92400e;\n --gaugeit-light-off: #3f2d12;\n --gaugeit-light-opacity: 1;\n pointer-events: none;\n opacity: var(--gaugeit-light-opacity);\n}\n\n.gaugeit__light--red {\n --gaugeit-light-core: #ef4444;\n --gaugeit-light-highlight: #fecaca;\n --gaugeit-light-glow: #f87171;\n --gaugeit-light-rim: #7f1d1d;\n --gaugeit-light-off: #3f1c1c;\n}\n\n.gaugeit__light--green {\n --gaugeit-light-core: #22c55e;\n --gaugeit-light-highlight: #bbf7d0;\n --gaugeit-light-glow: #4ade80;\n --gaugeit-light-rim: #14532d;\n --gaugeit-light-off: #182c1e;\n}\n\n.gaugeit__light--blue {\n --gaugeit-light-core: #3b82f6;\n --gaugeit-light-highlight: #bfdbfe;\n --gaugeit-light-glow: #60a5fa;\n --gaugeit-light-rim: #1e3a8a;\n --gaugeit-light-off: #1b2438;\n}\n\n.gaugeit__light--amber {\n --gaugeit-light-core: #f59e0b;\n --gaugeit-light-highlight: #fde68a;\n --gaugeit-light-glow: #fbbf24;\n --gaugeit-light-rim: #92400e;\n --gaugeit-light-off: #3f2d12;\n}\n\n.gaugeit__light--yellow {\n --gaugeit-light-core: #fde047;\n --gaugeit-light-highlight: #fef9c3;\n --gaugeit-light-glow: #facc15;\n --gaugeit-light-rim: #a16207;\n --gaugeit-light-off: #443a16;\n}\n\n.gaugeit__light--orange {\n --gaugeit-light-core: #f97316;\n --gaugeit-light-highlight: #fed7aa;\n --gaugeit-light-glow: #fb923c;\n --gaugeit-light-rim: #9a3412;\n --gaugeit-light-off: #462515;\n}\n\n.gaugeit__light--white {\n --gaugeit-light-core: #f8fafc;\n --gaugeit-light-highlight: #ffffff;\n --gaugeit-light-glow: #e2e8f0;\n --gaugeit-light-rim: #64748b;\n --gaugeit-light-off: #3f4955;\n}\n\n.gaugeit__light--halogen {\n --gaugeit-light-core: #fff2bf;\n --gaugeit-light-highlight: #fffdf0;\n --gaugeit-light-glow: #ffe79a;\n --gaugeit-light-rim: #9a7b24;\n --gaugeit-light-off: #4d4326;\n}\n\n.gaugeit__light--cyan {\n --gaugeit-light-core: #22d3ee;\n --gaugeit-light-highlight: #cffafe;\n --gaugeit-light-glow: #67e8f9;\n --gaugeit-light-rim: #155e75;\n --gaugeit-light-off: #18343a;\n}\n\n.gaugeit__light--brown {\n --gaugeit-light-core: #a16207;\n --gaugeit-light-highlight: #f5d0a1;\n --gaugeit-light-glow: #d6a56b;\n --gaugeit-light-rim: #5b3b10;\n --gaugeit-light-off: #332617;\n}\n\n.gaugeit__light-emission {\n pointer-events: none;\n transition: opacity 150ms ease;\n}\n\n.gaugeit__light-emission--off {\n opacity: var(--gaugeit-light-opacity, 1);\n}\n\n.gaugeit__light-emission--on {\n opacity: 0;\n}\n\n.gaugeit__light-glow {\n opacity: 0.76;\n transform-box: fill-box;\n transform-origin: center;\n}\n\n.gaugeit__light:not(.has-glow) .gaugeit__light-glow {\n display: none;\n}\n\n.gaugeit__light-bezel,\n.gaugeit__light-bezel-highlight,\n.gaugeit__light-bulb,\n.gaugeit__light-lens-shade,\n.gaugeit__light-sparkle {\n shape-rendering: geometricPrecision;\n}\n\n.gaugeit__light-bulb {\n transform-box: fill-box;\n transform-origin: center;\n transition: filter 150ms ease;\n}\n\n.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--off {\n opacity: 0;\n}\n\n.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--on {\n opacity: var(--gaugeit-light-opacity, 1);\n}\n\n.gaugeit__light.is-on .gaugeit__light-bulb--on {\n filter: saturate(1.08) brightness(1.05);\n}\n\n.gaugeit__light.is-pulsing .gaugeit__light-glow {\n animation: gaugeit-light-pulse-glow var(--gaugeit-light-pulse-duration, 2600ms) ease-in-out infinite;\n}\n\n.gaugeit__light.is-pulsing .gaugeit__light-bulb--on {\n animation: gaugeit-light-pulse-lens var(--gaugeit-light-pulse-duration, 2600ms) ease-in-out infinite;\n}\n\n.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on {\n animation: gaugeit-light-blink-on var(--gaugeit-light-blink-duration, 1000ms) step-end infinite;\n}\n\n.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--off {\n animation: gaugeit-light-blink-off var(--gaugeit-light-blink-duration, 1000ms) step-end infinite;\n}\n\n@keyframes gaugeit-light-pulse-glow {\n 0%, 100% { opacity: 0.72; transform: scale(0.99); }\n 50% { opacity: 0.8; transform: scale(1.015); }\n}\n\n@keyframes gaugeit-light-pulse-lens {\n 0%, 100% { filter: saturate(1.06) brightness(1.04); }\n 50% { filter: saturate(1.1) brightness(1.07); }\n}\n\n@keyframes gaugeit-light-blink-on {\n 0%, 48% { opacity: var(--gaugeit-light-opacity, 1); }\n 49%, 100% { opacity: 0; }\n}\n\n@keyframes gaugeit-light-blink-off {\n 0%, 48% { opacity: 0; }\n 49%, 100% { opacity: var(--gaugeit-light-opacity, 1); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .gaugeit__light.is-blinking .gaugeit__light-emission,\n .gaugeit__light.is-pulsing .gaugeit__light-glow,\n .gaugeit__light.is-pulsing .gaugeit__light-bulb--on {\n animation: none;\n }\n\n .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--off {\n opacity: 0;\n }\n\n .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on {\n opacity: var(--gaugeit-light-opacity, 1);\n }\n}\n';
43
+ var gaugeit_default = '/* Gaugeit.js baseline styles. Visual geometry is rendered by SVG; CSS only handles layout and integration. */\n.gaugeit-host {\n display: block;\n min-width: 0;\n width: var(--gaugeit-width, auto);\n height: var(--gaugeit-height, auto);\n aspect-ratio: var(--gaugeit-aspect-ratio, auto);\n}\n\n.gaugeit {\n display: block;\n width: 100%;\n min-width: 0;\n color: var(--gaugeit-text-color, inherit);\n font-family: var(--gaugeit-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);\n contain: layout style;\n}\n\n.gaugeit__svg {\n display: block;\n width: 100%;\n max-width: 100%;\n height: auto;\n overflow: hidden;\n user-select: none;\n -webkit-user-select: none;\n touch-action: pan-y;\n}\n\n.gaugeit__pointer-rotating,\n.gaugeit__linear-indicator-moving,\n.gaugeit__tape-slot {\n will-change: transform;\n}\n\n.gaugeit__pointer,\n.gaugeit__pointer-cap,\n.gaugeit__linear-indicator,\n.gaugeit__linear-indicator-cap,\n.gaugeit__tape-window,\n.gaugeit__tape-window-inner,\n.gaugeit__tape-indicator,\n.gaugeit__zero-marker,\n.gaugeit__ticks,\n.gaugeit__zone,\n.gaugeit__track {\n shape-rendering: geometricPrecision;\n}\n\n.gaugeit__label,\n.gaugeit__readout,\n.gaugeit__tape-label {\n paint-order: stroke fill;\n font-variant-numeric: tabular-nums;\n}\n\ngauge-it {\n display: block;\n min-width: 0;\n}\n\n.gaugeit-element__mount {\n display: block;\n width: 100%;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .gaugeit__pointer-rotating,\n .gaugeit__linear-indicator-moving,\n .gaugeit__tape-slot {\n will-change: auto;\n }\n}\n\n@media (forced-colors: active) {\n .gaugeit__pointer,\n .gaugeit__pointer-cap,\n .gaugeit__linear-indicator,\n .gaugeit__linear-indicator-cap,\n .gaugeit__tape-window,\n .gaugeit__tape-window-inner,\n .gaugeit__tape-indicator,\n .gaugeit__zero-marker,\n .gaugeit__ticks,\n .gaugeit__label,\n .gaugeit__readout,\n .gaugeit__light {\n forced-color-adjust: auto;\n }\n}\n\n/* Intrinsic mode grows with the computed SVG viewBox; contain mode fits a fixed host box. */\n.gaugeit--layout-intrinsic {\n height: auto;\n}\n\n.gaugeit--layout-contain {\n width: 100%;\n height: 100%;\n min-height: 0;\n}\n\n.gaugeit--layout-contain .gaugeit__svg {\n width: 100%;\n height: 100%;\n max-height: 100%;\n}\n\n/* Shared SVG annunciator lamp. Colors are themeable through CSS variables or light.customColor. */\n.gaugeit__light {\n --gaugeit-light-core: #f59e0b;\n --gaugeit-light-highlight: #fde68a;\n --gaugeit-light-glow: #fbbf24;\n --gaugeit-light-rim: #92400e;\n --gaugeit-light-off: #3f2d12;\n --gaugeit-light-opacity: 1;\n pointer-events: none;\n}\n\n.gaugeit__light--red {\n --gaugeit-light-core: #ef4444;\n --gaugeit-light-highlight: #fecaca;\n --gaugeit-light-glow: #f87171;\n --gaugeit-light-rim: #7f1d1d;\n --gaugeit-light-off: #3f1c1c;\n}\n\n.gaugeit__light--green {\n --gaugeit-light-core: #22c55e;\n --gaugeit-light-highlight: #bbf7d0;\n --gaugeit-light-glow: #4ade80;\n --gaugeit-light-rim: #14532d;\n --gaugeit-light-off: #182c1e;\n}\n\n.gaugeit__light--blue {\n --gaugeit-light-core: #3b82f6;\n --gaugeit-light-highlight: #bfdbfe;\n --gaugeit-light-glow: #60a5fa;\n --gaugeit-light-rim: #1e3a8a;\n --gaugeit-light-off: #1b2438;\n}\n\n.gaugeit__light--amber {\n --gaugeit-light-core: #f59e0b;\n --gaugeit-light-highlight: #fde68a;\n --gaugeit-light-glow: #fbbf24;\n --gaugeit-light-rim: #92400e;\n --gaugeit-light-off: #3f2d12;\n}\n\n.gaugeit__light--yellow {\n --gaugeit-light-core: #fde047;\n --gaugeit-light-highlight: #fef9c3;\n --gaugeit-light-glow: #facc15;\n --gaugeit-light-rim: #a16207;\n --gaugeit-light-off: #443a16;\n}\n\n.gaugeit__light--orange {\n --gaugeit-light-core: #f97316;\n --gaugeit-light-highlight: #fed7aa;\n --gaugeit-light-glow: #fb923c;\n --gaugeit-light-rim: #9a3412;\n --gaugeit-light-off: #462515;\n}\n\n.gaugeit__light--white {\n --gaugeit-light-core: #f8fafc;\n --gaugeit-light-highlight: #ffffff;\n --gaugeit-light-glow: #e2e8f0;\n --gaugeit-light-rim: #64748b;\n --gaugeit-light-off: #3f4955;\n}\n\n.gaugeit__light--halogen {\n --gaugeit-light-core: #fff2bf;\n --gaugeit-light-highlight: #fffdf0;\n --gaugeit-light-glow: #ffe79a;\n --gaugeit-light-rim: #9a7b24;\n --gaugeit-light-off: #4d4326;\n}\n\n.gaugeit__light--cyan {\n --gaugeit-light-core: #22d3ee;\n --gaugeit-light-highlight: #cffafe;\n --gaugeit-light-glow: #67e8f9;\n --gaugeit-light-rim: #155e75;\n --gaugeit-light-off: #18343a;\n}\n\n.gaugeit__light--brown {\n --gaugeit-light-core: #a16207;\n --gaugeit-light-highlight: #f5d0a1;\n --gaugeit-light-glow: #d6a56b;\n --gaugeit-light-rim: #5b3b10;\n --gaugeit-light-off: #332617;\n}\n\n.gaugeit__light-emission,\n.gaugeit__light-glow-emission {\n pointer-events: none;\n transition: opacity 150ms ease;\n}\n\n.gaugeit__light-emission--off {\n opacity: 1;\n}\n\n.gaugeit__light-emission--on {\n opacity: 0;\n}\n\n.gaugeit__light-glow-emission {\n opacity: 0;\n}\n\n.gaugeit__light-glow {\n opacity: 1;\n transform-box: fill-box;\n transform-origin: center;\n}\n\n.gaugeit__light:not(.has-glow) .gaugeit__light-glow-emission {\n display: none;\n}\n\n.gaugeit__light-bezel,\n.gaugeit__light-bezel-highlight,\n.gaugeit__light-bulb,\n.gaugeit__light-lens-shade,\n.gaugeit__light-sparkle {\n shape-rendering: geometricPrecision;\n}\n\n.gaugeit__light-bulb {\n transform-box: fill-box;\n transform-origin: center;\n transition: filter 150ms ease;\n}\n\n.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-emission--on {\n opacity: var(--gaugeit-light-on-opacity, var(--gaugeit-light-opacity, 1));\n}\n\n.gaugeit__light.is-on:not(.is-blinking) .gaugeit__light-glow-emission {\n opacity: var(--gaugeit-light-glow-opacity, 0.15);\n}\n\n.gaugeit__light.is-on .gaugeit__light-bulb--on {\n filter: saturate(1.08) brightness(1.05);\n}\n\n.gaugeit__light.is-flickering .gaugeit__light-emission--on,\n.gaugeit__light.is-flickering .gaugeit__light-glow-emission {\n transition: opacity 24ms linear;\n}\n\n.gaugeit__light.is-pulsing .gaugeit__light-glow {\n animation: gaugeit-light-pulse-glow var(--gaugeit-light-pulse-duration, 2600ms) ease-in-out infinite;\n}\n\n.gaugeit__light.is-pulsing .gaugeit__light-bulb--on {\n animation: gaugeit-light-pulse-lens var(--gaugeit-light-pulse-duration, 2600ms) ease-in-out infinite;\n}\n\n.gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on {\n animation: gaugeit-light-blink-on var(--gaugeit-light-blink-duration, 1000ms) step-end infinite;\n}\n\n.gaugeit__light.is-on.is-blinking .gaugeit__light-glow-emission {\n animation: gaugeit-light-blink-glow var(--gaugeit-light-blink-duration, 1000ms) step-end infinite;\n}\n\n@keyframes gaugeit-light-pulse-glow {\n 0%, 100% { opacity: 0.72; transform: scale(0.99); }\n 50% { opacity: 0.8; transform: scale(1.015); }\n}\n\n@keyframes gaugeit-light-pulse-lens {\n 0%, 100% { filter: saturate(1.06) brightness(1.04); }\n 50% { filter: saturate(1.1) brightness(1.07); }\n}\n\n@keyframes gaugeit-light-blink-on {\n 0%, 48% { opacity: var(--gaugeit-light-on-opacity, var(--gaugeit-light-opacity, 1)); }\n 49%, 100% { opacity: 0; }\n}\n\n@keyframes gaugeit-light-blink-glow {\n 0%, 48% { opacity: var(--gaugeit-light-glow-opacity, 0.15); }\n 49%, 100% { opacity: 0; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .gaugeit__light.is-blinking .gaugeit__light-emission--on,\n .gaugeit__light.is-blinking .gaugeit__light-glow-emission,\n .gaugeit__light.is-flickering .gaugeit__light-emission--on,\n .gaugeit__light.is-flickering .gaugeit__light-glow-emission,\n .gaugeit__light.is-pulsing .gaugeit__light-glow,\n .gaugeit__light.is-pulsing .gaugeit__light-bulb--on {\n animation: none;\n }\n\n .gaugeit__light.is-on.is-blinking .gaugeit__light-emission--on {\n opacity: var(--gaugeit-light-on-opacity, var(--gaugeit-light-opacity, 1));\n }\n\n .gaugeit__light.is-on.is-blinking .gaugeit__light-glow-emission {\n opacity: var(--gaugeit-light-glow-opacity, 0.15);\n }\n}\n';
44
44
 
45
45
  // src/core/utils.js
46
46
  function isPlainObject(value) {
@@ -880,7 +880,13 @@ var Gaugeit = (() => {
880
880
  if (!(light == null ? void 0 : light.visible)) return;
881
881
  const point = resolveLightPosition(light, options);
882
882
  const radius = Math.max(1, finiteNumber(light.radius, 8));
883
- const halo = light.glow ? radius * 2.96 : radius;
883
+ const glowRadius = Math.max(0, finiteNumber(light.glowRadius, radius * 1.82));
884
+ const flickerGlowRadius = light.flicker ? Math.min(1, Math.max(0, finiteNumber(light.flickerGlowRadius, 0))) : 0;
885
+ const maximumGlowRadius = glowRadius * (1 + flickerGlowRadius);
886
+ const glowSharpness = Math.min(1, Math.max(0, finiteNumber(light.glowSharpness, 0)));
887
+ const maximumBlur = glowRadius > 0 ? Math.max(1.4, glowRadius * 0.38) : 0;
888
+ const glowBlur = maximumBlur * (1 - glowSharpness);
889
+ const halo = light.glow ? maximumGlowRadius + glowBlur * 3 + (maximumGlowRadius > 0 ? 1e-9 : 0) : radius;
884
890
  const bezel = radius + Math.max(1.5, radius * 0.18);
885
891
  const extent = Math.max(halo, bezel);
886
892
  includeRect(bounds, point.x - extent, point.y - extent, extent * 2, extent * 2);
@@ -1326,28 +1332,36 @@ var Gaugeit = (() => {
1326
1332
  },
1327
1333
  light: {
1328
1334
  visible: false,
1329
- x: 160,
1335
+ x: 93,
1330
1336
  y: 110,
1331
1337
  radius: 8,
1332
- color: "amber",
1338
+ glowRadius: 20,
1339
+ glowSharpness: 0,
1340
+ color: "red",
1333
1341
  customColor: "",
1334
1342
  offColor: "#f3ead6",
1335
1343
  offEdgeColor: "#817768",
1336
1344
  bezelColor: "#4b5563",
1337
1345
  bezelHighlightColor: "#f8fafc",
1338
1346
  opacity: 1,
1347
+ glowOpacity: 0.15,
1339
1348
  on: false,
1340
1349
  glow: true,
1341
- pulse: true,
1350
+ pulse: false,
1342
1351
  pulseInterval: 2600,
1343
1352
  blink: false,
1344
1353
  blinkInterval: 1e3,
1354
+ flicker: true,
1355
+ flickerIntensity: 0.1,
1356
+ flickerGlowRadius: 0.1,
1357
+ flickerMinInterval: 45,
1358
+ flickerMaxInterval: 140,
1345
1359
  trigger: {
1346
- mode: "manual",
1360
+ mode: "below",
1347
1361
  source: "target",
1348
- value: 0,
1362
+ value: 15,
1349
1363
  min: 0,
1350
- max: 0
1364
+ max: 15
1351
1365
  }
1352
1366
  },
1353
1367
  readout: {
@@ -1650,27 +1664,63 @@ var Gaugeit = (() => {
1650
1664
  tape.colorByZone = tape.colorByZone === true;
1651
1665
  }
1652
1666
  function validateLight(light) {
1667
+ const defaults2 = BASE_DEFAULTS.light;
1653
1668
  light.visible = light.visible === true;
1654
- light.x = finiteNumber(light.x, 160);
1655
- light.y = finiteNumber(light.y, 110);
1656
- light.radius = Math.max(1, finiteNumber(light.radius, 8));
1657
- light.color = VALID_LIGHT_COLORS.has(light.color) ? light.color : "amber";
1658
- light.customColor = light.customColor === null || light.customColor === void 0 ? "" : String(light.customColor).trim();
1659
- light.offColor = normalizeColor(light.offColor, "#f3ead6");
1660
- light.offEdgeColor = normalizeColor(light.offEdgeColor, "#817768");
1661
- light.bezelColor = normalizeColor(light.bezelColor, "#4b5563");
1662
- light.bezelHighlightColor = normalizeColor(light.bezelHighlightColor, "#f8fafc");
1663
- light.opacity = Math.min(1, Math.max(0, finiteNumber(light.opacity, 1)));
1669
+ light.x = finiteNumber(light.x, defaults2.x);
1670
+ light.y = finiteNumber(light.y, defaults2.y);
1671
+ light.radius = Math.max(1, finiteNumber(light.radius, defaults2.radius));
1672
+ light.glowRadius = light.glowRadius === null || light.glowRadius === void 0 ? light.radius * 1.82 : Math.max(0, finiteNumber(light.glowRadius, defaults2.glowRadius));
1673
+ light.glowSharpness = Math.min(
1674
+ 1,
1675
+ Math.max(0, finiteNumber(light.glowSharpness, defaults2.glowSharpness))
1676
+ );
1677
+ light.color = VALID_LIGHT_COLORS.has(light.color) ? light.color : defaults2.color;
1678
+ light.customColor = light.customColor === null || light.customColor === void 0 ? defaults2.customColor : String(light.customColor).trim();
1679
+ light.offColor = normalizeColor(light.offColor, defaults2.offColor);
1680
+ light.offEdgeColor = normalizeColor(light.offEdgeColor, defaults2.offEdgeColor);
1681
+ light.bezelColor = normalizeColor(light.bezelColor, defaults2.bezelColor);
1682
+ light.bezelHighlightColor = normalizeColor(
1683
+ light.bezelHighlightColor,
1684
+ defaults2.bezelHighlightColor
1685
+ );
1686
+ light.opacity = Math.min(1, Math.max(0, finiteNumber(light.opacity, defaults2.opacity)));
1687
+ light.glowOpacity = Math.min(
1688
+ 1,
1689
+ Math.max(0, finiteNumber(light.glowOpacity, defaults2.glowOpacity))
1690
+ );
1664
1691
  light.on = light.on === true;
1665
1692
  light.glow = light.glow !== false;
1666
- light.pulse = light.pulse !== false;
1667
- light.pulseInterval = Math.max(400, finiteNumber(light.pulseInterval, 2600));
1693
+ light.pulse = light.pulse === true;
1694
+ light.pulseInterval = Math.max(400, finiteNumber(light.pulseInterval, defaults2.pulseInterval));
1668
1695
  light.blink = light.blink === true;
1669
- light.blinkInterval = Math.max(100, finiteNumber(light.blinkInterval, 1e3));
1696
+ light.blinkInterval = Math.max(100, finiteNumber(light.blinkInterval, defaults2.blinkInterval));
1697
+ light.flicker = light.flicker === true;
1698
+ light.flickerIntensity = Math.min(
1699
+ 1,
1700
+ Math.max(0, finiteNumber(light.flickerIntensity, defaults2.flickerIntensity))
1701
+ );
1702
+ light.flickerGlowRadius = Math.min(
1703
+ 1,
1704
+ Math.max(0, finiteNumber(light.flickerGlowRadius, defaults2.flickerGlowRadius))
1705
+ );
1706
+ light.flickerMinInterval = Math.max(
1707
+ 16,
1708
+ finiteNumber(light.flickerMinInterval, defaults2.flickerMinInterval)
1709
+ );
1710
+ light.flickerMaxInterval = Math.max(
1711
+ 16,
1712
+ finiteNumber(light.flickerMaxInterval, defaults2.flickerMaxInterval)
1713
+ );
1714
+ if (light.flickerMaxInterval < light.flickerMinInterval) {
1715
+ [light.flickerMinInterval, light.flickerMaxInterval] = [
1716
+ light.flickerMaxInterval,
1717
+ light.flickerMinInterval
1718
+ ];
1719
+ }
1670
1720
  light.trigger = isPlainObject(light.trigger) ? light.trigger : {};
1671
- light.trigger.mode = VALID_LIGHT_TRIGGER_MODES.has(light.trigger.mode) ? light.trigger.mode : "manual";
1672
- light.trigger.source = VALID_LIGHT_TRIGGER_SOURCES.has(light.trigger.source) ? light.trigger.source : "target";
1673
- light.trigger.value = finiteNumber(light.trigger.value, 0);
1721
+ light.trigger.mode = VALID_LIGHT_TRIGGER_MODES.has(light.trigger.mode) ? light.trigger.mode : defaults2.trigger.mode;
1722
+ light.trigger.source = VALID_LIGHT_TRIGGER_SOURCES.has(light.trigger.source) ? light.trigger.source : defaults2.trigger.source;
1723
+ light.trigger.value = finiteNumber(light.trigger.value, defaults2.trigger.value);
1674
1724
  light.trigger.min = finiteNumber(light.trigger.min, light.trigger.value);
1675
1725
  light.trigger.max = finiteNumber(light.trigger.max, light.trigger.value);
1676
1726
  if (light.trigger.max < light.trigger.min) {
@@ -2791,17 +2841,17 @@ var Gaugeit = (() => {
2791
2841
  if (!(light == null ? void 0 : light.visible)) return null;
2792
2842
  const { x, y } = resolveLightPosition(light, options);
2793
2843
  const palette = resolvePalette(light);
2794
- const colorName = Object.prototype.hasOwnProperty.call(LIGHT_PALETTES, light.color) ? light.color : "amber";
2844
+ const colorName = Object.prototype.hasOwnProperty.call(LIGHT_PALETTES, light.color) ? light.color : "red";
2795
2845
  const glowFilterId = `${renderer.id}-light-glow`;
2796
2846
  const onGradientId = `${renderer.id}-light-on`;
2797
2847
  const offGradientId = `${renderer.id}-light-off`;
2798
2848
  const bezelGradientId = `${renderer.id}-light-bezel`;
2799
2849
  const defs = svgElement("defs");
2800
2850
  defs.append(
2801
- createGlowFilter(glowFilterId, light.radius),
2851
+ createGlowFilter(glowFilterId, light.glowRadius, light.glowSharpness),
2802
2852
  createBulbGradient(onGradientId, {
2803
- center: "#ffffff",
2804
- highlight: palette.highlight,
2853
+ center: palette.highlight,
2854
+ highlight: palette.core,
2805
2855
  middle: palette.core,
2806
2856
  edge: palette.rim
2807
2857
  }),
@@ -2824,6 +2874,8 @@ var Gaugeit = (() => {
2824
2874
  lamp.style.setProperty("--gaugeit-light-blink-duration", `${light.blinkInterval}ms`);
2825
2875
  lamp.style.setProperty("--gaugeit-light-pulse-duration", `${light.pulseInterval}ms`);
2826
2876
  lamp.style.setProperty("--gaugeit-light-opacity", String(light.opacity));
2877
+ lamp.style.setProperty("--gaugeit-light-on-opacity", String(light.opacity));
2878
+ lamp.style.setProperty("--gaugeit-light-glow-opacity", String(light.glowOpacity));
2827
2879
  const bezel = svgElement("circle", {
2828
2880
  class: "gaugeit__light-bezel",
2829
2881
  cx: 0,
@@ -2846,9 +2898,7 @@ var Gaugeit = (() => {
2846
2898
  radius: light.radius,
2847
2899
  gradientId: offGradientId,
2848
2900
  edgeColor: light.offEdgeColor,
2849
- glowColor: null,
2850
- glowFilterId: null,
2851
- sparkleOpacity: 0.58,
2901
+ sparkleOpacity: 0.24,
2852
2902
  shadeOpacity: 0.14
2853
2903
  });
2854
2904
  const onVisual = createLampVisual({
@@ -2856,13 +2906,18 @@ var Gaugeit = (() => {
2856
2906
  radius: light.radius,
2857
2907
  gradientId: onGradientId,
2858
2908
  edgeColor: palette.rim,
2859
- glowColor: palette.glow,
2860
- glowFilterId,
2861
- sparkleOpacity: 0.72,
2909
+ sparkleOpacity: 0.26,
2862
2910
  shadeOpacity: 0.1
2863
2911
  });
2864
- lamp.append(bezel, bezelHighlight, offVisual, onVisual);
2912
+ const glowVisual = createGlowVisual({
2913
+ radius: light.glowRadius,
2914
+ color: palette.glow,
2915
+ filterId: glowFilterId
2916
+ });
2917
+ lamp.append(glowVisual, bezel, bezelHighlight, offVisual, onVisual);
2865
2918
  group.append(lamp);
2919
+ const glowElement = glowVisual.querySelector(".gaugeit__light-glow");
2920
+ let flickerTimer = null;
2866
2921
  return {
2867
2922
  update(value, state = {}) {
2868
2923
  var _a;
@@ -2870,13 +2925,54 @@ var Gaugeit = (() => {
2870
2925
  const active = lightIsActive(light, sample);
2871
2926
  const blinking = active && light.blink;
2872
2927
  const pulsing = active && light.pulse && !blinking;
2928
+ const flickering = active && light.flicker && (light.flickerIntensity > 0 || light.flickerGlowRadius > 0) && !prefersReducedMotion();
2873
2929
  lamp.classList.toggle("is-on", active);
2874
2930
  lamp.classList.toggle("is-blinking", blinking);
2875
2931
  lamp.classList.toggle("is-pulsing", pulsing);
2932
+ lamp.classList.toggle("is-flickering", flickering);
2876
2933
  lamp.classList.toggle("has-glow", light.glow);
2877
2934
  lamp.setAttribute("data-gaugeit-light-state", active ? "on" : "off");
2935
+ setFlickerRunning(flickering);
2936
+ },
2937
+ destroy() {
2938
+ stopFlicker();
2878
2939
  }
2879
2940
  };
2941
+ function setFlickerRunning(enabled) {
2942
+ if (!enabled) {
2943
+ stopFlicker();
2944
+ return;
2945
+ }
2946
+ if (flickerTimer !== null) return;
2947
+ updateFlicker();
2948
+ scheduleFlicker();
2949
+ }
2950
+ function scheduleFlicker() {
2951
+ const delay = randomBetween(light.flickerMinInterval, light.flickerMaxInterval);
2952
+ flickerTimer = setTimeout(() => {
2953
+ flickerTimer = null;
2954
+ updateFlicker();
2955
+ scheduleFlicker();
2956
+ }, delay);
2957
+ }
2958
+ function updateFlicker() {
2959
+ const lightLevel = 1 - Math.random() * light.flickerIntensity;
2960
+ const onOpacity = light.opacity * lightLevel;
2961
+ const glowOpacity = light.glowOpacity * lightLevel;
2962
+ lamp.style.setProperty("--gaugeit-light-on-opacity", onOpacity.toFixed(3));
2963
+ lamp.style.setProperty("--gaugeit-light-glow-opacity", glowOpacity.toFixed(3));
2964
+ if (glowElement) {
2965
+ const variation = randomBetween(-light.flickerGlowRadius, light.flickerGlowRadius);
2966
+ glowElement.setAttribute("r", String(light.glowRadius * (1 + variation)));
2967
+ }
2968
+ }
2969
+ function stopFlicker() {
2970
+ if (flickerTimer !== null) clearTimeout(flickerTimer);
2971
+ flickerTimer = null;
2972
+ lamp.style.setProperty("--gaugeit-light-on-opacity", String(light.opacity));
2973
+ lamp.style.setProperty("--gaugeit-light-glow-opacity", String(light.glowOpacity));
2974
+ if (glowElement) glowElement.setAttribute("r", String(light.glowRadius));
2975
+ }
2880
2976
  }
2881
2977
  };
2882
2978
  function createLampVisual({
@@ -2884,8 +2980,6 @@ var Gaugeit = (() => {
2884
2980
  radius,
2885
2981
  gradientId,
2886
2982
  edgeColor,
2887
- glowColor,
2888
- glowFilterId,
2889
2983
  sparkleOpacity,
2890
2984
  shadeOpacity
2891
2985
  }) {
@@ -2893,16 +2987,6 @@ var Gaugeit = (() => {
2893
2987
  class: `gaugeit__light-emission gaugeit__light-emission--${state}`,
2894
2988
  "data-gaugeit-light-visual": state
2895
2989
  });
2896
- if (glowColor && glowFilterId) {
2897
- visual.append(svgElement("circle", {
2898
- class: "gaugeit__light-glow",
2899
- cx: 0,
2900
- cy: 0,
2901
- r: radius * 1.82,
2902
- fill: glowColor,
2903
- filter: `url(#${glowFilterId})`
2904
- }));
2905
- }
2906
2990
  visual.append(
2907
2991
  svgElement("circle", {
2908
2992
  class: `gaugeit__light-bulb gaugeit__light-bulb--${state}`,
@@ -2931,18 +3015,33 @@ var Gaugeit = (() => {
2931
3015
  );
2932
3016
  return visual;
2933
3017
  }
3018
+ function createGlowVisual({ radius, color, filterId }) {
3019
+ const visual = svgElement("g", {
3020
+ class: "gaugeit__light-glow-emission",
3021
+ "data-gaugeit-light-visual": "glow"
3022
+ });
3023
+ visual.append(svgElement("circle", {
3024
+ class: "gaugeit__light-glow",
3025
+ cx: 0,
3026
+ cy: 0,
3027
+ r: radius,
3028
+ fill: color,
3029
+ filter: `url(#${filterId})`
3030
+ }));
3031
+ return visual;
3032
+ }
2934
3033
  function resolvePalette(light) {
2935
- const named = LIGHT_PALETTES[light.color] || LIGHT_PALETTES.amber;
3034
+ const named = LIGHT_PALETTES[light.color] || LIGHT_PALETTES.red;
2936
3035
  const custom = String(light.customColor || "").trim();
2937
3036
  if (!custom) return named;
2938
3037
  return {
2939
3038
  core: custom,
2940
- highlight: "#ffffff",
3039
+ highlight: custom,
2941
3040
  glow: custom,
2942
3041
  rim: custom
2943
3042
  };
2944
3043
  }
2945
- function createGlowFilter(id, radius) {
3044
+ function createGlowFilter(id, glowRadius, sharpness) {
2946
3045
  const filter = svgElement("filter", {
2947
3046
  id,
2948
3047
  x: "-120%",
@@ -2950,11 +3049,18 @@ var Gaugeit = (() => {
2950
3049
  width: "340%",
2951
3050
  height: "340%"
2952
3051
  });
3052
+ const maximumBlur = Math.max(1.4, glowRadius * 0.38);
2953
3053
  filter.append(svgElement("feGaussianBlur", {
2954
- stdDeviation: Math.max(1.4, radius * 0.38)
3054
+ stdDeviation: maximumBlur * (1 - sharpness)
2955
3055
  }));
2956
3056
  return filter;
2957
3057
  }
3058
+ function randomBetween(min, max) {
3059
+ return min + Math.random() * (max - min);
3060
+ }
3061
+ function prefersReducedMotion() {
3062
+ return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3063
+ }
2958
3064
  function createBulbGradient(id, colors) {
2959
3065
  const gradient = svgElement("radialGradient", {
2960
3066
  id,
@@ -3042,13 +3148,6 @@ var Gaugeit = (() => {
3042
3148
  width: 8,
3043
3149
  cap: { radius: 7, stackOrder: "above" }
3044
3150
  },
3045
- light: {
3046
- visible: false,
3047
- x: 160,
3048
- y: 142,
3049
- radius: 7,
3050
- color: "amber"
3051
- },
3052
3151
  readout: {
3053
3152
  title: { visible: false, x: "auto", y: 35 },
3054
3153
  value: { visible: false, x: 160, y: 130, fontSize: 30 },
@@ -3137,13 +3236,6 @@ var Gaugeit = (() => {
3137
3236
  strokeWidth: 2
3138
3237
  }
3139
3238
  },
3140
- light: {
3141
- visible: false,
3142
- x: 112,
3143
- y: 112,
3144
- radius: 8,
3145
- color: "amber"
3146
- },
3147
3239
  readout: {
3148
3240
  title: {
3149
3241
  visible: true,
@@ -3235,13 +3327,6 @@ var Gaugeit = (() => {
3235
3327
  strokeWidth: 2
3236
3328
  }
3237
3329
  },
3238
- light: {
3239
- visible: false,
3240
- x: 160,
3241
- y: 151,
3242
- radius: 7,
3243
- color: "amber"
3244
- },
3245
3330
  readout: {
3246
3331
  title: { visible: false, x: "auto", y: 140 },
3247
3332
  value: { visible: false, x: 160, y: 220, fontSize: 33 },
@@ -3328,16 +3413,6 @@ var Gaugeit = (() => {
3328
3413
  strokeWidth: 2
3329
3414
  }
3330
3415
  },
3331
- light: {
3332
- visible: false,
3333
- x: 108,
3334
- y: 110,
3335
- radius: 10,
3336
- color: "amber",
3337
- blink: false,
3338
- blinkInterval: 1e3,
3339
- trigger: { mode: "below", source: "target", value: 15, min: 0, max: 15 }
3340
- },
3341
3416
  readout: {
3342
3417
  title: {
3343
3418
  visible: true,
@@ -3868,13 +3943,6 @@ var Gaugeit = (() => {
3868
3943
  strokeWidth: 1.2
3869
3944
  }
3870
3945
  },
3871
- light: {
3872
- visible: false,
3873
- x: 72,
3874
- y: 60,
3875
- radius: 8,
3876
- color: "amber"
3877
- },
3878
3946
  readout: {
3879
3947
  title: {
3880
3948
  visible: true,
@@ -4109,13 +4177,6 @@ var Gaugeit = (() => {
4109
4177
  strokeWidth: 2
4110
4178
  }
4111
4179
  },
4112
- light: {
4113
- visible: false,
4114
- x: 112,
4115
- y: 205,
4116
- radius: 8,
4117
- color: "amber"
4118
- },
4119
4180
  readout: {
4120
4181
  title: {
4121
4182
  visible: true,
@@ -4465,13 +4526,6 @@ var Gaugeit = (() => {
4465
4526
  { min: 20, max: 80, color: "transparent" },
4466
4527
  { min: 80, max: 100, color: "#15803d" }
4467
4528
  ],
4468
- light: {
4469
- visible: false,
4470
- x: 72,
4471
- y: 46,
4472
- radius: 8,
4473
- color: "amber"
4474
- },
4475
4529
  readout: {
4476
4530
  title: {
4477
4531
  visible: true,
@@ -4686,7 +4740,7 @@ var Gaugeit = (() => {
4686
4740
  resolveLightPosition
4687
4741
  });
4688
4742
  var types = builtInTypes;
4689
- var VERSION = "0.1.0";
4743
+ var VERSION = "0.1.1";
4690
4744
  var Gaugeit = Object.freeze({
4691
4745
  VERSION,
4692
4746
  Gauge,