@nice2dev/ui-math 1.0.10

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.
@@ -0,0 +1,675 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /** Animation state */
4
+ export declare interface AnimationState {
5
+ isPlaying: boolean;
6
+ parameter: string;
7
+ currentValue: number;
8
+ minValue: number;
9
+ maxValue: number;
10
+ speed: number;
11
+ }
12
+
13
+ /** Axis range */
14
+ export declare interface AxisRange {
15
+ min: number;
16
+ max: number;
17
+ }
18
+
19
+ export declare interface CalculatorConfig {
20
+ precision?: number;
21
+ angleUnit?: 'deg' | 'rad';
22
+ }
23
+
24
+ declare interface CalculatorContextValue {
25
+ service: CalculatorService;
26
+ display: string;
27
+ setDisplay: (val: string) => void;
28
+ mode: CalculatorMode;
29
+ setMode: (mode: CalculatorMode) => void;
30
+ history: HistoryEntry[];
31
+ calculate: () => void;
32
+ appendDigit: (digit: string) => void;
33
+ clear: () => void;
34
+ }
35
+
36
+ export declare type CalculatorMode = 'standard' | 'scientific' | 'programmer' | 'matrix' | 'calculus' | 'units';
37
+
38
+ export declare class CalculatorService {
39
+ private history;
40
+ private memory;
41
+ private variables;
42
+ private config;
43
+ constructor(config?: CalculatorConfig);
44
+ /** Evaluate expression */
45
+ evaluate(expression: string): number;
46
+ /** Add to history */
47
+ addHistory(expression: string, result: string, mode: CalculatorMode): void;
48
+ /** Get history */
49
+ getHistory(): HistoryEntry[];
50
+ /** Clear history */
51
+ clearHistory(): void;
52
+ /** Memory operations */
53
+ memoryStore(value: number): void;
54
+ memoryRecall(): number;
55
+ memoryAdd(value: number): void;
56
+ memoryClear(): void;
57
+ /** Variable operations */
58
+ setVariable(name: string, value: number): void;
59
+ getVariable(name: string): number | undefined;
60
+ /** Convert between number bases */
61
+ convertBase(value: string, fromBase: NumberBase, toBase: NumberBase): string;
62
+ /** Convert units */
63
+ convertUnits(value: number, fromUnit: string, toUnit: string): number;
64
+ /** Get units by category */
65
+ getUnitsByCategory(category: string): UnitDef[];
66
+ /** Get all unit categories */
67
+ getUnitCategories(): string[];
68
+ /** Format number with precision */
69
+ format(value: number): string;
70
+ }
71
+
72
+ export declare const CalculusOps: {
73
+ /** Numerical derivative at a point */
74
+ derivative(f: (x: number) => number, x: number, h?: number): number;
75
+ /** Second derivative at a point */
76
+ secondDerivative(f: (x: number) => number, x: number, h?: number): number;
77
+ /** Numerical integration using Simpson's rule */
78
+ integrate(f: (x: number) => number, a: number, b: number, n?: number): number;
79
+ /** Find root using Newton-Raphson method */
80
+ findRoot(f: (x: number) => number, x0: number, tolerance?: number, maxIterations?: number): number;
81
+ /** Symbolic differentiation (simple cases) */
82
+ symbolicDerivative(expr: string): string;
83
+ /** Symbolic integration (simple cases) */
84
+ symbolicIntegral(expr: string): string;
85
+ /** Solve quadratic equation ax² + bx + c = 0 */
86
+ solveQuadratic(a: number, b: number, c: number): number[];
87
+ };
88
+
89
+ export declare function createCalculatorService(config?: CalculatorConfig): CalculatorService;
90
+
91
+ export declare function createGeometryService(): GeometryService;
92
+
93
+ export declare function createGraphService(config?: GraphServiceConfig): GraphService;
94
+
95
+ export declare function createMathEditorService(config?: MathEditorConfig): MathEditorService;
96
+
97
+ export declare type ElementId = string;
98
+
99
+ /** Equation entry */
100
+ export declare interface Equation {
101
+ id: EquationId;
102
+ latex: string;
103
+ label?: string;
104
+ number?: number;
105
+ createdAt: string;
106
+ updatedAt: string;
107
+ }
108
+
109
+ export declare const EQUATION_TEMPLATES: EquationTemplate[];
110
+
111
+ export declare type EquationId = string;
112
+
113
+ export declare interface EquationTemplate {
114
+ name: string;
115
+ latex: string;
116
+ category: string;
117
+ }
118
+
119
+ /**
120
+ * Simple expression parser for math expressions.
121
+ * Supports: +, -, *, /, ^, (), functions, variables
122
+ */
123
+ export declare class ExpressionParser {
124
+ private pos;
125
+ private expr;
126
+ parse(expression: string): MathFunction;
127
+ private parseAddSub;
128
+ private parseMulDiv;
129
+ private parsePower;
130
+ private parseUnary;
131
+ private parsePrimary;
132
+ private evaluate;
133
+ }
134
+
135
+ export declare const FUNCTION_PRESETS: FunctionPreset[];
136
+
137
+ export declare interface FunctionPreset {
138
+ name: string;
139
+ expression: string;
140
+ type: PlotType;
141
+ expressionY?: string;
142
+ category: string;
143
+ }
144
+
145
+ /** Angle element */
146
+ export declare interface GeoAngle extends GeoElementBase {
147
+ type: 'angle';
148
+ point1Id: ElementId;
149
+ vertexId: ElementId;
150
+ point2Id: ElementId;
151
+ showArc: boolean;
152
+ showValue: boolean;
153
+ }
154
+
155
+ /** Arc element */
156
+ export declare interface GeoArc extends GeoElementBase {
157
+ type: 'arc';
158
+ centerId: ElementId;
159
+ radius: number;
160
+ startAngle: number;
161
+ endAngle: number;
162
+ width: number;
163
+ }
164
+
165
+ /** Circle element */
166
+ export declare interface GeoCircle extends GeoElementBase {
167
+ type: 'circle';
168
+ centerId: ElementId;
169
+ radius: number;
170
+ width: number;
171
+ fill?: GeoColor;
172
+ }
173
+
174
+ /** Color */
175
+ export declare interface GeoColor {
176
+ r: number;
177
+ g: number;
178
+ b: number;
179
+ a?: number;
180
+ }
181
+
182
+ export declare type GeoElement = GeoPoint | GeoLine | GeoRay | GeoSegment | GeoCircle | GeoArc | GeoPolygon | GeoAngle | GeoText | GeoMeasurement;
183
+
184
+ /** Base geometry element */
185
+ export declare interface GeoElementBase {
186
+ id: ElementId;
187
+ type: GeoElementType;
188
+ label?: string;
189
+ color: GeoColor;
190
+ visible: boolean;
191
+ selected: boolean;
192
+ locked: boolean;
193
+ dependencies?: ElementId[];
194
+ }
195
+
196
+ /** Geometry element types */
197
+ export declare type GeoElementType = 'point' | 'line' | 'ray' | 'segment' | 'circle' | 'arc' | 'polygon' | 'angle' | 'text' | 'measurement';
198
+
199
+ /** Line element (infinite) */
200
+ export declare interface GeoLine extends GeoElementBase {
201
+ type: 'line';
202
+ point1Id: ElementId;
203
+ point2Id: ElementId;
204
+ width: number;
205
+ }
206
+
207
+ export declare const GeoMath: {
208
+ /** Distance between two points */
209
+ distance(p1: Point, p2: Point): number;
210
+ /** Midpoint of two points */
211
+ midpoint(p1: Point, p2: Point): Point;
212
+ /** Angle between three points (vertex at p2) */
213
+ angle(p1: Point, vertex: Point, p3: Point): number;
214
+ /** Angle in degrees */
215
+ angleDegrees(p1: Point, vertex: Point, p3: Point): number;
216
+ /** Point on line closest to given point */
217
+ closestPointOnLine(lineP1: Point, lineP2: Point, point: Point): Point;
218
+ /** Line-line intersection */
219
+ lineIntersection(l1p1: Point, l1p2: Point, l2p1: Point, l2p2: Point): Point | null;
220
+ /** Circle-line intersection */
221
+ circleLineIntersection(center: Point, radius: number, lineP1: Point, lineP2: Point): Point[];
222
+ /** Circle-circle intersection */
223
+ circleCircleIntersection(c1: Point, r1: number, c2: Point, r2: number): Point[];
224
+ /** Perpendicular line through point */
225
+ perpendicularThrough(lineP1: Point, lineP2: Point, point: Point): {
226
+ p1: Point;
227
+ p2: Point;
228
+ };
229
+ /** Parallel line through point */
230
+ parallelThrough(lineP1: Point, lineP2: Point, point: Point): {
231
+ p1: Point;
232
+ p2: Point;
233
+ };
234
+ /** Angle bisector */
235
+ angleBisector(p1: Point, vertex: Point, p3: Point): Point;
236
+ /** Reflect point over line */
237
+ reflect(point: Point, lineP1: Point, lineP2: Point): Point;
238
+ /** Rotate point around center */
239
+ rotate(point: Point, center: Point, angle: number): Point;
240
+ /** Translate point */
241
+ translate(point: Point, dx: number, dy: number): Point;
242
+ /** Dilate point from center */
243
+ dilate(point: Point, center: Point, factor: number): Point;
244
+ /** Polygon area (shoelace formula) */
245
+ polygonArea(points: Point[]): number;
246
+ /** Polygon perimeter */
247
+ polygonPerimeter(points: Point[]): number;
248
+ /** Triangle circumcenter */
249
+ circumcenter(a: Point, b: Point, c: Point): Point;
250
+ /** Triangle incenter */
251
+ incenter(a: Point, b: Point, c: Point): Point;
252
+ /** Triangle centroid */
253
+ centroid(a: Point, b: Point, c: Point): Point;
254
+ };
255
+
256
+ /** Measurement element */
257
+ export declare interface GeoMeasurement extends GeoElementBase {
258
+ type: 'measurement';
259
+ measureType: 'distance' | 'angle' | 'area' | 'perimeter';
260
+ targetIds: ElementId[];
261
+ x: number;
262
+ y: number;
263
+ }
264
+
265
+ declare interface GeometryContextValue {
266
+ service: GeometryService;
267
+ elements: GeoElement[];
268
+ tool: GeoTool;
269
+ setTool: (tool: GeoTool) => void;
270
+ view: GeoViewConfig;
271
+ setView: (view: Partial<GeoViewConfig>) => void;
272
+ selectedIds: ElementId[];
273
+ setSelectedIds: (ids: ElementId[]) => void;
274
+ refresh: () => void;
275
+ }
276
+
277
+ export declare class GeometryService {
278
+ private elements;
279
+ private nextLabel;
280
+ /** Add element */
281
+ addElement<T extends GeoElement>(element: Omit<T, 'id'>): T;
282
+ /** Get element */
283
+ getElement(id: ElementId): GeoElement | undefined;
284
+ /** Get point */
285
+ getPoint(id: ElementId): GeoPoint | undefined;
286
+ /** Update element */
287
+ updateElement(id: ElementId, updates: Partial<GeoElement>): void;
288
+ /** Delete element */
289
+ deleteElement(id: ElementId): void;
290
+ /** Get all elements */
291
+ getAllElements(): GeoElement[];
292
+ /** Get elements by type */
293
+ getElementsByType<T extends GeoElement>(type: GeoElementType): T[];
294
+ /** Clear all */
295
+ clear(): void;
296
+ /** Create point */
297
+ createPoint(x: number, y: number, label?: string): GeoPoint;
298
+ /** Create segment */
299
+ createSegment(point1Id: ElementId, point2Id: ElementId): GeoSegment;
300
+ /** Create line */
301
+ createLine(point1Id: ElementId, point2Id: ElementId): GeoLine;
302
+ /** Create ray */
303
+ createRay(originId: ElementId, throughId: ElementId): GeoRay;
304
+ /** Create circle */
305
+ createCircle(centerId: ElementId, radius: number): GeoCircle;
306
+ /** Create polygon */
307
+ createPolygon(pointIds: ElementId[]): GeoPolygon;
308
+ /** Create midpoint */
309
+ createMidpoint(point1Id: ElementId, point2Id: ElementId): GeoPoint | null;
310
+ /** Create perpendicular */
311
+ createPerpendicular(lineP1Id: ElementId, lineP2Id: ElementId, throughId: ElementId): GeoLine | null;
312
+ /** Create parallel */
313
+ createParallel(lineP1Id: ElementId, lineP2Id: ElementId, throughId: ElementId): GeoLine | null;
314
+ /** Create intersection point */
315
+ createIntersection(el1Id: ElementId, el2Id: ElementId): GeoPoint[];
316
+ /** Calculate measurement */
317
+ calculateMeasurement(type: 'distance' | 'angle' | 'area' | 'perimeter', targetIds: ElementId[]): number;
318
+ /** Export to SVG */
319
+ exportSVG(width: number, height: number, view: GeoViewConfig): string;
320
+ private generateId;
321
+ private getNextLabel;
322
+ }
323
+
324
+ /** Point element */
325
+ export declare interface GeoPoint extends GeoElementBase {
326
+ type: 'point';
327
+ x: number;
328
+ y: number;
329
+ size: number;
330
+ }
331
+
332
+ /** Polygon element */
333
+ export declare interface GeoPolygon extends GeoElementBase {
334
+ type: 'polygon';
335
+ pointIds: ElementId[];
336
+ width: number;
337
+ fill?: GeoColor;
338
+ }
339
+
340
+ /** Ray element */
341
+ export declare interface GeoRay extends GeoElementBase {
342
+ type: 'ray';
343
+ originId: ElementId;
344
+ throughId: ElementId;
345
+ width: number;
346
+ }
347
+
348
+ /** Line segment */
349
+ export declare interface GeoSegment extends GeoElementBase {
350
+ type: 'segment';
351
+ point1Id: ElementId;
352
+ point2Id: ElementId;
353
+ width: number;
354
+ }
355
+
356
+ /** Text element */
357
+ export declare interface GeoText extends GeoElementBase {
358
+ type: 'text';
359
+ x: number;
360
+ y: number;
361
+ text: string;
362
+ fontSize: number;
363
+ }
364
+
365
+ /** Tool modes */
366
+ export declare type GeoTool = 'select' | 'point' | 'line' | 'ray' | 'segment' | 'circle' | 'arc' | 'polygon' | 'angle' | 'perpendicular' | 'parallel' | 'bisector' | 'midpoint' | 'tangent' | 'intersection' | 'reflect' | 'rotate' | 'translate' | 'dilate' | 'measure' | 'text';
367
+
368
+ /** Transformation */
369
+ export declare interface GeoTransform {
370
+ type: 'reflect' | 'rotate' | 'translate' | 'dilate';
371
+ params: Record<string, number | ElementId>;
372
+ }
373
+
374
+ /** View configuration */
375
+ export declare interface GeoViewConfig {
376
+ centerX: number;
377
+ centerY: number;
378
+ scale: number;
379
+ showGrid: boolean;
380
+ showAxes: boolean;
381
+ gridSpacing: number;
382
+ snapToGrid: boolean;
383
+ snapToPoints: boolean;
384
+ backgroundColor: GeoColor;
385
+ }
386
+
387
+ /** Get symbols by category */
388
+ export declare function getSymbolsByCategory(category: SymbolCategory): MathSymbol[];
389
+
390
+ declare interface GraphContextValue {
391
+ service: GraphService;
392
+ plots: Plot[];
393
+ view: ViewConfig;
394
+ setView: (view: Partial<ViewConfig>) => void;
395
+ addPlot: (data: Partial<Plot> & {
396
+ expression: string;
397
+ type: PlotType;
398
+ }) => void;
399
+ removePlot: (id: PlotId) => void;
400
+ updatePlot: (id: PlotId, data: Partial<Plot>) => void;
401
+ animation: AnimationState;
402
+ setAnimation: (anim: Partial<AnimationState>) => void;
403
+ refresh: () => void;
404
+ }
405
+
406
+ export declare class GraphService {
407
+ private plots;
408
+ private parser;
409
+ private config;
410
+ constructor(config?: GraphServiceConfig);
411
+ /** Add a plot */
412
+ addPlot(data: Partial<Plot> & {
413
+ expression: string;
414
+ type: PlotType;
415
+ }): Plot;
416
+ /** Update a plot */
417
+ updatePlot(id: PlotId, data: Partial<Plot>): Plot;
418
+ /** Remove a plot */
419
+ removePlot(id: PlotId): void;
420
+ /** Get all plots */
421
+ getPlots(): Plot[];
422
+ /** Get plot by ID */
423
+ getPlot(id: PlotId): Plot | undefined;
424
+ /** Compute 2D function points */
425
+ compute2DFunction(expression: string, xRange: AxisRange, resolution: number, animationVars?: Record<string, number>): Point2D[];
426
+ /** Compute 2D parametric curve */
427
+ compute2DParametric(expressionX: string, expressionY: string, tRange: AxisRange, resolution: number, animationVars?: Record<string, number>): Point2D[];
428
+ /** Compute 2D polar curve */
429
+ compute2DPolar(expression: string, thetaRange: AxisRange, resolution: number, animationVars?: Record<string, number>): Point2D[];
430
+ /** Compute 3D surface points */
431
+ compute3DSurface(expression: string, xRange: AxisRange, yRange: AxisRange, resolution: number, animationVars?: Record<string, number>): Point3D[][];
432
+ /** Export plot data as SVG */
433
+ exportSVG(plots: Plot[], view: ViewConfig, width: number, height: number): string;
434
+ /** Export as PNG (data URL) */
435
+ exportPNG(plots: Plot[], view: ViewConfig, width: number, height: number): Promise<string>;
436
+ private generateId;
437
+ }
438
+
439
+ export declare interface GraphServiceConfig {
440
+ defaultResolution?: number;
441
+ maxResolution?: number;
442
+ }
443
+
444
+ export declare interface HandwritingRecognitionResult {
445
+ latex: string;
446
+ confidence: number;
447
+ alternatives: string[];
448
+ }
449
+
450
+ /** History entry */
451
+ export declare interface HistoryEntry {
452
+ id: string;
453
+ expression: string;
454
+ result: string;
455
+ timestamp: string;
456
+ mode: CalculatorMode;
457
+ }
458
+
459
+ export declare const MATH_SYMBOLS: MathSymbol[];
460
+
461
+ export declare interface MathEditorConfig {
462
+ enableNumbering?: boolean;
463
+ startNumber?: number;
464
+ renderDelay?: number;
465
+ }
466
+
467
+ declare interface MathEditorContextValue {
468
+ service: MathEditorService;
469
+ latex: string;
470
+ setLatex: (latex: string) => void;
471
+ insertSymbol: (latex: string) => void;
472
+ insertTemplate: (template: EquationTemplate) => void;
473
+ mode: 'input' | 'handwriting';
474
+ setMode: (mode: 'input' | 'handwriting') => void;
475
+ }
476
+
477
+ export declare class MathEditorService {
478
+ private equations;
479
+ private config;
480
+ private nextNumber;
481
+ constructor(config?: MathEditorConfig);
482
+ /** Create new equation */
483
+ createEquation(latex: string, label?: string): Equation;
484
+ /** Update equation */
485
+ updateEquation(id: EquationId, latex: string, label?: string): Equation;
486
+ /** Delete equation */
487
+ deleteEquation(id: EquationId): void;
488
+ /** Get equation */
489
+ getEquation(id: EquationId): Equation | undefined;
490
+ /** List all equations */
491
+ listEquations(): Equation[];
492
+ /** Export to LaTeX document */
493
+ exportToLatex(): string;
494
+ /** Parse LaTeX and extract equations */
495
+ parseLatex(content: string): Equation[];
496
+ private generateId;
497
+ }
498
+
499
+ declare type MathFunction = (vars: Record<string, number>) => number;
500
+
501
+ /** Math symbol definition */
502
+ export declare interface MathSymbol {
503
+ name: string;
504
+ latex: string;
505
+ category: SymbolCategory;
506
+ preview?: string;
507
+ }
508
+
509
+ /** Matrix */
510
+ export declare interface Matrix {
511
+ rows: number;
512
+ cols: number;
513
+ data: number[][];
514
+ }
515
+
516
+ export declare const MatrixOps: {
517
+ create(rows: number, cols: number, fill?: number): Matrix;
518
+ identity(size: number): Matrix;
519
+ add(a: Matrix, b: Matrix): Matrix;
520
+ subtract(a: Matrix, b: Matrix): Matrix;
521
+ multiply(a: Matrix, b: Matrix): Matrix;
522
+ scalar(m: Matrix, s: number): Matrix;
523
+ transpose(m: Matrix): Matrix;
524
+ determinant(m: Matrix): number;
525
+ minor(m: Matrix, row: number, col: number): Matrix;
526
+ inverse(m: Matrix): Matrix;
527
+ trace(m: Matrix): number;
528
+ eigenvalues2x2(m: Matrix): number[];
529
+ toString(m: Matrix, precision?: number): string;
530
+ };
531
+
532
+ export declare function NiceCalculator({ service, className, style, }: NiceCalculatorProps): default_2.ReactElement;
533
+
534
+ export declare interface NiceCalculatorProps {
535
+ service: CalculatorService;
536
+ className?: string;
537
+ style?: default_2.CSSProperties;
538
+ }
539
+
540
+ export declare function NiceGeometry({ service, width, height, className, style, }: NiceGeometryProps): default_2.ReactElement;
541
+
542
+ export declare interface NiceGeometryProps {
543
+ service: GeometryService;
544
+ width?: number;
545
+ height?: number;
546
+ className?: string;
547
+ style?: default_2.CSSProperties;
548
+ }
549
+
550
+ export declare function NiceGraphPlotter({ service, width, height, className, style, }: NiceGraphPlotterProps): default_2.ReactElement;
551
+
552
+ export declare interface NiceGraphPlotterProps {
553
+ service: GraphService;
554
+ width?: number;
555
+ height?: number;
556
+ className?: string;
557
+ style?: default_2.CSSProperties;
558
+ }
559
+
560
+ export declare function NiceMathEditor({ service, initialLatex, onChange, className, style, }: NiceMathEditorProps): default_2.ReactElement;
561
+
562
+ export declare interface NiceMathEditorProps {
563
+ service: MathEditorService;
564
+ initialLatex?: string;
565
+ onChange?: (latex: string) => void;
566
+ className?: string;
567
+ style?: default_2.CSSProperties;
568
+ }
569
+
570
+ export declare type NumberBase = 'BIN' | 'OCT' | 'DEC' | 'HEX';
571
+
572
+ /** Plot definition */
573
+ export declare interface Plot {
574
+ id: PlotId;
575
+ type: PlotType;
576
+ label?: string;
577
+ expression: string;
578
+ expressionY?: string;
579
+ expressionZ?: string;
580
+ color: PlotColor;
581
+ lineWidth?: number;
582
+ visible: boolean;
583
+ parameterRange?: AxisRange;
584
+ parameterRange2?: AxisRange;
585
+ resolution?: number;
586
+ }
587
+
588
+ /** Plot color */
589
+ export declare interface PlotColor {
590
+ r: number;
591
+ g: number;
592
+ b: number;
593
+ a?: number;
594
+ }
595
+
596
+ export declare type PlotId = string;
597
+
598
+ /** Plot types */
599
+ export declare type PlotType = '2d-function' | '2d-parametric' | '2d-implicit' | '2d-polar' | '3d-surface' | '3d-parametric' | '3d-implicit';
600
+
601
+ /** Point on canvas */
602
+ export declare interface Point {
603
+ x: number;
604
+ y: number;
605
+ }
606
+
607
+ /** 2D Point */
608
+ export declare interface Point2D {
609
+ x: number;
610
+ y: number;
611
+ }
612
+
613
+ /** 3D Point */
614
+ export declare interface Point3D {
615
+ x: number;
616
+ y: number;
617
+ z: number;
618
+ }
619
+
620
+ /**
621
+ * Recognize handwritten math from strokes.
622
+ * This is a stub implementation - in production, this would
623
+ * connect to MyScript, Mathpix, or similar service.
624
+ */
625
+ export declare function recognizeHandwriting(strokes: Stroke[]): Promise<HandwritingRecognitionResult>;
626
+
627
+ /** Handwriting stroke */
628
+ export declare interface Stroke {
629
+ id: string;
630
+ points: StrokePoint[];
631
+ }
632
+
633
+ /** Handwriting point */
634
+ export declare interface StrokePoint {
635
+ x: number;
636
+ y: number;
637
+ pressure?: number;
638
+ timestamp: number;
639
+ }
640
+
641
+ /** Symbol category */
642
+ export declare type SymbolCategory = 'greek' | 'operators' | 'relations' | 'arrows' | 'functions' | 'accents' | 'delimiters' | 'sets' | 'logic' | 'geometry' | 'calculus' | 'matrices';
643
+
644
+ /** Unit definition */
645
+ export declare interface UnitDef {
646
+ name: string;
647
+ symbol: string;
648
+ category: string;
649
+ toBase: (value: number) => number;
650
+ fromBase: (value: number) => number;
651
+ }
652
+
653
+ export declare function useCalculator(): CalculatorContextValue;
654
+
655
+ export declare function useGeometry(): GeometryContextValue;
656
+
657
+ export declare function useGraph(): GraphContextValue;
658
+
659
+ export declare function useMathEditor(): MathEditorContextValue;
660
+
661
+ /** View configuration */
662
+ export declare interface ViewConfig {
663
+ xRange: AxisRange;
664
+ yRange: AxisRange;
665
+ zRange?: AxisRange;
666
+ showGrid: boolean;
667
+ showAxes: boolean;
668
+ showLabels: boolean;
669
+ backgroundColor: PlotColor;
670
+ cameraRotationX?: number;
671
+ cameraRotationY?: number;
672
+ cameraDistance?: number;
673
+ }
674
+
675
+ export { }