@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.21 → 2.2.0-next.22

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 (55) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +113 -56
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +49 -21
  4. package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
  5. package/dist/automation/automation-tank/automation-tank.js +2 -1
  6. package/dist/automation/automation-tank/automation-tank.js.map +1 -1
  7. package/dist/building-blocks/bar-horizontal/bar-horizontal.d.ts +4 -2
  8. package/dist/building-blocks/bar-horizontal/bar-horizontal.d.ts.map +1 -1
  9. package/dist/building-blocks/bar-horizontal/bar-horizontal.js +12 -6
  10. package/dist/building-blocks/bar-horizontal/bar-horizontal.js.map +1 -1
  11. package/dist/building-blocks/bar-vertical/bar-vertical.d.ts +4 -2
  12. package/dist/building-blocks/bar-vertical/bar-vertical.d.ts.map +1 -1
  13. package/dist/building-blocks/bar-vertical/bar-vertical.js +12 -6
  14. package/dist/building-blocks/bar-vertical/bar-vertical.js.map +1 -1
  15. package/dist/building-blocks/external-scale/external-scale.d.ts +21 -3
  16. package/dist/building-blocks/external-scale/external-scale.d.ts.map +1 -1
  17. package/dist/building-blocks/external-scale/external-scale.js +40 -17
  18. package/dist/building-blocks/external-scale/external-scale.js.map +1 -1
  19. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.d.ts +4 -2
  20. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.d.ts.map +1 -1
  21. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.js +14 -6
  22. package/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.js.map +1 -1
  23. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.d.ts +4 -2
  24. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.d.ts.map +1 -1
  25. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.js +14 -6
  26. package/dist/navigation-instruments/gauge-vertical/gauge-vertical.js.map +1 -1
  27. package/dist/svghelpers/advice-linear.d.ts +7 -0
  28. package/dist/svghelpers/advice-linear.d.ts.map +1 -1
  29. package/dist/svghelpers/advice-linear.js +14 -10
  30. package/dist/svghelpers/advice-linear.js.map +1 -1
  31. package/dist/svghelpers/advice-patterns.d.ts +2 -2
  32. package/dist/svghelpers/advice-patterns.d.ts.map +1 -1
  33. package/dist/svghelpers/advice-patterns.js +6 -4
  34. package/dist/svghelpers/advice-patterns.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/automation/automation-tank/automation-tank.ts +4 -0
  37. package/src/building-blocks/bar-horizontal/bar-horizontal-fixed-aspect.spec.ts +50 -0
  38. package/src/building-blocks/bar-horizontal/bar-horizontal.stories.ts +6 -0
  39. package/src/building-blocks/bar-horizontal/bar-horizontal.ts +22 -9
  40. package/src/building-blocks/bar-vertical/bar-vertical-dimensions.spec.ts +36 -0
  41. package/src/building-blocks/bar-vertical/bar-vertical-fixed-aspect.spec.ts +49 -0
  42. package/src/building-blocks/bar-vertical/bar-vertical.stories.ts +6 -0
  43. package/src/building-blocks/bar-vertical/bar-vertical.ts +22 -9
  44. package/src/building-blocks/external-scale/external-scale.spec.ts +151 -0
  45. package/src/building-blocks/external-scale/external-scale.stories.ts +6 -0
  46. package/src/building-blocks/external-scale/external-scale.ts +86 -40
  47. package/src/navigation-instruments/gauge-horizontal/gauge-horizontal.spec.ts +55 -0
  48. package/src/navigation-instruments/gauge-horizontal/gauge-horizontal.stories.ts +2 -0
  49. package/src/navigation-instruments/gauge-horizontal/gauge-horizontal.ts +24 -9
  50. package/src/navigation-instruments/gauge-trend/gauge-trend.stories.ts +25 -0
  51. package/src/navigation-instruments/gauge-vertical/gauge-vertical.spec.ts +55 -0
  52. package/src/navigation-instruments/gauge-vertical/gauge-vertical.stories.ts +2 -0
  53. package/src/navigation-instruments/gauge-vertical/gauge-vertical.ts +24 -9
  54. package/src/svghelpers/advice-linear.ts +25 -11
  55. package/src/svghelpers/advice-patterns.ts +13 -5
@@ -63797,19 +63797,24 @@
63797
63797
  },
63798
63798
  {
63799
63799
  "kind": "field",
63800
- "name": "_viewBoxThickness",
63800
+ "name": "_layoutConfig",
63801
63801
  "type": {
63802
- "text": "number"
63802
+ "text": "ExternalScaleLayoutConfig | undefined"
63803
63803
  },
63804
63804
  "privacy": "private",
63805
- "default": "0",
63806
- "description": "The drawing's height in viewBox units, kept from the last render for the scale measurement."
63805
+ "description": "The last render's layout inputs, for the scale measurement."
63806
+ },
63807
+ {
63808
+ "kind": "field",
63809
+ "name": "_thicknessAt",
63810
+ "privacy": "private",
63811
+ "description": "The drawing's height in viewBox units at a scale: the advice column is pixels, so it depends on it."
63807
63812
  },
63808
63813
  {
63809
63814
  "kind": "field",
63810
63815
  "name": "_resizeController",
63811
63816
  "privacy": "private",
63812
- "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; this._scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.horizontal, containerMainAxisSize: entry.contentRect.width, containerCrossAxisSize: entry.contentRect.height, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._viewBoxThickness, }); // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
63817
+ "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; this._scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.horizontal, containerMainAxisSize: entry.contentRect.width, containerCrossAxisSize: entry.contentRect.height, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._thicknessAt, }); // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
63813
63818
  },
63814
63819
  {
63815
63820
  "kind": "field",
@@ -65177,19 +65182,24 @@
65177
65182
  },
65178
65183
  {
65179
65184
  "kind": "field",
65180
- "name": "_viewBoxThickness",
65185
+ "name": "_layoutConfig",
65181
65186
  "type": {
65182
- "text": "number"
65187
+ "text": "ExternalScaleLayoutConfig | undefined"
65183
65188
  },
65184
65189
  "privacy": "private",
65185
- "default": "0",
65186
- "description": "The drawing's width in viewBox units, kept from the last render for the scale measurement."
65190
+ "description": "The last render's layout inputs, for the scale measurement."
65191
+ },
65192
+ {
65193
+ "kind": "field",
65194
+ "name": "_thicknessAt",
65195
+ "privacy": "private",
65196
+ "description": "The drawing's width in viewBox units at a scale: the advice column is pixels, so it depends on it."
65187
65197
  },
65188
65198
  {
65189
65199
  "kind": "field",
65190
65200
  "name": "_resizeController",
65191
65201
  "privacy": "private",
65192
- "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; this._scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.vertical, containerMainAxisSize: entry.contentRect.height, containerCrossAxisSize: entry.contentRect.width, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._viewBoxThickness, }); // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
65202
+ "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; this._scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.vertical, containerMainAxisSize: entry.contentRect.height, containerCrossAxisSize: entry.contentRect.width, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._thicknessAt, }); // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
65193
65203
  },
65194
65204
  {
65195
65205
  "kind": "field",
@@ -68414,7 +68424,7 @@
68414
68424
  {
68415
68425
  "name": "config",
68416
68426
  "type": {
68417
- "text": "Pick<\n ExternalScaleLayoutConfig,\n | 'hasBar'\n | 'hasScale'\n | 'labels'\n | 'labelThickness'\n | 'tickThickness'\n | 'scaleType'\n | 'hasAdvice'\n | 'hasAdviceIcon'\n | 'advicePosition'\n | 'hasSetpoint'\n >"
68427
+ "text": "Pick<\n ExternalScaleLayoutConfig,\n | 'hasBar'\n | 'hasScale'\n | 'labels'\n | 'labelThickness'\n | 'tickThickness'\n | 'scaleType'\n | 'hasAdvice'\n | 'hasAdviceIcon'\n | 'advicePosition'\n | 'hasSetpoint'\n | 'fixedAspectRatioScale'\n >"
68418
68428
  }
68419
68429
  }
68420
68430
  ],
@@ -116138,19 +116148,24 @@
116138
116148
  },
116139
116149
  {
116140
116150
  "kind": "field",
116141
- "name": "_viewBoxThickness",
116151
+ "name": "_layoutConfig",
116142
116152
  "type": {
116143
- "text": "number"
116153
+ "text": "ExternalScaleLayoutConfig | undefined"
116144
116154
  },
116145
116155
  "privacy": "private",
116146
- "default": "0",
116147
- "description": "The drawing's height in viewBox units, kept from the last render for the scale measurement."
116156
+ "description": "The last render's layout inputs, for the scale measurement."
116157
+ },
116158
+ {
116159
+ "kind": "field",
116160
+ "name": "_thicknessAt",
116161
+ "privacy": "private",
116162
+ "description": "The drawing's height in viewBox units at a scale: the advice column is pixels, so it depends on it."
116148
116163
  },
116149
116164
  {
116150
116165
  "kind": "field",
116151
116166
  "name": "_resizeController",
116152
116167
  "privacy": "private",
116153
- "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; const scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.horizontal, containerMainAxisSize: entry.contentRect.width, containerCrossAxisSize: entry.contentRect.height, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._viewBoxThickness, }); // Guard against zero-sized containers, but allow fractional scales < 1 this._scale = scale > 0 ? scale : 1; // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
116168
+ "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; const scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.horizontal, containerMainAxisSize: entry.contentRect.width, containerCrossAxisSize: entry.contentRect.height, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._thicknessAt, }); // Guard against zero-sized containers, but allow fractional scales < 1 this._scale = scale > 0 ? scale : 1; // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
116154
116169
  },
116155
116170
  {
116156
116171
  "kind": "field",
@@ -123031,19 +123046,24 @@
123031
123046
  },
123032
123047
  {
123033
123048
  "kind": "field",
123034
- "name": "_viewBoxThickness",
123049
+ "name": "_layoutConfig",
123035
123050
  "type": {
123036
- "text": "number"
123051
+ "text": "ExternalScaleLayoutConfig | undefined"
123037
123052
  },
123038
123053
  "privacy": "private",
123039
- "default": "0",
123040
- "description": "The drawing's width in viewBox units, kept from the last render for the scale measurement."
123054
+ "description": "The last render's layout inputs, for the scale measurement."
123055
+ },
123056
+ {
123057
+ "kind": "field",
123058
+ "name": "_thicknessAt",
123059
+ "privacy": "private",
123060
+ "description": "The drawing's width in viewBox units at a scale: the advice column is pixels, so it depends on it."
123041
123061
  },
123042
123062
  {
123043
123063
  "kind": "field",
123044
123064
  "name": "_resizeController",
123045
123065
  "privacy": "private",
123046
- "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; const scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.vertical, containerMainAxisSize: entry.contentRect.height, containerCrossAxisSize: entry.contentRect.width, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._viewBoxThickness, }); // Guard against zero-sized containers, but allow fractional scales < 1 this._scale = scale > 0 ? scale : 1; // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
123066
+ "default": "new ResizeController(this, { callback: (entries) => { if (!this.fixedAspectRatio) return; const entry = entries[0]; if (!entry) return; const scale = computeFixedAspectRatioScale({ orientation: ExternalScaleOrientation.vertical, containerMainAxisSize: entry.contentRect.height, containerCrossAxisSize: entry.contentRect.width, scaleReferenceSize: this.scaleReferenceSize, viewBoxThickness: this._thicknessAt, }); // Guard against zero-sized containers, but allow fractional scales < 1 this._scale = scale > 0 ? scale : 1; // Report scaled dimensions to parent chart this.reportDimensions(); }, })"
123047
123067
  },
123048
123068
  {
123049
123069
  "kind": "field",
@@ -146272,6 +146292,10 @@
146272
146292
  {
146273
146293
  "name": "mirrored",
146274
146294
  "default": "false"
146295
+ },
146296
+ {
146297
+ "name": "unitsPerPx",
146298
+ "default": "1"
146275
146299
  }
146276
146300
  ],
146277
146301
  "description": "Parallel 45° lines from top-left to bottom-right, `width` units wide on\nthe design's pitch; a hairline when `width` is\nADVICE_HAIRLINE_WIDTH. The line runs corner to corner of a square\ntile whose side is the pitch along the axis, with the two half lines at the\nopposite corners completing the neighbours."
@@ -146300,6 +146324,10 @@
146300
146324
  {
146301
146325
  "name": "mirrored",
146302
146326
  "default": "false"
146327
+ },
146328
+ {
146329
+ "name": "unitsPerPx",
146330
+ "default": "1"
146303
146331
  }
146304
146332
  ],
146305
146333
  "description": "The exclusion hatch: the stripe tile as a hairline."
@@ -1 +1 @@
1
- {"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGP,cAAc,EACf,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AACjD,OAAO,EACL,6BAA6B,EAG9B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CAA8C,CAAC;AACtD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,wCAAwC,CAAC;AAChD,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,O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I;cAOlB,OAAO,CACxB,OAAO,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAC9C,IAAI;IASP,OAAO,CAAC,wBAAwB;IA8BhC,SAAS,IAAI,kBAAkB,GAAG,OAAO,OAAO;IA0BhD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IA4I5B,OAAO,CAAC,SAAS;IAaR,UAAU,CAAC,OAAO,EAAE,cAAc;IAKlC,MAAM;IAqYf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
1
+ {"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGP,cAAc,EACf,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AACjD,OAAO,EACL,6BAA6B,EAG9B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CAA8C,CAAC;AACtD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,wCAAwC,CAAC;AAChD,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,sBAAsB,E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,CAAC,GAC9C,IAAI;IASP,OAAO,CAAC,wBAAwB;IA8BhC,SAAS,IAAI,kBAAkB,GAAG,OAAO,OAAO;IA0BhD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IA4I5B,OAAO,CAAC,SAAS;IAaR,UAAU,CAAC,OAAO,EAAE,cAAc;IAKlC,MAAM;IAyYf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
@@ -467,7 +467,8 @@ var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixi
467
467
  hasAdvice: this.hasAdvice,
468
468
  hasAdviceIcon: this.hasAdvice && !!this.advices?.some((a) => a.showIcon),
469
469
  advicePosition: AdvicePosition.inner,
470
- hasSetpoint: hasSetpointMarker
470
+ hasSetpoint: hasSetpointMarker,
471
+ fixedAspectRatioScale: Math.max(1, this._cellHeight) / SCALE_REFERENCE_SIZE
471
472
  });
472
473
  const safeCellHeight = Math.max(1, this._cellHeight);
473
474
  const viewBoxCross = this._cellWidth * SCALE_REFERENCE_SIZE / safeCellHeight;
@@ -1 +1 @@
1
- {"version":3,"file":"automation-tank.js","names":["compentStyle","_decorate"],"sources":["../../../src/automation/automation-tank/automation-tank.ts"],"sourcesContent":["import {\n HTMLTemplateResult,\n LitElement,\n html,\n nothing,\n svg,\n unsafeCSS,\n PropertyValues,\n} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport compentStyle from './automation-tank.css?inline';\nimport {LineMedium} from '../index.js';\nimport '../automation-badge/automation-badge.js';\nimport {\n AutomationBadgeSymbolOverride,\n automationBadgeType,\n currentBadgeSymbolOverride,\n} from '../automation-button/badge-symbols.js';\nimport {BadgeSettingsController} from '../automation-button/badge-settings-controller.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\n\nimport '../../icons/icon-chevron-double-up-google.js';\nimport '../../icons/icon-chevron-up-google.js';\nimport '../../icons/icon-chevron-double-down-google.js';\nimport '../../icons/icon-chevron-down-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../icons/icon-off.js';\nimport '../../icons/icon-tank.js';\nimport '../../icons/icon-energy-battery.js';\nimport '../../navigation-instruments/gauge-trend/gauge-trend.js';\nimport '../../building-blocks/bar-vertical/bar-vertical.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {Priority} from '../../navigation-instruments/types.js';\nimport {\n ObcAlertFrameMode,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport type {ChartLineDataItem} from '../../building-blocks/chart-line/chart-line-base.js';\nimport {AdviceMixin, syncAdviceAlias} from '../../svghelpers/advice-mixin.js';\nimport type {AdviceInput} from '../../svghelpers/advice.js';\nimport {\n AdvicePosition,\n ExternalScaleSide,\n FillMode,\n ScaleType,\n computeOutsideBarThickness,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport {TankPositioning} from './tank-positioning.js';\nimport {clamp} from '../../svghelpers/math.js';\n\nexport enum TankTrend {\n fastRising = 'fast-rising',\n rising = 'rising',\n stable = 'stable',\n falling = 'falling',\n fastFalling = 'fast-falling',\n closed = 'closed',\n}\n\nexport enum TankType {\n generic = 'generic',\n atmospheric = 'atmospheric',\n pressurized = 'pressurized',\n battery = 'battery',\n}\n\nexport enum TankOrientation {\n vertical = 'vertical',\n horizontal = 'horizontal',\n}\n\nexport {TankPositioning};\n\nexport enum TankChartMode {\n /** Static fill bar driven by `value` / `max` (default, backward compatible). */\n bar = 'bar',\n /** Embedded `obc-gauge-trend` line/area chart, no side bar. */\n graph = 'graph',\n /** Embedded `obc-gauge-trend` line/area chart with a side bar. */\n graphAndBar = 'graph-and-bar',\n}\n\n/**\n *\n *\n * Setpoint properties are inherited from {@link SetpointMixin}\n * (`setpoint`, `newSetpoint`, `touching`, `atSetpoint`, `autoAtSetpoint`,\n * `autoAtSetpointDeadband`, `setpointAtZeroDeadband`, `setpointOverride`,\n * `animateSetpoint`) and are forwarded to the embedded chart: the SVG bar in\n * `bar` mode, or `obc-gauge-trend` in the graph modes (where the marker\n * renders on the side bar, i.e. `graph-and-bar`). Values share the tank's\n * `value` / `max` scale.\n *\n * @property positioning - Host positioning model — see `TankPositioning` for details. Defaults to\n * `button` (host fills parent container, 100% × 100%, falling back to the\n * design aspect ratio on any axis the parent leaves indefinite, no anchor\n * offset). Set to `point` for the legacy P&ID canvas mode (fixed default\n * dimensions + top-center anchor offset).\n * @property activated - Enables the activated background color, used to indicate that the tank is\n * activated/selected. Requires an interactive tank — the `noClick` mixin\n * variant used when `clickable` is `false` only paints the enabled state, so\n * a non-clickable tank ignores this (matching `obc-elevated-card`).\n * @availableWhen activated clickable==true\n * @property chartData - Time-series data points for the embedded gauge-trend (graph modes only).\n * @property priority - Priority hint forwarded to child charts (regular | enhanced).\n * @property advice - Advice overlays. Forwarded to the embedded `obc-gauge-trend` in\n * `graph` / `graph-and-bar` modes, or rendered as pills over the static\n * bar in `bar` mode.\n * @property hasAdvice - Show advice overlays (works in all `chartMode` variants).\n * @property alert - Show an `<obc-alert-frame>` overlay around the bordered tank area (the\n * `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven\n * properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).\n * The ring overlays `.halo` only, so the tag and readout that sit outside\n * the halo in compact / static layouts remain unaffected.\n * @property alertFrameType - Shape of the alert frame.\n * @availableWhen alertFrameType alert==true\n * @property alertFrameThickness - Thickness of the alert frame.\n * @availableWhen alertFrameThickness alert==true\n * @property alertFrameStatus - Alert status the frame is coloured for.\n * @availableWhen alertFrameStatus alert==true\n * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,\n * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.\n * @availableWhen alertFrameMode alert==true\n * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @property showAlertIcon - Shows the slotted alert icon inside the frame.\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property showTrendSymbol - Show the trend chevron / off icon next to the percent readout. Default\n * `true` preserves existing behavior. Set to `false` to hide the trend\n * indicator in both compact and non-compact readouts — useful when the\n * trend is not meaningful for a given tank, or when the consumer wants\n * to keep the readout compact. Has no effect in `static` mode, which\n * renders the tank's capacity (`max` + `unit`) instead of a percent and\n * intentionally omits the trend indicator (a static tank represents\n * \"device present, current state unknown\"). `attribute: false` per the\n * repo's positive-default-true boolean convention.\n * @property percentFractionDigits - Number of fraction digits used to format the percent readout in the\n * non-compact (regular) layout. Defaults to `0` (integer percent). The\n * compact layout always renders integer percent to keep its fixed-width\n * footprint stable. The static layout renders capacity (`max` + `unit`)\n * rather than percent, so this property has no effect there — pass a\n * pre-formatted value through the `max-value` slot if fractional\n * precision is needed (see the `WithFractionDigits` story).\n * @property static - Display-only variant for a device whose current state is unknown: the\n * chart cell is hidden, the bordered area is filled with\n * `--container-section-color` and the readout is centred inside it. Always\n * compact-sized, so it overrides `compact`, and it renders as a\n * `<div role=\"img\">` — outside the tab order and not announced as a control.\n * @property clickable - Whether the tank is interactive. `true` renders the root as a `<button>`\n * with the flat-mixin interaction surface; `false` renders a `<div>` that\n * keeps the resting appearance (the mixin's `noClick` variant) but loses\n * hover, pressed and focus-visible and leaves the tab order. Everything\n * else — chart, badges, readout, tag and the alert frame — still renders,\n * so use it for a display-only tank that shows live data. No effect on a\n * `static` tank, which is already non-interactive.\n * @property chartMode - Chart cell rendering mode: `bar` (default) is a static fill bar driven by\n * `value` and `max`, `graph` embeds an `obc-gauge-trend` line/area chart,\n * and `graphAndBar` embeds one with an integrated side bar.\n * @property hasGraphIcon - Overlays a decorative icon centred on the chart cell — the energy-battery\n * icon for a battery tank, the generic tank icon otherwise. Works in every\n * `chartMode` and both orientations; the icon sits in a fixed CSS layer\n * above the bar or graph and is silhouetted so it stays legible on any\n * fill, and its size follows the ambient `obc-component-size-*` class.\n * @property badgeControl - Control badge rendered in the `badges` cell. A non-`None` value renders an\n * `<obc-automation-badge>` as fallback content for the `badges` slot, so any\n * slotted content wins. The cell orders the four badges control, alert,\n * interlock, commandLocked, left to right.\n * @property badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.\n * @slot badges - Custom badges to be displayed in the badge area.\n * @slot tag - Text or element for the tank's tag/label.\n * @slot readout - Replaces the entire readout content block.\n * @slot max-value - Content for the capacity value.\n * @slot unit - Content for the unit of measurement.\n * @slot current-value - Content for the current level value.\n * @slot rich - Detail rows below the main readout, shown in the regular\n * (non-compact, non-static) layout. Slot an `<obc-readout-list>` of\n * `<obc-readout-list-item>` rows — it owns the row typography and cross-row\n * column alignment; the tank renders a divider above it automatically when\n * the slot is filled.\n * @slot alert-icon - Custom icon for the alert frame.\n * @slot alert-label - Label for the alert frame.\n * @slot alert-timer - Timer for the alert frame.\n * @fires click - Fired when the tank is clicked. When `clickable` is `false` the tank renders a plain `<div>`, and in `static` mode a `<div role=\"img\">`, instead of a `<button>` — in both cases it is not focusable or keyboard-activatable; pointer clicks still reach the host.\n * @beta\n */\n@customElement('obc-automation-tank')\nexport class ObcAutomationTank extends AdviceMixin(SetpointMixin(LitElement)) {\n @property({type: String}) medium: LineMedium = LineMedium.water;\n @property({type: Number}) value: number = 0;\n @property({type: Number}) max: number = 100;\n @property({type: String}) trend: TankTrend = TankTrend.stable;\n @property({type: String, reflect: true}) type: TankType = TankType.generic;\n @property({type: String, reflect: true}) orientation: TankOrientation =\n TankOrientation.vertical;\n @property({type: Boolean, reflect: true}) compact: boolean = false;\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.button;\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: Boolean, attribute: false}) clickable: boolean = true;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: String}) tag: string = '';\n\n @property({type: String, reflect: true, attribute: 'chart-mode'})\n chartMode: TankChartMode = TankChartMode.bar;\n\n @property({type: Array, attribute: false})\n chartData: ChartLineDataItem[] = [];\n\n @property({type: String}) priority: Priority = Priority.regular;\n\n /** @deprecated Alias of `advices`. Ranges in tank units. */\n @property({type: Array, attribute: false}) advice?: AdviceInput[];\n\n @property({type: Boolean}) hasAdvice = false;\n\n @property({type: Boolean, attribute: false}) hasGraphIcon = false;\n\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n @property({type: Boolean, attribute: false}) showTrendSymbol: boolean = true;\n\n @property({type: Number}) percentFractionDigits: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({attribute: false}) badgeSymbolOverride:\n AutomationBadgeSymbolOverride | undefined = undefined;\n\n constructor() {\n super();\n // Registers itself on the host; nothing else holds it.\n new BadgeSettingsController(this);\n }\n\n @state() private _cellWidth = 0;\n @state() private _cellHeight = 0;\n /**\n * Tracks whether the `badges` and `tag` slots have assigned content. Used\n * in compact/static mode to collapse empty cells to 0px so the tank-frame\n * can absorb the freed space (per spec: \"if there are no badges it would\n * grow upward; if there are no readout or tags it would grow downward\").\n * Non-compact (regular) layout keeps its grid-based reserved rows.\n */\n @state() private _hasBadges = false;\n @state() private _hasTagSlot = false;\n /**\n * Tracks whether the `rich` slot has assigned content, so the regular\n * (non-compact) layout only draws the rich divider when a consumer has\n * slotted detail rows (canonically an `<obc-readout-list>`). Mirrors\n * `_hasBadges` / `_hasTagSlot`.\n */\n @state() private _hasRichSlot = false;\n private _chartResizeObserver?: ResizeObserver;\n private _observedCell?: Element;\n\n private get isCompact(): boolean {\n return this.compact || this.static;\n }\n\n private get _usesGaugeTrend(): boolean {\n return (\n this.chartMode === TankChartMode.graph ||\n this.chartMode === TankChartMode.graphAndBar\n );\n }\n\n private _onBadgesSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasBadges = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onTagSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasTagSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onRichSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasRichSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._chartResizeObserver?.disconnect();\n this._chartResizeObserver = undefined;\n this._observedCell = undefined;\n }\n\n protected override updated(\n changed: Map<string | number | symbol, unknown>\n ): void {\n super.updated(changed);\n // The chart cell element is recreated when `chartMode` moves between bar\n // and graph, and appears or disappears with `static` and `compact`, so the\n // observer is re-attached to the current `.bar-container`. `priority`\n // needs no forwarding — children take it through template bindings.\n this._syncChartResizeObserver();\n }\n\n private _syncChartResizeObserver(): void {\n // Observe the bar-container in BOTH bar mode and graph modes — the bar\n // mode now renders an SVG `obc-bar-vertical` / `-horizontal` that needs\n // measured pixel dimensions for its viewBox and barThickness.\n const cell = this.renderRoot.querySelector('.bar-container');\n if (!cell) {\n if (this._chartResizeObserver) {\n this._chartResizeObserver.disconnect();\n this._observedCell = undefined;\n }\n return;\n }\n if (cell === this._observedCell) return;\n\n if (!this._chartResizeObserver) {\n this._chartResizeObserver = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (!entry) return;\n const w = Math.round(entry.contentRect.width);\n const h = Math.round(entry.contentRect.height);\n if (w !== this._cellWidth) this._cellWidth = w;\n if (h !== this._cellHeight) this._cellHeight = h;\n });\n } else {\n this._chartResizeObserver.disconnect();\n }\n this._chartResizeObserver.observe(cell);\n this._observedCell = cell;\n }\n\n trendIcon(): HTMLTemplateResult | typeof nothing {\n if (this.trend === TankTrend.fastRising) {\n return html`<obi-chevron-double-up-google\n class=\"trend-icon\"\n ></obi-chevron-double-up-google>`;\n } else if (this.trend === TankTrend.rising) {\n return html`<obi-chevron-up-google\n class=\"trend-icon\"\n ></obi-chevron-up-google>`;\n } else if (this.trend === TankTrend.fastFalling) {\n return html`<obi-chevron-double-down-google\n class=\"trend-icon\"\n ></obi-chevron-double-down-google>`;\n } else if (this.trend === TankTrend.falling) {\n return html`<obi-chevron-down-google\n class=\"trend-icon\"\n ></obi-chevron-down-google>`;\n } else if (this.trend === TankTrend.closed) {\n return html`<obi-off class=\"trend-icon\"></obi-off>`;\n } else {\n return html`<obi-arrow-right-google\n class=\"trend-icon\"\n ></obi-arrow-right-google>`;\n }\n }\n\n /**\n * Atmospheric cap, 3-piece (corner-start / stretchable middle arc / corner-end).\n * Each piece draws its own fill (closed) and stroke (open) so adjacent pieces\n * abut without a visible vertical seam line. Coordinates are derived from the\n * Figma 248x14 path; corners stay 12px wide while the middle arc stretches.\n * Position (start vs end) and orientation flipping are handled in CSS.\n *\n * Horizontal orientation reuses the same path data but rotates each piece\n * via an inner `<g transform=\"translate(0 H) rotate(-90)\">`, mapping the\n * source coord (x, y) to (y, H - x). The viewBox is swapped accordingly:\n * corner: 12x14 -> 14x12 (H=12)\n * middle: 224x14 -> 14x224 (H=224)\n * Cap-end (right side in horizontal) is mirrored via CSS scaleX(-1).\n */\n private renderAtmosphericCap(side: 'start' | 'end'): HTMLTemplateResult {\n const isHorizontal = this.orientation === TankOrientation.horizontal;\n\n // Curve Y-values are scaled proportionally from the 18/12-tall Figma\n // reference, so the corners stay continuous at both thicknesses\n // (automation-components.md § Tank rendering).\n let cornerStartFill: string;\n let cornerStartStroke: string;\n let midFill: string;\n let midStroke: string;\n let cornerEndFill: string;\n let cornerEndStroke: string;\n let cornerW: number;\n let capH: number;\n let midW: number;\n\n if (this.isCompact) {\n cornerW = 7;\n capH = 10;\n midW = 149;\n cornerStartFill =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10 L 6.374 10 Z';\n cornerStartStroke =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10';\n midFill =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214 L 149.252 10 L 0 10 Z';\n midStroke =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214';\n cornerEndFill =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10 L 0 10 Z';\n cornerEndStroke =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10';\n } else {\n cornerW = 12;\n capH = 14;\n midW = 224;\n cornerStartFill =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14 L 12 14 Z';\n // Curve and outer edge only: the seam with `.middle` is a 1px CSS\n // `border-top` so it pixel-snaps like the pressurized cap's border,\n // where an SVG stroke renders thinner and blurrier.\n cornerStartStroke =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14';\n midFill =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837 L 224 14 L 0 14 Z';\n midStroke =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837';\n cornerEndFill =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14 L 0 14 Z';\n cornerEndStroke =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14';\n }\n\n if (isHorizontal) {\n // Rotate vertical paths -90deg into a `capH`-wide column. Source coord\n // (x, y) maps to (y, cornerW - x) for corners and (y, midW - x) for mid.\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMax meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${capH} ${midW}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${midW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMin meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n </g>\n `}\n </svg>\n </div>\n `;\n }\n\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMaxYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${midW} ${capH}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMinYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n `}\n </svg>\n </div>\n `;\n }\n\n private renderCap(side: 'start' | 'end'): HTMLTemplateResult | null {\n if (this.type === TankType.generic) return null;\n if (this.type === TankType.battery && side === 'end') return null;\n if (this.type === TankType.atmospheric) {\n return this.renderAtmosphericCap(side);\n }\n if (this.type === TankType.pressurized) {\n return html`<div class=\"cap cap-pressurized cap-${side}\"></div>`;\n }\n // battery, start only\n return html`<div class=\"cap cap-battery cap-${side}\"></div>`;\n }\n\n override willUpdate(changed: PropertyValues) {\n super.willUpdate(changed);\n syncAdviceAlias(this, this.advice);\n }\n\n override render() {\n const safeMax = this.max > 0 ? this.max : 1;\n const percent = clamp((this.value / safeMax) * 100, 0, 100);\n const isCompact = this.isCompact;\n\n // Compact and static collapse their empty cells so the tank frame absorbs\n // the space; non-compact cells sit in the inner `.grid` and always reserve\n // their min-content rows (automation-components.md § Tank rendering).\n const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);\n const controlBadge = automationBadgeType(\n 'control',\n this.badgeControl,\n symbolOverride\n );\n const alertBadge = automationBadgeType(\n 'alert',\n this.badgeAlert,\n symbolOverride\n );\n const interlockBadge = automationBadgeType(\n 'interlock',\n this.badgeInterlock,\n symbolOverride\n );\n const commandLockedBadge = automationBadgeType(\n 'commandLocked',\n this.badgeCommandLocked,\n symbolOverride\n );\n const hasEnumBadges =\n controlBadge !== null ||\n alertBadge !== null ||\n interlockBadge !== null ||\n commandLockedBadge !== null;\n\n const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges;\n const tagHidden = isCompact && !this._hasTagSlot && !this.tag;\n\n const badgesCell = html`\n <div class=\"badges\" ?hidden=${badgesHidden}>\n <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}>\n ${\n controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </div>\n `;\n const tagCell = html`\n <div class=\"tag\" ?hidden=${tagHidden}>\n <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot>\n </div>\n `;\n // Static shows capacity rather than a percent: the state is unknown, so a\n // reading would be a claim the tank cannot make, and the trend icon goes\n // for the same reason (automation-components.md § Tank rendering).\n const readoutCell = this.static\n ? html`\n <div class=\"readout readout-compact readout-static\">\n <slot name=\"readout\">\n <slot name=\"max-value\">${this.max.toFixed(0)}</slot>\n <slot name=\"unit\">m<sup>3</sup></slot>\n </slot>\n </div>\n `\n : isCompact\n ? html`\n <div class=\"readout readout-compact\">\n <slot name=\"readout\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <span class=\"percent\"\n >${percent.toFixed(0)}<span class=\"percent-symbol\"\n >%</span\n ></span\n >\n </slot>\n </div>\n `\n : html`\n <div class=\"readout\">\n <slot name=\"readout\">\n <div class=\"header\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <div class=\"percent\">\n ${percent.toFixed(this.percentFractionDigits)}<span\n class=\"percent-symbol\"\n >%</span\n >\n </div>\n </div>\n <div class=\"value\">\n <div class=\"current\">\n <slot name=\"current-value\" class=\"current-value\"\n >${this.value.toFixed(0)}</slot\n ><span class=\"divider\">/</span>\n </div>\n <div class=\"max\">\n <slot class=\"max-value\" name=\"max-value\"\n >${this.max.toFixed(0)}</slot\n >\n <slot class=\"unit\" name=\"unit\">m<sup>3</sup></slot>\n </div>\n </div>\n <div class=\"rich-divider\" ?hidden=${!this._hasRichSlot}></div>\n <slot name=\"rich\" @slotchange=${this._onRichSlotChange}></slot>\n </slot>\n </div>\n `;\n // Two stacked icons form the silhouette `obc-automation-button` uses: the\n // back layer paints the inherited SVG `stroke` halo, the front layer the\n // fill through `color` (automation-components.md § Tank rendering).\n const graphIconClasses = classMap({\n 'graph-icon': true,\n 'priority-enhanced': this.priority === Priority.enhanced,\n });\n const graphIconOverlay =\n this.type === TankType.battery\n ? html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-energy-battery\n class=\"graph-icon-stroke\"\n ></obi-energy-battery>\n <obi-energy-battery class=\"graph-icon-fill\"></obi-energy-battery>\n </div>\n `\n : html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-tank class=\"graph-icon-stroke\"></obi-tank>\n <obi-tank class=\"graph-icon-fill\"></obi-tank>\n </div>\n `;\n // Alert-frame overlay. Mirrors the `obc-automation-button` pattern\n // exactly so consumer API is identical. Placed inside `.halo` so the\n // ring hugs only the bordered tank area; `belowHalo` (tag / readout) is\n // unaffected. `.halo` is `position: relative` (see CSS) to anchor the\n // absolutely-positioned alert-frame.\n const alertFrameOverlay = this.alert\n ? html`<obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .mode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : null;\n let chartCell: HTMLTemplateResult;\n if (this._usesGaugeTrend) {\n // gauge-trend reads these as an aspect-ratio reference and derives its\n // own height from its wrapper. Rendering waits for both measurements —\n // a zero divides in that maths on first paint.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n chartCell = html`\n <div class=\"bar-container chart-cell\">\n ${\n hasSize\n ? html`<obc-gauge-trend\n .data=${this.chartData}\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .hasBar=${this.chartMode === TankChartMode.graphAndBar}\n .hasScale=${false}\n .hasLabelPadding=${false}\n .chartFill=${true}\n .hasAdvice=${this.hasAdvice}\n .advices=${this.advices}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .width=${this._cellWidth}\n .height=${this._cellHeight}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-gauge-trend>`\n : null\n }\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n } else {\n // The shared SVG bar, the renderer gauge-trend uses for its side bar, so\n // advice overlays behave the same in all three chart modes; its fill\n // follows the instrument palette, not the tank's `medium` colour.\n // TODO(#1284): carry the medium colour through, and fold this branch\n // into gauge-trend once it offers a bar-only layout at this size.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n // The inner bar is always portrait and mirrors gauge-trend's\n // `fixedAspectRatio` sizing, so fixed-pixel SVG primitives keep one\n // on-screen size; `barThickness` and the cross-axis size are therefore\n // in viewBox units (automation-components.md § Tank rendering).\n const SCALE_REFERENCE_SIZE = 384;\n // The bar's viewBox cross-axis includes an outside-bar band for advice\n // pills, icons and/or the setpoint marker (see computeExternalScaleLayout).\n // Subtract the same band the bar will reserve so total viewBox width\n // still equals viewBoxCross and the meet-scale fills the cell exactly.\n const hasSetpointMarker =\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined;\n const outsideBarReserveVb = computeOutsideBarThickness({\n hasBar: true,\n hasScale: false,\n labels: false,\n labelThickness: 0,\n tickThickness: 0,\n scaleType: ScaleType.regular,\n hasAdvice: this.hasAdvice,\n hasAdviceIcon:\n this.hasAdvice && !!this.advices?.some((a) => a.showIcon),\n advicePosition: AdvicePosition.inner,\n hasSetpoint: hasSetpointMarker,\n });\n const safeCellHeight = Math.max(1, this._cellHeight);\n const viewBoxCross =\n (this._cellWidth * SCALE_REFERENCE_SIZE) / safeCellHeight;\n const barThickness = Math.max(0, viewBoxCross - outsideBarReserveVb);\n // `tint` is locked in for tank bar mode: it draws a fill from 0 to\n // value plus a small marker at the value position, which mirrors the\n // legacy CSS bar's \"fill + top border at value\" visual idiom.\n const barWrapper = html`<obc-bar-vertical\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .height=${this._cellHeight}\n .fixedAspectRatio=${true}\n .scaleReferenceSize=${SCALE_REFERENCE_SIZE}\n .paddingTop=${0}\n .paddingBottom=${0}\n .side=${ExternalScaleSide.right}\n .hasBar=${true}\n .hasScale=${false}\n .showLabels=${false}\n .barThickness=${barThickness}\n .fillMode=${FillMode.tint}\n .instrumentMode=${true}\n .borderRadius=${2}\n .advices=${this.hasAdvice ? this.advices : []}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .advicePosition=${AdvicePosition.inner}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-bar-vertical>`;\n chartCell = html`\n <div class=\"bar-container bar-cell\">\n ${hasSize ? barWrapper : null}\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n }\n\n const frameClasses = classMap({\n 'tank-frame': true,\n [`type-${this.type}`]: true,\n [`orientation-${this.orientation}`]: true,\n [this.medium]: true,\n compact: isCompact,\n static: this.static,\n });\n\n let middleContents: HTMLTemplateResult;\n if (this.static) {\n middleContents = html`<div class=\"static-readout\">${readoutCell}</div>`;\n } else if (this.compact) {\n middleContents = chartCell;\n } else {\n middleContents = html`<div class=\"grid\">\n ${tagCell}${badgesCell}${readoutCell}${chartCell}\n </div>`;\n }\n\n const tankFrame = html`\n <div class=${frameClasses}>\n ${this.renderCap('start')}\n <div class=\"middle\">${middleContents}</div>\n ${this.renderCap('end')}\n </div>\n `;\n\n // One interactive element: the flat mixin paints `.halo` through\n // `visibleWrapperClass` so the surround hugs the bordered area only, and\n // the alert-frame overlay is its last child so the ring covers every cell\n // (automation-components.md § Tank rendering).\n let haloContents: HTMLTemplateResult;\n if (this.static) {\n haloContents = html`${badgesCell}${tankFrame}${tagCell}`;\n } else if (this.compact) {\n haloContents = html`${badgesCell}${tankFrame}${readoutCell}${tagCell}`;\n } else {\n haloContents = tankFrame;\n }\n const halo = html`\n <div class=\"halo\">${haloContents}${alertFrameOverlay}</div>\n `;\n\n // Both classes sit on `.root` so the mixin paints `.halo`: `activated`\n // like its hover and pressed states, `clickable` choosing between the\n // six-state variant and the resting-only `noClick` one\n // (automation-components.md § Tank rendering).\n const isClickable = this.clickable && !this.static;\n const rootClasses = classMap({\n root: true,\n activated: this.activated,\n clickable: isClickable,\n });\n\n // The live region stays on all three root shapes, so an `alert` label is\n // announced whatever the interactivity (automation-components.md § Tank\n // rendering).\n // TODO(a11y): the rest of the automation family lacks the live region;\n // consolidate when alert support moves into a shared mixin.\n if (this.static) {\n return html`<div\n class=${rootClasses}\n role=\"img\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n if (!isClickable) {\n return html`<div\n class=${rootClasses}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n return html`<button\n class=${rootClasses}\n type=\"button\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </button>`;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-tank': ObcAutomationTank;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,gBAAA;CACA,UAAA,YAAA;CACA,UAAA,YAAA;CACA,UAAA,aAAA;CACA,UAAA,iBAAA;CACA,UAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,aAAA;CACA,SAAA,iBAAA;CACA,SAAA,iBAAA;CACA,SAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,cAAA;CACA,gBAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAIA,IAAY,gBAAL,yBAAA,eAAA;;CAEL,cAAA,SAAA;;CAEA,cAAA,WAAA;;CAEA,cAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;AA0GO,IAAM,oBAAN,MAAM,0BAA0B,YAAY,cAAc,UAAU,CAAC,CAAC,CAAC;CA2D5E,cAAc;EACZ,MAAM;EA3DuC,K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AA,yBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,gBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,cAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,kBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,sBAAA,KAAA,CAAA;AAGvBA,WAAA,CAAA,SAAS,EAAC,WAAW,MAAK,CAAC,CAAA,GAAA,kBAAA,WAAA,uBAAA,KAAA,CAAA;AAS3BA,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,cAAA,KAAA,CAAA;AACNA,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,eAAA,KAAA,CAAA;AAQNA,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,cAAA,KAAA,CAAA;AACNA,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,eAAA,KAAA,CAAA;AAONA,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,gBAAA,KAAA,CAAA;AAnFR,oBAAAA,WAAA,CAAA,cAAc,qBAAqB,CAAA,GAAA,iBAAA"}
1
+ {"version":3,"file":"automation-tank.js","names":["compentStyle","_decorate"],"sources":["../../../src/automation/automation-tank/automation-tank.ts"],"sourcesContent":["import {\n HTMLTemplateResult,\n LitElement,\n html,\n nothing,\n svg,\n unsafeCSS,\n PropertyValues,\n} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport compentStyle from './automation-tank.css?inline';\nimport {LineMedium} from '../index.js';\nimport '../automation-badge/automation-badge.js';\nimport {\n AutomationBadgeSymbolOverride,\n automationBadgeType,\n currentBadgeSymbolOverride,\n} from '../automation-button/badge-symbols.js';\nimport {BadgeSettingsController} from '../automation-button/badge-settings-controller.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\n\nimport '../../icons/icon-chevron-double-up-google.js';\nimport '../../icons/icon-chevron-up-google.js';\nimport '../../icons/icon-chevron-double-down-google.js';\nimport '../../icons/icon-chevron-down-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../icons/icon-off.js';\nimport '../../icons/icon-tank.js';\nimport '../../icons/icon-energy-battery.js';\nimport '../../navigation-instruments/gauge-trend/gauge-trend.js';\nimport '../../building-blocks/bar-vertical/bar-vertical.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {Priority} from '../../navigation-instruments/types.js';\nimport {\n ObcAlertFrameMode,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport type {ChartLineDataItem} from '../../building-blocks/chart-line/chart-line-base.js';\nimport {AdviceMixin, syncAdviceAlias} from '../../svghelpers/advice-mixin.js';\nimport type {AdviceInput} from '../../svghelpers/advice.js';\nimport {\n AdvicePosition,\n ExternalScaleSide,\n FillMode,\n ScaleType,\n computeOutsideBarThickness,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport {TankPositioning} from './tank-positioning.js';\nimport {clamp} from '../../svghelpers/math.js';\n\nexport enum TankTrend {\n fastRising = 'fast-rising',\n rising = 'rising',\n stable = 'stable',\n falling = 'falling',\n fastFalling = 'fast-falling',\n closed = 'closed',\n}\n\nexport enum TankType {\n generic = 'generic',\n atmospheric = 'atmospheric',\n pressurized = 'pressurized',\n battery = 'battery',\n}\n\nexport enum TankOrientation {\n vertical = 'vertical',\n horizontal = 'horizontal',\n}\n\nexport {TankPositioning};\n\nexport enum TankChartMode {\n /** Static fill bar driven by `value` / `max` (default, backward compatible). */\n bar = 'bar',\n /** Embedded `obc-gauge-trend` line/area chart, no side bar. */\n graph = 'graph',\n /** Embedded `obc-gauge-trend` line/area chart with a side bar. */\n graphAndBar = 'graph-and-bar',\n}\n\n/**\n *\n *\n * Setpoint properties are inherited from {@link SetpointMixin}\n * (`setpoint`, `newSetpoint`, `touching`, `atSetpoint`, `autoAtSetpoint`,\n * `autoAtSetpointDeadband`, `setpointAtZeroDeadband`, `setpointOverride`,\n * `animateSetpoint`) and are forwarded to the embedded chart: the SVG bar in\n * `bar` mode, or `obc-gauge-trend` in the graph modes (where the marker\n * renders on the side bar, i.e. `graph-and-bar`). Values share the tank's\n * `value` / `max` scale.\n *\n * @property positioning - Host positioning model — see `TankPositioning` for details. Defaults to\n * `button` (host fills parent container, 100% × 100%, falling back to the\n * design aspect ratio on any axis the parent leaves indefinite, no anchor\n * offset). Set to `point` for the legacy P&ID canvas mode (fixed default\n * dimensions + top-center anchor offset).\n * @property activated - Enables the activated background color, used to indicate that the tank is\n * activated/selected. Requires an interactive tank — the `noClick` mixin\n * variant used when `clickable` is `false` only paints the enabled state, so\n * a non-clickable tank ignores this (matching `obc-elevated-card`).\n * @availableWhen activated clickable==true\n * @property chartData - Time-series data points for the embedded gauge-trend (graph modes only).\n * @property priority - Priority hint forwarded to child charts (regular | enhanced).\n * @property advice - Advice overlays. Forwarded to the embedded `obc-gauge-trend` in\n * `graph` / `graph-and-bar` modes, or rendered as pills over the static\n * bar in `bar` mode.\n * @property hasAdvice - Show advice overlays (works in all `chartMode` variants).\n * @property alert - Show an `<obc-alert-frame>` overlay around the bordered tank area (the\n * `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven\n * properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).\n * The ring overlays `.halo` only, so the tag and readout that sit outside\n * the halo in compact / static layouts remain unaffected.\n * @property alertFrameType - Shape of the alert frame.\n * @availableWhen alertFrameType alert==true\n * @property alertFrameThickness - Thickness of the alert frame.\n * @availableWhen alertFrameThickness alert==true\n * @property alertFrameStatus - Alert status the frame is coloured for.\n * @availableWhen alertFrameStatus alert==true\n * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,\n * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.\n * @availableWhen alertFrameMode alert==true\n * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @property showAlertIcon - Shows the slotted alert icon inside the frame.\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property showTrendSymbol - Show the trend chevron / off icon next to the percent readout. Default\n * `true` preserves existing behavior. Set to `false` to hide the trend\n * indicator in both compact and non-compact readouts — useful when the\n * trend is not meaningful for a given tank, or when the consumer wants\n * to keep the readout compact. Has no effect in `static` mode, which\n * renders the tank's capacity (`max` + `unit`) instead of a percent and\n * intentionally omits the trend indicator (a static tank represents\n * \"device present, current state unknown\"). `attribute: false` per the\n * repo's positive-default-true boolean convention.\n * @property percentFractionDigits - Number of fraction digits used to format the percent readout in the\n * non-compact (regular) layout. Defaults to `0` (integer percent). The\n * compact layout always renders integer percent to keep its fixed-width\n * footprint stable. The static layout renders capacity (`max` + `unit`)\n * rather than percent, so this property has no effect there — pass a\n * pre-formatted value through the `max-value` slot if fractional\n * precision is needed (see the `WithFractionDigits` story).\n * @property static - Display-only variant for a device whose current state is unknown: the\n * chart cell is hidden, the bordered area is filled with\n * `--container-section-color` and the readout is centred inside it. Always\n * compact-sized, so it overrides `compact`, and it renders as a\n * `<div role=\"img\">` — outside the tab order and not announced as a control.\n * @property clickable - Whether the tank is interactive. `true` renders the root as a `<button>`\n * with the flat-mixin interaction surface; `false` renders a `<div>` that\n * keeps the resting appearance (the mixin's `noClick` variant) but loses\n * hover, pressed and focus-visible and leaves the tab order. Everything\n * else — chart, badges, readout, tag and the alert frame — still renders,\n * so use it for a display-only tank that shows live data. No effect on a\n * `static` tank, which is already non-interactive.\n * @property chartMode - Chart cell rendering mode: `bar` (default) is a static fill bar driven by\n * `value` and `max`, `graph` embeds an `obc-gauge-trend` line/area chart,\n * and `graphAndBar` embeds one with an integrated side bar.\n * @property hasGraphIcon - Overlays a decorative icon centred on the chart cell — the energy-battery\n * icon for a battery tank, the generic tank icon otherwise. Works in every\n * `chartMode` and both orientations; the icon sits in a fixed CSS layer\n * above the bar or graph and is silhouetted so it stays legible on any\n * fill, and its size follows the ambient `obc-component-size-*` class.\n * @property badgeControl - Control badge rendered in the `badges` cell. A non-`None` value renders an\n * `<obc-automation-badge>` as fallback content for the `badges` slot, so any\n * slotted content wins. The cell orders the four badges control, alert,\n * interlock, commandLocked, left to right.\n * @property badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.\n * @slot badges - Custom badges to be displayed in the badge area.\n * @slot tag - Text or element for the tank's tag/label.\n * @slot readout - Replaces the entire readout content block.\n * @slot max-value - Content for the capacity value.\n * @slot unit - Content for the unit of measurement.\n * @slot current-value - Content for the current level value.\n * @slot rich - Detail rows below the main readout, shown in the regular\n * (non-compact, non-static) layout. Slot an `<obc-readout-list>` of\n * `<obc-readout-list-item>` rows — it owns the row typography and cross-row\n * column alignment; the tank renders a divider above it automatically when\n * the slot is filled.\n * @slot alert-icon - Custom icon for the alert frame.\n * @slot alert-label - Label for the alert frame.\n * @slot alert-timer - Timer for the alert frame.\n * @fires click - Fired when the tank is clicked. When `clickable` is `false` the tank renders a plain `<div>`, and in `static` mode a `<div role=\"img\">`, instead of a `<button>` — in both cases it is not focusable or keyboard-activatable; pointer clicks still reach the host.\n * @beta\n */\n@customElement('obc-automation-tank')\nexport class ObcAutomationTank extends AdviceMixin(SetpointMixin(LitElement)) {\n @property({type: String}) medium: LineMedium = LineMedium.water;\n @property({type: Number}) value: number = 0;\n @property({type: Number}) max: number = 100;\n @property({type: String}) trend: TankTrend = TankTrend.stable;\n @property({type: String, reflect: true}) type: TankType = TankType.generic;\n @property({type: String, reflect: true}) orientation: TankOrientation =\n TankOrientation.vertical;\n @property({type: Boolean, reflect: true}) compact: boolean = false;\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.button;\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: Boolean, attribute: false}) clickable: boolean = true;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: String}) tag: string = '';\n\n @property({type: String, reflect: true, attribute: 'chart-mode'})\n chartMode: TankChartMode = TankChartMode.bar;\n\n @property({type: Array, attribute: false})\n chartData: ChartLineDataItem[] = [];\n\n @property({type: String}) priority: Priority = Priority.regular;\n\n /** @deprecated Alias of `advices`. Ranges in tank units. */\n @property({type: Array, attribute: false}) advice?: AdviceInput[];\n\n @property({type: Boolean}) hasAdvice = false;\n\n @property({type: Boolean, attribute: false}) hasGraphIcon = false;\n\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n @property({type: Boolean, attribute: false}) showTrendSymbol: boolean = true;\n\n @property({type: Number}) percentFractionDigits: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({attribute: false}) badgeSymbolOverride:\n AutomationBadgeSymbolOverride | undefined = undefined;\n\n constructor() {\n super();\n // Registers itself on the host; nothing else holds it.\n new BadgeSettingsController(this);\n }\n\n @state() private _cellWidth = 0;\n @state() private _cellHeight = 0;\n /**\n * Tracks whether the `badges` and `tag` slots have assigned content. Used\n * in compact/static mode to collapse empty cells to 0px so the tank-frame\n * can absorb the freed space (per spec: \"if there are no badges it would\n * grow upward; if there are no readout or tags it would grow downward\").\n * Non-compact (regular) layout keeps its grid-based reserved rows.\n */\n @state() private _hasBadges = false;\n @state() private _hasTagSlot = false;\n /**\n * Tracks whether the `rich` slot has assigned content, so the regular\n * (non-compact) layout only draws the rich divider when a consumer has\n * slotted detail rows (canonically an `<obc-readout-list>`). Mirrors\n * `_hasBadges` / `_hasTagSlot`.\n */\n @state() private _hasRichSlot = false;\n private _chartResizeObserver?: ResizeObserver;\n private _observedCell?: Element;\n\n private get isCompact(): boolean {\n return this.compact || this.static;\n }\n\n private get _usesGaugeTrend(): boolean {\n return (\n this.chartMode === TankChartMode.graph ||\n this.chartMode === TankChartMode.graphAndBar\n );\n }\n\n private _onBadgesSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasBadges = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onTagSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasTagSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onRichSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasRichSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._chartResizeObserver?.disconnect();\n this._chartResizeObserver = undefined;\n this._observedCell = undefined;\n }\n\n protected override updated(\n changed: Map<string | number | symbol, unknown>\n ): void {\n super.updated(changed);\n // The chart cell element is recreated when `chartMode` moves between bar\n // and graph, and appears or disappears with `static` and `compact`, so the\n // observer is re-attached to the current `.bar-container`. `priority`\n // needs no forwarding — children take it through template bindings.\n this._syncChartResizeObserver();\n }\n\n private _syncChartResizeObserver(): void {\n // Observe the bar-container in BOTH bar mode and graph modes — the bar\n // mode now renders an SVG `obc-bar-vertical` / `-horizontal` that needs\n // measured pixel dimensions for its viewBox and barThickness.\n const cell = this.renderRoot.querySelector('.bar-container');\n if (!cell) {\n if (this._chartResizeObserver) {\n this._chartResizeObserver.disconnect();\n this._observedCell = undefined;\n }\n return;\n }\n if (cell === this._observedCell) return;\n\n if (!this._chartResizeObserver) {\n this._chartResizeObserver = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (!entry) return;\n const w = Math.round(entry.contentRect.width);\n const h = Math.round(entry.contentRect.height);\n if (w !== this._cellWidth) this._cellWidth = w;\n if (h !== this._cellHeight) this._cellHeight = h;\n });\n } else {\n this._chartResizeObserver.disconnect();\n }\n this._chartResizeObserver.observe(cell);\n this._observedCell = cell;\n }\n\n trendIcon(): HTMLTemplateResult | typeof nothing {\n if (this.trend === TankTrend.fastRising) {\n return html`<obi-chevron-double-up-google\n class=\"trend-icon\"\n ></obi-chevron-double-up-google>`;\n } else if (this.trend === TankTrend.rising) {\n return html`<obi-chevron-up-google\n class=\"trend-icon\"\n ></obi-chevron-up-google>`;\n } else if (this.trend === TankTrend.fastFalling) {\n return html`<obi-chevron-double-down-google\n class=\"trend-icon\"\n ></obi-chevron-double-down-google>`;\n } else if (this.trend === TankTrend.falling) {\n return html`<obi-chevron-down-google\n class=\"trend-icon\"\n ></obi-chevron-down-google>`;\n } else if (this.trend === TankTrend.closed) {\n return html`<obi-off class=\"trend-icon\"></obi-off>`;\n } else {\n return html`<obi-arrow-right-google\n class=\"trend-icon\"\n ></obi-arrow-right-google>`;\n }\n }\n\n /**\n * Atmospheric cap, 3-piece (corner-start / stretchable middle arc / corner-end).\n * Each piece draws its own fill (closed) and stroke (open) so adjacent pieces\n * abut without a visible vertical seam line. Coordinates are derived from the\n * Figma 248x14 path; corners stay 12px wide while the middle arc stretches.\n * Position (start vs end) and orientation flipping are handled in CSS.\n *\n * Horizontal orientation reuses the same path data but rotates each piece\n * via an inner `<g transform=\"translate(0 H) rotate(-90)\">`, mapping the\n * source coord (x, y) to (y, H - x). The viewBox is swapped accordingly:\n * corner: 12x14 -> 14x12 (H=12)\n * middle: 224x14 -> 14x224 (H=224)\n * Cap-end (right side in horizontal) is mirrored via CSS scaleX(-1).\n */\n private renderAtmosphericCap(side: 'start' | 'end'): HTMLTemplateResult {\n const isHorizontal = this.orientation === TankOrientation.horizontal;\n\n // Curve Y-values are scaled proportionally from the 18/12-tall Figma\n // reference, so the corners stay continuous at both thicknesses\n // (automation-components.md § Tank rendering).\n let cornerStartFill: string;\n let cornerStartStroke: string;\n let midFill: string;\n let midStroke: string;\n let cornerEndFill: string;\n let cornerEndStroke: string;\n let cornerW: number;\n let capH: number;\n let midW: number;\n\n if (this.isCompact) {\n cornerW = 7;\n capH = 10;\n midW = 149;\n cornerStartFill =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10 L 6.374 10 Z';\n cornerStartStroke =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10';\n midFill =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214 L 149.252 10 L 0 10 Z';\n midStroke =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214';\n cornerEndFill =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10 L 0 10 Z';\n cornerEndStroke =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10';\n } else {\n cornerW = 12;\n capH = 14;\n midW = 224;\n cornerStartFill =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14 L 12 14 Z';\n // Curve and outer edge only: the seam with `.middle` is a 1px CSS\n // `border-top` so it pixel-snaps like the pressurized cap's border,\n // where an SVG stroke renders thinner and blurrier.\n cornerStartStroke =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14';\n midFill =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837 L 224 14 L 0 14 Z';\n midStroke =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837';\n cornerEndFill =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14 L 0 14 Z';\n cornerEndStroke =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14';\n }\n\n if (isHorizontal) {\n // Rotate vertical paths -90deg into a `capH`-wide column. Source coord\n // (x, y) maps to (y, cornerW - x) for corners and (y, midW - x) for mid.\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMax meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${capH} ${midW}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${midW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMin meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n </g>\n `}\n </svg>\n </div>\n `;\n }\n\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMaxYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${midW} ${capH}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMinYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n `}\n </svg>\n </div>\n `;\n }\n\n private renderCap(side: 'start' | 'end'): HTMLTemplateResult | null {\n if (this.type === TankType.generic) return null;\n if (this.type === TankType.battery && side === 'end') return null;\n if (this.type === TankType.atmospheric) {\n return this.renderAtmosphericCap(side);\n }\n if (this.type === TankType.pressurized) {\n return html`<div class=\"cap cap-pressurized cap-${side}\"></div>`;\n }\n // battery, start only\n return html`<div class=\"cap cap-battery cap-${side}\"></div>`;\n }\n\n override willUpdate(changed: PropertyValues) {\n super.willUpdate(changed);\n syncAdviceAlias(this, this.advice);\n }\n\n override render() {\n const safeMax = this.max > 0 ? this.max : 1;\n const percent = clamp((this.value / safeMax) * 100, 0, 100);\n const isCompact = this.isCompact;\n\n // Compact and static collapse their empty cells so the tank frame absorbs\n // the space; non-compact cells sit in the inner `.grid` and always reserve\n // their min-content rows (automation-components.md § Tank rendering).\n const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);\n const controlBadge = automationBadgeType(\n 'control',\n this.badgeControl,\n symbolOverride\n );\n const alertBadge = automationBadgeType(\n 'alert',\n this.badgeAlert,\n symbolOverride\n );\n const interlockBadge = automationBadgeType(\n 'interlock',\n this.badgeInterlock,\n symbolOverride\n );\n const commandLockedBadge = automationBadgeType(\n 'commandLocked',\n this.badgeCommandLocked,\n symbolOverride\n );\n const hasEnumBadges =\n controlBadge !== null ||\n alertBadge !== null ||\n interlockBadge !== null ||\n commandLockedBadge !== null;\n\n const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges;\n const tagHidden = isCompact && !this._hasTagSlot && !this.tag;\n\n const badgesCell = html`\n <div class=\"badges\" ?hidden=${badgesHidden}>\n <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}>\n ${\n controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </div>\n `;\n const tagCell = html`\n <div class=\"tag\" ?hidden=${tagHidden}>\n <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot>\n </div>\n `;\n // Static shows capacity rather than a percent: the state is unknown, so a\n // reading would be a claim the tank cannot make, and the trend icon goes\n // for the same reason (automation-components.md § Tank rendering).\n const readoutCell = this.static\n ? html`\n <div class=\"readout readout-compact readout-static\">\n <slot name=\"readout\">\n <slot name=\"max-value\">${this.max.toFixed(0)}</slot>\n <slot name=\"unit\">m<sup>3</sup></slot>\n </slot>\n </div>\n `\n : isCompact\n ? html`\n <div class=\"readout readout-compact\">\n <slot name=\"readout\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <span class=\"percent\"\n >${percent.toFixed(0)}<span class=\"percent-symbol\"\n >%</span\n ></span\n >\n </slot>\n </div>\n `\n : html`\n <div class=\"readout\">\n <slot name=\"readout\">\n <div class=\"header\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <div class=\"percent\">\n ${percent.toFixed(this.percentFractionDigits)}<span\n class=\"percent-symbol\"\n >%</span\n >\n </div>\n </div>\n <div class=\"value\">\n <div class=\"current\">\n <slot name=\"current-value\" class=\"current-value\"\n >${this.value.toFixed(0)}</slot\n ><span class=\"divider\">/</span>\n </div>\n <div class=\"max\">\n <slot class=\"max-value\" name=\"max-value\"\n >${this.max.toFixed(0)}</slot\n >\n <slot class=\"unit\" name=\"unit\">m<sup>3</sup></slot>\n </div>\n </div>\n <div class=\"rich-divider\" ?hidden=${!this._hasRichSlot}></div>\n <slot name=\"rich\" @slotchange=${this._onRichSlotChange}></slot>\n </slot>\n </div>\n `;\n // Two stacked icons form the silhouette `obc-automation-button` uses: the\n // back layer paints the inherited SVG `stroke` halo, the front layer the\n // fill through `color` (automation-components.md § Tank rendering).\n const graphIconClasses = classMap({\n 'graph-icon': true,\n 'priority-enhanced': this.priority === Priority.enhanced,\n });\n const graphIconOverlay =\n this.type === TankType.battery\n ? html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-energy-battery\n class=\"graph-icon-stroke\"\n ></obi-energy-battery>\n <obi-energy-battery class=\"graph-icon-fill\"></obi-energy-battery>\n </div>\n `\n : html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-tank class=\"graph-icon-stroke\"></obi-tank>\n <obi-tank class=\"graph-icon-fill\"></obi-tank>\n </div>\n `;\n // Alert-frame overlay. Mirrors the `obc-automation-button` pattern\n // exactly so consumer API is identical. Placed inside `.halo` so the\n // ring hugs only the bordered tank area; `belowHalo` (tag / readout) is\n // unaffected. `.halo` is `position: relative` (see CSS) to anchor the\n // absolutely-positioned alert-frame.\n const alertFrameOverlay = this.alert\n ? html`<obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .mode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : null;\n let chartCell: HTMLTemplateResult;\n if (this._usesGaugeTrend) {\n // gauge-trend reads these as an aspect-ratio reference and derives its\n // own height from its wrapper. Rendering waits for both measurements —\n // a zero divides in that maths on first paint.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n chartCell = html`\n <div class=\"bar-container chart-cell\">\n ${\n hasSize\n ? html`<obc-gauge-trend\n .data=${this.chartData}\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .hasBar=${this.chartMode === TankChartMode.graphAndBar}\n .hasScale=${false}\n .hasLabelPadding=${false}\n .chartFill=${true}\n .hasAdvice=${this.hasAdvice}\n .advices=${this.advices}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .width=${this._cellWidth}\n .height=${this._cellHeight}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-gauge-trend>`\n : null\n }\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n } else {\n // The shared SVG bar, the renderer gauge-trend uses for its side bar, so\n // advice overlays behave the same in all three chart modes; its fill\n // follows the instrument palette, not the tank's `medium` colour.\n // TODO(#1284): carry the medium colour through, and fold this branch\n // into gauge-trend once it offers a bar-only layout at this size.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n // The inner bar is always portrait and mirrors gauge-trend's\n // `fixedAspectRatio` sizing, so fixed-pixel SVG primitives keep one\n // on-screen size; `barThickness` and the cross-axis size are therefore\n // in viewBox units (automation-components.md § Tank rendering).\n const SCALE_REFERENCE_SIZE = 384;\n // The bar's viewBox cross-axis includes an outside-bar band for advice\n // pills, icons and/or the setpoint marker (see computeExternalScaleLayout).\n // Subtract the same band the bar will reserve so total viewBox width\n // still equals viewBoxCross and the meet-scale fills the cell exactly.\n const hasSetpointMarker =\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined;\n const outsideBarReserveVb = computeOutsideBarThickness({\n hasBar: true,\n hasScale: false,\n labels: false,\n labelThickness: 0,\n tickThickness: 0,\n scaleType: ScaleType.regular,\n hasAdvice: this.hasAdvice,\n hasAdviceIcon:\n this.hasAdvice && !!this.advices?.some((a) => a.showIcon),\n advicePosition: AdvicePosition.inner,\n hasSetpoint: hasSetpointMarker,\n // The advice column is pixels; in viewBox units it is those pixels\n // over the cell's own scale.\n fixedAspectRatioScale:\n Math.max(1, this._cellHeight) / SCALE_REFERENCE_SIZE,\n });\n const safeCellHeight = Math.max(1, this._cellHeight);\n const viewBoxCross =\n (this._cellWidth * SCALE_REFERENCE_SIZE) / safeCellHeight;\n const barThickness = Math.max(0, viewBoxCross - outsideBarReserveVb);\n // `tint` is locked in for tank bar mode: it draws a fill from 0 to\n // value plus a small marker at the value position, which mirrors the\n // legacy CSS bar's \"fill + top border at value\" visual idiom.\n const barWrapper = html`<obc-bar-vertical\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .height=${this._cellHeight}\n .fixedAspectRatio=${true}\n .scaleReferenceSize=${SCALE_REFERENCE_SIZE}\n .paddingTop=${0}\n .paddingBottom=${0}\n .side=${ExternalScaleSide.right}\n .hasBar=${true}\n .hasScale=${false}\n .showLabels=${false}\n .barThickness=${barThickness}\n .fillMode=${FillMode.tint}\n .instrumentMode=${true}\n .borderRadius=${2}\n .advices=${this.hasAdvice ? this.advices : []}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .advicePosition=${AdvicePosition.inner}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-bar-vertical>`;\n chartCell = html`\n <div class=\"bar-container bar-cell\">\n ${hasSize ? barWrapper : null}\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n }\n\n const frameClasses = classMap({\n 'tank-frame': true,\n [`type-${this.type}`]: true,\n [`orientation-${this.orientation}`]: true,\n [this.medium]: true,\n compact: isCompact,\n static: this.static,\n });\n\n let middleContents: HTMLTemplateResult;\n if (this.static) {\n middleContents = html`<div class=\"static-readout\">${readoutCell}</div>`;\n } else if (this.compact) {\n middleContents = chartCell;\n } else {\n middleContents = html`<div class=\"grid\">\n ${tagCell}${badgesCell}${readoutCell}${chartCell}\n </div>`;\n }\n\n const tankFrame = html`\n <div class=${frameClasses}>\n ${this.renderCap('start')}\n <div class=\"middle\">${middleContents}</div>\n ${this.renderCap('end')}\n </div>\n `;\n\n // One interactive element: the flat mixin paints `.halo` through\n // `visibleWrapperClass` so the surround hugs the bordered area only, and\n // the alert-frame overlay is its last child so the ring covers every cell\n // (automation-components.md § Tank rendering).\n let haloContents: HTMLTemplateResult;\n if (this.static) {\n haloContents = html`${badgesCell}${tankFrame}${tagCell}`;\n } else if (this.compact) {\n haloContents = html`${badgesCell}${tankFrame}${readoutCell}${tagCell}`;\n } else {\n haloContents = tankFrame;\n }\n const halo = html`\n <div class=\"halo\">${haloContents}${alertFrameOverlay}</div>\n `;\n\n // Both classes sit on `.root` so the mixin paints `.halo`: `activated`\n // like its hover and pressed states, `clickable` choosing between the\n // six-state variant and the resting-only `noClick` one\n // (automation-components.md § Tank rendering).\n const isClickable = this.clickable && !this.static;\n const rootClasses = classMap({\n root: true,\n activated: this.activated,\n clickable: isClickable,\n });\n\n // The live region stays on all three root shapes, so an `alert` label is\n // announced whatever the interactivity (automation-components.md § Tank\n // rendering).\n // TODO(a11y): the rest of the automation family lacks the live region;\n // consolidate when alert support moves into a shared mixin.\n if (this.static) {\n return html`<div\n class=${rootClasses}\n role=\"img\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n if (!isClickable) {\n return html`<div\n class=${rootClasses}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n return html`<button\n class=${rootClasses}\n type=\"button\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </button>`;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-tank': ObcAutomationTank;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,gBAAA;CACA,UAAA,YAAA;CACA,UAAA,YAAA;CACA,UAAA,aAAA;CACA,UAAA,iBAAA;CACA,UAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,aAAA;CACA,SAAA,iBAAA;CACA,SAAA,iBAAA;CACA,SAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,cAAA;CACA,gBAAA,gBAAA;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ontal extends ObcBarHorizontal_base {
123
123
  */
124
124
  scaleReferenceSize: number;
125
125
  private _scale;
126
- /** The drawing's height in viewBox units, kept from the last render for the scale measurement. */
127
- private _viewBoxThickness;
126
+ /** The last render's layout inputs, for the scale measurement. */
127
+ private _layoutConfig?;
128
+ /** The drawing's height in viewBox units at a scale: the advice column is pixels, so it depends on it. */
129
+ private _thicknessAt;
128
130
  private _resizeController;
129
131
  /** Show scale tickmarks */
130
132
  hasScale: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"bar-horizontal.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/bar-horizontal/bar-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EAWL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAClB,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,qBACa,gBAAiB,SAAQ,qBAIrC;IAC2B,QAAQ,SAAK;IACb,QAAQ,SAAO;IACd,OAAO,UAAS;IAEjB,KAAK,SAAO;IAEZ,WAAW,EAAE,MAAM,CACX;IAER,YAAY,EAAE,MAAM,CACZ;IAER,IAAI,EAAE,iBAAiB,CAA4B;IAG7E,gBAAgB,UAAS;IAGzB,kBAAkB,SAAO;IAGzB,OAAO,CAAC,MAAM,CAAK;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OAIG;IACH,OAAO,CAAC,4BAA4B;IAMpC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAMrC,yFAAyF;IACzF,OAAO,CAAC,aAAa;IAarB;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,8BAA8B;IAiBtC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;CAelC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
1
+ {"version":3,"file":"bar-horizontal.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/bar-horizontal/bar-horizontal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,uCAAuC,CAAC;AAO/C,OAAO,EAWL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAClB,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAClB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,qBACa,gBAAiB,SAAQ,qBAIrC;IAC2B,QAAQ,SAAK;IACb,QAAQ,SAAO;IACd,OAAO,UAAS;IAEjB,KAAK,SAAO;IAEZ,WAAW,EAAE,MAAM,CACX;IAER,YAAY,EAAE,MAAM,CACZ;IAER,IAAI,EAAE,iBAAiB,CAA4B;IAG7E,gBAAgB,UAAS;IAGzB,kBAAkB,SAAO;IAGzB,OAAO,C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AI;IAezB,oBAAoB,IAAI,IAAI;IAMrC,OAAO,CAAC,0BAA0B;IASlC;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAMpC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAMrC,yFAAyF;IACzF,OAAO,CAAC,aAAa;IAarB;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,8BAA8B;IAiBtC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;CAelC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
@@ -23,7 +23,10 @@ var ObcBarHorizontal = class ObcBarHorizontal extends AdviceMixin(SetpointMixin(
23
23
  this.fixedAspectRatio = false;
24
24
  this.scaleReferenceSize = 384;
25
25
  this._scale = 1;
26
- this._viewBoxThickness = 0;
26
+ this._thicknessAt = (scale) => this._layoutConfig ? computeExternalScaleLayout({
27
+ ...this._layoutConfig,
28
+ fixedAspectRatioScale: scale
29
+ }).thickness : 0;
27
30
  this._resizeController = new ResizeController(this, { callback: (entries) => {
28
31
  if (!this.fixedAspectRatio) return;
29
32
  const entry = entries[0];
@@ -33,7 +36,7 @@ var ObcBarHorizontal = class ObcBarHorizontal extends AdviceMixin(SetpointMixin(
33
36
  containerMainAxisSize: entry.contentRect.width,
34
37
  containerCrossAxisSize: entry.contentRect.height,
35
38
  scaleReferenceSize: this.scaleReferenceSize,
36
- viewBoxThickness: this._viewBoxThickness
39
+ viewBoxThickness: this._thicknessAt
37
40
  });
38
41
  this.reportDimensions();
39
42
  } });
@@ -118,11 +121,13 @@ var ObcBarHorizontal = class ObcBarHorizontal extends AdviceMixin(SetpointMixin(
118
121
  adviceEmphasis: this.adviceEmphasis,
119
122
  adviceMaskPrefix: this._adviceMaskPrefix,
120
123
  fixedAspectRatio: this.fixedAspectRatio,
124
+ fixedAspectRatioScale: this.fixedAspectRatio ? this._scale : 1,
121
125
  instrumentMode: this.instrumentMode,
122
126
  highlightCurrentValue: this.highlightCurrentValue
123
127
  };
124
- const layout = computeExternalScaleLayout(toExternalScaleLayoutConfig(config));
125
- this._viewBoxThickness = layout.thickness;
128
+ const layoutConfig = toExternalScaleLayoutConfig(config);
129
+ const layout = computeExternalScaleLayout(layoutConfig);
130
+ this._layoutConfig = layoutConfig;
126
131
  const parts = renderExternalScale(config);
127
132
  const viewBox = computeExternalScaleViewBox({
128
133
  orientation: config.orientation,
@@ -191,7 +196,8 @@ var ObcBarHorizontal = class ObcBarHorizontal extends AdviceMixin(SetpointMixin(
191
196
  advicePosition: this.advicePosition,
192
197
  hasAdvice: !!this.advices && this.advices.length > 0,
193
198
  hasAdviceIcon: !!this.advices?.some((a) => a.showIcon),
194
- hasSetpoint: this.setpoint !== void 0 || this.newSetpoint !== void 0 || this.departingNewSetpoint !== void 0
199
+ hasSetpoint: this.setpoint !== void 0 || this.newSetpoint !== void 0 || this.departingNewSetpoint !== void 0,
200
+ fixedAspectRatioScale: this.fixedAspectRatio ? this._scale : 1
195
201
  });
196
202
  const dimensions = this.fixedAspectRatio ? {
197
203
  ...baseDimensions,
@@ -249,7 +255,7 @@ var ObcBarHorizontal = class ObcBarHorizontal extends AdviceMixin(SetpointMixin(
249
255
  containerMainAxisSize: width,
250
256
  containerCrossAxisSize: height,
251
257
  scaleReferenceSize: this.scaleReferenceSize,
252
- viewBoxThickness: this._viewBoxThickness
258
+ viewBoxThickness: this._thicknessAt
253
259
  });
254
260
  return true;
255
261
  }