myio-js-library 0.1.507 → 0.1.508

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.507",
1167
+ version: "0.1.508",
1168
1168
  description: "A clean, standalone JS SDK for MYIO projects",
1169
1169
  license: "MIT",
1170
1170
  repository: "github:gh-myio/myio-js-library",
@@ -16048,7 +16048,9 @@ var INFO_TOOLTIP_CSS = `
16048
16048
  }
16049
16049
 
16050
16050
  .myio-info-tooltip.maximized .myio-info-tooltip__content {
16051
- flex: 1;
16051
+ flex: 1 1 auto;
16052
+ min-height: 0;
16053
+ max-height: none;
16052
16054
  overflow-y: auto;
16053
16055
  }
16054
16056
 
@@ -74288,7 +74290,7 @@ var COLUMN_SUMMARY_CSS = `
74288
74290
  .myio-info-tooltip.maximized .myio-col-summary__body {
74289
74291
  flex: 1 1 auto; min-height: 0;
74290
74292
  display: grid;
74291
- grid-template-columns: minmax(340px, 440px) 1fr;
74293
+ grid-template-columns: minmax(520px, 620px) 1fr;
74292
74294
  grid-template-rows: auto 1fr;
74293
74295
  gap: 14px 22px;
74294
74296
  }
@@ -74296,7 +74298,7 @@ var COLUMN_SUMMARY_CSS = `
74296
74298
  display: block; grid-column: 1; grid-row: 1; min-width: 0;
74297
74299
  }
74298
74300
  .myio-info-tooltip.maximized .myio-col-summary__pie {
74299
- width: 320px; height: 320px; aspect-ratio: auto; margin: 0 auto;
74301
+ width: 500px; height: 500px; aspect-ratio: auto; margin: 0 auto;
74300
74302
  }
74301
74303
  .myio-info-tooltip.maximized .myio-col-summary__lists {
74302
74304
  grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto;
@@ -74412,7 +74414,7 @@ function buildPieSvg(visible, total) {
74412
74414
  function buildLegend(total) {
74413
74415
  if (!_state) return "";
74414
74416
  const { data, excluded, fmt: fmt2, pd } = _state;
74415
- const rows = data.devices.map((d, idx) => {
74417
+ const rows = data.devices.map((d, idx) => ({ d, idx })).sort((a, b) => (Number(b.d.value) || 0) - (Number(a.d.value) || 0)).map(({ d, idx }) => {
74416
74418
  const val = Number(d.value) || 0;
74417
74419
  const isExcl = excluded.has(idx);
74418
74420
  const pct = isExcl ? "\u2014" : fmtPct(val, total, pd);
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.507",
549
+ version: "0.1.508",
550
550
  description: "A clean, standalone JS SDK for MYIO projects",
551
551
  license: "MIT",
552
552
  repository: "github:gh-myio/myio-js-library",
@@ -15430,7 +15430,9 @@ var INFO_TOOLTIP_CSS = `
15430
15430
  }
15431
15431
 
15432
15432
  .myio-info-tooltip.maximized .myio-info-tooltip__content {
15433
- flex: 1;
15433
+ flex: 1 1 auto;
15434
+ min-height: 0;
15435
+ max-height: none;
15434
15436
  overflow-y: auto;
15435
15437
  }
15436
15438
 
@@ -73670,7 +73672,7 @@ var COLUMN_SUMMARY_CSS = `
73670
73672
  .myio-info-tooltip.maximized .myio-col-summary__body {
73671
73673
  flex: 1 1 auto; min-height: 0;
73672
73674
  display: grid;
73673
- grid-template-columns: minmax(340px, 440px) 1fr;
73675
+ grid-template-columns: minmax(520px, 620px) 1fr;
73674
73676
  grid-template-rows: auto 1fr;
73675
73677
  gap: 14px 22px;
73676
73678
  }
@@ -73678,7 +73680,7 @@ var COLUMN_SUMMARY_CSS = `
73678
73680
  display: block; grid-column: 1; grid-row: 1; min-width: 0;
73679
73681
  }
73680
73682
  .myio-info-tooltip.maximized .myio-col-summary__pie {
73681
- width: 320px; height: 320px; aspect-ratio: auto; margin: 0 auto;
73683
+ width: 500px; height: 500px; aspect-ratio: auto; margin: 0 auto;
73682
73684
  }
73683
73685
  .myio-info-tooltip.maximized .myio-col-summary__lists {
73684
73686
  grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto;
@@ -73794,7 +73796,7 @@ function buildPieSvg(visible, total) {
73794
73796
  function buildLegend(total) {
73795
73797
  if (!_state) return "";
73796
73798
  const { data, excluded, fmt: fmt2, pd } = _state;
73797
- const rows = data.devices.map((d, idx) => {
73799
+ const rows = data.devices.map((d, idx) => ({ d, idx })).sort((a, b) => (Number(b.d.value) || 0) - (Number(a.d.value) || 0)).map(({ d, idx }) => {
73798
73800
  const val = Number(d.value) || 0;
73799
73801
  const isExcl = excluded.has(idx);
73800
73802
  const pct = isExcl ? "\u2014" : fmtPct(val, total, pd);
@@ -4070,7 +4070,7 @@
4070
4070
 
4071
4071
  // package.json
4072
4072
  var package_default = {
4073
- version: "0.1.507"};
4073
+ version: "0.1.508"};
4074
4074
 
4075
4075
  // src/format/energy.ts
4076
4076
  function formatPower(value, decimals = 2) {
@@ -18865,7 +18865,9 @@
18865
18865
  }
18866
18866
 
18867
18867
  .myio-info-tooltip.maximized .myio-info-tooltip__content {
18868
- flex: 1;
18868
+ flex: 1 1 auto;
18869
+ min-height: 0;
18870
+ max-height: none;
18869
18871
  overflow-y: auto;
18870
18872
  }
18871
18873
 
@@ -76900,7 +76902,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
76900
76902
  .myio-info-tooltip.maximized .myio-col-summary__body {
76901
76903
  flex: 1 1 auto; min-height: 0;
76902
76904
  display: grid;
76903
- grid-template-columns: minmax(340px, 440px) 1fr;
76905
+ grid-template-columns: minmax(520px, 620px) 1fr;
76904
76906
  grid-template-rows: auto 1fr;
76905
76907
  gap: 14px 22px;
76906
76908
  }
@@ -76908,7 +76910,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
76908
76910
  display: block; grid-column: 1; grid-row: 1; min-width: 0;
76909
76911
  }
76910
76912
  .myio-info-tooltip.maximized .myio-col-summary__pie {
76911
- width: 320px; height: 320px; aspect-ratio: auto; margin: 0 auto;
76913
+ width: 500px; height: 500px; aspect-ratio: auto; margin: 0 auto;
76912
76914
  }
76913
76915
  .myio-info-tooltip.maximized .myio-col-summary__lists {
76914
76916
  grid-column: 1; grid-row: 2; min-height: 0; overflow-y: auto;
@@ -77024,7 +77026,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
77024
77026
  function buildLegend(total) {
77025
77027
  if (!_state) return "";
77026
77028
  const { data, excluded, fmt: fmt2, pd } = _state;
77027
- const rows = data.devices.map((d, idx) => {
77029
+ const rows = data.devices.map((d, idx) => ({ d, idx })).sort((a, b) => (Number(b.d.value) || 0) - (Number(a.d.value) || 0)).map(({ d, idx }) => {
77028
77030
  const val = Number(d.value) || 0;
77029
77031
  const isExcl = excluded.has(idx);
77030
77032
  const pct = isExcl ? "\u2014" : fmtPct(val, total, pd);