@seanyeh77/ui 0.48.3 → 0.50.0

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.
Files changed (47) hide show
  1. package/dist/bundle.js +18 -18
  2. package/dist/components/CodeView/CodeView.js +6 -5
  3. package/dist/components/CodeView/CodeView.js.map +1 -1
  4. package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +11 -5
  5. package/dist/components/ConsoleLayout/ConsoleLayout.js +73 -10
  6. package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
  7. package/dist/components/DataTable/DataTable.js +2 -2
  8. package/dist/components/DataTable/DataTable.js.map +1 -1
  9. package/dist/components/EmptyState/EmptyState.js +2 -2
  10. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  11. package/dist/components/FloorPlan/FloorPlan.d.ts +65 -0
  12. package/dist/components/FloorPlan/FloorPlan.js +830 -0
  13. package/dist/components/FloorPlan/FloorPlan.js.map +1 -0
  14. package/dist/components/Markdown/Markdown.js +3 -3
  15. package/dist/components/Markdown/Markdown.js.map +1 -1
  16. package/dist/components/SideNav/SideNav.js +2 -2
  17. package/dist/components/SideNav/SideNav.js.map +1 -1
  18. package/dist/components/SplitPane/SplitPane.js +2 -2
  19. package/dist/components/SplitPane/SplitPane.js.map +1 -1
  20. package/dist/components/ZoneMap/ZoneMap.d.ts +3 -0
  21. package/dist/components/ZoneMap/ZoneMap.js +6 -20
  22. package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
  23. package/dist/css/ConsoleLayout.css +43 -5
  24. package/dist/css/FloorPlan.css +273 -0
  25. package/dist/css/KpiCard.css +5 -4
  26. package/dist/css/ZoneMap.css +0 -97
  27. package/dist/css/base.css +99 -0
  28. package/dist/i18n.js +6 -0
  29. package/dist/i18n.js.map +1 -1
  30. package/dist/index.d.ts +2 -1
  31. package/dist/index.js +2 -1
  32. package/dist/internal/chart.js +2 -2
  33. package/dist/internal/chart.js.map +1 -1
  34. package/dist/internal/util.js +8 -1
  35. package/dist/internal/util.js.map +1 -1
  36. package/dist/internal/zone.js +48 -0
  37. package/dist/internal/zone.js.map +1 -0
  38. package/dist/styles.css +415 -106
  39. package/docs/ConsoleLayout.md +23 -7
  40. package/docs/DataColors.md +1 -1
  41. package/docs/FloorPlan.md +43 -0
  42. package/docs/ZoneMap.md +2 -2
  43. package/docs/agents.md +5 -5
  44. package/docs/components.json +4 -0
  45. package/docs/data.md +2 -1
  46. package/docs/monitoring.md +9 -2
  47. package/package.json +2 -2
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import { format } from "../format.js";
3
+ import { tr } from "../i18n.js";
4
+ import { heatToken, textOn } from "../theme.js";
5
+ // src/internal/zone.ts
6
+ /** Data tokens whose text color comes from CSS (it follows the theme); other fills are measured with textOn(). */
7
+ const DATA_TOKEN = /^(heat-[1-7]|diverge-(neg|pos)(-strong)?|diverge-zero|chart-[1-4])$/;
8
+ /** The heat range: min and max when given, else the zones' own smallest and largest value. One value alone (or all
9
+ * equal) gets that value ± 1, so it lands in the middle of the scale. */
10
+ function heatRange(zones, min, max) {
11
+ const values = zones.map((z) => z.value).filter((v) => v != null && Number.isFinite(v));
12
+ const lo = min ?? (values.length ? Math.min(...values) : 0);
13
+ const hi = max ?? (values.length ? Math.max(...values) : 1);
14
+ return hi > lo ? [lo, hi] : [lo - 1, lo + 1];
15
+ }
16
+ /** True when the zone has no data: a dashed outline, not selectable. */
17
+ const noData = (z) => z.value == null && !z.forecast;
18
+ /** The fill (token name or color), its CSS background, the text color for a fill that is not a data token, the state
19
+ * with 「⚠ 」 when it needs attention, the figure, the figure with its unit, and the accessible name. */
20
+ function zoneText(z, min, max, extra = []) {
21
+ const tone = z.tone ?? "normal";
22
+ const fill = z.fill ?? (z.value != null ? heatToken(z.value, min, max) : "surface-sub");
23
+ const bg = /^[a-z][a-z0-9-]*$/.test(fill) ? `var(--${fill})` : fill;
24
+ const stateWord = z.state ?? (z.forecast ? tr("預測") : tr("正常"));
25
+ const state = (tone === "normal" ? "" : "⚠ ") + stateWord;
26
+ const figure = z.value != null ? format.number(z.value, z.decimals ?? 1) : "—";
27
+ const reading = figure + (z.unit ? " " + z.unit : "");
28
+ const label = [
29
+ z.name,
30
+ reading,
31
+ stateWord,
32
+ ...extra,
33
+ z.detail
34
+ ].filter(Boolean).join(tr(","));
35
+ return {
36
+ tone,
37
+ fill,
38
+ bg,
39
+ color: DATA_TOKEN.test(fill) ? void 0 : textOn(fill),
40
+ state,
41
+ figure,
42
+ reading,
43
+ label
44
+ };
45
+ }
46
+ export { DATA_TOKEN, heatRange, noData, zoneText };
47
+
48
+ //# sourceMappingURL=zone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zone.js","names":[],"sources":["../../src/internal/zone.ts"],"sourcesContent":["// What ZoneMap and FloorPlan share: the heat range, and a zone's fill, figure, state and accessible name.\nimport { format } from '../format';\nimport { tr } from '../i18n';\nimport { heatToken, textOn } from '../theme';\n\n/** The fields of a zone both maps read. */\ninterface ZoneText {\n name: string;\n value?: number | null;\n unit?: string;\n decimals?: number;\n fill?: string;\n tone?: 'normal' | 'warning' | 'danger';\n state?: string;\n forecast?: boolean;\n detail?: string;\n}\n\n/** Data tokens whose text color comes from CSS (it follows the theme); other fills are measured with textOn(). */\nexport const DATA_TOKEN = /^(heat-[1-7]|diverge-(neg|pos)(-strong)?|diverge-zero|chart-[1-4])$/;\n\n/** The heat range: min and max when given, else the zones' own smallest and largest value. One value alone (or all\n * equal) gets that value ± 1, so it lands in the middle of the scale. */\nexport function heatRange(zones: readonly { value?: number | null }[], min?: number, max?: number): [number, number] {\n const values = zones.map((z) => z.value).filter((v): v is number => v != null && Number.isFinite(v));\n const lo = min ?? (values.length ? Math.min(...values) : 0);\n const hi = max ?? (values.length ? Math.max(...values) : 1);\n return hi > lo ? [lo, hi] : [lo - 1, lo + 1];\n}\n\n/** True when the zone has no data: a dashed outline, not selectable. */\nexport const noData = (z: ZoneText): boolean => z.value == null && !z.forecast;\n\n/** The fill (token name or color), its CSS background, the text color for a fill that is not a data token, the state\n * with 「⚠ 」 when it needs attention, the figure, the figure with its unit, and the accessible name. */\nexport function zoneText(z: ZoneText, min: number, max: number, extra: string[] = []) {\n const tone = z.tone ?? 'normal';\n const fill = z.fill ?? (z.value != null ? heatToken(z.value, min, max) : 'surface-sub');\n const bg = /^[a-z][a-z0-9-]*$/.test(fill) ? `var(--${fill})` : fill;\n const stateWord = z.state ?? (z.forecast ? tr('預測') : tr('正常'));\n const state = (tone === 'normal' ? '' : '⚠ ') + stateWord;\n const figure = z.value != null ? format.number(z.value, z.decimals ?? 1) : '—';\n const reading = figure + (z.unit ? ' ' + z.unit : '');\n const label = [z.name, reading, stateWord, ...extra, z.detail].filter(Boolean).join(tr(','));\n const color = DATA_TOKEN.test(fill) ? undefined : textOn(fill);\n return { tone, fill, bg, color, state, figure, reading, label };\n}\n"],"mappings":";;;;;;AAmBA,MAAa,aAAa;;;AAI1B,SAAgB,UAAU,OAA6C,KAAc,KAAgC;CACnH,MAAM,SAAS,MAAM,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,MAAmB,KAAK,QAAQ,OAAO,SAAS,CAAC,CAAC;CACnG,MAAM,KAAK,QAAQ,OAAO,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI;CACzD,MAAM,KAAK,QAAQ,OAAO,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI;CACzD,OAAO,KAAK,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AAC7C;;AAGA,MAAa,UAAU,MAAyB,EAAE,SAAS,QAAQ,CAAC,EAAE;;;AAItE,SAAgB,SAAS,GAAa,KAAa,KAAa,QAAkB,CAAC,GAAG;CACpF,MAAM,OAAO,EAAE,QAAQ;CACvB,MAAM,OAAO,EAAE,SAAS,EAAE,SAAS,OAAO,UAAU,EAAE,OAAO,KAAK,GAAG,IAAI;CACzE,MAAM,KAAK,oBAAoB,KAAK,IAAI,IAAI,SAAS,KAAK,KAAK;CAC/D,MAAM,YAAY,EAAE,UAAU,EAAE,WAAW,GAAG,IAAI,IAAI,GAAG,IAAI;CAC7D,MAAM,SAAS,SAAS,WAAW,KAAK,QAAQ;CAChD,MAAM,SAAS,EAAE,SAAS,OAAO,OAAO,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI;CAC3E,MAAM,UAAU,UAAU,EAAE,OAAO,MAAM,EAAE,OAAO;CAClD,MAAM,QAAQ;EAAC,EAAE;EAAM;EAAS;EAAW,GAAG;EAAO,EAAE;CAAM,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC;CAE3F,OAAO;EAAE;EAAM;EAAM;EAAI,OADX,WAAW,KAAK,IAAI,IAAI,KAAA,IAAY,OAAO,IAAI;EAC7B;EAAO;EAAQ;EAAS;CAAM;AAChE"}
package/dist/styles.css CHANGED
@@ -686,6 +686,105 @@ label:has(> .ui-switch) {
686
686
  stroke: var(--surface);
687
687
  stroke-width: 2;
688
688
  }
689
+
690
+ /* Text on a data fill (ZoneMap zones, FloorPlan labels): the pick of textOn() for each step, per theme, so it follows a
691
+ theme switch without a render. */
692
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-1'] {
693
+ color: #ffffff;
694
+ }
695
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-2'] {
696
+ color: #171512;
697
+ }
698
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-3'] {
699
+ color: #171512;
700
+ }
701
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-4'] {
702
+ color: #171512;
703
+ }
704
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-5'] {
705
+ color: #171512;
706
+ }
707
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-6'] {
708
+ color: #171512;
709
+ }
710
+ :is(.ui-zone, .ui-fp-label)[data-fill='heat-7'] {
711
+ color: #ffffff;
712
+ }
713
+ :is(.ui-zone, .ui-fp-label)[data-fill='diverge-neg-strong'] {
714
+ color: #ffffff;
715
+ }
716
+ :is(.ui-zone, .ui-fp-label)[data-fill='diverge-neg'] {
717
+ color: #171512;
718
+ }
719
+ :is(.ui-zone, .ui-fp-label)[data-fill='diverge-zero'] {
720
+ color: #171512;
721
+ }
722
+ :is(.ui-zone, .ui-fp-label)[data-fill='diverge-pos'] {
723
+ color: #171512;
724
+ }
725
+ :is(.ui-zone, .ui-fp-label)[data-fill='diverge-pos-strong'] {
726
+ color: #ffffff;
727
+ }
728
+ :is(.ui-zone, .ui-fp-label)[data-fill='chart-1'] {
729
+ color: #ffffff;
730
+ }
731
+ :is(.ui-zone, .ui-fp-label)[data-fill='chart-2'] {
732
+ color: #171512;
733
+ }
734
+ :is(.ui-zone, .ui-fp-label)[data-fill='chart-3'] {
735
+ color: #171512;
736
+ }
737
+ :is(.ui-zone, .ui-fp-label)[data-fill='chart-4'] {
738
+ color: #171512;
739
+ }
740
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-1'] {
741
+ color: #ffffff;
742
+ }
743
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-2'] {
744
+ color: #171512;
745
+ }
746
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-3'] {
747
+ color: #171512;
748
+ }
749
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-4'] {
750
+ color: #ffffff;
751
+ }
752
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-5'] {
753
+ color: #171512;
754
+ }
755
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-6'] {
756
+ color: #171512;
757
+ }
758
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='heat-7'] {
759
+ color: #171512;
760
+ }
761
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='diverge-neg-strong'] {
762
+ color: #171512;
763
+ }
764
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='diverge-neg'] {
765
+ color: #171512;
766
+ }
767
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='diverge-zero'] {
768
+ color: #ffffff;
769
+ }
770
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='diverge-pos'] {
771
+ color: #171512;
772
+ }
773
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='diverge-pos-strong'] {
774
+ color: #171512;
775
+ }
776
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='chart-1'] {
777
+ color: #171512;
778
+ }
779
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='chart-2'] {
780
+ color: #171512;
781
+ }
782
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='chart-3'] {
783
+ color: #171512;
784
+ }
785
+ [data-theme='dark'] :is(.ui-zone, .ui-fp-label)[data-fill='chart-4'] {
786
+ color: #171512;
787
+ }
689
788
  /* Link: accent text, always underlined (a link in a sentence is told apart by more than its colour), a thin line
690
789
  that thickens on hover. Bare <a> in Markdown or older content gets the same look from base.css. */
691
790
  .ui-textlink {
@@ -6389,6 +6488,7 @@ div.ui-toast[role='status'] {
6389
6488
  as its content. */
6390
6489
  .ui-console-kpis > .ui-kpi {
6391
6490
  flex: 1 1 0;
6491
+ /* At least as wide as its content; the row wraps (the top bar's next line) when they do not all fit. */
6392
6492
  min-width: max-content;
6393
6493
  padding: 6px var(--space-4);
6394
6494
  border-radius: 0;
@@ -6399,11 +6499,11 @@ div.ui-toast[role='status'] {
6399
6499
  .ui-console-kpis > .ui-kpi:last-child {
6400
6500
  border-right: 1px solid var(--line);
6401
6501
  }
6402
- .ui-console.is-stacked .ui-console-kpis > .ui-kpi:first-child {
6502
+ /* Stacked, the KPIs are a grid under the title line: no lines between them, each starting at its column's edge. */
6503
+ .ui-console.is-stacked .ui-console-kpis > .ui-kpi {
6504
+ min-width: 0;
6505
+ padding: 0;
6403
6506
  border-left: 0;
6404
- padding-left: 0;
6405
- }
6406
- .ui-console.is-stacked .ui-console-kpis > .ui-kpi:last-child {
6407
6507
  border-right: 0;
6408
6508
  }
6409
6509
  /* DetailList */
@@ -9609,103 +9709,6 @@ button.ui-md-link.is-row {
9609
9709
  background: CanvasText;
9610
9710
  }
9611
9711
  }
9612
- .ui-zone[data-fill='heat-1'] {
9613
- color: #ffffff;
9614
- }
9615
- .ui-zone[data-fill='heat-2'] {
9616
- color: #171512;
9617
- }
9618
- .ui-zone[data-fill='heat-3'] {
9619
- color: #171512;
9620
- }
9621
- .ui-zone[data-fill='heat-4'] {
9622
- color: #171512;
9623
- }
9624
- .ui-zone[data-fill='heat-5'] {
9625
- color: #171512;
9626
- }
9627
- .ui-zone[data-fill='heat-6'] {
9628
- color: #171512;
9629
- }
9630
- .ui-zone[data-fill='heat-7'] {
9631
- color: #ffffff;
9632
- }
9633
- .ui-zone[data-fill='diverge-neg-strong'] {
9634
- color: #ffffff;
9635
- }
9636
- .ui-zone[data-fill='diverge-neg'] {
9637
- color: #171512;
9638
- }
9639
- .ui-zone[data-fill='diverge-zero'] {
9640
- color: #171512;
9641
- }
9642
- .ui-zone[data-fill='diverge-pos'] {
9643
- color: #171512;
9644
- }
9645
- .ui-zone[data-fill='diverge-pos-strong'] {
9646
- color: #ffffff;
9647
- }
9648
- .ui-zone[data-fill='chart-1'] {
9649
- color: #ffffff;
9650
- }
9651
- .ui-zone[data-fill='chart-2'] {
9652
- color: #171512;
9653
- }
9654
- .ui-zone[data-fill='chart-3'] {
9655
- color: #171512;
9656
- }
9657
- .ui-zone[data-fill='chart-4'] {
9658
- color: #171512;
9659
- }
9660
- [data-theme='dark'] .ui-zone[data-fill='heat-1'] {
9661
- color: #ffffff;
9662
- }
9663
- [data-theme='dark'] .ui-zone[data-fill='heat-2'] {
9664
- color: #171512;
9665
- }
9666
- [data-theme='dark'] .ui-zone[data-fill='heat-3'] {
9667
- color: #171512;
9668
- }
9669
- [data-theme='dark'] .ui-zone[data-fill='heat-4'] {
9670
- color: #ffffff;
9671
- }
9672
- [data-theme='dark'] .ui-zone[data-fill='heat-5'] {
9673
- color: #171512;
9674
- }
9675
- [data-theme='dark'] .ui-zone[data-fill='heat-6'] {
9676
- color: #171512;
9677
- }
9678
- [data-theme='dark'] .ui-zone[data-fill='heat-7'] {
9679
- color: #171512;
9680
- }
9681
- [data-theme='dark'] .ui-zone[data-fill='diverge-neg-strong'] {
9682
- color: #171512;
9683
- }
9684
- [data-theme='dark'] .ui-zone[data-fill='diverge-neg'] {
9685
- color: #171512;
9686
- }
9687
- [data-theme='dark'] .ui-zone[data-fill='diverge-zero'] {
9688
- color: #ffffff;
9689
- }
9690
- [data-theme='dark'] .ui-zone[data-fill='diverge-pos'] {
9691
- color: #171512;
9692
- }
9693
- [data-theme='dark'] .ui-zone[data-fill='diverge-pos-strong'] {
9694
- color: #171512;
9695
- }
9696
- [data-theme='dark'] .ui-zone[data-fill='chart-1'] {
9697
- color: #171512;
9698
- }
9699
- [data-theme='dark'] .ui-zone[data-fill='chart-2'] {
9700
- color: #171512;
9701
- }
9702
- [data-theme='dark'] .ui-zone[data-fill='chart-3'] {
9703
- color: #171512;
9704
- }
9705
- [data-theme='dark'] .ui-zone[data-fill='chart-4'] {
9706
- color: #171512;
9707
- }
9708
-
9709
9712
  /* ZoneMap: zones on a grid, filled by value. Name 16 px and state on one line, the figure 31 px with a 16 px unit,
9710
9713
  one 13 px detail line. Selected: an ink outline 4 px outside; attention: a 4 px warning or danger border. */
9711
9714
  .ui-zonemap {
@@ -9807,6 +9810,274 @@ button.ui-md-link.is-row {
9807
9810
  .ui-zone.is-empty .ui-zone-name {
9808
9811
  color: var(--ink);
9809
9812
  }
9813
+ /* FloorPlan: zones with any outline in an SVG, labels as HTML on top (the same size at every zoom). Fills, the 4 px
9814
+ attention border, the forecast stripes, the selection outline (ink, 2 px, 4 px outside) and the label type follow
9815
+ ZoneMap. */
9816
+ .ui-floorplan {
9817
+ /* The containing block of the visually hidden hint: without it the hint escapes a scrolling card and makes the page
9818
+ scroll. */
9819
+ position: relative;
9820
+ display: flex;
9821
+ flex-direction: column;
9822
+ gap: var(--space-3);
9823
+ min-width: 0;
9824
+ }
9825
+ .ui-floorplan.is-fill {
9826
+ flex: 1 1 auto;
9827
+ min-height: 0;
9828
+ }
9829
+ .ui-fp-box {
9830
+ position: relative;
9831
+ width: 100%;
9832
+ min-height: 240px;
9833
+ max-height: 640px;
9834
+ overflow: hidden;
9835
+ border-radius: var(--radius-md);
9836
+ }
9837
+ .ui-floorplan.is-fill .ui-fp-box {
9838
+ flex: 1 1 auto;
9839
+ max-height: none;
9840
+ }
9841
+ .ui-fp-svg {
9842
+ position: absolute;
9843
+ inset: 0;
9844
+ display: block;
9845
+ width: 100%;
9846
+ height: 100%;
9847
+ touch-action: none;
9848
+ -webkit-user-select: none;
9849
+ user-select: none;
9850
+ }
9851
+ .ui-fp-shell {
9852
+ fill: var(--surface-sub);
9853
+ stroke: var(--line-strong);
9854
+ stroke-width: 1.5px;
9855
+ vector-effect: non-scaling-stroke;
9856
+ }
9857
+ .ui-fp-zone {
9858
+ cursor: pointer;
9859
+ outline: none;
9860
+ }
9861
+ .ui-fp-fill {
9862
+ stroke: var(--surface);
9863
+ stroke-width: 1.5px;
9864
+ stroke-linejoin: round;
9865
+ vector-effect: non-scaling-stroke;
9866
+ }
9867
+ .ui-fp-zone.is-warning .ui-fp-tone {
9868
+ stroke: var(--warning);
9869
+ }
9870
+ .ui-fp-zone.is-danger .ui-fp-tone {
9871
+ stroke: var(--danger);
9872
+ }
9873
+ .ui-fp-stripe {
9874
+ fill: var(--forecast-stripe);
9875
+ }
9876
+ .ui-fp-empty {
9877
+ fill: transparent;
9878
+ stroke: var(--line-strong);
9879
+ stroke-width: 1px;
9880
+ stroke-dasharray: 4 3;
9881
+ vector-effect: non-scaling-stroke;
9882
+ }
9883
+ .ui-fp-edge {
9884
+ fill: none;
9885
+ stroke: var(--ink-muted);
9886
+ stroke-width: 1.5px;
9887
+ stroke-dasharray: 5 4;
9888
+ vector-effect: non-scaling-stroke;
9889
+ pointer-events: none;
9890
+ }
9891
+ .ui-fp-group {
9892
+ fill: var(--ink-muted);
9893
+ pointer-events: none;
9894
+ }
9895
+
9896
+ /* Labels: centred on the zone's label point, sized by FloorPlan (width and height set inline). */
9897
+ .ui-fp-labels {
9898
+ position: absolute;
9899
+ inset: 0;
9900
+ pointer-events: none;
9901
+ }
9902
+ .ui-fp-labels > * {
9903
+ position: absolute;
9904
+ box-sizing: border-box;
9905
+ overflow: hidden;
9906
+ white-space: nowrap;
9907
+ }
9908
+ .ui-fp-label {
9909
+ display: flex;
9910
+ flex-direction: column;
9911
+ align-items: center;
9912
+ justify-content: center;
9913
+ color: var(--ink);
9914
+ text-align: center;
9915
+ }
9916
+ .ui-fp-name {
9917
+ max-width: 100%;
9918
+ overflow: hidden;
9919
+ text-overflow: ellipsis;
9920
+ font-size: var(--text-body);
9921
+ font-weight: 600;
9922
+ line-height: 22px;
9923
+ }
9924
+ .ui-fp-value {
9925
+ font-family: var(--font-mono);
9926
+ font-size: var(--text-h3);
9927
+ font-weight: 700;
9928
+ line-height: 32px;
9929
+ font-variant-numeric: tabular-nums;
9930
+ }
9931
+ .ui-fp-unit {
9932
+ font-family: var(--font-sans);
9933
+ font-size: var(--text-body);
9934
+ font-weight: 500;
9935
+ }
9936
+ .ui-fp-state {
9937
+ font-size: var(--text-small);
9938
+ font-weight: 600;
9939
+ line-height: 20px;
9940
+ }
9941
+ .ui-fp-label.is-muted .ui-fp-name {
9942
+ font-size: var(--text-small);
9943
+ line-height: 20px;
9944
+ }
9945
+ .ui-fp-label.is-muted .ui-fp-value {
9946
+ font-size: var(--text-body);
9947
+ line-height: 22px;
9948
+ }
9949
+ .ui-fp-label.is-muted .ui-fp-unit {
9950
+ font-size: var(--text-small);
9951
+ }
9952
+ .ui-fp-label.is-empty .ui-fp-state {
9953
+ color: var(--ink-muted);
9954
+ font-weight: 400;
9955
+ }
9956
+ /* One line on a pill of its own ground: slender zones, and zones too small for the full label. */
9957
+ .ui-fp-pill {
9958
+ padding: 0 8px;
9959
+ border: 1px solid var(--line-strong);
9960
+ border-radius: var(--radius-full);
9961
+ background: var(--surface);
9962
+ color: var(--ink);
9963
+ font-size: var(--text-small);
9964
+ font-weight: 600;
9965
+ line-height: 22px;
9966
+ text-align: center;
9967
+ }
9968
+ .ui-fp-pill.is-empty {
9969
+ color: var(--ink-muted);
9970
+ }
9971
+ .ui-fp-num {
9972
+ font-family: var(--font-mono);
9973
+ font-variant-numeric: tabular-nums;
9974
+ }
9975
+ .ui-fp-group-name {
9976
+ padding: 0 6px;
9977
+ border-radius: var(--radius-xs);
9978
+ background: var(--surface);
9979
+ color: var(--ink-muted);
9980
+ font-size: var(--text-small);
9981
+ font-weight: 600;
9982
+ line-height: 22px;
9983
+ }
9984
+
9985
+ /* Tooltip: the look of Tooltip, beside the pointer (or the label point, for keyboard focus). */
9986
+ .ui-fp-tip {
9987
+ position: absolute;
9988
+ z-index: var(--z-raised);
9989
+ display: flex;
9990
+ flex-direction: column;
9991
+ max-width: 240px;
9992
+ padding: 6px 10px;
9993
+ border-radius: var(--radius-chip);
9994
+ background: var(--ink);
9995
+ color: var(--bg);
9996
+ font-size: var(--text-small);
9997
+ line-height: 20px;
9998
+ pointer-events: none;
9999
+ }
10000
+ .ui-fp-tip-name {
10001
+ font-weight: 600;
10002
+ }
10003
+
10004
+ .ui-fp-controls {
10005
+ position: absolute;
10006
+ right: var(--space-2);
10007
+ bottom: var(--space-2);
10008
+ display: flex;
10009
+ gap: var(--space-1);
10010
+ }
10011
+ .ui-fp-controls > * {
10012
+ background: var(--surface);
10013
+ }
10014
+
10015
+ /* Legend: the heat scale with its ends, the watch and limit marks, and a note when there are muted zones. */
10016
+ .ui-fp-legend {
10017
+ display: flex;
10018
+ flex-wrap: wrap;
10019
+ align-items: center;
10020
+ gap: var(--space-2) var(--space-4);
10021
+ color: var(--ink-muted);
10022
+ font-size: var(--text-small);
10023
+ line-height: 20px;
10024
+ }
10025
+ .ui-fp-scale {
10026
+ display: inline-flex;
10027
+ align-items: center;
10028
+ gap: var(--space-2);
10029
+ }
10030
+ .ui-fp-bar {
10031
+ position: relative;
10032
+ display: inline-flex;
10033
+ width: 168px;
10034
+ height: 12px;
10035
+ border-radius: var(--radius-xs);
10036
+ }
10037
+ .ui-fp-bar > span:not(.ui-fp-tick) {
10038
+ flex: 1;
10039
+ }
10040
+ .ui-fp-bar > span:first-child {
10041
+ border-radius: var(--radius-xs) 0 0 var(--radius-xs);
10042
+ }
10043
+ .ui-fp-bar > span:nth-child(7) {
10044
+ border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
10045
+ }
10046
+ .ui-fp-tick {
10047
+ position: absolute;
10048
+ top: -4px;
10049
+ width: 2px;
10050
+ height: 20px;
10051
+ margin-left: -1px;
10052
+ }
10053
+ .ui-fp-tick.is-warning,
10054
+ .ui-fp-key.is-warning::before {
10055
+ background: var(--warning);
10056
+ }
10057
+ .ui-fp-tick.is-danger,
10058
+ .ui-fp-key.is-danger::before {
10059
+ background: var(--danger);
10060
+ }
10061
+ .ui-fp-key {
10062
+ display: inline-flex;
10063
+ align-items: center;
10064
+ gap: 6px;
10065
+ }
10066
+ .ui-fp-key::before {
10067
+ content: '';
10068
+ width: 2px;
10069
+ height: 14px;
10070
+ }
10071
+ .ui-fp-key.is-muted::before {
10072
+ width: 14px;
10073
+ border-radius: 3px;
10074
+ background: color-mix(in srgb, var(--heat-4) 40%, var(--surface));
10075
+ box-shadow: inset 0 0 0 1px var(--line);
10076
+ }
10077
+ .ui-fp-pill .ui-fp-unit {
10078
+ font-size: inherit;
10079
+ font-weight: inherit;
10080
+ }
9810
10081
  /* EventTimeline: newest first; time, kind icon (no fill), what happened. */
9811
10082
  .ui-events {
9812
10083
  margin: 0;
@@ -9936,6 +10207,9 @@ button.ui-md-link.is-row {
9936
10207
  .ui-console-top {
9937
10208
  grid-column: 1 / -1;
9938
10209
  display: flex;
10210
+ /* Never wider than the layout: what does not fit goes to a second line (the main view gives up the height). */
10211
+ flex-wrap: wrap;
10212
+ row-gap: var(--space-2);
9939
10213
  align-items: center;
9940
10214
  justify-content: space-between;
9941
10215
  gap: var(--space-4);
@@ -9954,6 +10228,11 @@ button.ui-md-link.is-row {
9954
10228
  gap: var(--space-3);
9955
10229
  min-width: 0;
9956
10230
  }
10231
+ .ui-console-end {
10232
+ flex-wrap: wrap;
10233
+ justify-content: flex-end;
10234
+ margin-left: auto;
10235
+ }
9957
10236
  .ui-console-title {
9958
10237
  margin: 0;
9959
10238
  font-size: inherit;
@@ -9967,7 +10246,9 @@ button.ui-md-link.is-row {
9967
10246
  }
9968
10247
  .ui-console-kpis {
9969
10248
  display: flex;
10249
+ flex-wrap: wrap;
9970
10250
  align-items: stretch;
10251
+ max-width: 100%;
9971
10252
  }
9972
10253
  .ui-console-content {
9973
10254
  display: contents;
@@ -9981,6 +10262,9 @@ button.ui-md-link.is-row {
9981
10262
  flex-direction: column;
9982
10263
  }
9983
10264
  .ui-console-main > * {
10265
+ /* Scroll containers are positioned, so visually hidden text inside them is clipped with them instead of making the
10266
+ page scroll. */
10267
+ position: relative;
9984
10268
  flex: 1 1 auto;
9985
10269
  min-height: 0;
9986
10270
  overflow: auto;
@@ -9989,6 +10273,7 @@ button.ui-md-link.is-row {
9989
10273
  flex-direction: column;
9990
10274
  }
9991
10275
  .ui-console-side {
10276
+ position: relative;
9992
10277
  grid-column: 2;
9993
10278
  grid-row: 2 / 4;
9994
10279
  min-height: 0;
@@ -10001,9 +10286,22 @@ button.ui-md-link.is-row {
10001
10286
  padding: 12px;
10002
10287
  }
10003
10288
  .ui-console-side > * {
10289
+ /* Side cards keep their own height; the panel scrolls when they do not fit. */
10004
10290
  flex: none;
10005
10291
  }
10292
+ /* An extra card that does not fit: laid out at the panel's width, out of sight and at no height, so it is measured
10293
+ again when the panel grows. */
10294
+ .ui-console-extra.is-out {
10295
+ position: absolute;
10296
+ top: 0;
10297
+ left: 12px;
10298
+ right: 12px;
10299
+ height: 0;
10300
+ overflow: hidden;
10301
+ visibility: hidden;
10302
+ }
10006
10303
  .ui-console-bottom {
10304
+ position: relative;
10007
10305
  grid-column: 1;
10008
10306
  grid-row: 3;
10009
10307
  min-width: 0;
@@ -10011,7 +10309,9 @@ button.ui-md-link.is-row {
10011
10309
  display: flex;
10012
10310
  flex-direction: column;
10013
10311
  }
10014
- /* Phones: one scrolling column, top bar first, then the main view, side cards, bottom row and extra cards. */
10312
+ /* Stacked (narrower than stackedBelow, 1100 px by default): one scrolling column. The top bar keeps the title, status,
10313
+ clock and full screen on its first line and puts every KPI on the next ones; the main view; the side cards side by
10314
+ side where there is room; the bottom row; the extra cards the same way as the side cards. */
10015
10315
  .ui-console.is-stacked {
10016
10316
  height: auto;
10017
10317
  min-height: 100dvh;
@@ -10023,21 +10323,30 @@ button.ui-md-link.is-row {
10023
10323
  height: auto;
10024
10324
  }
10025
10325
  .ui-console.is-stacked .ui-console-top {
10026
- flex-wrap: wrap;
10027
10326
  padding: var(--space-3) var(--space-4);
10028
10327
  }
10328
+ .ui-console.is-stacked .ui-console-start {
10329
+ margin-right: auto;
10330
+ }
10029
10331
  .ui-console.is-stacked .ui-console-end {
10030
- flex-wrap: wrap;
10031
- row-gap: var(--space-2);
10332
+ display: contents;
10032
10333
  }
10033
10334
  .ui-console.is-stacked .ui-console-kpis {
10034
10335
  order: 1;
10336
+ display: grid;
10337
+ grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
10338
+ gap: var(--space-2) var(--space-4);
10035
10339
  width: 100%;
10036
- overflow-x: auto;
10037
10340
  }
10038
10341
  .ui-console.is-stacked .ui-console-main {
10039
10342
  min-height: 320px;
10040
10343
  }
10344
+ .ui-console-cards {
10345
+ display: grid;
10346
+ grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
10347
+ align-items: start;
10348
+ gap: 12px;
10349
+ }
10041
10350
  .ui-table-copy.is-copied {
10042
10351
  color: var(--success-text);
10043
10352
  }