@oicl/openbridge-webcomponents-svelte 2.0.0-next.102 → 2.0.0-next.103

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,13 @@
1
1
 
2
2
  <script lang="ts">
3
- export type {InstrumentState, Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
3
+ export type {RadialFrame} from '@oicl/openbridge-webcomponents/dist/svghelpers/radial-frame.js';
4
+ export type {InstrumentState, Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
4
5
  export type {ObcGaugeRadialType, GaugeRadialAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-radial/instrument-radial.js';
5
6
  export type {TickmarkStyle} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/tickmark.js';
6
7
  import '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-radial/instrument-radial.js';
7
8
  import { setProperties } from "../../util.js";
8
- import type {InstrumentState, Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
9
+ import type {RadialFrame} from '@oicl/openbridge-webcomponents/dist/svghelpers/radial-frame.js';
10
+ import type {InstrumentState, Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
9
11
  import type {ObcGaugeRadialType, GaugeRadialAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-radial/instrument-radial.js';
10
12
  import type {TickmarkStyle} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/tickmark.js';
11
13
  import type { Snippet } from 'svelte';
@@ -65,22 +67,28 @@ tertiaryTickmarkInterval?: number | undefined;
65
67
  of beside it — the "Max-min" placement from the radial label model
66
68
  (External / Internal / Max-min). See PR #903 / design discussion. */
67
69
  endLabelsMaxMin?: boolean;
68
- zoomToFitArc?: boolean
70
+ zoomToFitArc?: boolean;
71
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
72
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
73
+ so instruments sharing the same value have identical ring circumference
74
+ regardless of label width or arc extent (like obc-donut-chart's
75
+ fixedHeight). When unset (default), the instrument fills its container. */
76
+ faceDiameter?: number | undefined
69
77
  }
70
78
  export interface Events {
71
-
79
+ onFrameChanged?: (event: CustomEvent<RadialFrame>) => void
72
80
  }
73
81
  export interface Slots {
74
82
  children?: Snippet
75
83
  }
76
- const { class: className, style, children, ...props} = $props<Props & Events & Slots>();
84
+ const {onFrameChanged, class: className, style, children, ...props} = $props<Props & Events & Slots>();
77
85
 
78
86
  </script>
79
87
  <obc-instrument-radial
80
88
  use:setProperties={props}
81
89
  class={className}
82
90
  style={style}
83
- >
91
+ onframe-changed={onFrameChanged} >
84
92
 
85
93
  {#if children}
86
94
  {@render children()}
@@ -1,4 +1,5 @@
1
1
  import '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-radial/instrument-radial.js';
2
+ import type { RadialFrame } from '@oicl/openbridge-webcomponents/dist/svghelpers/radial-frame.js';
2
3
  import type { InstrumentState, Priority } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
3
4
  import type { ObcGaugeRadialType, GaugeRadialAdvice } from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-radial/instrument-radial.js';
4
5
  import type { TickmarkStyle } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/tickmark.js';
@@ -59,14 +60,22 @@ of beside it — the "Max-min" placement from the radial label model
59
60
  (External / Internal / Max-min). See PR #903 / design discussion. */
60
61
  endLabelsMaxMin?: boolean;
61
62
  zoomToFitArc?: boolean;
63
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
64
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
65
+ so instruments sharing the same value have identical ring circumference
66
+ regardless of label width or arc extent (like obc-donut-chart's
67
+ fixedHeight). When unset (default), the instrument fills its container. */
68
+ faceDiameter?: number | undefined;
62
69
  }
63
70
  export interface Events {
71
+ onFrameChanged?: (event: CustomEvent<RadialFrame>) => void;
64
72
  }
65
73
  export interface Slots {
66
74
  children?: Snippet;
67
75
  }
68
76
  type $$ComponentProps = Props & Events & Slots;
69
77
  declare const ObcInstrumentRadial: import("svelte").Component<$$ComponentProps, {
78
+ RadialFrame: typeof RadialFrame;
70
79
  InstrumentState: typeof InstrumentState;
71
80
  Priority: typeof Priority;
72
81
  ObcGaugeRadialType: typeof ObcGaugeRadialType;
@@ -57,7 +57,13 @@ tertiaryTickmarkInterval?: number | undefined;
57
57
  topPropeller?: PropellerType;
58
58
  bottomPropeller?: PropellerType;
59
59
  tickmarkStyle?: TickmarkStyle;
60
- starboardPortIndicator?: boolean
60
+ starboardPortIndicator?: boolean;
61
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
62
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
63
+ so instruments sharing the same value have identical ring circumference
64
+ regardless of label width or arc extent (like obc-donut-chart's
65
+ fixedHeight). When unset (default), the instrument fills its container. */
66
+ faceDiameter?: number | undefined
61
67
  }
62
68
  export interface Events {
63
69
 
@@ -49,6 +49,12 @@ When undefined or <= 0, no tertiary tickmarks are shown. */
49
49
  bottomPropeller?: PropellerType;
50
50
  tickmarkStyle?: TickmarkStyle;
51
51
  starboardPortIndicator?: boolean;
52
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
53
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
54
+ so instruments sharing the same value have identical ring circumference
55
+ regardless of label width or arc extent (like obc-donut-chart's
56
+ fixedHeight). When unset (default), the instrument fills its container. */
57
+ faceDiameter?: number | undefined;
52
58
  }
53
59
  export interface Events {
54
60
  }
@@ -82,7 +82,13 @@ priority?: Priority;
82
82
  /** Show compass NSEW labels and north arrow. */
83
83
  showLabels?: boolean;
84
84
  /** When true, labels and north arrow are placed inside the outer ring. */
85
- tickmarksInside?: boolean
85
+ tickmarksInside?: boolean;
86
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
87
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
88
+ so instruments sharing the same value have identical ring circumference
89
+ regardless of label width or arc extent (like obc-donut-chart's
90
+ fixedHeight). When unset (default), the instrument fills its container. */
91
+ faceDiameter?: number | undefined
86
92
  }
87
93
  export interface Events {
88
94
 
@@ -75,6 +75,12 @@ the physical ROT API was introduced. */
75
75
  showLabels?: boolean;
76
76
  /** When true, labels and north arrow are placed inside the outer ring. */
77
77
  tickmarksInside?: boolean;
78
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
79
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
80
+ so instruments sharing the same value have identical ring circumference
81
+ regardless of label width or arc extent (like obc-donut-chart's
82
+ fixedHeight). When unset (default), the instrument fills its container. */
83
+ faceDiameter?: number | undefined;
78
84
  }
79
85
  export interface Events {
80
86
  }
@@ -65,7 +65,13 @@ Default `false`. */
65
65
  hasReadout?: boolean;
66
66
  label?: string;
67
67
  unit?: string;
68
- fractionDigits?: number
68
+ fractionDigits?: number;
69
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
70
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
71
+ so instruments sharing the same value have identical ring circumference
72
+ regardless of label width or arc extent (like obc-donut-chart's
73
+ fixedHeight). When unset (default), the instrument fills its container. */
74
+ faceDiameter?: number | undefined
69
75
  }
70
76
  export interface Events {
71
77
 
@@ -59,6 +59,12 @@ Default `false`. */
59
59
  label?: string;
60
60
  unit?: string;
61
61
  fractionDigits?: number;
62
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
63
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
64
+ so instruments sharing the same value have identical ring circumference
65
+ regardless of label width or arc extent (like obc-donut-chart's
66
+ fixedHeight). When unset (default), the instrument fills its container. */
67
+ faceDiameter?: number | undefined;
62
68
  }
63
69
  export interface Events {
64
70
  }
@@ -31,7 +31,13 @@ import type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-inst
31
31
  /** Show compass NSEW labels. */
32
32
  showLabels?: boolean;
33
33
  /** When true, labels and north arrow are placed inside the outer ring. */
34
- tickmarksInside?: boolean
34
+ tickmarksInside?: boolean;
35
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
36
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
37
+ so instruments sharing the same value have identical ring circumference
38
+ regardless of label width or arc extent (like obc-donut-chart's
39
+ fixedHeight). When unset (default), the instrument fills its container. */
40
+ faceDiameter?: number | undefined
35
41
  }
36
42
  export interface Events {
37
43
 
@@ -25,6 +25,12 @@ export interface Props {
25
25
  showLabels?: boolean;
26
26
  /** When true, labels and north arrow are placed inside the outer ring. */
27
27
  tickmarksInside?: boolean;
28
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
29
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
30
+ so instruments sharing the same value have identical ring circumference
31
+ regardless of label width or arc extent (like obc-donut-chart's
32
+ fixedHeight). When unset (default), the instrument fills its container. */
33
+ faceDiameter?: number | undefined;
28
34
  }
29
35
  export interface Events {
30
36
  }
@@ -46,7 +46,13 @@ tickmarksInside?: boolean;
46
46
  priority?: Priority;
47
47
  tickmarkStyle?: TickmarkStyle;
48
48
  advices?: AngleAdvice[];
49
- zoomToFitArc?: boolean
49
+ zoomToFitArc?: boolean;
50
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
51
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
52
+ so instruments sharing the same value have identical ring circumference
53
+ regardless of label width or arc extent (like obc-donut-chart's
54
+ fixedHeight). When unset (default), the instrument fills its container. */
55
+ faceDiameter?: number | undefined
50
56
  }
51
57
  export interface Events {
52
58
 
@@ -39,6 +39,12 @@ regardless of instrument state. */
39
39
  tickmarkStyle?: TickmarkStyle;
40
40
  advices?: AngleAdvice[];
41
41
  zoomToFitArc?: boolean;
42
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
43
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
44
+ so instruments sharing the same value have identical ring circumference
45
+ regardless of label width or arc extent (like obc-donut-chart's
46
+ fixedHeight). When unset (default), the instrument fills its container. */
47
+ faceDiameter?: number | undefined;
42
48
  }
43
49
  export interface Events {
44
50
  }
@@ -55,7 +55,13 @@ label?: string;
55
55
  /** Readout unit. Default `KN`. */
56
56
  unit?: string;
57
57
  /** Number of fraction digits shown in the readout. Default `1`. */
58
- fractionDigits?: number
58
+ fractionDigits?: number;
59
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
60
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
61
+ so instruments sharing the same value have identical ring circumference
62
+ regardless of label width or arc extent (like obc-donut-chart's
63
+ fixedHeight). When unset (default), the instrument fills its container. */
64
+ faceDiameter?: number | undefined
59
65
  }
60
66
  export interface Events {
61
67
 
@@ -49,6 +49,12 @@ below the gauge with the current speed. Default `false`. */
49
49
  unit?: string;
50
50
  /** Number of fraction digits shown in the readout. Default `1`. */
51
51
  fractionDigits?: number;
52
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
53
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
54
+ so instruments sharing the same value have identical ring circumference
55
+ regardless of label width or arc extent (like obc-donut-chart's
56
+ fixedHeight). When unset (default), the instrument fills its container. */
57
+ faceDiameter?: number | undefined;
52
58
  }
53
59
  export interface Events {
54
60
  }
@@ -38,7 +38,16 @@ angleSetpointAtZeroDeadband?: number;
38
38
  setpointOverride?: boolean;
39
39
  touching?: boolean;
40
40
  animateSetpoint?: boolean;
41
- padding?: number | undefined;
41
+ /** Explicit padding override in SVG units: the un-zoomed viewBox becomes
42
+ exactly `(176 + padding) * 2`. Setting it disables the automatic
43
+ width-aware label reserve (issue #1021) — the caller owns label room. */
44
+ padding?: number | undefined;
45
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
46
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
47
+ so instruments sharing the same value have identical ring circumference
48
+ regardless of label width or arc extent (like obc-donut-chart's
49
+ fixedHeight). When unset (default), the instrument fills its container. */
50
+ faceDiameter?: number | undefined;
42
51
  areas?: WatchArea[];
43
52
  barAreas?: WatchBarArea[];
44
53
  needles?: WatchNeedle[];
@@ -28,7 +28,16 @@ export interface Props {
28
28
  setpointOverride?: boolean;
29
29
  touching?: boolean;
30
30
  animateSetpoint?: boolean;
31
+ /** Explicit padding override in SVG units: the un-zoomed viewBox becomes
32
+ exactly `(176 + padding) * 2`. Setting it disables the automatic
33
+ width-aware label reserve (issue #1021) — the caller owns label room. */
31
34
  padding?: number | undefined;
35
+ /** Outer-ring diameter in CSS pixels. When set, the instrument renders at a
36
+ fixed intrinsic size derived from the ring, arc shape and label reserve —
37
+ so instruments sharing the same value have identical ring circumference
38
+ regardless of label width or arc extent (like obc-donut-chart's
39
+ fixedHeight). When unset (default), the instrument fills its container. */
40
+ faceDiameter?: number | undefined;
32
41
  areas?: WatchArea[];
33
42
  barAreas?: WatchBarArea[];
34
43
  needles?: WatchNeedle[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.102",
3
+ "version": "2.0.0-next.103",
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.101"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.102"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"