@oicl/openbridge-webcomponents-svelte 2.0.0-next.40 → 2.0.0-next.42

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.
@@ -1,11 +1,21 @@
1
1
 
2
2
  <script lang="ts">
3
3
  export type {LineMedium} from '@oicl/openbridge-webcomponents/dist/automation/index.js';
4
- export type {TankTrend, TankVariant} from '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
4
+ export type {TankTrend, TankType, TankOrientation, TankPositioning, TankChartMode} from '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
5
+ export type {ChartLineDataItem} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
6
+ export type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
7
+ export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
8
+ export type {ObcAlertFrameType, ObcAlertFrameThickness, ObcAlertFrameStatus} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
9
+ export type {AutomationButtonBadgeControl, AutomationButtonBadgeAlert, AutomationButtonBadgeInterlock, AutomationButtonBadgeCommandLocked} from '@oicl/openbridge-webcomponents/dist/automation/automation-button/abstract-automation-button.js';
5
10
  import '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
6
11
  import { setProperties } from "../../util.js";
7
12
  import type {LineMedium} from '@oicl/openbridge-webcomponents/dist/automation/index.js';
8
- import type {TankTrend, TankVariant} from '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
13
+ import type {TankTrend, TankType, TankOrientation, TankPositioning, TankChartMode} from '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
14
+ import type {ChartLineDataItem} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
15
+ import type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
16
+ import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
17
+ import type {ObcAlertFrameType, ObcAlertFrameThickness, ObcAlertFrameStatus} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
18
+ import type {AutomationButtonBadgeControl, AutomationButtonBadgeAlert, AutomationButtonBadgeInterlock, AutomationButtonBadgeCommandLocked} from '@oicl/openbridge-webcomponents/dist/automation/automation-button/abstract-automation-button.js';
9
19
  import type { Snippet } from 'svelte';
10
20
 
11
21
  export interface Props {
@@ -15,8 +25,99 @@ import type {TankTrend, TankVariant} from '@oicl/openbridge-webcomponents/dist/a
15
25
  value?: number;
16
26
  max?: number;
17
27
  trend?: TankTrend;
18
- variant?: TankVariant;
19
- tag?: string
28
+ type?: TankType;
29
+ orientation?: TankOrientation;
30
+ compact?: boolean;
31
+ /** Host positioning model — see `TankPositioning` for details. Defaults to
32
+ `point` for backward compatibility (fixed default dimensions + P&ID
33
+ top-center anchor). Set to `button` to make the host fill its parent
34
+ container (100% × 100%) with no anchor offset. */
35
+ positioning?: TankPositioning;
36
+ /** Static (display-only) variant. Always rendered at the compact size; the
37
+ inner chart/bar is hidden, the bordered area is filled with
38
+ `--container-section-color`, and the readout is centered inside the frame.
39
+ Tag is rendered below the bordered area; badges (when slotted) sit above
40
+ the frame inside the halo and shrink the frame just like in compact mode.
41
+ Overrides `compact` (a static tank is always compact-sized).
42
+
43
+ Static tanks render as a non-interactive `<div role="img">` (not a
44
+ `<button>`), so they are not in the tab order and do not announce as
45
+ activatable controls. */
46
+ static?: boolean;
47
+ tag?: string;
48
+ /** Chart cell rendering mode.
49
+ - `bar`: static fill bar driven by `value`/`max` (default).
50
+ - `graph`: embedded `obc-gauge-trend` line/area chart.
51
+ - `graphAndBar`: embedded `obc-gauge-trend` with an integrated side bar. */
52
+ chartMode?: TankChartMode;
53
+ /** Time-series data points for the embedded gauge-trend (graph modes only). */
54
+ chartData?: ChartLineDataItem[];
55
+ /** Priority hint forwarded to child charts (regular | enhanced). */
56
+ priority?: Priority;
57
+ /** Advice overlays. Forwarded to the embedded `obc-gauge-trend` in
58
+ `graph` / `graph-and-bar` modes, or rendered as pills over the static
59
+ bar in `bar` mode. */
60
+ advice?: LinearAdvice[];
61
+ /** Show advice overlays (works in all `chartMode` variants). */
62
+ hasAdvice?: boolean;
63
+ /** Overlay a 32×32 decorative icon (currently `<obi-tank>`) centered on the
64
+ chart cell. Works in all three `chartMode` variants (bar, graph,
65
+ graph-and-bar) and in both orientations. The icon is rendered above the
66
+ bar/graph in a fixed CSS layer (does not scale with the SVG meet
67
+ transform) and is silhouetted with a `--border-silhouette-color` halo so
68
+ it stays legible on any underlying fill. The icon size scales with the
69
+ ambient `obc-component-size-*` class on an ancestor via the design token
70
+ `--automation-components-tanks-graphs-graph-icon-size` (32 → 48 → 64 → 64
71
+ for regular → medium → large → xl).
72
+
73
+ TODO(future): replace the hard-coded `<obi-tank>` with a `slot="graph-icon"`
74
+ so consumers can pass any `<obi-*>` icon. The current API ships the
75
+ smallest viable surface; the slot can be added without breaking the
76
+ boolean property. */
77
+ hasGraphIcon?: boolean;
78
+ /** Show an `<obc-alert-frame>` overlay around the bordered tank area (the
79
+ `.halo` wrapper). Mirrors the API of `obc-automation-button`: same six
80
+ properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).
81
+ The ring overlays `.halo` only, so the tag and readout that sit outside
82
+ the halo in compact / static layouts remain unaffected. */
83
+ alert?: boolean;
84
+ alertFrameType?: ObcAlertFrameType;
85
+ alertFrameThickness?: ObcAlertFrameThickness;
86
+ alertFrameStatus?: ObcAlertFrameStatus;
87
+ showAlertCategoryIcon?: boolean;
88
+ showAlertIcon?: boolean;
89
+ /** Show the trend chevron / off icon next to the percent readout. Default
90
+ `true` preserves existing behavior. Set to `false` to hide the trend
91
+ indicator in both compact and non-compact readouts — useful when the
92
+ trend is not meaningful for a given tank, or when the consumer wants
93
+ to keep the readout compact. Has no effect in `static` mode, which
94
+ renders the tank's capacity (`max` + `unit`) instead of a percent and
95
+ intentionally omits the trend indicator (a static tank represents
96
+ "device present, current state unknown"). `attribute: false` per the
97
+ repo's positive-default-true boolean convention. */
98
+ showTrendSymbol?: boolean;
99
+ /** Number of fraction digits used to format the percent readout in the
100
+ non-compact (regular) layout. Defaults to `0` (integer percent). The
101
+ compact layout always renders integer percent to keep its fixed-width
102
+ footprint stable. The static layout renders capacity (`max` + `unit`)
103
+ rather than percent, so this property has no effect there — pass a
104
+ pre-formatted value through the `max-value` slot if fractional
105
+ precision is needed (see the `WithFractionDigits` story). */
106
+ percentFractionDigits?: number;
107
+ /** Enum-driven badges rendered inside the `badges` cell. Mirrors the API
108
+ introduced for `ObcAbstractAutomationButton` in PR #839 (#829). When set
109
+ to a non-`None` value, an `<obc-automation-badge>` of the corresponding
110
+ type is rendered as fallback content for the `badges` slot. Any content
111
+ the consumer slots into `badges` overrides these defaults, preserving
112
+ backward compatibility with the existing slot-based API.
113
+
114
+ Render order (left → right): control, alert, interlock, commandLocked —
115
+ matching the positional convention used by `ObcAbstractAutomationButton`
116
+ (top-left, top-right, bottom-left, bottom-right) read row-by-row. */
117
+ badgeControl?: AutomationButtonBadgeControl;
118
+ badgeAlert?: AutomationButtonBadgeAlert;
119
+ badgeInterlock?: AutomationButtonBadgeInterlock;
120
+ badgeCommandLocked?: AutomationButtonBadgeCommandLocked
20
121
  }
21
122
  export interface Events {
22
123
 
@@ -1,6 +1,11 @@
1
1
  import '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
2
2
  import type { LineMedium } from '@oicl/openbridge-webcomponents/dist/automation/index.js';
3
- import type { TankTrend, TankVariant } from '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
3
+ import type { TankTrend, TankType, TankOrientation, TankPositioning, TankChartMode } from '@oicl/openbridge-webcomponents/dist/automation/automation-tank/automation-tank.js';
4
+ import type { ChartLineDataItem } from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
5
+ import type { Priority } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
6
+ import type { LinearAdvice } from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
7
+ import type { ObcAlertFrameType, ObcAlertFrameThickness, ObcAlertFrameStatus } from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
8
+ import type { AutomationButtonBadgeControl, AutomationButtonBadgeAlert, AutomationButtonBadgeInterlock, AutomationButtonBadgeCommandLocked } from '@oicl/openbridge-webcomponents/dist/automation/automation-button/abstract-automation-button.js';
4
9
  import type { Snippet } from 'svelte';
5
10
  export interface Props {
6
11
  class?: string;
@@ -9,8 +14,99 @@ export interface Props {
9
14
  value?: number;
10
15
  max?: number;
11
16
  trend?: TankTrend;
12
- variant?: TankVariant;
17
+ type?: TankType;
18
+ orientation?: TankOrientation;
19
+ compact?: boolean;
20
+ /** Host positioning model — see `TankPositioning` for details. Defaults to
21
+ `point` for backward compatibility (fixed default dimensions + P&ID
22
+ top-center anchor). Set to `button` to make the host fill its parent
23
+ container (100% × 100%) with no anchor offset. */
24
+ positioning?: TankPositioning;
25
+ /** Static (display-only) variant. Always rendered at the compact size; the
26
+ inner chart/bar is hidden, the bordered area is filled with
27
+ `--container-section-color`, and the readout is centered inside the frame.
28
+ Tag is rendered below the bordered area; badges (when slotted) sit above
29
+ the frame inside the halo and shrink the frame just like in compact mode.
30
+ Overrides `compact` (a static tank is always compact-sized).
31
+
32
+ Static tanks render as a non-interactive `<div role="img">` (not a
33
+ `<button>`), so they are not in the tab order and do not announce as
34
+ activatable controls. */
35
+ static?: boolean;
13
36
  tag?: string;
37
+ /** Chart cell rendering mode.
38
+ - `bar`: static fill bar driven by `value`/`max` (default).
39
+ - `graph`: embedded `obc-gauge-trend` line/area chart.
40
+ - `graphAndBar`: embedded `obc-gauge-trend` with an integrated side bar. */
41
+ chartMode?: TankChartMode;
42
+ /** Time-series data points for the embedded gauge-trend (graph modes only). */
43
+ chartData?: ChartLineDataItem[];
44
+ /** Priority hint forwarded to child charts (regular | enhanced). */
45
+ priority?: Priority;
46
+ /** Advice overlays. Forwarded to the embedded `obc-gauge-trend` in
47
+ `graph` / `graph-and-bar` modes, or rendered as pills over the static
48
+ bar in `bar` mode. */
49
+ advice?: LinearAdvice[];
50
+ /** Show advice overlays (works in all `chartMode` variants). */
51
+ hasAdvice?: boolean;
52
+ /** Overlay a 32×32 decorative icon (currently `<obi-tank>`) centered on the
53
+ chart cell. Works in all three `chartMode` variants (bar, graph,
54
+ graph-and-bar) and in both orientations. The icon is rendered above the
55
+ bar/graph in a fixed CSS layer (does not scale with the SVG meet
56
+ transform) and is silhouetted with a `--border-silhouette-color` halo so
57
+ it stays legible on any underlying fill. The icon size scales with the
58
+ ambient `obc-component-size-*` class on an ancestor via the design token
59
+ `--automation-components-tanks-graphs-graph-icon-size` (32 → 48 → 64 → 64
60
+ for regular → medium → large → xl).
61
+
62
+ TODO(future): replace the hard-coded `<obi-tank>` with a `slot="graph-icon"`
63
+ so consumers can pass any `<obi-*>` icon. The current API ships the
64
+ smallest viable surface; the slot can be added without breaking the
65
+ boolean property. */
66
+ hasGraphIcon?: boolean;
67
+ /** Show an `<obc-alert-frame>` overlay around the bordered tank area (the
68
+ `.halo` wrapper). Mirrors the API of `obc-automation-button`: same six
69
+ properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).
70
+ The ring overlays `.halo` only, so the tag and readout that sit outside
71
+ the halo in compact / static layouts remain unaffected. */
72
+ alert?: boolean;
73
+ alertFrameType?: ObcAlertFrameType;
74
+ alertFrameThickness?: ObcAlertFrameThickness;
75
+ alertFrameStatus?: ObcAlertFrameStatus;
76
+ showAlertCategoryIcon?: boolean;
77
+ showAlertIcon?: boolean;
78
+ /** Show the trend chevron / off icon next to the percent readout. Default
79
+ `true` preserves existing behavior. Set to `false` to hide the trend
80
+ indicator in both compact and non-compact readouts — useful when the
81
+ trend is not meaningful for a given tank, or when the consumer wants
82
+ to keep the readout compact. Has no effect in `static` mode, which
83
+ renders the tank's capacity (`max` + `unit`) instead of a percent and
84
+ intentionally omits the trend indicator (a static tank represents
85
+ "device present, current state unknown"). `attribute: false` per the
86
+ repo's positive-default-true boolean convention. */
87
+ showTrendSymbol?: boolean;
88
+ /** Number of fraction digits used to format the percent readout in the
89
+ non-compact (regular) layout. Defaults to `0` (integer percent). The
90
+ compact layout always renders integer percent to keep its fixed-width
91
+ footprint stable. The static layout renders capacity (`max` + `unit`)
92
+ rather than percent, so this property has no effect there — pass a
93
+ pre-formatted value through the `max-value` slot if fractional
94
+ precision is needed (see the `WithFractionDigits` story). */
95
+ percentFractionDigits?: number;
96
+ /** Enum-driven badges rendered inside the `badges` cell. Mirrors the API
97
+ introduced for `ObcAbstractAutomationButton` in PR #839 (#829). When set
98
+ to a non-`None` value, an `<obc-automation-badge>` of the corresponding
99
+ type is rendered as fallback content for the `badges` slot. Any content
100
+ the consumer slots into `badges` overrides these defaults, preserving
101
+ backward compatibility with the existing slot-based API.
102
+
103
+ Render order (left → right): control, alert, interlock, commandLocked —
104
+ matching the positional convention used by `ObcAbstractAutomationButton`
105
+ (top-left, top-right, bottom-left, bottom-right) read row-by-row. */
106
+ badgeControl?: AutomationButtonBadgeControl;
107
+ badgeAlert?: AutomationButtonBadgeAlert;
108
+ badgeInterlock?: AutomationButtonBadgeInterlock;
109
+ badgeCommandLocked?: AutomationButtonBadgeCommandLocked;
14
110
  }
15
111
  export interface Events {
16
112
  }
@@ -21,7 +117,20 @@ type $$ComponentProps = Props & Events & Slots;
21
117
  declare const ObcAutomationTank: import("svelte").Component<$$ComponentProps, {
22
118
  LineMedium: typeof LineMedium;
23
119
  TankTrend: typeof TankTrend;
24
- TankVariant: typeof TankVariant;
120
+ TankType: typeof TankType;
121
+ TankOrientation: typeof TankOrientation;
122
+ TankPositioning: typeof TankPositioning;
123
+ TankChartMode: typeof TankChartMode;
124
+ ChartLineDataItem: typeof ChartLineDataItem;
125
+ Priority: typeof Priority;
126
+ LinearAdvice: typeof LinearAdvice;
127
+ ObcAlertFrameType: typeof ObcAlertFrameType;
128
+ ObcAlertFrameThickness: typeof ObcAlertFrameThickness;
129
+ ObcAlertFrameStatus: typeof ObcAlertFrameStatus;
130
+ AutomationButtonBadgeControl: typeof AutomationButtonBadgeControl;
131
+ AutomationButtonBadgeAlert: typeof AutomationButtonBadgeAlert;
132
+ AutomationButtonBadgeInterlock: typeof AutomationButtonBadgeInterlock;
133
+ AutomationButtonBadgeCommandLocked: typeof AutomationButtonBadgeCommandLocked;
25
134
  }, "">;
26
135
  type ObcAutomationTank = ReturnType<typeof ObcAutomationTank>;
27
136
  export default ObcAutomationTank;
@@ -53,6 +53,22 @@ showGridX?: boolean;
53
53
  showGridY?: boolean;
54
54
  /** Show axis tick marks and labels. */
55
55
  showTickMarks?: boolean;
56
+ /** Reserve canvas padding for axis tick labels on sides without an external scale.
57
+
58
+ When `true` (default), the chart leaves room for tick labels and renders them
59
+ (subject to `showTickMarks` and the 192px auto-compact threshold).
60
+
61
+ When `false`, the chart renders edge-to-edge on sides without a slotted external
62
+ scale AND axis tick labels are force-hidden so they cannot be clipped. This also
63
+ suppresses the automatic edge-to-edge switch that normally happens below the
64
+ 192px threshold, eliminating the visible padding "jump" when crossing it.
65
+
66
+ Useful when embedding the chart inside another component that owns framing
67
+ and never wants to show axis labels (e.g. `obc-automation-tank`).
68
+
69
+ Defaults to `true` to preserve existing behavior. Declared with `attribute: false`
70
+ because a `true`-default boolean cannot work as an HTML boolean attribute. */
71
+ hasLabelPadding?: boolean;
56
72
  /** Show point markers on data points. Default: false. */
57
73
  showPoints?: boolean;
58
74
  /** Line drawing style: 'smooth' (curved), 'straight', or 'stepped'. */
@@ -49,6 +49,22 @@ Default: 384 (matches Figma design baseline). */
49
49
  showGridY?: boolean;
50
50
  /** Show axis tick marks and labels. */
51
51
  showTickMarks?: boolean;
52
+ /** Reserve canvas padding for axis tick labels on sides without an external scale.
53
+
54
+ When `true` (default), the chart leaves room for tick labels and renders them
55
+ (subject to `showTickMarks` and the 192px auto-compact threshold).
56
+
57
+ When `false`, the chart renders edge-to-edge on sides without a slotted external
58
+ scale AND axis tick labels are force-hidden so they cannot be clipped. This also
59
+ suppresses the automatic edge-to-edge switch that normally happens below the
60
+ 192px threshold, eliminating the visible padding "jump" when crossing it.
61
+
62
+ Useful when embedding the chart inside another component that owns framing
63
+ and never wants to show axis labels (e.g. `obc-automation-tank`).
64
+
65
+ Defaults to `true` to preserve existing behavior. Declared with `attribute: false`
66
+ because a `true`-default boolean cannot work as an HTML boolean attribute. */
67
+ hasLabelPadding?: boolean;
52
68
  /** Show point markers on data points. Default: false. */
53
69
  showPoints?: boolean;
54
70
  /** Line drawing style: 'smooth' (curved), 'straight', or 'stepped'. */
@@ -1,16 +1,20 @@
1
1
 
2
2
  <script lang="ts">
3
- export type {ScaleType, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
3
+ export type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
4
+ export type {ScaleType, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
4
5
  export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
5
6
  import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-trend/gauge-trend.js';
6
7
  import { setProperties } from "../../util.js";
7
- import type {ScaleType, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
8
+ import type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
9
+ import type {ScaleType, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
8
10
  import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
9
11
  import type { Snippet } from 'svelte';
10
12
 
11
13
  export interface Props {
12
14
  class?: string;
13
15
  style?: string;
16
+ /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */
17
+ priority?: Priority;
14
18
  /** Scale type for the vertical scale.
15
19
  - `'regular'`: Standard tick lengths (default)
16
20
  - `'condensed'`: Shorter tick lengths for compact display
@@ -1,10 +1,13 @@
1
1
  import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-trend/gauge-trend.js';
2
+ import type { Priority } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
2
3
  import type { ScaleType, FillMode } from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
3
4
  import type { LinearAdvice } from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
4
5
  import type { Snippet } from 'svelte';
5
6
  export interface Props {
6
7
  class?: string;
7
8
  style?: string;
9
+ /** Color priority: enhanced uses blue instrument colors for bar fill and setpoint */
10
+ priority?: Priority;
8
11
  /** Scale type for the vertical scale.
9
12
  - `'regular'`: Standard tick lengths (default)
10
13
  - `'condensed'`: Shorter tick lengths for compact display
@@ -80,6 +83,7 @@ export interface Slots {
80
83
  }
81
84
  type $$ComponentProps = Props & Events & Slots;
82
85
  declare const ObcGaugeTrend: import("svelte").Component<$$ComponentProps, {
86
+ Priority: typeof Priority;
83
87
  ScaleType: typeof ScaleType;
84
88
  FillMode: typeof FillMode;
85
89
  LinearAdvice: typeof LinearAdvice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.40",
3
+ "version": "2.0.0-next.42",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@oicl/openbridge-webcomponents": "^2.0.0-next.39"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.41"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"