myio-js-library 0.1.506 → 0.1.507

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/index.cjs CHANGED
@@ -1164,7 +1164,7 @@ module.exports = __toCommonJS(index_exports);
1164
1164
  // package.json
1165
1165
  var package_default = {
1166
1166
  name: "myio-js-library",
1167
- version: "0.1.506",
1167
+ version: "0.1.507",
1168
1168
  description: "A clean, standalone JS SDK for MYIO projects",
1169
1169
  license: "MIT",
1170
1170
  repository: "github:gh-myio/myio-js-library",
@@ -16057,7 +16057,7 @@ var INFO_TOOLTIP_CSS = `
16057
16057
  border: 1px solid #e2e8f0;
16058
16058
  border-radius: 12px;
16059
16059
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
16060
- width: 395px;
16060
+ width: 450px;
16061
16061
  max-width: 90vw;
16062
16062
  font-size: 12px;
16063
16063
  color: #1e293b;
@@ -16503,6 +16503,10 @@ function toggleMaximize3(container) {
16503
16503
  left: container.style.left,
16504
16504
  top: container.style.top
16505
16505
  };
16506
+ state3.isPinned = true;
16507
+ container.classList.add("pinned");
16508
+ const pinBtn = container.querySelector('[data-action="pin"]');
16509
+ pinBtn?.classList.add("pinned");
16506
16510
  }
16507
16511
  container.classList.toggle("maximized", state3.isMaximized);
16508
16512
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -70285,7 +70289,7 @@ var ENERGY_SUMMARY_TOOLTIP_CSS = `
70285
70289
  border: 1px solid #e2e8f0;
70286
70290
  border-radius: 12px;
70287
70291
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
70288
- width: 395px;
70292
+ width: 450px;
70289
70293
  max-width: 90vw;
70290
70294
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
70291
70295
  font-size: 12px;
@@ -70387,7 +70391,9 @@ var ENERGY_SUMMARY_TOOLTIP_CSS = `
70387
70391
  }
70388
70392
 
70389
70393
  .energy-summary-tooltip.maximized .energy-summary-tooltip__body {
70390
- flex: 1;
70394
+ flex: 1 1 auto;
70395
+ min-height: 0;
70396
+ max-height: none;
70391
70397
  overflow-y: auto;
70392
70398
  }
70393
70399
 
@@ -71817,6 +71823,7 @@ var EnergySummaryTooltip = {
71817
71823
  left: container.style.left,
71818
71824
  top: container.style.top
71819
71825
  };
71826
+ if (!this._isPinned) this.togglePin();
71820
71827
  }
71821
71828
  container.classList.toggle("maximized", this._isMaximized);
71822
71829
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -72338,7 +72345,7 @@ var WATER_SUMMARY_TOOLTIP_CSS = `
72338
72345
  border: 1px solid #e2e8f0;
72339
72346
  border-radius: 12px;
72340
72347
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
72341
- width: 395px;
72348
+ width: 450px;
72342
72349
  max-width: 90vw;
72343
72350
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
72344
72351
  font-size: 12px;
@@ -72440,7 +72447,9 @@ var WATER_SUMMARY_TOOLTIP_CSS = `
72440
72447
  }
72441
72448
 
72442
72449
  .water-summary-tooltip.maximized .water-summary-tooltip__body {
72443
- flex: 1;
72450
+ flex: 1 1 auto;
72451
+ min-height: 0;
72452
+ max-height: none;
72444
72453
  overflow-y: auto;
72445
72454
  }
72446
72455
 
@@ -73739,6 +73748,7 @@ var WaterSummaryTooltip = {
73739
73748
  left: container.style.left,
73740
73749
  top: container.style.top
73741
73750
  };
73751
+ if (!this._isPinned) this.togglePin();
73742
73752
  }
73743
73753
  container.classList.toggle("maximized", this._isMaximized);
73744
73754
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -74229,6 +74239,8 @@ var COLUMN_SUMMARY_CSS = `
74229
74239
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
74230
74240
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
74231
74241
  }
74242
+ /* Footer band \u2014 hidden in compact, shown when maximized (mirrors Energy/Water). */
74243
+ .myio-col-summary__footer { display: none; }
74232
74244
  .myio-col-summary__slice {
74233
74245
  stroke: #ffffff; stroke-width: 1.5;
74234
74246
  transition: opacity 0.12s ease;
@@ -74283,7 +74295,9 @@ var COLUMN_SUMMARY_CSS = `
74283
74295
  .myio-info-tooltip.maximized .myio-col-summary__chart {
74284
74296
  display: block; grid-column: 1; grid-row: 1; min-width: 0;
74285
74297
  }
74286
- .myio-info-tooltip.maximized .myio-col-summary__pie { max-width: 440px; margin: 0 auto; }
74298
+ .myio-info-tooltip.maximized .myio-col-summary__pie {
74299
+ width: 320px; height: 320px; aspect-ratio: auto; margin: 0 auto;
74300
+ }
74287
74301
  .myio-info-tooltip.maximized .myio-col-summary__lists {
74288
74302
  grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto;
74289
74303
  display: flex; flex-direction: column; gap: 14px;
@@ -74295,6 +74309,22 @@ var COLUMN_SUMMARY_CSS = `
74295
74309
  border-left: 1px solid #e3d9f3; padding-left: 20px;
74296
74310
  }
74297
74311
  .myio-info-tooltip.maximized .myio-col-summary__group { margin-top: 0; }
74312
+ /* Footer band \u2014 same visual language as Energy/Water tooltips. */
74313
+ .myio-info-tooltip.maximized .myio-col-summary__footer {
74314
+ display: flex; justify-content: space-between; align-items: center;
74315
+ flex: 0 0 auto;
74316
+ margin: 14px -16px -16px -16px; /* bleed to the panel edges (cancels __content padding) */
74317
+ padding: 12px 18px;
74318
+ background: linear-gradient(135deg, #3e1a7d 0%, #6d28d9 100%);
74319
+ color: #ffffff; border-radius: 0 0 11px 11px;
74320
+ }
74321
+ .myio-info-tooltip.maximized .myio-col-summary__footer-label {
74322
+ font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.92);
74323
+ letter-spacing: 0.3px;
74324
+ }
74325
+ .myio-info-tooltip.maximized .myio-col-summary__footer-value {
74326
+ font-size: 18px; font-weight: 700; color: #ffffff;
74327
+ }
74298
74328
  `;
74299
74329
  var _cssInjected2 = false;
74300
74330
  function injectCSS10() {
@@ -74456,6 +74486,10 @@ function buildInner() {
74456
74486
  ${group("\u25BC 3 menores", bottom3)}
74457
74487
  ${group("\u25CF 3 na m\xE9dia", near3)}
74458
74488
  </div>
74489
+ </div>
74490
+ <div class="myio-col-summary__footer">
74491
+ <span class="myio-col-summary__footer-label">Consumo Total \xB7 ${count} dispositivos</span>
74492
+ <span class="myio-col-summary__footer-value">${esc3(fmt2(total))}</span>
74459
74493
  </div>`;
74460
74494
  }
74461
74495
  function setHighlight(idx) {
package/dist/index.js CHANGED
@@ -546,7 +546,7 @@ var init_template_card = __esm({
546
546
  // package.json
547
547
  var package_default = {
548
548
  name: "myio-js-library",
549
- version: "0.1.506",
549
+ version: "0.1.507",
550
550
  description: "A clean, standalone JS SDK for MYIO projects",
551
551
  license: "MIT",
552
552
  repository: "github:gh-myio/myio-js-library",
@@ -15439,7 +15439,7 @@ var INFO_TOOLTIP_CSS = `
15439
15439
  border: 1px solid #e2e8f0;
15440
15440
  border-radius: 12px;
15441
15441
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
15442
- width: 395px;
15442
+ width: 450px;
15443
15443
  max-width: 90vw;
15444
15444
  font-size: 12px;
15445
15445
  color: #1e293b;
@@ -15885,6 +15885,10 @@ function toggleMaximize3(container) {
15885
15885
  left: container.style.left,
15886
15886
  top: container.style.top
15887
15887
  };
15888
+ state3.isPinned = true;
15889
+ container.classList.add("pinned");
15890
+ const pinBtn = container.querySelector('[data-action="pin"]');
15891
+ pinBtn?.classList.add("pinned");
15888
15892
  }
15889
15893
  container.classList.toggle("maximized", state3.isMaximized);
15890
15894
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -69667,7 +69671,7 @@ var ENERGY_SUMMARY_TOOLTIP_CSS = `
69667
69671
  border: 1px solid #e2e8f0;
69668
69672
  border-radius: 12px;
69669
69673
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
69670
- width: 395px;
69674
+ width: 450px;
69671
69675
  max-width: 90vw;
69672
69676
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
69673
69677
  font-size: 12px;
@@ -69769,7 +69773,9 @@ var ENERGY_SUMMARY_TOOLTIP_CSS = `
69769
69773
  }
69770
69774
 
69771
69775
  .energy-summary-tooltip.maximized .energy-summary-tooltip__body {
69772
- flex: 1;
69776
+ flex: 1 1 auto;
69777
+ min-height: 0;
69778
+ max-height: none;
69773
69779
  overflow-y: auto;
69774
69780
  }
69775
69781
 
@@ -71199,6 +71205,7 @@ var EnergySummaryTooltip = {
71199
71205
  left: container.style.left,
71200
71206
  top: container.style.top
71201
71207
  };
71208
+ if (!this._isPinned) this.togglePin();
71202
71209
  }
71203
71210
  container.classList.toggle("maximized", this._isMaximized);
71204
71211
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -71720,7 +71727,7 @@ var WATER_SUMMARY_TOOLTIP_CSS = `
71720
71727
  border: 1px solid #e2e8f0;
71721
71728
  border-radius: 12px;
71722
71729
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
71723
- width: 395px;
71730
+ width: 450px;
71724
71731
  max-width: 90vw;
71725
71732
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
71726
71733
  font-size: 12px;
@@ -71822,7 +71829,9 @@ var WATER_SUMMARY_TOOLTIP_CSS = `
71822
71829
  }
71823
71830
 
71824
71831
  .water-summary-tooltip.maximized .water-summary-tooltip__body {
71825
- flex: 1;
71832
+ flex: 1 1 auto;
71833
+ min-height: 0;
71834
+ max-height: none;
71826
71835
  overflow-y: auto;
71827
71836
  }
71828
71837
 
@@ -73121,6 +73130,7 @@ var WaterSummaryTooltip = {
73121
73130
  left: container.style.left,
73122
73131
  top: container.style.top
73123
73132
  };
73133
+ if (!this._isPinned) this.togglePin();
73124
73134
  }
73125
73135
  container.classList.toggle("maximized", this._isMaximized);
73126
73136
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -73611,6 +73621,8 @@ var COLUMN_SUMMARY_CSS = `
73611
73621
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
73612
73622
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
73613
73623
  }
73624
+ /* Footer band \u2014 hidden in compact, shown when maximized (mirrors Energy/Water). */
73625
+ .myio-col-summary__footer { display: none; }
73614
73626
  .myio-col-summary__slice {
73615
73627
  stroke: #ffffff; stroke-width: 1.5;
73616
73628
  transition: opacity 0.12s ease;
@@ -73665,7 +73677,9 @@ var COLUMN_SUMMARY_CSS = `
73665
73677
  .myio-info-tooltip.maximized .myio-col-summary__chart {
73666
73678
  display: block; grid-column: 1; grid-row: 1; min-width: 0;
73667
73679
  }
73668
- .myio-info-tooltip.maximized .myio-col-summary__pie { max-width: 440px; margin: 0 auto; }
73680
+ .myio-info-tooltip.maximized .myio-col-summary__pie {
73681
+ width: 320px; height: 320px; aspect-ratio: auto; margin: 0 auto;
73682
+ }
73669
73683
  .myio-info-tooltip.maximized .myio-col-summary__lists {
73670
73684
  grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto;
73671
73685
  display: flex; flex-direction: column; gap: 14px;
@@ -73677,6 +73691,22 @@ var COLUMN_SUMMARY_CSS = `
73677
73691
  border-left: 1px solid #e3d9f3; padding-left: 20px;
73678
73692
  }
73679
73693
  .myio-info-tooltip.maximized .myio-col-summary__group { margin-top: 0; }
73694
+ /* Footer band \u2014 same visual language as Energy/Water tooltips. */
73695
+ .myio-info-tooltip.maximized .myio-col-summary__footer {
73696
+ display: flex; justify-content: space-between; align-items: center;
73697
+ flex: 0 0 auto;
73698
+ margin: 14px -16px -16px -16px; /* bleed to the panel edges (cancels __content padding) */
73699
+ padding: 12px 18px;
73700
+ background: linear-gradient(135deg, #3e1a7d 0%, #6d28d9 100%);
73701
+ color: #ffffff; border-radius: 0 0 11px 11px;
73702
+ }
73703
+ .myio-info-tooltip.maximized .myio-col-summary__footer-label {
73704
+ font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.92);
73705
+ letter-spacing: 0.3px;
73706
+ }
73707
+ .myio-info-tooltip.maximized .myio-col-summary__footer-value {
73708
+ font-size: 18px; font-weight: 700; color: #ffffff;
73709
+ }
73680
73710
  `;
73681
73711
  var _cssInjected2 = false;
73682
73712
  function injectCSS10() {
@@ -73838,6 +73868,10 @@ function buildInner() {
73838
73868
  ${group("\u25BC 3 menores", bottom3)}
73839
73869
  ${group("\u25CF 3 na m\xE9dia", near3)}
73840
73870
  </div>
73871
+ </div>
73872
+ <div class="myio-col-summary__footer">
73873
+ <span class="myio-col-summary__footer-label">Consumo Total \xB7 ${count} dispositivos</span>
73874
+ <span class="myio-col-summary__footer-value">${esc3(fmt2(total))}</span>
73841
73875
  </div>`;
73842
73876
  }
73843
73877
  function setHighlight(idx) {
@@ -4070,7 +4070,7 @@
4070
4070
 
4071
4071
  // package.json
4072
4072
  var package_default = {
4073
- version: "0.1.506"};
4073
+ version: "0.1.507"};
4074
4074
 
4075
4075
  // src/format/energy.ts
4076
4076
  function formatPower(value, decimals = 2) {
@@ -18874,7 +18874,7 @@
18874
18874
  border: 1px solid #e2e8f0;
18875
18875
  border-radius: 12px;
18876
18876
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
18877
- width: 395px;
18877
+ width: 450px;
18878
18878
  max-width: 90vw;
18879
18879
  font-size: 12px;
18880
18880
  color: #1e293b;
@@ -19320,6 +19320,10 @@
19320
19320
  left: container.style.left,
19321
19321
  top: container.style.top
19322
19322
  };
19323
+ state3.isPinned = true;
19324
+ container.classList.add("pinned");
19325
+ const pinBtn = container.querySelector('[data-action="pin"]');
19326
+ pinBtn?.classList.add("pinned");
19323
19327
  }
19324
19328
  container.classList.toggle("maximized", state3.isMaximized);
19325
19329
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -72897,7 +72901,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
72897
72901
  border: 1px solid #e2e8f0;
72898
72902
  border-radius: 12px;
72899
72903
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
72900
- width: 395px;
72904
+ width: 450px;
72901
72905
  max-width: 90vw;
72902
72906
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
72903
72907
  font-size: 12px;
@@ -72999,7 +73003,9 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
72999
73003
  }
73000
73004
 
73001
73005
  .energy-summary-tooltip.maximized .energy-summary-tooltip__body {
73002
- flex: 1;
73006
+ flex: 1 1 auto;
73007
+ min-height: 0;
73008
+ max-height: none;
73003
73009
  overflow-y: auto;
73004
73010
  }
73005
73011
 
@@ -74429,6 +74435,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
74429
74435
  left: container.style.left,
74430
74436
  top: container.style.top
74431
74437
  };
74438
+ if (!this._isPinned) this.togglePin();
74432
74439
  }
74433
74440
  container.classList.toggle("maximized", this._isMaximized);
74434
74441
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -74950,7 +74957,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
74950
74957
  border: 1px solid #e2e8f0;
74951
74958
  border-radius: 12px;
74952
74959
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
74953
- width: 395px;
74960
+ width: 450px;
74954
74961
  max-width: 90vw;
74955
74962
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
74956
74963
  font-size: 12px;
@@ -75052,7 +75059,9 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
75052
75059
  }
75053
75060
 
75054
75061
  .water-summary-tooltip.maximized .water-summary-tooltip__body {
75055
- flex: 1;
75062
+ flex: 1 1 auto;
75063
+ min-height: 0;
75064
+ max-height: none;
75056
75065
  overflow-y: auto;
75057
75066
  }
75058
75067
 
@@ -76351,6 +76360,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
76351
76360
  left: container.style.left,
76352
76361
  top: container.style.top
76353
76362
  };
76363
+ if (!this._isPinned) this.togglePin();
76354
76364
  }
76355
76365
  container.classList.toggle("maximized", this._isMaximized);
76356
76366
  const maxBtn = container.querySelector('[data-action="maximize"]');
@@ -76841,6 +76851,8 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
76841
76851
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
76842
76852
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
76843
76853
  }
76854
+ /* Footer band \u2014 hidden in compact, shown when maximized (mirrors Energy/Water). */
76855
+ .myio-col-summary__footer { display: none; }
76844
76856
  .myio-col-summary__slice {
76845
76857
  stroke: #ffffff; stroke-width: 1.5;
76846
76858
  transition: opacity 0.12s ease;
@@ -76895,7 +76907,9 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
76895
76907
  .myio-info-tooltip.maximized .myio-col-summary__chart {
76896
76908
  display: block; grid-column: 1; grid-row: 1; min-width: 0;
76897
76909
  }
76898
- .myio-info-tooltip.maximized .myio-col-summary__pie { max-width: 440px; margin: 0 auto; }
76910
+ .myio-info-tooltip.maximized .myio-col-summary__pie {
76911
+ width: 320px; height: 320px; aspect-ratio: auto; margin: 0 auto;
76912
+ }
76899
76913
  .myio-info-tooltip.maximized .myio-col-summary__lists {
76900
76914
  grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto;
76901
76915
  display: flex; flex-direction: column; gap: 14px;
@@ -76907,6 +76921,22 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
76907
76921
  border-left: 1px solid #e3d9f3; padding-left: 20px;
76908
76922
  }
76909
76923
  .myio-info-tooltip.maximized .myio-col-summary__group { margin-top: 0; }
76924
+ /* Footer band \u2014 same visual language as Energy/Water tooltips. */
76925
+ .myio-info-tooltip.maximized .myio-col-summary__footer {
76926
+ display: flex; justify-content: space-between; align-items: center;
76927
+ flex: 0 0 auto;
76928
+ margin: 14px -16px -16px -16px; /* bleed to the panel edges (cancels __content padding) */
76929
+ padding: 12px 18px;
76930
+ background: linear-gradient(135deg, #3e1a7d 0%, #6d28d9 100%);
76931
+ color: #ffffff; border-radius: 0 0 11px 11px;
76932
+ }
76933
+ .myio-info-tooltip.maximized .myio-col-summary__footer-label {
76934
+ font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.92);
76935
+ letter-spacing: 0.3px;
76936
+ }
76937
+ .myio-info-tooltip.maximized .myio-col-summary__footer-value {
76938
+ font-size: 18px; font-weight: 700; color: #ffffff;
76939
+ }
76910
76940
  `;
76911
76941
  var _cssInjected2 = false;
76912
76942
  function injectCSS10() {
@@ -77068,6 +77098,10 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
77068
77098
  ${group("\u25BC 3 menores", bottom3)}
77069
77099
  ${group("\u25CF 3 na m\xE9dia", near3)}
77070
77100
  </div>
77101
+ </div>
77102
+ <div class="myio-col-summary__footer">
77103
+ <span class="myio-col-summary__footer-label">Consumo Total \xB7 ${count} dispositivos</span>
77104
+ <span class="myio-col-summary__footer-value">${esc3(fmt2(total))}</span>
77071
77105
  </div>`;
77072
77106
  }
77073
77107
  function setHighlight(idx) {