@oicl/openbridge-webcomponents-svelte 2.0.0-next.121 → 2.0.0-next.122

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.
@@ -52,9 +52,10 @@ animateSetpoint?: boolean;
52
52
  orientation?: TankOrientation;
53
53
  compact?: boolean;
54
54
  /** Host positioning model — see `TankPositioning` for details. Defaults to
55
- `button` (host fills parent container, 100% × 100%, no anchor offset).
56
- Set to `point` for the legacy P&ID canvas mode (fixed default dimensions
57
- + top-center anchor offset). */
55
+ `button` (host fills parent container, 100% × 100%, falling back to the
56
+ design aspect ratio on any axis the parent leaves indefinite, no anchor
57
+ offset). Set to `point` for the legacy P&ID canvas mode (fixed default
58
+ dimensions + top-center anchor offset). */
58
59
  positioning?: TankPositioning;
59
60
  /** Static (display-only) variant. Always rendered at the compact size; the
60
61
  inner chart/bar is hidden, the bordered area is filled with
@@ -67,7 +68,33 @@ Static tanks render as a non-interactive `<div role="img">` (not a
67
68
  `<button>`), so they are not in the tab order and do not announce as
68
69
  activatable controls. */
69
70
  static?: boolean;
70
- /** Enables the activated background color, used to indicate that the tank is activated/selected. */
71
+ /** Whether the tank is interactive. `true` (default) renders the root as a
72
+ `<button>` with the full flat-mixin interaction surface. `false` renders a
73
+ non-interactive `<div>` — the resting appearance is unchanged (same
74
+ enabled-state colors and the same 1px border box, via the mixin's
75
+ `noClick` variant), but the hover / pressed / focus-visible states are
76
+ gone and the tank leaves the tab order.
77
+
78
+ Everything else keeps rendering: the chart / bar, badges, readout, tag and
79
+ the `alert` frame all behave exactly as they do on a clickable tank. Use
80
+ this for a display-only tank that still shows live data — e.g. a row total
81
+ aggregating the tanks beside it. For "device present, current state
82
+ unknown" use `static` instead, which also hides the chart and shrinks to
83
+ the compact footprint.
84
+
85
+ `static` is already non-interactive, so this has no effect there.
86
+
87
+ Property-only (`attribute: false`, per the repo's positive-default-true
88
+ boolean convention — a `true` default cannot round-trip through an HTML
89
+ boolean attribute). Set it as a property: `el.clickable = false`,
90
+ `.clickable=${false}` in a Lit template, or the equivalent binding in the
91
+ React / Vue / Angular / Svelte wrappers. A `clickable="false"` attribute in
92
+ plain HTML is **not** observed and leaves the tank interactive. */
93
+ clickable?: boolean;
94
+ /** Enables the activated background color, used to indicate that the tank is
95
+ activated/selected. Requires an interactive tank — the `noClick` mixin
96
+ variant used when `clickable` is `false` only paints the enabled state, so
97
+ a non-clickable tank ignores this (matching `obc-elevated-card`). */
71
98
  activated?: boolean;
72
99
  tag?: string;
73
100
  /** Chart cell rendering mode.
@@ -40,9 +40,10 @@ regardless of instrument state. */
40
40
  orientation?: TankOrientation;
41
41
  compact?: boolean;
42
42
  /** Host positioning model — see `TankPositioning` for details. Defaults to
43
- `button` (host fills parent container, 100% × 100%, no anchor offset).
44
- Set to `point` for the legacy P&ID canvas mode (fixed default dimensions
45
- + top-center anchor offset). */
43
+ `button` (host fills parent container, 100% × 100%, falling back to the
44
+ design aspect ratio on any axis the parent leaves indefinite, no anchor
45
+ offset). Set to `point` for the legacy P&ID canvas mode (fixed default
46
+ dimensions + top-center anchor offset). */
46
47
  positioning?: TankPositioning;
47
48
  /** Static (display-only) variant. Always rendered at the compact size; the
48
49
  inner chart/bar is hidden, the bordered area is filled with
@@ -55,7 +56,33 @@ Static tanks render as a non-interactive `<div role="img">` (not a
55
56
  `<button>`), so they are not in the tab order and do not announce as
56
57
  activatable controls. */
57
58
  static?: boolean;
58
- /** Enables the activated background color, used to indicate that the tank is activated/selected. */
59
+ /** Whether the tank is interactive. `true` (default) renders the root as a
60
+ `<button>` with the full flat-mixin interaction surface. `false` renders a
61
+ non-interactive `<div>` — the resting appearance is unchanged (same
62
+ enabled-state colors and the same 1px border box, via the mixin's
63
+ `noClick` variant), but the hover / pressed / focus-visible states are
64
+ gone and the tank leaves the tab order.
65
+
66
+ Everything else keeps rendering: the chart / bar, badges, readout, tag and
67
+ the `alert` frame all behave exactly as they do on a clickable tank. Use
68
+ this for a display-only tank that still shows live data — e.g. a row total
69
+ aggregating the tanks beside it. For "device present, current state
70
+ unknown" use `static` instead, which also hides the chart and shrinks to
71
+ the compact footprint.
72
+
73
+ `static` is already non-interactive, so this has no effect there.
74
+
75
+ Property-only (`attribute: false`, per the repo's positive-default-true
76
+ boolean convention — a `true` default cannot round-trip through an HTML
77
+ boolean attribute). Set it as a property: `el.clickable = false`,
78
+ `.clickable=${false}` in a Lit template, or the equivalent binding in the
79
+ React / Vue / Angular / Svelte wrappers. A `clickable="false"` attribute in
80
+ plain HTML is **not** observed and leaves the tank interactive. */
81
+ clickable?: boolean;
82
+ /** Enables the activated background color, used to indicate that the tank is
83
+ activated/selected. Requires an interactive tank — the `noClick` mixin
84
+ variant used when `clickable` is `false` only paints the enabled state, so
85
+ a non-clickable tank ignores this (matching `obc-elevated-card`). */
59
86
  activated?: boolean;
60
87
  tag?: string;
61
88
  /** Chart cell rendering mode.
@@ -35,9 +35,19 @@ weight?: ObcTextboxFontWeight;
35
35
  hasDegree?: boolean;
36
36
  /** Show the leading marker-icon container (always on for setpoint/advice). */
37
37
  hasIcon?: boolean;
38
- /** Number of fraction digits. */
38
+ /** Number of fraction digits. Must be between 0 and 100 — the range
39
+ `Number.prototype.toFixed` accepts; outside it throws a `RangeError`.
40
+ A fractional count truncates (`2.7` → `2`). A count that never arrived
41
+ (`NaN`, `null` or unset) renders the reading as the unavailable dash —
42
+ formatting with a precision the author never chose would let a critical
43
+ `0.4` pass for a healthy `0`. */
39
44
  fractionDigits?: number;
40
- /** Integer digits to reserve / hint (independent of `fractionDigits`). */
45
+ /** Integer digits to reserve / hint (independent of `fractionDigits`).
46
+ Bounded before use: a fractional count
47
+ truncates (`2.7` → `2`), anything above 100 — including `Infinity` —
48
+ caps at 100, and a negative count reserves nothing. A count that never
49
+ arrived (`NaN`, `null` or unset) renders the reading as the unavailable
50
+ dash, consistent with `fractionDigits`. */
41
51
  maxDigits?: number;
42
52
  /** Render muted leading zeros filling the integer part to `maxDigits`. */
43
53
  hintedZeros?: boolean;
@@ -27,9 +27,19 @@ a secondary setpoint) can pass a smaller size without changing the tier. */
27
27
  hasDegree?: boolean;
28
28
  /** Show the leading marker-icon container (always on for setpoint/advice). */
29
29
  hasIcon?: boolean;
30
- /** Number of fraction digits. */
30
+ /** Number of fraction digits. Must be between 0 and 100 — the range
31
+ `Number.prototype.toFixed` accepts; outside it throws a `RangeError`.
32
+ A fractional count truncates (`2.7` → `2`). A count that never arrived
33
+ (`NaN`, `null` or unset) renders the reading as the unavailable dash —
34
+ formatting with a precision the author never chose would let a critical
35
+ `0.4` pass for a healthy `0`. */
31
36
  fractionDigits?: number;
32
- /** Integer digits to reserve / hint (independent of `fractionDigits`). */
37
+ /** Integer digits to reserve / hint (independent of `fractionDigits`).
38
+ Bounded before use: a fractional count
39
+ truncates (`2.7` → `2`), anything above 100 — including `Infinity` —
40
+ caps at 100, and a negative count reserves nothing. A count that never
41
+ arrived (`NaN`, `null` or unset) renders the reading as the unavailable
42
+ dash, consistent with `fractionDigits`. */
33
43
  maxDigits?: number;
34
44
  /** Render muted leading zeros filling the integer part to `maxDigits`. */
35
45
  hintedZeros?: boolean;
@@ -47,10 +47,19 @@ offText?: string;
47
47
  hasDegree?: boolean;
48
48
  hasDegreeSpacer?: boolean;
49
49
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
50
- even when the value is text. */
50
+ even when the value is text. Must be between 0 and 100 — the range
51
+ `Number.prototype.toFixed` accepts; outside it throws a `RangeError`.
52
+ A fractional count truncates (`2.7` → `2`). A count that never arrived
53
+ (`NaN`, `null` or unset) renders the reading as the unavailable dash —
54
+ formatting with a precision the author never chose would let a critical
55
+ `0.4` pass for a healthy `0`. */
51
56
  fractionDigits?: number;
52
57
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
53
- even when the value is text. */
58
+ even when the value is text. Bounded before use: a fractional count
59
+ truncates (`2.7` → `2`), anything above 100 — including `Infinity` —
60
+ caps at 100, and a negative count reserves nothing. A count that never
61
+ arrived (`NaN`, `null` or unset) renders the reading as the unavailable
62
+ dash, consistent with `fractionDigits`. */
54
63
  maxDigits?: number;
55
64
  dataQuality?: ReadoutBlockDataQuality | undefined;
56
65
  alert?: boolean | AlertFrameConfig;
@@ -37,10 +37,19 @@ value block at full size, so the layout does not shift when data arrives. */
37
37
  hasDegree?: boolean;
38
38
  hasDegreeSpacer?: boolean;
39
39
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
40
- even when the value is text. */
40
+ even when the value is text. Must be between 0 and 100 — the range
41
+ `Number.prototype.toFixed` accepts; outside it throws a `RangeError`.
42
+ A fractional count truncates (`2.7` → `2`). A count that never arrived
43
+ (`NaN`, `null` or unset) renders the reading as the unavailable dash —
44
+ formatting with a precision the author never chose would let a critical
45
+ `0.4` pass for a healthy `0`. */
41
46
  fractionDigits?: number;
42
47
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
43
- even when the value is text. */
48
+ even when the value is text. Bounded before use: a fractional count
49
+ truncates (`2.7` → `2`), anything above 100 — including `Infinity` —
50
+ caps at 100, and a negative count reserves nothing. A count that never
51
+ arrived (`NaN`, `null` or unset) renders the reading as the unavailable
52
+ dash, consistent with `fractionDigits`. */
44
53
  maxDigits?: number;
45
54
  dataQuality?: ReadoutBlockDataQuality | undefined;
46
55
  alert?: boolean | AlertFrameConfig;
@@ -43,10 +43,19 @@ offText?: string;
43
43
  hasDegree?: boolean;
44
44
  hasDegreeSpacer?: boolean;
45
45
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
46
- even when the value is text. */
46
+ even when the value is text. Must be between 0 and 100 — the range
47
+ `Number.prototype.toFixed` accepts; outside it throws a `RangeError`.
48
+ A fractional count truncates (`2.7` → `2`). A count that never arrived
49
+ (`NaN`, `null` or unset) renders the reading as the unavailable dash —
50
+ formatting with a precision the author never chose would let a critical
51
+ `0.4` pass for a healthy `0`. */
47
52
  fractionDigits?: number;
48
53
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
49
- even when the value is text. */
54
+ even when the value is text. Bounded before use: a fractional count
55
+ truncates (`2.7` → `2`), anything above 100 — including `Infinity` —
56
+ caps at 100, and a negative count reserves nothing. A count that never
57
+ arrived (`NaN`, `null` or unset) renders the reading as the unavailable
58
+ dash, consistent with `fractionDigits`. */
50
59
  maxDigits?: number;
51
60
  dataQuality?: ReadoutBlockDataQuality | undefined;
52
61
  alert?: boolean | AlertFrameConfig;
@@ -35,10 +35,19 @@ block at full size, so the row does not shift when data arrives. */
35
35
  hasDegree?: boolean;
36
36
  hasDegreeSpacer?: boolean;
37
37
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
38
- even when the value is text. */
38
+ even when the value is text. Must be between 0 and 100 — the range
39
+ `Number.prototype.toFixed` accepts; outside it throws a `RangeError`.
40
+ A fractional count truncates (`2.7` → `2`). A count that never arrived
41
+ (`NaN`, `null` or unset) renders the reading as the unavailable dash —
42
+ formatting with a precision the author never chose would let a critical
43
+ `0.4` pass for a healthy `0`. */
39
44
  fractionDigits?: number;
40
45
  /** Also formats the numeric setpoint / advice blocks, which stay numeric
41
- even when the value is text. */
46
+ even when the value is text. Bounded before use: a fractional count
47
+ truncates (`2.7` → `2`), anything above 100 — including `Infinity` —
48
+ caps at 100, and a negative count reserves nothing. A count that never
49
+ arrived (`NaN`, `null` or unset) renders the reading as the unavailable
50
+ dash, consistent with `fractionDigits`. */
42
51
  maxDigits?: number;
43
52
  dataQuality?: ReadoutBlockDataQuality | undefined;
44
53
  alert?: boolean | AlertFrameConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.121",
3
+ "version": "2.0.0-next.122",
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.120"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.121"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"