smithkit 0.2.0 → 0.3.0

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 (38) hide show
  1. package/README.md +176 -6
  2. package/dist/lib/Smith.d.ts +13 -37
  3. package/dist/lib/Smith.js +82 -282
  4. package/dist/lib/appearance/SvgTheme.d.ts +6 -0
  5. package/dist/lib/appearance/SvgTheme.js +21 -0
  6. package/dist/lib/appearance/Theme.d.ts +8 -0
  7. package/dist/lib/appearance/Theme.js +120 -0
  8. package/dist/lib/appearance/types.d.ts +55 -0
  9. package/dist/lib/appearance/types.js +1 -0
  10. package/dist/lib/grid/ConstCircles.d.ts +0 -3
  11. package/dist/lib/grid/ConstCircles.js +6 -20
  12. package/dist/lib/grid/ConstQCircles.js +1 -1
  13. package/dist/lib/grid/ConstSwrCircles.js +1 -1
  14. package/dist/lib/grid/GridDefinitions.d.ts +7 -1
  15. package/dist/lib/grid/GridDefinitions.js +29 -0
  16. package/dist/lib/grid/GridLayerControl.d.ts +5 -4
  17. package/dist/lib/grid/GridLayerControl.js +11 -2
  18. package/dist/lib/grid/SmithGridLayer.d.ts +7 -1
  19. package/dist/lib/grid/SmithGridLayer.js +35 -5
  20. package/dist/lib/index.d.ts +3 -1
  21. package/dist/lib/interaction/SmithCursor.d.ts +0 -17
  22. package/dist/lib/interaction/SmithCursor.js +6 -14
  23. package/dist/lib/layers.d.ts +5 -1
  24. package/dist/lib/rendering/SvgChartRenderer.d.ts +66 -0
  25. package/dist/lib/rendering/SvgChartRenderer.js +342 -0
  26. package/dist/lib/scales/SmithPeripheralScales.js +11 -11
  27. package/dist/lib/scales/SmithScales.d.ts +10 -3
  28. package/dist/lib/scales/SmithScales.js +73 -39
  29. package/dist/lib/svg/ImageExporter.d.ts +18 -0
  30. package/dist/lib/svg/ImageExporter.js +211 -0
  31. package/dist/lib/svg/MarkerLegend.d.ts +12 -0
  32. package/dist/lib/svg/MarkerLegend.js +63 -0
  33. package/dist/lib/svg/SvgExporter.d.ts +6 -1
  34. package/dist/lib/svg/SvgExporter.js +50 -5
  35. package/dist/lib/svg/export.d.ts +36 -0
  36. package/dist/lib/svg/export.js +1 -0
  37. package/dist/lib/traces/SmithMarker.js +8 -5
  38. package/package.json +1 -1
@@ -0,0 +1,55 @@
1
+ /** Resolved appearance shared by charts and independent scales. Lengths are positive. */
2
+ export interface SmithTheme {
3
+ background: string;
4
+ fontFamily: string;
5
+ grid: {
6
+ stroke: string;
7
+ textColor: string;
8
+ majorWidth: number;
9
+ minorWidth: number;
10
+ fontSize: number;
11
+ };
12
+ boundary: {
13
+ stroke: string;
14
+ width: number;
15
+ };
16
+ circles: {
17
+ q: string;
18
+ vswr: string;
19
+ width: number;
20
+ };
21
+ scales: {
22
+ stroke: string;
23
+ boundaryColor: string;
24
+ textColor: string;
25
+ valueColor: string;
26
+ indicatorColor: string;
27
+ indicatorOutline: string;
28
+ fontSize: number;
29
+ titleFontSize: number;
30
+ valueFontSize: number;
31
+ peripheralFontSize: number;
32
+ };
33
+ cursor: {
34
+ pointColor: string;
35
+ impedanceColor: string;
36
+ admittanceColor: string;
37
+ pointSize: number;
38
+ lineWidth: number;
39
+ };
40
+ marker: {
41
+ outlineColor: string;
42
+ textColor: string;
43
+ focusColor: string;
44
+ focusHaloColor: string;
45
+ };
46
+ traceColors: readonly string[];
47
+ }
48
+ export type SmithThemeOverrides = {
49
+ [K in keyof SmithTheme]?: SmithTheme[K] extends readonly string[] ? readonly string[] : SmithTheme[K] extends object ? Partial<SmithTheme[K]> : SmithTheme[K];
50
+ };
51
+ /** Each application replaces the previous appearance, starting from the named preset. */
52
+ export interface SmithAppearance {
53
+ theme?: 'light' | 'dark';
54
+ overrides?: SmithThemeOverrides;
55
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -35,9 +35,6 @@ export declare abstract class ConstCircles {
35
35
  visibility(visible: boolean): void;
36
36
  show(): void;
37
37
  hide(): void;
38
- displayMinor(display: boolean): void;
39
- showMinor(): void;
40
- hideMinor(): void;
41
38
  protected build(): SmithGroup;
42
39
  /** Mount labels separately so every grid line is painted before any label. */
43
40
  get labels(): SmithGroup;
@@ -26,20 +26,6 @@ export class ConstCircles {
26
26
  this.container.hide();
27
27
  this.texts.hide();
28
28
  }
29
- displayMinor(display) {
30
- if (display) {
31
- this.minor.show();
32
- }
33
- else {
34
- this.minor.hide();
35
- }
36
- }
37
- showMinor() {
38
- this.minor.show();
39
- }
40
- hideMinor() {
41
- this.minor.hide();
42
- }
43
29
  build() {
44
30
  this.texts.hide();
45
31
  return this.container.append(this.minor).append(this.major).hide();
@@ -108,12 +94,12 @@ export class ConstCircles {
108
94
  defaultDrawingOptions() {
109
95
  return {
110
96
  // Keep curved grid strokes visible at normal browser zoom and low pixel density.
111
- stroke: '#64748b',
112
- majorWidth: '1',
113
- minorWidth: '0.6',
114
- textColor: 'black',
115
- textFontFamily: 'Verdana',
116
- textFontSize: '1',
97
+ stroke: 'var(--smithkit-grid-stroke)',
98
+ majorWidth: 'var(--smithkit-grid-majorWidth)',
99
+ minorWidth: 'var(--smithkit-grid-minorWidth)',
100
+ textColor: 'var(--smithkit-grid-textColor)',
101
+ textFontFamily: 'var(--smithkit-fontFamily)',
102
+ textFontSize: 'var(--smithkit-grid-fontSize)',
117
103
  };
118
104
  }
119
105
  scaleArc(scaler, d) {
@@ -28,7 +28,7 @@ export class ConstQCircles {
28
28
  this.container.append(a2);
29
29
  }
30
30
  getDefaultDrawOptions() {
31
- return { stroke: 'blue', strokeWidth: '1' };
31
+ return { stroke: 'var(--smithkit-circles-q)', strokeWidth: 'var(--smithkit-circles-width)' };
32
32
  }
33
33
  setDrawOptions(opts) {
34
34
  this.opts = opts;
@@ -27,7 +27,7 @@ export class ConstSwrCircles {
27
27
  this.container.append(circle);
28
28
  }
29
29
  getDefaultDrawOptions() {
30
- return { stroke: 'orange', strokeWidth: '1' };
30
+ return { stroke: 'var(--smithkit-circles-vswr)', strokeWidth: 'var(--smithkit-circles-width)' };
31
31
  }
32
32
  setDrawOptions(opts) {
33
33
  this.opts = opts;
@@ -1,6 +1,12 @@
1
- import type { SmithTicksData } from './types.js';
1
+ import type { SmithTicksData, SmithTicksShapes } from './types.js';
2
2
  export declare class GridDefinitions {
3
3
  private constructor();
4
+ static readonly basicValues: readonly number[];
5
+ /** Complete principal circles and boundary-to-axis arcs for a sparse grid. */
6
+ static basic(): {
7
+ resistance: SmithTicksShapes;
8
+ reactance: SmithTicksShapes;
9
+ };
4
10
  private static readonly resistanceMajor;
5
11
  private static readonly resistanceMinor;
6
12
  private static readonly reactanceMajor;
@@ -1,5 +1,34 @@
1
1
  export class GridDefinitions {
2
2
  constructor() { }
3
+ static basicValues = Object.freeze([0.2, 0.5, 1, 2, 5]);
4
+ /** Complete principal circles and boundary-to-axis arcs for a sparse grid. */
5
+ static basic() {
6
+ return {
7
+ resistance: { lines: [], circles: [...GridDefinitions.basicValues], arcs: [] },
8
+ reactance: {
9
+ lines: [{ p1: [-1, 0], p2: [1, 0] }],
10
+ circles: [],
11
+ arcs: GridDefinitions.basicValues.flatMap((value) => [
12
+ [
13
+ value,
14
+ [
15
+ [0, 0],
16
+ [0, 1],
17
+ ],
18
+ [false, false],
19
+ ],
20
+ [
21
+ -value,
22
+ [
23
+ [0, 1],
24
+ [0, 0],
25
+ ],
26
+ [false, true],
27
+ ],
28
+ ]),
29
+ },
30
+ };
31
+ }
3
32
  static resistanceMajor = [
4
33
  [[0.05, 0.15], 0.2, -0.2, false],
5
34
  [[0.1, 0.3, 0.5, 0.7, 0.9], 2, -2, true],
@@ -1,12 +1,13 @@
1
- import type { ConstCircles } from './ConstCircles.js';
2
- import type { GridLayer, GridStyle } from '../layers.js';
1
+ import type { SmithGridLayer } from './SmithGridLayer.js';
2
+ import type { GridDetail, GridLayer, GridStyle } from '../layers.js';
3
3
  import { LayerControl } from './LayerControl.js';
4
4
  /** Exposes grid controls without exposing the SVG renderer. */
5
5
  export declare class GridLayerControl extends LayerControl implements GridLayer {
6
6
  private readonly layer;
7
7
  private readonly changed;
8
- constructor(layer: ConstCircles, assertAlive: () => void, changed: () => void);
8
+ constructor(layer: SmithGridLayer, assertAlive: () => void, changed: () => void);
9
9
  setVisible(visible: boolean): void;
10
- setMinorVisible(visible: boolean): void;
10
+ setLabelsVisible(visible: boolean): void;
11
+ setDetail(detail: GridDetail): void;
11
12
  setStyle(style: Partial<GridStyle>): void;
12
13
  }
@@ -13,9 +13,18 @@ export class GridLayerControl extends LayerControl {
13
13
  this.layer.visibility(visible);
14
14
  this.changed();
15
15
  }
16
- setMinorVisible(visible) {
16
+ setLabelsVisible(visible) {
17
17
  this.assertAlive();
18
- this.layer.displayMinor(visible);
18
+ this.layer.setLabelsVisible(visible);
19
+ this.changed();
20
+ }
21
+ setDetail(detail) {
22
+ this.assertAlive();
23
+ if (!['basic', 'standard', 'detailed'].includes(detail)) {
24
+ throw new RangeError('Grid detail must be basic, standard, or detailed.');
25
+ }
26
+ this.layer.setDetail(detail);
27
+ this.changed();
19
28
  }
20
29
  setStyle(style) {
21
30
  this.assertAlive();
@@ -3,9 +3,10 @@ import { SmithGroup } from '../svg/SmithGroup.js';
3
3
  import type { SmithScaler } from '../svg/SmithScaler.js';
4
4
  import type { SmithTicksData } from './types.js';
5
5
  import { type GridKind } from './GridGeometry.js';
6
+ import type { GridDetail } from '../layers.js';
6
7
  export interface GridLayerParams {
7
8
  scaler: SmithScaler;
8
- showMinor: boolean;
9
+ detail: GridDetail;
9
10
  data: SmithTicksData;
10
11
  }
11
12
  /** SVG adapter shared by the four constant impedance/admittance layers. */
@@ -14,7 +15,12 @@ export declare class SmithGridLayer extends ConstCircles {
14
15
  protected major: SmithGroup;
15
16
  protected minor: SmithGroup;
16
17
  protected texts: SmithGroup;
18
+ private readonly standardDefinitions;
19
+ private readonly basicDefinitions;
20
+ private detail;
17
21
  constructor(params: GridLayerParams, kind: GridKind);
22
+ setLabelsVisible(visible: boolean): void;
23
+ setDetail(detail: GridDetail): void;
18
24
  private static labelPriority;
19
25
  private drawGrid;
20
26
  }
@@ -2,6 +2,7 @@ import { ConstCircles } from './ConstCircles.js';
2
2
  import { SmithGroup } from '../svg/SmithGroup.js';
3
3
  import { SmithText } from '../svg/SmithText.js';
4
4
  import { GridGeometry } from './GridGeometry.js';
5
+ import { GridDefinitions } from './GridDefinitions.js';
5
6
  import { GridLabels } from './GridLabels.js';
6
7
  /** SVG adapter shared by the four constant impedance/admittance layers. */
7
8
  export class SmithGridLayer extends ConstCircles {
@@ -9,17 +10,23 @@ export class SmithGridLayer extends ConstCircles {
9
10
  major;
10
11
  minor;
11
12
  texts;
13
+ standardDefinitions;
14
+ basicDefinitions;
15
+ detail = 'detailed';
12
16
  constructor(params, kind) {
13
17
  super(params.scaler);
14
18
  this.kind = kind;
15
19
  const real = kind === 'resistance' || kind === 'conductance';
16
20
  const definitions = params.data[real ? 'resistance' : 'reactance'];
21
+ this.standardDefinitions = definitions.major;
22
+ this.basicDefinitions = GridDefinitions.basic()[real ? 'resistance' : 'reactance'];
17
23
  this.major = this.drawGrid(definitions.major, this.opts.majorWidth);
18
24
  this.minor = this.drawGrid(definitions.minor, this.opts.minorWidth);
19
25
  this.texts = new SmithGroup()
20
26
  .attr('stroke', 'none')
21
- .attr('font-size', '7')
22
- .attr('font-family', 'Verdana');
27
+ .attr('font-size', this.opts.textFontSize)
28
+ .attr('font-family', this.opts.textFontFamily)
29
+ .attr('fill', this.opts.textColor);
23
30
  for (const tick of real ? GridLabels.resistance() : GridLabels.reactance()) {
24
31
  const label = GridGeometry.label(kind, tick.definition);
25
32
  const text = new SmithText(this.scaler.point(label.point), label.text, {
@@ -30,12 +37,36 @@ export class SmithGridLayer extends ConstCircles {
30
37
  dominantBaseline: label.dominantBaseline,
31
38
  });
32
39
  text.Element.attr('data-label-priority', SmithGridLayer.labelPriority(tick.definition.point.r, tick.definition.point.i));
40
+ const { r, i } = tick.definition.point;
41
+ const basic = real
42
+ ? i === 0 && (r === 0 || GridDefinitions.basicValues.includes(r))
43
+ : r === 0 && GridDefinitions.basicValues.includes(Math.abs(i));
44
+ text.Element.attr('data-basic-label', String(basic));
33
45
  this.texts.append(text);
34
46
  }
35
47
  this.build();
36
- if (!params.showMinor) {
48
+ this.setDetail(params.detail);
49
+ }
50
+ setLabelsVisible(visible) {
51
+ // Keep this separate from whole-layer opacity and detail-specific label filtering.
52
+ this.texts.attr('display', visible ? null : 'none');
53
+ }
54
+ setDetail(detail) {
55
+ if (detail === this.detail) {
56
+ return;
57
+ }
58
+ if ((detail === 'basic') !== (this.detail === 'basic')) {
59
+ this.major.Element.selectAll('*').remove();
60
+ this.drawGrid(detail === 'basic' ? this.basicDefinitions : this.standardDefinitions, this.opts.majorWidth, this.major);
61
+ }
62
+ if (detail === 'detailed') {
63
+ this.minor.show();
64
+ }
65
+ else {
37
66
  this.minor.hide();
38
67
  }
68
+ this.texts.Element.selectAll('[data-basic-label="false"]').attr('display', detail === 'basic' ? 'none' : null);
69
+ this.detail = detail;
39
70
  }
40
71
  static labelPriority(real, imaginary) {
41
72
  const value = Math.abs(imaginary === 0 ? real : imaginary);
@@ -52,9 +83,8 @@ export class SmithGridLayer extends ConstCircles {
52
83
  : 40;
53
84
  return importance + (imaginary === 0 ? 20 : real === 0 ? 10 : 0);
54
85
  }
55
- drawGrid(definitions, width) {
86
+ drawGrid(definitions, width, group = new SmithGroup()) {
56
87
  const geometry = GridGeometry.shapes(this.kind, definitions);
57
- const group = new SmithGroup();
58
88
  this.drawShapes(group.Element, this.opts.stroke, width, {
59
89
  lines: geometry.lines.map((line) => this.scaler.line(line)),
60
90
  circles: geometry.circles.map((circle) => this.scaler.circle(circle)),
@@ -9,6 +9,8 @@ export { MarkerMeasurements } from './MarkerMeasurements.js';
9
9
  export type { TraceOptions, TraceUpdateOptions, MarkerSelectionStrategy, TraceStyle, TraceRenderMode, TraceInfo, MarkerInfo, MarkerSnapshot, MarkerComparison, } from './measurements.js';
10
10
  export { RfCalculations } from './rf/RfCalculations.js';
11
11
  export type { SmithReading } from './rf/RfCalculations.js';
12
- export type { GridStyle, CircleStyle, GridLayer, CircleLayer, ChartLayers, PeripheralScales, } from './layers.js';
12
+ export type { GridStyle, CircleStyle, GridLayer, GridDetail, CircleLayer, ChartLayers, PeripheralScales, } from './layers.js';
13
13
  export { SmithFormatter } from './SmithFormatter.js';
14
14
  export type { ReactiveComponent } from './rf/RfCalculations.js';
15
+ export type { SmithAppearance, SmithTheme, SmithThemeOverrides } from './appearance/types.js';
16
+ export type { MarkerLegendField, MarkerLegendOptions, ImageExportOptions, SmithImageExportOptions, ScaleImageExportOptions, ScaleExportReadout, } from './svg/export.js';
@@ -1,25 +1,10 @@
1
1
  import { SmithGroup } from '../svg/SmithGroup.js';
2
2
  import { SmithScaler } from '../svg/SmithScaler.js';
3
3
  import { Complex } from '../math/Complex.js';
4
- interface DrawOptions {
5
- point: {
6
- radius: number;
7
- color: string;
8
- };
9
- impedance: {
10
- width: number;
11
- color: string;
12
- };
13
- admittance: {
14
- width: number;
15
- color: string;
16
- };
17
- }
18
4
  export declare class SmithCursor {
19
5
  private scaler;
20
6
  private epsilon;
21
7
  private pendingMove;
22
- private drawingOpts;
23
8
  private calcs;
24
9
  private zClipCircle;
25
10
  private yClipCircle;
@@ -44,6 +29,4 @@ export declare class SmithCursor {
44
29
  hide(): void;
45
30
  private cancelPendingMove;
46
31
  setMoveHandler(handler: ((rc: Complex) => void) | null): void;
47
- setDrawOptions(opts: DrawOptions): void;
48
32
  }
49
- export {};
@@ -8,11 +8,6 @@ export class SmithCursor {
8
8
  scaler;
9
9
  epsilon = 1.5e-4;
10
10
  pendingMove;
11
- drawingOpts = {
12
- point: { radius: 5, color: 'red' },
13
- impedance: { width: 1, color: 'red' },
14
- admittance: { width: 1, color: 'green' },
15
- };
16
11
  calcs = new SmithConstantCircle();
17
12
  zClipCircle = this.calcs.resistanceCircle(0);
18
13
  yClipCircle = this.calcs.conductanceCircle(0);
@@ -27,8 +22,8 @@ export class SmithCursor {
27
22
  this.group = new SmithGroup().attr('pointer-events', 'none');
28
23
  this.impedance = {
29
24
  group: new SmithGroup({
30
- stroke: this.drawingOpts.impedance.color,
31
- strokeWidth: this.drawingOpts.impedance.width.toString(),
25
+ stroke: 'var(--smithkit-cursor-impedanceColor)',
26
+ strokeWidth: 'var(--smithkit-cursor-lineWidth)',
32
27
  fill: 'none',
33
28
  }),
34
29
  resistance: { circle: new SmithCircle({ p: [0, 0], r: 1 }) },
@@ -42,8 +37,8 @@ export class SmithCursor {
42
37
  this.impedance.reactance.line.nonScalingStroke();
43
38
  this.admittance = {
44
39
  group: new SmithGroup({
45
- stroke: this.drawingOpts.admittance.color,
46
- strokeWidth: this.drawingOpts.admittance.width.toString(),
40
+ stroke: 'var(--smithkit-cursor-admittanceColor)',
41
+ strokeWidth: 'var(--smithkit-cursor-lineWidth)',
47
42
  fill: 'none',
48
43
  }),
49
44
  conductance: { circle: new SmithCircle({ p: [0, 0], r: 1 }) },
@@ -56,8 +51,8 @@ export class SmithCursor {
56
51
  this.admittance.susceptance.arc.nonScalingStroke();
57
52
  this.admittance.susceptance.line.nonScalingStroke();
58
53
  this.point = new SmithLine([0, 0], [0, 0], {
59
- stroke: this.drawingOpts.point.color,
60
- strokeWidth: this.drawingOpts.point.radius.toString(),
54
+ stroke: 'var(--smithkit-cursor-pointColor)',
55
+ strokeWidth: 'var(--smithkit-cursor-pointSize)',
61
56
  fill: 'none',
62
57
  });
63
58
  this.point.nonScalingStroke();
@@ -180,7 +175,4 @@ export class SmithCursor {
180
175
  this.cancelPendingMove();
181
176
  }
182
177
  }
183
- setDrawOptions(opts) {
184
- this.drawingOpts = opts;
185
- }
186
178
  }
@@ -15,10 +15,14 @@ export interface CircleStyle {
15
15
  /** Non-scaling stroke width in CSS pixels. */
16
16
  strokeWidth: number;
17
17
  }
18
+ export type GridDetail = 'basic' | 'standard' | 'detailed';
18
19
  /** Grid styling uses SVG user units, except non-scaling stroke widths in screen pixels. */
19
20
  export interface GridLayer {
20
21
  setVisible(visible: boolean): void;
21
- setMinorVisible(visible: boolean): void;
22
+ /** Show or hide labels independently of grid lines. Default: true. */
23
+ setLabelsVisible(visible: boolean): void;
24
+ /** Default: detailed. Basic shows only the principal normalized values. */
25
+ setDetail(detail: GridDetail): void;
22
26
  setStyle(style: Partial<GridStyle>): void;
23
27
  }
24
28
  export interface CircleLayer {
@@ -0,0 +1,66 @@
1
+ import type { SmithTheme } from '../appearance/types.js';
2
+ import { SmithData } from '../traces/SmithData.js';
3
+ import type { SmithMarker } from '../traces/SmithMarker.js';
4
+ import { TraceSamples } from '../samples.js';
5
+ import { Complex } from '../math/Complex.js';
6
+ import type { ChartLayers, PeripheralScales } from '../layers.js';
7
+ import type { TraceStyle } from '../measurements.js';
8
+ /** Internal SVG backend. Owns chart elements, view transforms, and SVG gestures. */
9
+ export declare class SvgChartRenderer {
10
+ private onCursorChange;
11
+ private calcs;
12
+ private scalers;
13
+ private readonly defaultTransform;
14
+ private transform;
15
+ private zoomEnabled;
16
+ private applyingView;
17
+ private zoomBehavior;
18
+ private svg;
19
+ private resizeObserver;
20
+ private readonly labelLayout;
21
+ private container;
22
+ private dataContainer;
23
+ private markerContainer;
24
+ private reactanceAxis;
25
+ private constResistance;
26
+ private constReactance;
27
+ private constConductance;
28
+ private constSusceptance;
29
+ private constSwrCircles;
30
+ private constQCircles;
31
+ private cursor;
32
+ private peripheralScaleRenderer;
33
+ private readonly traces;
34
+ private destroyed;
35
+ private mouseGesture;
36
+ private markerDragging;
37
+ private cursorBeforeMarkerDrag;
38
+ readonly layers: ChartLayers;
39
+ readonly peripheralScales: PeripheralScales;
40
+ constructor(onCursorChange: ((position: Complex | undefined) => void) | null);
41
+ setTheme(theme: SmithTheme): void;
42
+ draw(target: string | HTMLElement): void;
43
+ /** Export the current mounted view as standalone SVG with its configured background. */
44
+ toSvg(): string;
45
+ /** Remove this chart and release its event handlers. Safe to call more than once. */
46
+ destroy(): void;
47
+ private updateViewportScale;
48
+ private assertAlive;
49
+ private createScalers;
50
+ private cursorMove;
51
+ setMarkerDragging(dragging: boolean): void;
52
+ hideCursor(): void;
53
+ private initCursor;
54
+ get cursorPosition(): Complex;
55
+ private initializeZoom;
56
+ /** Enable or disable wheel, double-click, and mouse/touch zoom/pan. Keeps the current view. */
57
+ setZoomEnabled(enabled: boolean): void;
58
+ private applyView;
59
+ resetView(): void;
60
+ private onZoom;
61
+ private cursorContainer;
62
+ private drawReactanceAxis;
63
+ /** Construct trace rendering without exposing chart containers or scalers to Smith. */
64
+ createTrace(values: TraceSamples, color: string, style: Partial<TraceStyle>, onMarkerDrag: (marker: SmithMarker, dragging: boolean) => void): SmithData;
65
+ removeTrace(trace: SmithData): void;
66
+ }