@oicl/openbridge-webcomponents-svelte 2.0.0-next.147 → 2.0.0-next.148

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.
@@ -22,6 +22,8 @@ import type {TransmitterButtonSize} from '@oicl/openbridge-webcomponents/dist/au
22
22
  /** Integer digits to reserve / hint (independent of `fractionDigits`). */
23
23
  maxDigits?: number;
24
24
  hintedZeros?: boolean;
25
+ /** Reserve a minus-sign column on every segment, filled by the real sign only while a value is negative, so the chip's width does not change across zero. */
26
+ hasSignSpacer?: boolean;
25
27
  size?: TransmitterButtonSize;
26
28
  hasIcon?: boolean;
27
29
  hasAdvice?: boolean;
@@ -15,6 +15,8 @@ export interface Props {
15
15
  /** Integer digits to reserve / hint (independent of `fractionDigits`). */
16
16
  maxDigits?: number;
17
17
  hintedZeros?: boolean;
18
+ /** Reserve a minus-sign column on every segment, filled by the real sign only while a value is negative, so the chip's width does not change across zero. */
19
+ hasSignSpacer?: boolean;
18
20
  size?: TransmitterButtonSize;
19
21
  hasIcon?: boolean;
20
22
  hasAdvice?: boolean;
@@ -17,6 +17,8 @@
17
17
  /** Integer digits to reserve / hint (independent of `fractionDigits`). */
18
18
  maxDigits?: number;
19
19
  hintedZeros?: boolean;
20
+ /** Reserve a minus-sign column on every segment, filled by the real sign only while a value is negative, so the width does not change across zero. */
21
+ hasSignSpacer?: boolean;
20
22
  hasIcon?: boolean;
21
23
  hasAdvice?: boolean;
22
24
  /** Advisory value shown in the leading advice segment when `hasAdvice`. */
@@ -12,6 +12,8 @@ export interface Props {
12
12
  /** Integer digits to reserve / hint (independent of `fractionDigits`). */
13
13
  maxDigits?: number;
14
14
  hintedZeros?: boolean;
15
+ /** Reserve a minus-sign column on every segment, filled by the real sign only while a value is negative, so the width does not change across zero. */
16
+ hasSignSpacer?: boolean;
15
17
  hasIcon?: boolean;
16
18
  hasAdvice?: boolean;
17
19
  /** Advisory value shown in the leading advice segment when `hasAdvice`. */
@@ -46,12 +46,18 @@ import type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/compone
46
46
  */
47
47
  maxDigits?: number;
48
48
  /**
49
- * Render muted leading zeros filling the integer part to `maxDigits`.
49
+ * Render muted leading zeros filling the integer part to `maxDigits`. A negative value keeps them all — the sign is prepended and never consumes a zero (`maxDigits` 3: `12.3` → `012.3`, `-12.3` → `-012.3`) — so a negative reading is one character wider than a positive one unless `hasSignSpacer` reserves the sign column. An unavailable value renders dashes across the whole reserved width (`‒‒‒.‒`) instead of the short placeholder.
50
50
  *
51
51
  * Available when `valueType==number`.
52
52
  */
53
53
  hintedZeros?: boolean;
54
- /** Explicit longest string to reserve width for (e.g. `"0000.0"`). */
54
+ /**
55
+ * Reserve a minus-sign column ahead of the digits: an invisible sign placeholder holds the column open while the value is non-negative and the real sign fills it when negative, so the width does not change across zero. Enable it on readouts whose value can go negative; all-positive readouts reserve nothing.
56
+ *
57
+ * Available when `valueType==number`.
58
+ */
59
+ hasSignSpacer?: boolean;
60
+ /** Explicit longest string to reserve width for (e.g. `"0000.0"`). Combined with the `maxDigits`-derived reserve by taking whichever is wider, so it can never reserve less than the formatted value needs. */
55
61
  spaceReserver?: string | undefined;
56
62
  /** Render `offText` instead of a number (e.g. equipment powered down). */
57
63
  off?: boolean;
@@ -38,12 +38,18 @@ export interface Props {
38
38
  */
39
39
  maxDigits?: number;
40
40
  /**
41
- * Render muted leading zeros filling the integer part to `maxDigits`.
41
+ * Render muted leading zeros filling the integer part to `maxDigits`. A negative value keeps them all — the sign is prepended and never consumes a zero (`maxDigits` 3: `12.3` → `012.3`, `-12.3` → `-012.3`) — so a negative reading is one character wider than a positive one unless `hasSignSpacer` reserves the sign column. An unavailable value renders dashes across the whole reserved width (`‒‒‒.‒`) instead of the short placeholder.
42
42
  *
43
43
  * Available when `valueType==number`.
44
44
  */
45
45
  hintedZeros?: boolean;
46
- /** Explicit longest string to reserve width for (e.g. `"0000.0"`). */
46
+ /**
47
+ * Reserve a minus-sign column ahead of the digits: an invisible sign placeholder holds the column open while the value is non-negative and the real sign fills it when negative, so the width does not change across zero. Enable it on readouts whose value can go negative; all-positive readouts reserve nothing.
48
+ *
49
+ * Available when `valueType==number`.
50
+ */
51
+ hasSignSpacer?: boolean;
52
+ /** Explicit longest string to reserve width for (e.g. `"0000.0"`). Combined with the `maxDigits`-derived reserve by taking whichever is wider, so it can never reserve less than the formatted value needs. */
47
53
  spaceReserver?: string | undefined;
48
54
  /** Render `offText` instead of a number (e.g. equipment powered down). */
49
55
  off?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.147",
3
+ "version": "2.0.0-next.148",
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.147"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.148"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"