energy-visualization-sankey 1.0.7 โ†’ 1.0.9

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/dist/sankey.css CHANGED
@@ -620,7 +620,7 @@ input[type="checkbox"].switch_1 {
620
620
  appearance: none;
621
621
  width: 3.5em;
622
622
  height: 1.5em;
623
- background: black;
623
+ background: #666666;
624
624
  border-radius: 3em;
625
625
  position: relative;
626
626
  cursor: pointer;
@@ -630,7 +630,7 @@ input[type="checkbox"].switch_1 {
630
630
  }
631
631
 
632
632
  input[type="checkbox"].switch_1:checked {
633
- background: black;
633
+ background: #e49942;
634
634
  }
635
635
 
636
636
  input[type="checkbox"].switch_1:after {
@@ -653,6 +653,22 @@ input[type="checkbox"].switch_1:checked:after {
653
653
  left: calc(100% - 1.5em);
654
654
  }
655
655
 
656
+ /* Hover effects for better interactivity */
657
+
658
+ input[type="checkbox"].switch_1:hover {
659
+ background: #555555;
660
+ }
661
+
662
+ input[type="checkbox"].switch_1:checked:hover {
663
+ background: #e49942;
664
+ }
665
+
666
+ /* Focus states for accessibility */
667
+
668
+ input[type="checkbox"].switch_1:focus {
669
+ box-shadow: 0 0 0 3px #F5DBBC;
670
+ }
671
+
656
672
  /* Milestone Tick Markers */
657
673
 
658
674
  #testTick .tick text {
@@ -1 +1 @@
1
- {"version":3,"sources":["index.css","sankey.css","controls.css"],"names":[],"mappings":"AAAA,kDAAkD;;AAElD,sCAAsC;;ACFtC,mCAAmC;;AAEnC,eAAe;;AACf;IACI,0CAA0C;IAC1C,eAAe;AACnB;;AAEA,gBAAgB;;AAChB;IACI,UAAU;IACV,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;IACf,uBAAuB;AAC3B;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,e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;IACZ,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,+CAA+C;IAC/C,uCAAuC;IACvC,4BAA4B;IAC5B,oBAAoB;IACpB,OAAO;IACP,uCAAuC;IACvC,+BAA+B;AACnC;;AAEA;IACI,wBAAwB;AAC5B;;AAEA,2BAA2B;;AAC3B;IACI,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,uBAAuB;AAC3B","file":"sankey.css","sourcesContent":["/* Energy Visualization Sankey - Combined Styles */\n\n/* Import core Sankey diagram styles */\n@import './sankey.css';\n\n/* Import UI controls styles */\n@import './controls.css';\n","/* US Energy Sankey - Core Styles */\n\n/* Typography */\ntext, tspan {\n font-family: Fieldwork, Futura, sans-serif;\n font-size: 16px;\n}\n\n/* Flow Styles */\n.flow {\n fill: none;\n stroke-opacity: 0.8;\n}\n\n.flow:hover {\n stroke-opacity: 0.9;\n}\n\n.flow.heat {\n stroke: #98002e;\n}\n\n.flow.elec, .flow.waste.heat {\n stroke: #e49942;\n}\n\n.flow.waste {\n stroke: #e49942;\n opacity: 0.4 !important;\n}\n\n.flow.solar {\n stroke: #fed530;\n}\n\n.flow.nuclear {\n stroke: #ca0813;\n}\n\n.flow.hydro {\n stroke: #0b24fb;\n}\n\n.flow.wind {\n stroke: #901d8f;\n}\n\n.flow.geo {\n stroke: #905a1c;\n}\n\n.flow.gas {\n stroke: #4cabf2;\n}\n\n.flow.coal {\n stroke: #000000;\n}\n\n.flow.bio {\n stroke: #46be48;\n}\n\n.flow.petro {\n stroke: #095f0b;\n}\n\n/* Box Styles */\n.box.sector {\n fill: #cccccc;\n}\n\n.box.solar {\n fill: #fed530;\n}\n\n.box.nuclear {\n fill: #ca0813;\n}\n\n.box.hydro {\n fill: #0b24fb;\n}\n\n.box.wind {\n fill: #901d8f;\n}\n\n.box.geo {\n fill: #905a1c;\n}\n\n.box.gas {\n fill: #4cabf2;\n}\n\n.box.coal {\n fill: #000000;\n}\n\n.box.bio {\n fill: #46be48;\n}\n\n.box.petro {\n fill: #095f0b;\n}\n\n/* Other Elements */\n.maxline {\n stroke: #cccccc;\n stroke-width: 1px;\n}\n\n.bkgd {\n fill: #000000;\n}\n\n/* Title Container - Responsive Header Layout */\n.title_container {\n border-top: 2px solid #000000;\n border-bottom: 1px solid #000000;\n position: relative;\n min-height: 58px;\n padding: 8px 16px;\n background: white;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 20px;\n flex-wrap: nowrap;\n}\n\n/* Logo Section */\n.header-logo {\n flex: 0 0 auto;\n min-width: 60px;\n}\n\n.header-logo img {\n max-height: 45px;\n height: auto;\n display: block;\n}\n\n/* Main Title Section - Contains title and energy usage */\n.header-main {\n flex: 1;\n text-align: center;\n min-width: 160px;\n position: relative;\n}\n\n.header-title-section {\n position: relative;\n min-height: 45px;\n}\n\n.main-title {\n font-family: Fieldwork, Futura, sans-serif;\n font-size: 1em;\n font-weight: normal;\n color: black;\n margin: 0;\n line-height: 1.2;\n margin-bottom: 2px;\n}\n\n.energy-usage-overlay {\n position: absolute;\n top: 22px;\n left: 0;\n width: 100%;\n height: 25px;\n pointer-events: none;\n}\n\n/* Year Section - Separate section for year display */\n.header-year {\n flex: 1;\n min-width: 80px;\n height: 45px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.year-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n\n/* Info Section */\n.header-info {\n flex: 1.9;\n min-width: 160px;\n text-align: left;\n}\n\n.subtitle {\n font-family: Fieldwork-HumThin, Futura, sans-serif;\n font-size: 1em;\n color: #000000;\n font-weight: bolder;\n line-height: 1.2;\n margin-bottom: 2px;\n}\n\n.attribution {\n font-family: Fieldwork-HumThin, Futura, sans-serif;\n font-size: 1em;\n color: #000000;\n font-weight: normal;\n line-height: 1.2;\n}\n\n/* Affiliation Section */\n.header-affiliation {\n flex: 1.7;\n text-align: center;\n min-width: 140px;\n}\n\n.affiliation-text {\n font-family: Fieldwork-HumThin, Futura, sans-serif;\n font-size: 1em;\n color: #000000;\n font-weight: normal;\n line-height: 1.2;\n}\n\n/* SVG Overlay Styles */\n.energy-svg-overlay,\n.year-svg-overlay {\n z-index: 10;\n}\n\n.energy-svg-overlay text,\n.year-svg-overlay text {\n font-family: Fieldwork, Futura, sans-serif;\n fill: black;\n}\n\n/* Legacy SVG styles for compatibility */\n.title_container svg {\n font-size: 15px;\n}\n\n.title_container .title {\n font-size: 1em;\n fill: black;\n}\n\n.title_container .title .unit {\n font-size: .9em;\n font-weight: bold;\n}\n\n.title_container .title .year {\n font-size: 3.1em;\n font-weight: bold;\n clear: left;\n letter-spacing: .05em;\n font-variant-numeric: tabular-nums;\n}\n\n/* Mobile Responsive Design */\n@media (max-width: 1024px) {\n .header-content {\n gap: 15px;\n }\n\n .main-title {\n font-size: 0.9em;\n }\n\n .header-logo {\n min-width: 50px;\n }\n\n .header-main,\n .header-year,\n .header-info,\n .header-affiliation {\n flex: 1;\n min-width: 120px;\n }\n\n .year-svg-overlay text {\n font-size: 2.8em !important;\n }\n\n .subtitle, .attribution, .affiliation-text {\n font-size: 0.9em;\n }\n}\n\n@media (max-width: 768px) {\n .title_container {\n padding: 6px 12px;\n }\n\n .header-content {\n gap: 10px;\n }\n\n .header-logo {\n min-width: 40px;\n }\n\n .header-logo img {\n max-height: 35px;\n }\n\n .main-title {\n font-size: 0.8em;\n }\n\n .header-main,\n .header-year,\n .header-info,\n .header-affiliation {\n flex: 1;\n min-width: 100px;\n }\n\n .header-year {\n height: 40px;\n }\n\n .year-svg-overlay text {\n font-size: 2.5em !important;\n }\n\n .energy-svg-overlay text {\n font-size: 0.8em !important;\n }\n\n .subtitle, .attribution, .affiliation-text {\n font-size: 0.8em;\n }\n}\n\n@media (max-width: 600px) {\n .header-content {\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .header-main {\n order: 1;\n flex: 1 1 100%;\n margin-bottom: 8px;\n }\n\n .header-year {\n order: 2;\n flex: 1 1 100%;\n margin-bottom: 8px;\n justify-content: center;\n height: 50px;\n }\n\n .header-logo {\n order: 3;\n flex: 1 1 50%;\n }\n\n .header-info {\n order: 4;\n flex: 1 1 100%;\n margin-bottom: 8px;\n }\n\n .header-affiliation {\n order: 5;\n flex: 1 1 50%;\n text-align: left;\n }\n\n .main-title {\n text-align: center;\n margin-bottom: 5px;\n }\n\n .energy-usage-overlay {\n position: relative;\n top: 0;\n text-align: center;\n margin-top: 5px;\n }\n}\n\n/* Totals */\n.total.sector {\n font-size: 0.7em;\n font-weight: bold;\n}\n\n.total.waste-level {\n fill: #e49942;\n opacity: 0.4;\n}\n\n/* Visibility */\n.hidden {\n visibility: hidden;\n}\n\n/* Tooltip */\n.tooltip {\n color: #000000;\n position: absolute;\n text-align: justify;\n width: auto;\n padding: 5px;\n background: #efefef;\n border: 1px solid black;\n pointer-events: none;\n z-index: 3;\n}\n\n.fuel_value {\n text-align: center;\n vertical-align: middle;\n}\n\n/* Waste Heat Visibility Control */\n.waste-heat-hidden .flow.waste {\n display: none !important;\n}\n\n.waste-heat-hidden .total.waste-level {\n display: none !important;\n}\n\n/* Smooth transition for waste heat toggle (optional) */\n.flow.waste,\n.total.waste-level {\n transition: opacity 0.3s ease;\n}","/* US Energy Sankey - Controls Styles */\n\n/* Range Slider */\n.range-slider {\n width: 100%;\n margin-top: 5px;\n position: relative;\n overflow: visible;\n padding-top: 40px;\n}\n\n.range-slider__range {\n -webkit-appearance: none;\n width: 100%;\n border-radius: 5px;\n outline: none;\n padding: 0;\n margin: 0;\n}\n\n.range-slider__range:first-child {\n background: #d7dcdf;\n}\n\n.range-slider__range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 11px;\n height: 11px;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 0 4px 0 rgba(0, 0, 0, 1);\n cursor: pointer;\n transition: background 0.15s ease-in-out;\n}\n\n.range-slider__range::-moz-range-thumb {\n width: 11px;\n height: 11px;\n border: 0;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 0 4px 0 rgba(0, 0, 0, 1);\n cursor: pointer;\n transition: background 0.15s ease-in-out;\n}\n\n/* Dynamic Year Display */\n#dynamicYear {\n color: black;\n position: absolute;\n height: 25px;\n width: 50px;\n text-align: center;\n border: 1px solid black;\n border-radius: 3px;\n display: block;\n font-size: 16px;\n top: 40%;\n /*bottom: 100%;*/\n background: white;\n padding: 3px 5px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n/* Add downward arrow pointing to slider */\n#dynamicYear::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n width: 0;\n height: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 6px solid black;\n}\n\n/* Play/Pause Button */\n#play-button {\n border-radius: 0;\n display: block;\n height: 0;\n}\n\n#play-button:hover {\n background: transparent !important;\n}\n\n#play-button.playbutton {\n outline: 0;\n background: transparent;\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n border-style: solid;\n border-width: 13px 0 13px 20px;\n}\n\n#play-button.playpaused {\n outline: 0;\n background: transparent;\n height: 26px;\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n border-style: double;\n border-width: 0px 0 0px 20px;\n}\n\n#play-button.playbutton:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n/* Waste Heat Toggle Switch */\n.switch_box {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n min-width: 200px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n\n.box_1 {\n background: #ffffff;\n}\n\ninput[type=\"checkbox\"].switch_1 {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n width: 3.5em;\n height: 1.5em;\n background: black;\n border-radius: 3em;\n position: relative;\n cursor: pointer;\n outline: none;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n}\n\ninput[type=\"checkbox\"].switch_1:checked {\n background: black;\n}\n\ninput[type=\"checkbox\"].switch_1:after {\n position: absolute;\n content: \"\";\n width: 1.5em;\n height: 1.5em;\n border-radius: 50%;\n background: #fff;\n -webkit-box-shadow: 0 0 .25em rgba(0, 0, 0, .3);\n box-shadow: 0 0 .25em rgba(0, 0, 0, .3);\n -webkit-transform: scale(.7);\n transform: scale(.7);\n left: 0;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n}\n\ninput[type=\"checkbox\"].switch_1:checked:after {\n left: calc(100% - 1.5em);\n}\n\n/* Milestone Tick Markers */\n#testTick .tick text {\n cursor: pointer;\n}\n\n#testTick .tick text:hover {\n color: grey;\n transition: color 250ms;\n}\n"]}
1
+ {"version":3,"sources":["index.css","sankey.css","controls.css"],"names":[],"mappings":"AAAA,kDAAkD;;AAElD,sCAAsC;;ACFtC,mCAAmC;;AAEnC,eAAe;;AACf;IACI,0CAA0C;IAC1C,eAAe;AACnB;;AAEA,gBAAgB;;AAChB;IACI,UAAU;IACV,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;IACf,uBAAuB;AAC3B;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,eAAe;AACnB;;AAEA,eAAe;;AACf;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;AACjB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IACI,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,uBAAuB;AAC3B","file":"sankey.css","sourcesContent":["/* Energy Visualization Sankey - Combined Styles */\n\n/* Import core Sankey diagram styles */\n@import './sankey.css';\n\n/* Import UI controls styles */\n@import './controls.css';\n","/* US Energy Sankey - Core Styles */\n\n/* Typography */\ntext, tspan {\n font-family: Fieldwork, Futura, sans-serif;\n font-size: 16px;\n}\n\n/* Flow Styles */\n.flow {\n fill: none;\n stroke-opacity: 0.8;\n}\n\n.flow:hover {\n stroke-opacity: 0.9;\n}\n\n.flow.heat {\n stroke: #98002e;\n}\n\n.flow.elec, .flow.waste.heat {\n stroke: #e49942;\n}\n\n.flow.waste {\n stroke: #e49942;\n opacity: 0.4 !important;\n}\n\n.flow.solar {\n stroke: #fed530;\n}\n\n.flow.nuclear {\n stroke: #ca0813;\n}\n\n.flow.hydro {\n stroke: #0b24fb;\n}\n\n.flow.wind {\n stroke: #901d8f;\n}\n\n.flow.geo {\n stroke: #905a1c;\n}\n\n.flow.gas {\n stroke: #4cabf2;\n}\n\n.flow.coal {\n stroke: #000000;\n}\n\n.flow.bio {\n stroke: #46be48;\n}\n\n.flow.petro {\n stroke: #095f0b;\n}\n\n/* Box Styles */\n.box.sector {\n fill: #cccccc;\n}\n\n.box.solar {\n fill: #fed530;\n}\n\n.box.nuclear {\n fill: #ca0813;\n}\n\n.box.hydro {\n fill: #0b24fb;\n}\n\n.box.wind {\n fill: #901d8f;\n}\n\n.box.geo {\n fill: #905a1c;\n}\n\n.box.gas {\n fill: #4cabf2;\n}\n\n.box.coal {\n fill: #000000;\n}\n\n.box.bio {\n fill: #46be48;\n}\n\n.box.petro {\n fill: #095f0b;\n}\n\n/* Other Elements */\n.maxline {\n stroke: #cccccc;\n stroke-width: 1px;\n}\n\n.bkgd {\n fill: #000000;\n}\n\n/* Title Container - Responsive Header Layout */\n.title_container {\n border-top: 2px solid #000000;\n border-bottom: 1px solid #000000;\n position: relative;\n min-height: 58px;\n padding: 8px 16px;\n background: white;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 20px;\n flex-wrap: nowrap;\n}\n\n/* Logo Section */\n.header-logo {\n flex: 0 0 auto;\n min-width: 60px;\n}\n\n.header-logo img {\n max-height: 45px;\n height: auto;\n display: block;\n}\n\n/* Main Title Section - Contains title and energy usage */\n.header-main {\n flex: 1;\n text-align: center;\n min-width: 160px;\n position: relative;\n}\n\n.header-title-section {\n position: relative;\n min-height: 45px;\n}\n\n.main-title {\n font-family: Fieldwork, Futura, sans-serif;\n font-size: 1em;\n font-weight: normal;\n color: black;\n margin: 0;\n line-height: 1.2;\n margin-bottom: 2px;\n}\n\n.energy-usage-overlay {\n position: absolute;\n top: 22px;\n left: 0;\n width: 100%;\n height: 25px;\n pointer-events: none;\n}\n\n/* Year Section - Separate section for year display */\n.header-year {\n flex: 1;\n min-width: 80px;\n height: 45px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.year-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n\n/* Info Section */\n.header-info {\n flex: 1.9;\n min-width: 160px;\n text-align: left;\n}\n\n.subtitle {\n font-family: Fieldwork-HumThin, Futura, sans-serif;\n font-size: 1em;\n color: #000000;\n font-weight: bolder;\n line-height: 1.2;\n margin-bottom: 2px;\n}\n\n.attribution {\n font-family: Fieldwork-HumThin, Futura, sans-serif;\n font-size: 1em;\n color: #000000;\n font-weight: normal;\n line-height: 1.2;\n}\n\n/* Affiliation Section */\n.header-affiliation {\n flex: 1.7;\n text-align: center;\n min-width: 140px;\n}\n\n.affiliation-text {\n font-family: Fieldwork-HumThin, Futura, sans-serif;\n font-size: 1em;\n color: #000000;\n font-weight: normal;\n line-height: 1.2;\n}\n\n/* SVG Overlay Styles */\n.energy-svg-overlay,\n.year-svg-overlay {\n z-index: 10;\n}\n\n.energy-svg-overlay text,\n.year-svg-overlay text {\n font-family: Fieldwork, Futura, sans-serif;\n fill: black;\n}\n\n/* Legacy SVG styles for compatibility */\n.title_container svg {\n font-size: 15px;\n}\n\n.title_container .title {\n font-size: 1em;\n fill: black;\n}\n\n.title_container .title .unit {\n font-size: .9em;\n font-weight: bold;\n}\n\n.title_container .title .year {\n font-size: 3.1em;\n font-weight: bold;\n clear: left;\n letter-spacing: .05em;\n font-variant-numeric: tabular-nums;\n}\n\n/* Mobile Responsive Design */\n@media (max-width: 1024px) {\n .header-content {\n gap: 15px;\n }\n\n .main-title {\n font-size: 0.9em;\n }\n\n .header-logo {\n min-width: 50px;\n }\n\n .header-main,\n .header-year,\n .header-info,\n .header-affiliation {\n flex: 1;\n min-width: 120px;\n }\n\n .year-svg-overlay text {\n font-size: 2.8em !important;\n }\n\n .subtitle, .attribution, .affiliation-text {\n font-size: 0.9em;\n }\n}\n\n@media (max-width: 768px) {\n .title_container {\n padding: 6px 12px;\n }\n\n .header-content {\n gap: 10px;\n }\n\n .header-logo {\n min-width: 40px;\n }\n\n .header-logo img {\n max-height: 35px;\n }\n\n .main-title {\n font-size: 0.8em;\n }\n\n .header-main,\n .header-year,\n .header-info,\n .header-affiliation {\n flex: 1;\n min-width: 100px;\n }\n\n .header-year {\n height: 40px;\n }\n\n .year-svg-overlay text {\n font-size: 2.5em !important;\n }\n\n .energy-svg-overlay text {\n font-size: 0.8em !important;\n }\n\n .subtitle, .attribution, .affiliation-text {\n font-size: 0.8em;\n }\n}\n\n@media (max-width: 600px) {\n .header-content {\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .header-main {\n order: 1;\n flex: 1 1 100%;\n margin-bottom: 8px;\n }\n\n .header-year {\n order: 2;\n flex: 1 1 100%;\n margin-bottom: 8px;\n justify-content: center;\n height: 50px;\n }\n\n .header-logo {\n order: 3;\n flex: 1 1 50%;\n }\n\n .header-info {\n order: 4;\n flex: 1 1 100%;\n margin-bottom: 8px;\n }\n\n .header-affiliation {\n order: 5;\n flex: 1 1 50%;\n text-align: left;\n }\n\n .main-title {\n text-align: center;\n margin-bottom: 5px;\n }\n\n .energy-usage-overlay {\n position: relative;\n top: 0;\n text-align: center;\n margin-top: 5px;\n }\n}\n\n/* Totals */\n.total.sector {\n font-size: 0.7em;\n font-weight: bold;\n}\n\n.total.waste-level {\n fill: #e49942;\n opacity: 0.4;\n}\n\n/* Visibility */\n.hidden {\n visibility: hidden;\n}\n\n/* Tooltip */\n.tooltip {\n color: #000000;\n position: absolute;\n text-align: justify;\n width: auto;\n padding: 5px;\n background: #efefef;\n border: 1px solid black;\n pointer-events: none;\n z-index: 3;\n}\n\n.fuel_value {\n text-align: center;\n vertical-align: middle;\n}\n\n/* Waste Heat Visibility Control */\n.waste-heat-hidden .flow.waste {\n display: none !important;\n}\n\n.waste-heat-hidden .total.waste-level {\n display: none !important;\n}\n\n/* Smooth transition for waste heat toggle (optional) */\n.flow.waste,\n.total.waste-level {\n transition: opacity 0.3s ease;\n}","/* US Energy Sankey - Controls Styles */\n\n/* Range Slider */\n.range-slider {\n width: 100%;\n margin-top: 5px;\n position: relative;\n overflow: visible;\n padding-top: 40px;\n}\n\n.range-slider__range {\n -webkit-appearance: none;\n width: 100%;\n border-radius: 5px;\n outline: none;\n padding: 0;\n margin: 0;\n}\n\n.range-slider__range:first-child {\n background: #d7dcdf;\n}\n\n.range-slider__range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 11px;\n height: 11px;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 0 4px 0 rgba(0, 0, 0, 1);\n cursor: pointer;\n transition: background 0.15s ease-in-out;\n}\n\n.range-slider__range::-moz-range-thumb {\n width: 11px;\n height: 11px;\n border: 0;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 0 4px 0 rgba(0, 0, 0, 1);\n cursor: pointer;\n transition: background 0.15s ease-in-out;\n}\n\n/* Dynamic Year Display */\n#dynamicYear {\n color: black;\n position: absolute;\n height: 25px;\n width: 50px;\n text-align: center;\n border: 1px solid black;\n border-radius: 3px;\n display: block;\n font-size: 16px;\n top: 40%;\n /*bottom: 100%;*/\n background: white;\n padding: 3px 5px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n/* Add downward arrow pointing to slider */\n#dynamicYear::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n width: 0;\n height: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 6px solid black;\n}\n\n/* Play/Pause Button */\n#play-button {\n border-radius: 0;\n display: block;\n height: 0;\n}\n\n#play-button:hover {\n background: transparent !important;\n}\n\n#play-button.playbutton {\n outline: 0;\n background: transparent;\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n border-style: solid;\n border-width: 13px 0 13px 20px;\n}\n\n#play-button.playpaused {\n outline: 0;\n background: transparent;\n height: 26px;\n border-color: transparent transparent transparent #202020;\n transition: 100ms all ease;\n cursor: pointer;\n border-style: double;\n border-width: 0px 0 0px 20px;\n}\n\n#play-button.playbutton:hover {\n border-color: transparent transparent transparent #404040;\n}\n\n/* Waste Heat Toggle Switch */\n.switch_box {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n min-width: 200px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n\n.box_1 {\n background: #ffffff;\n}\n\ninput[type=\"checkbox\"].switch_1 {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n width: 3.5em;\n height: 1.5em;\n background: #666666;\n border-radius: 3em;\n position: relative;\n cursor: pointer;\n outline: none;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n}\n\ninput[type=\"checkbox\"].switch_1:checked {\n background: #e49942;\n}\n\ninput[type=\"checkbox\"].switch_1:after {\n position: absolute;\n content: \"\";\n width: 1.5em;\n height: 1.5em;\n border-radius: 50%;\n background: #fff;\n -webkit-box-shadow: 0 0 .25em rgba(0, 0, 0, .3);\n box-shadow: 0 0 .25em rgba(0, 0, 0, .3);\n -webkit-transform: scale(.7);\n transform: scale(.7);\n left: 0;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n}\n\ninput[type=\"checkbox\"].switch_1:checked:after {\n left: calc(100% - 1.5em);\n}\n\n/* Hover effects for better interactivity */\ninput[type=\"checkbox\"].switch_1:hover {\n background: #555555;\n}\n\ninput[type=\"checkbox\"].switch_1:checked:hover {\n background: #e49942;\n}\n\n/* Focus states for accessibility */\ninput[type=\"checkbox\"].switch_1:focus {\n box-shadow: 0 0 0 3px #F5DBBC;\n}\n\n/* Milestone Tick Markers */\n#testTick .tick text {\n cursor: pointer;\n}\n\n#testTick .tick text:hover {\n color: grey;\n transition: color 250ms;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "energy-visualization-sankey",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "A modern TypeScript library for creating interactive Sankey diagrams that visualize energy flows from sources to consumption sectors.",
5
5
  "keywords": [
6
6
  "sankey",
@@ -0,0 +1,147 @@
1
+ #!/bin/bash
2
+
3
+ # Master Validation Script for US Energy Sankey v5
4
+ # Comprehensive validation with real data (1800-2021)
5
+ # Ensures pixel-perfect accuracy during optimization
6
+
7
+ echo "Energy Sankey - Comprehensive Validation"
8
+ echo "================================================="
9
+ echo "Testing with real US energy data: 1800-2021 (222 years)"
10
+ echo ""
11
+
12
+ # Colors for output
13
+ RED='\033[0;31m'
14
+ GREEN='\033[0;32m'
15
+ YELLOW='\033[1;33m'
16
+ BLUE='\033[0;34m'
17
+ NC='\033[0m' # No Color
18
+
19
+ # Track validation results
20
+ NUMERICAL_RESULT=0
21
+ VISUAL_RESULT=0
22
+ PERFORMANCE_RESULT=0
23
+ BUILD_RESULT=0
24
+
25
+ # Function to print status
26
+ print_status() {
27
+ if [ $1 -eq 0 ]; then
28
+ echo -e "${GREEN} $2 PASSED${NC}"
29
+ else
30
+ echo -e "${RED} $2 FAILED${NC}"
31
+ fi
32
+ }
33
+
34
+ # Function to cleanup background processes
35
+ cleanup() {
36
+ echo -e "\n๐Ÿงน Cleaning up..."
37
+ if [ ! -z "$SERVER_PID" ]; then
38
+ kill $SERVER_PID 2>/dev/null
39
+ wait $SERVER_PID 2>/dev/null
40
+ echo " Server stopped"
41
+ fi
42
+ }
43
+
44
+ # Trap to ensure cleanup on exit
45
+ trap cleanup EXIT INT TERM
46
+
47
+ # Step 1: Build the project
48
+ echo -e "${BLUE}Step 1: Building project...${NC}"
49
+ npm run build
50
+ BUILD_RESULT=$?
51
+ print_status $BUILD_RESULT "Build"
52
+
53
+ if [ $BUILD_RESULT -ne 0 ]; then
54
+ echo -e "${RED}Build failed. Cannot proceed with validation.${NC}"
55
+ exit 1
56
+ fi
57
+
58
+ # Verify required build files exist
59
+ echo "๐Ÿ” Verifying build artifacts..."
60
+ if [ ! -f "dist/us-energy-sankey-v5.standalone.esm.js" ]; then
61
+ echo -e "${RED}Required standalone ESM build not found${NC}"
62
+ exit 1
63
+ fi
64
+ if [ ! -f "examples/data/data.json" ]; then
65
+ echo -e "${RED}Required data file not found${NC}"
66
+ exit 1
67
+ fi
68
+ echo -e "${GREEN}All required files present${NC}"
69
+
70
+ # Step 2: Run numerical validation
71
+ echo -e "\n${BLUE}Step 2: Running numerical validation...${NC}"
72
+ echo "Testing mathematical consistency with real data"
73
+ npm run test:numerical
74
+ NUMERICAL_RESULT=$?
75
+ print_status $NUMERICAL_RESULT "Numerical Validation"
76
+
77
+ # Step 3: Start server for visual/performance tests
78
+ echo -e "\n${BLUE}๐ŸŒ Step 3: Starting local server...${NC}"
79
+ npm run serve &
80
+ SERVER_PID=$!
81
+ echo "Server PID: $SERVER_PID"
82
+
83
+ # Wait for server to start
84
+ echo "Waiting for server to start..."
85
+ sleep 3
86
+
87
+ # Check if server is running
88
+ if ! curl -s http://localhost:8080 > /dev/null; then
89
+ echo -e "${RED} Server failed to start${NC}"
90
+ exit 1
91
+ fi
92
+ echo -e "${GREEN} Server running on http://localhost:8080${NC}"
93
+
94
+ # Step 4: Run visual validation
95
+ echo -e "\n${BLUE} Step 4: Running visual validation...${NC}"
96
+ echo "Testing pixel-perfect accuracy across energy eras"
97
+ npm run test:visual
98
+ VISUAL_RESULT=$?
99
+ print_status $VISUAL_RESULT "Visual Validation"
100
+
101
+ # Step 5: Run performance validation
102
+ echo -e "\n${BLUE} Step 5: Running performance validation...${NC}"
103
+ echo "Testing performance with 222 years of real data"
104
+ npm run test:performance
105
+ PERFORMANCE_RESULT=$?
106
+ print_status $PERFORMANCE_RESULT "Performance Validation"
107
+
108
+ # Generate final report
109
+ echo -e "\nVALIDATION SUMMARY"
110
+ echo "===================="
111
+ print_status $BUILD_RESULT "Build"
112
+ print_status $NUMERICAL_RESULT "Numerical Validation (Real Data Calculations)"
113
+ print_status $VISUAL_RESULT "Visual Validation (Pixel-Perfect Screenshots)"
114
+ print_status $PERFORMANCE_RESULT "Performance Validation (Speed & Memory)"
115
+
116
+ # Calculate overall result
117
+ OVERALL_RESULT=$((BUILD_RESULT + NUMERICAL_RESULT + VISUAL_RESULT + PERFORMANCE_RESULT))
118
+
119
+ if [ $OVERALL_RESULT -eq 0 ]; then
120
+ echo -e "\n${GREEN} ALL VALIDATIONS PASSED!${NC}"
121
+ echo -e "${GREEN} Your optimization maintains identical results${NC}"
122
+ echo -e "${GREEN} Ready for production deployment${NC}"
123
+ else
124
+ echo -e "\n${RED} VALIDATION FAILURES DETECTED${NC}"
125
+ echo -e "${RED} Do not proceed with optimization until all tests pass${NC}"
126
+
127
+ # Provide specific guidance
128
+ if [ $NUMERICAL_RESULT -ne 0 ]; then
129
+ echo -e "${YELLOW} Numerical failures: Check mathematical calculations and constants${NC}"
130
+ fi
131
+ if [ $VISUAL_RESULT -ne 0 ]; then
132
+ echo -e "${YELLOW} Visual failures: Check validation/diffs/ for pixel differences${NC}"
133
+ fi
134
+ if [ $PERFORMANCE_RESULT -ne 0 ]; then
135
+ echo -e "${YELLOW} Performance failures: Check if performance thresholds were exceeded${NC}"
136
+ fi
137
+ fi
138
+
139
+ # Show validation artifacts
140
+ echo -e "\n VALIDATION ARTIFACTS"
141
+ echo "======================"
142
+ echo " Numerical test results: Jest output above"
143
+ echo " Visual baselines: validation/baselines/"
144
+ echo " Visual differences: validation/diffs/"
145
+ echo " Performance data: validation/performance/"
146
+
147
+ exit $OVERALL_RESULT
@@ -140,7 +140,7 @@ input[type="checkbox"].switch_1 {
140
140
  appearance: none;
141
141
  width: 3.5em;
142
142
  height: 1.5em;
143
- background: black;
143
+ background: #666666;
144
144
  border-radius: 3em;
145
145
  position: relative;
146
146
  cursor: pointer;
@@ -150,7 +150,7 @@ input[type="checkbox"].switch_1 {
150
150
  }
151
151
 
152
152
  input[type="checkbox"].switch_1:checked {
153
- background: black;
153
+ background: #e49942;
154
154
  }
155
155
 
156
156
  input[type="checkbox"].switch_1:after {
@@ -173,6 +173,20 @@ input[type="checkbox"].switch_1:checked:after {
173
173
  left: calc(100% - 1.5em);
174
174
  }
175
175
 
176
+ /* Hover effects for better interactivity */
177
+ input[type="checkbox"].switch_1:hover {
178
+ background: #555555;
179
+ }
180
+
181
+ input[type="checkbox"].switch_1:checked:hover {
182
+ background: #e49942;
183
+ }
184
+
185
+ /* Focus states for accessibility */
186
+ input[type="checkbox"].switch_1:focus {
187
+ box-shadow: 0 0 0 3px #F5DBBC;
188
+ }
189
+
176
190
  /* Milestone Tick Markers */
177
191
  #testTick .tick text {
178
192
  cursor: pointer;