leaflet-tual 0.1.0 → 1.0.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.
package/dist/react.d.ts CHANGED
@@ -12,7 +12,7 @@ type ScreenPoint = {
12
12
  };
13
13
  type ArrowStyle = 'linear' | 'curved' | 'bi' | 'elbow' | 's-curve';
14
14
  type ShapeKind = 'square' | 'circle' | 'star' | 'actor' | 'triangle' | 'diamond' | 'hexagon' | 'marker';
15
- type CanvasTool = 'select' | 'freedraw' | 'arrow-linear' | 'arrow-curved' | 'arrow-bi' | 'arrow-elbow' | 'arrow-s-curve' | 'shape' | 'ruler' | 'note' | 'text';
15
+ type TualTool = 'select' | 'freedraw' | 'arrow-linear' | 'arrow-curved' | 'arrow-bi' | 'arrow-elbow' | 'arrow-s-curve' | 'shape' | 'ruler' | 'note' | 'text';
16
16
  type ToolbarToolGroupId = 'select' | 'freedraw' | 'arrow' | 'shape' | 'ruler' | 'note' | 'text';
17
17
  type ArrowHeadStyle = 'triangle' | 'open' | 'both' | 'none';
18
18
  interface ArrowItem {
@@ -95,11 +95,11 @@ interface RulerItem {
95
95
  unit?: 'metric' | 'imperial';
96
96
  createdAt: number;
97
97
  }
98
- type CanvasItem = ArrowItem | FreeDrawItem | ShapeItem | NoteItem | TextItem | RulerItem;
98
+ type TualItem = ArrowItem | FreeDrawItem | ShapeItem | NoteItem | TextItem | RulerItem;
99
99
 
100
100
  type ToolbarPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-center' | 'bottom-center' | 'left-center' | 'right-center';
101
101
  type ToolbarOrientation = 'horizontal' | 'vertical';
102
- interface CanvasLabels {
102
+ interface TualLabels {
103
103
  select?: string;
104
104
  freedraw?: string;
105
105
  arrowGroup?: string;
@@ -153,7 +153,7 @@ interface CanvasLabels {
153
153
  collapseToolbar?: string;
154
154
  expandToolbar?: string;
155
155
  }
156
- interface CanvasAnnotationTheme {
156
+ interface TualAnnotationTheme {
157
157
  selectionGlowColor?: string;
158
158
  selectionGlowWidth?: number;
159
159
  guideLineDash?: readonly number[];
@@ -183,8 +183,8 @@ interface CanvasAnnotationTheme {
183
183
  labelMaxTextWidth?: number;
184
184
  fitLabelsToShape?: boolean;
185
185
  }
186
- type ArrowRenderTheme = CanvasAnnotationTheme;
187
- interface LeafletCanvasClassNames {
186
+ type ArrowRenderTheme = TualAnnotationTheme;
187
+ interface LeafletTualClassNames {
188
188
  overlay?: string;
189
189
  canvas?: string;
190
190
  drawingSurface?: string;
@@ -250,7 +250,7 @@ interface DraftRulerState {
250
250
  startGeo: GeoPoint;
251
251
  currentGeo: GeoPoint;
252
252
  }
253
- interface CanvasOverlayOptions {
253
+ interface TualOverlayOptions {
254
254
  interactive?: boolean;
255
255
  readOnly?: boolean;
256
256
  zIndex?: number;
@@ -260,29 +260,29 @@ interface CanvasOverlayOptions {
260
260
  defaultFontSize?: number;
261
261
  defaultShape?: ShapeKind;
262
262
  }
263
- interface UseLeafletCanvasOptions extends CanvasOverlayOptions {
264
- initialItems?: CanvasItem[];
265
- items?: CanvasItem[];
263
+ interface UseLeafletTualOptions extends TualOverlayOptions {
264
+ initialItems?: TualItem[];
265
+ items?: TualItem[];
266
266
  maxHistory?: number;
267
- onItemsChange?: (items: CanvasItem[]) => void;
268
- onChange?: (items: CanvasItem[]) => void;
269
- onChangeComplete?: (items: CanvasItem[], targetItem?: CanvasItem | null) => void;
270
- onItemsChangeComplete?: (items: CanvasItem[], targetItem?: CanvasItem | null) => void;
271
- onEditEnd?: (items: CanvasItem[], targetItem?: CanvasItem | null) => void;
272
- onEditComplete?: (items: CanvasItem[], targetItem?: CanvasItem | null) => void;
273
- onItemSelect?: (item: CanvasItem | null) => void;
274
- onItemCreate?: (item: CanvasItem) => void;
275
- onItemChange?: (item: CanvasItem) => void;
267
+ onItemsChange?: (items: TualItem[]) => void;
268
+ onChange?: (items: TualItem[]) => void;
269
+ onChangeComplete?: (items: TualItem[], targetItem?: TualItem | null) => void;
270
+ onItemsChangeComplete?: (items: TualItem[], targetItem?: TualItem | null) => void;
271
+ onEditEnd?: (items: TualItem[], targetItem?: TualItem | null) => void;
272
+ onEditComplete?: (items: TualItem[], targetItem?: TualItem | null) => void;
273
+ onItemSelect?: (item: TualItem | null) => void;
274
+ onItemCreate?: (item: TualItem) => void;
275
+ onItemChange?: (item: TualItem) => void;
276
276
  onItemDelete?: (id: string) => void;
277
- onItemChangeComplete?: (item: CanvasItem) => void;
278
- initialTool?: CanvasTool;
279
- onToolChange?: (tool: CanvasTool) => void;
280
- }
281
- type LeafletCanvasOptions = UseLeafletCanvasOptions;
282
- interface LeafletCanvasController {
283
- items: CanvasItem[];
284
- activeTool: CanvasTool;
285
- setActiveTool: (tool: CanvasTool) => void;
277
+ onItemChangeComplete?: (item: TualItem) => void;
278
+ initialTool?: TualTool;
279
+ onToolChange?: (tool: TualTool) => void;
280
+ }
281
+ type LeafletTualOptions = UseLeafletTualOptions;
282
+ interface LeafletTualController {
283
+ items: TualItem[];
284
+ activeTool: TualTool;
285
+ setActiveTool: (tool: TualTool) => void;
286
286
  readOnly: boolean;
287
287
  setReadOnly: (readOnly: boolean) => void;
288
288
  activeShape: ShapeKind;
@@ -291,7 +291,7 @@ interface LeafletCanvasController {
291
291
  setShapeFilled: (filled: boolean) => void;
292
292
  selectedId: string | null;
293
293
  setSelectedId: (id: string | null) => void;
294
- selectedItem: CanvasItem | null;
294
+ selectedItem: TualItem | null;
295
295
  isEditingLabel?: boolean;
296
296
  setEditingLabel?: (editing: boolean) => void;
297
297
  labelEditMode?: boolean;
@@ -308,20 +308,20 @@ interface LeafletCanvasController {
308
308
  setFontSize: (size: number) => void;
309
309
  fontWeight: 'normal' | 'bold';
310
310
  setFontWeight: (weight: 'normal' | 'bold') => void;
311
- addItem: (item: CanvasItem) => void;
312
- updateItem: (id: string, patch: Partial<CanvasItem>) => void;
311
+ addItem: (item: TualItem) => void;
312
+ updateItem: (id: string, patch: Partial<TualItem>) => void;
313
313
  removeItem: (id: string) => void;
314
314
  deleteSelected: () => void;
315
315
  clearAll: () => void;
316
316
  clear: () => void;
317
317
  deleteItem: (id: string) => void;
318
- setTool: (tool: CanvasTool) => void;
318
+ setTool: (tool: TualTool) => void;
319
319
  selectItem: (id: string | null) => void;
320
320
  undo: () => void;
321
321
  redo: () => void;
322
322
  canUndo: boolean;
323
323
  canRedo: boolean;
324
- notifyChangeComplete: (targetItem?: CanvasItem | null) => void;
324
+ notifyChangeComplete: (targetItem?: TualItem | null) => void;
325
325
  exportJSON: () => string;
326
326
  importJSON: (json: string) => boolean;
327
327
  }
@@ -348,7 +348,7 @@ declare const FONT_SIZE_OPTIONS: readonly number[];
348
348
  /**
349
349
  * Super simple unified annotation default theme matching basic HTML element appearance.
350
350
  */
351
- declare const DEFAULT_ANNOTATION_THEME: Readonly<CanvasAnnotationTheme>;
351
+ declare const DEFAULT_ANNOTATION_THEME: Readonly<TualAnnotationTheme>;
352
352
 
353
353
  declare function createId(prefix?: string): string;
354
354
  declare function geoToScreen(map: L.Map, point: GeoPoint): ScreenPoint;
@@ -364,7 +364,7 @@ declare function getMapDimensions(map: L.Map | null | undefined): {
364
364
  width: number;
365
365
  height: number;
366
366
  } | null;
367
- declare function truncateCanvasText(ctx: CanvasRenderingContext2D, text: string, maxWidth: number): string;
367
+ declare function truncateTualText(ctx: CanvasRenderingContext2D, text: string, maxWidth: number): string;
368
368
  declare function calculateZoomFontSize(initialFontSize: number | undefined, currentZoom: number | null, baseZoom?: number, options?: {
369
369
  min?: number;
370
370
  max?: number;
@@ -374,8 +374,8 @@ declare function calculateGeodesicDistance(p1: GeoPoint, p2: GeoPoint): number;
374
374
  declare function formatRealWorldDistance(meters: number, unit?: 'metric' | 'imperial'): string;
375
375
  declare function calculateLineDistance(points: GeoPoint[]): number;
376
376
 
377
- declare function drawCanvasHandle(ctx: CanvasRenderingContext2D, pt: ScreenPoint, strokeColor: string, fillColor: string, radius: number, strokeWidth?: number): void;
378
- declare function drawCanvasLabelPill(ctx: CanvasRenderingContext2D, label: string, midX: number, midY: number, strokeColor: string, maxAllowedBoxWidth: number, theme?: CanvasAnnotationTheme): void;
377
+ declare function drawTualHandle(ctx: CanvasRenderingContext2D, pt: ScreenPoint, strokeColor: string, fillColor: string, radius: number, strokeWidth?: number): void;
378
+ declare function drawTualLabelPill(ctx: CanvasRenderingContext2D, label: string, midX: number, midY: number, strokeColor: string, maxAllowedBoxWidth: number, theme?: TualAnnotationTheme): void;
379
379
 
380
380
  type ArrowHandleType = 'start' | 'end' | 'control';
381
381
  interface ProjectedArrow {
@@ -399,7 +399,7 @@ declare function projectFreeDraw(map: L.Map, item: Pick<FreeDrawItem, 'points'>)
399
399
  declare function renderFreeDrawOnCanvas(ctx: CanvasRenderingContext2D, screenPoints: ScreenPoint[], item: Pick<FreeDrawItem, 'color' | 'strokeWidth' | 'dashed'>, options?: {
400
400
  isSelected?: boolean;
401
401
  isPreview?: boolean;
402
- theme?: CanvasAnnotationTheme;
402
+ theme?: TualAnnotationTheme;
403
403
  }): void;
404
404
  declare function hitTestFreeDraw(point: ScreenPoint, screenPoints: ScreenPoint[], item: FreeDrawItem, tolerance?: number): boolean;
405
405
 
@@ -420,12 +420,12 @@ declare function projectShape(map: L.Map, shape: ShapeItem): ProjectedShape;
420
420
  declare function renderShapeOnCanvas(ctx: CanvasRenderingContext2D, projected: ProjectedShape, shape: Pick<ShapeItem, 'shape' | 'color' | 'fillColor' | 'filled' | 'strokeWidth' | 'dashed' | 'label'>, options?: {
421
421
  isSelected?: boolean;
422
422
  isPreview?: boolean;
423
- theme?: CanvasAnnotationTheme;
423
+ theme?: TualAnnotationTheme;
424
424
  }): void;
425
425
  declare function hitTestShapeHandle(point: ScreenPoint, projected: ProjectedShape, tolerance?: number): ShapeHandleType | null;
426
426
  declare function hitTestShape(point: ScreenPoint, projected: ProjectedShape, tolerance?: number): boolean;
427
427
 
428
- declare function tracePolygonShape(ctx: CanvasRenderingContext2D, proj: ProjectedShape, kind: ShapeKind, theme?: CanvasAnnotationTheme): void;
428
+ declare function tracePolygonShape(ctx: CanvasRenderingContext2D, proj: ProjectedShape, kind: ShapeKind, theme?: TualAnnotationTheme): void;
429
429
 
430
430
  type RulerHandleType = 'start' | 'end';
431
431
  interface ProjectedRuler {
@@ -439,7 +439,7 @@ declare function projectRuler(map: L.Map, ruler: Pick<RulerItem, 'start' | 'end'
439
439
  declare function renderRulerOnCanvas(ctx: CanvasRenderingContext2D, projected: ProjectedRuler, ruler: Pick<RulerItem, 'start' | 'end' | 'color' | 'strokeWidth' | 'dashed' | 'label' | 'unit'>, options?: {
440
440
  isSelected?: boolean;
441
441
  isPreview?: boolean;
442
- theme?: CanvasAnnotationTheme;
442
+ theme?: TualAnnotationTheme;
443
443
  }): void;
444
444
  declare function hitTestRulerHandle(point: ScreenPoint, projected: ProjectedRuler, tolerance?: number): RulerHandleType | null;
445
445
  declare function hitTestRuler(point: ScreenPoint, projected: ProjectedRuler, ruler: RulerItem, tolerance?: number): boolean;
@@ -482,7 +482,7 @@ declare function startFreeDrawBodyDrag(map: L.Map, fd: FreeDrawItem, initialScre
482
482
  declare function startRulerHandleDrag(map: L.Map, ruler: RulerItem, projected: ProjectedRuler, handle: RulerHandleType, getLocalPoint: (e: PointerEvent) => ScreenPoint, updateItem: (id: string, patch: Partial<RulerItem>) => void): void;
483
483
  declare function startRulerBodyDrag(map: L.Map, ruler: RulerItem, projected: ProjectedRuler, originPt: ScreenPoint, getLocalPoint: (e: PointerEvent) => ScreenPoint, updateItem: (id: string, patch: Partial<RulerItem>) => void): void;
484
484
 
485
- interface PaintLeafletCanvasOptions {
485
+ interface PaintLeafletTualOptions {
486
486
  map: L.Map | null;
487
487
  canvas: HTMLCanvasElement | null;
488
488
  width: number;
@@ -503,11 +503,11 @@ interface PaintLeafletCanvasOptions {
503
503
  strokeWidth: number;
504
504
  dashed: boolean;
505
505
  shapeFilled: boolean;
506
- annotationTheme?: CanvasAnnotationTheme;
506
+ annotationTheme?: TualAnnotationTheme;
507
507
  arrowTheme?: ArrowRenderTheme;
508
508
  isReadOnly: boolean;
509
509
  }
510
- declare function paintLeafletCanvas({ map, canvas, width, height, arrowItems, shapeItems, freeDrawItems, rulerItems, selectedId, draftShape, draftArrow, draftRuler, draftFreeDraw, activeColor, strokeWidth, dashed, shapeFilled, annotationTheme, arrowTheme, isReadOnly, }: PaintLeafletCanvasOptions): void;
510
+ declare function paintLeafletTual({ map, canvas, width, height, arrowItems, shapeItems, freeDrawItems, rulerItems, selectedId, draftShape, draftArrow, draftRuler, draftFreeDraw, activeColor, strokeWidth, dashed, shapeFilled, annotationTheme, arrowTheme, isReadOnly, }: PaintLeafletTualOptions): void;
511
511
 
512
512
  interface MapViewportDimensions {
513
513
  width: number;
@@ -516,29 +516,27 @@ interface MapViewportDimensions {
516
516
  declare function bindLeafletSync(map: L.Map, onSync: (dimensions: MapViewportDimensions) => void): () => void;
517
517
  declare function bindBlockMapDblClick(map: L.Map): () => void;
518
518
 
519
- interface LeafletCanvasStore extends LeafletCanvasController {
520
- subscribe: (listener: (controller: LeafletCanvasController) => void) => () => void;
521
- getState: () => LeafletCanvasController;
519
+ interface LeafletTualStore extends LeafletTualController {
520
+ subscribe: (listener: (controller: LeafletTualController) => void) => () => void;
521
+ getState: () => LeafletTualController;
522
522
  destroy: () => void;
523
523
  }
524
- declare function createLeafletCanvasController(options?: UseLeafletCanvasOptions): LeafletCanvasStore;
525
- declare const createLeafletTualController: typeof createLeafletCanvasController;
524
+ declare function createLeafletTualController(options?: UseLeafletTualOptions): LeafletTualStore;
526
525
 
527
- interface CreateLeafletCanvasOptions extends UseLeafletCanvasOptions {
528
- controller?: LeafletCanvasStore;
529
- annotationTheme?: CanvasAnnotationTheme;
526
+ interface CreateLeafletTualOptions extends UseLeafletTualOptions {
527
+ controller?: LeafletTualStore;
528
+ annotationTheme?: TualAnnotationTheme;
530
529
  arrowTheme?: ArrowRenderTheme;
531
- labels?: CanvasLabels;
530
+ labels?: TualLabels;
532
531
  }
533
- interface LeafletCanvasInstance {
534
- controller: LeafletCanvasStore;
532
+ interface LeafletTualInstance {
533
+ controller: LeafletTualStore;
535
534
  container: HTMLDivElement;
536
535
  canvas: HTMLCanvasElement;
537
536
  repaint: () => void;
538
537
  destroy: () => void;
539
538
  }
540
- declare function createLeafletCanvas(map: L.Map, options?: CreateLeafletCanvasOptions): LeafletCanvasInstance;
541
- declare const createLeafletTual: typeof createLeafletCanvas;
539
+ declare function createLeafletTual(map: L.Map, options?: CreateLeafletTualOptions): LeafletTualInstance;
542
540
 
543
541
  /**
544
542
  * leaflet-tual — core (framework-agnostic)
@@ -552,13 +550,13 @@ declare const createLeafletTual: typeof createLeafletCanvas;
552
550
  * dependency on React or any UI framework, so it can be used directly from
553
551
  * vanilla JavaScript, TypeScript, Vue, Svelte, Angular, or a plain `<script>` tag.
554
552
  *
555
- * React users: see `leaflet-tual/react` for `<LeafletCanvas>`, `<CanvasToolbar>`,
556
- * `useLeafletCanvas`, and `useLeafletSync`.
553
+ * React users: see `leaflet-tual/react` for `<LeafletTual>`, `<TualToolbar>`,
554
+ * `useLeafletTual`, and `useLeafletSync`.
557
555
  */
558
556
 
559
557
  declare const VERSION: string;
560
558
 
561
- interface CanvasIcons {
559
+ interface TualIcons {
562
560
  select?: React__default.ReactNode;
563
561
  freedraw?: React__default.ReactNode;
564
562
  arrowGroup?: React__default.ReactNode;
@@ -598,8 +596,8 @@ interface CanvasIcons {
598
596
  collapseToolbar?: React__default.ReactNode;
599
597
  expandToolbar?: React__default.ReactNode;
600
598
  }
601
- type LeafletCanvasStyles = {
602
- [K in keyof LeafletCanvasClassNames]?: React__default.CSSProperties;
599
+ type LeafletTualStyles = {
600
+ [K in keyof LeafletTualClassNames]?: React__default.CSSProperties;
603
601
  };
604
602
 
605
603
  interface CustomToolbarItem {
@@ -609,8 +607,8 @@ interface CustomToolbarItem {
609
607
  icon?: React__default.ReactNode;
610
608
  isActive?: boolean;
611
609
  disabled?: boolean;
612
- onClick?: (controller: LeafletCanvasController) => void;
613
- render?: (controller: LeafletCanvasController) => React__default.ReactNode;
610
+ onClick?: (controller: LeafletTualController) => void;
611
+ render?: (controller: LeafletTualController) => React__default.ReactNode;
614
612
  }
615
613
  interface DragHandleTriggerProps {
616
614
  onPointerDown: (e: React__default.PointerEvent<HTMLElement>) => void;
@@ -644,9 +642,9 @@ interface RenderTextProps {
644
642
  onUpdate: (patch: Partial<TextItem>) => void;
645
643
  onDelete: () => void;
646
644
  }
647
- interface LeafletCanvasProps extends UseLeafletCanvasOptions {
645
+ interface LeafletTualProps extends UseLeafletTualOptions {
648
646
  map?: L.Map | null;
649
- controller?: LeafletCanvasController;
647
+ controller?: LeafletTualController;
650
648
  readOnly?: boolean;
651
649
  showToolbar?: boolean;
652
650
  toolbarPosition?: ToolbarPosition;
@@ -663,17 +661,17 @@ interface LeafletCanvasProps extends UseLeafletCanvasOptions {
663
661
  showDeleteButton?: boolean;
664
662
  showClearButton?: boolean;
665
663
  showToolLabels?: boolean;
666
- labels?: CanvasLabels;
667
- icons?: CanvasIcons;
664
+ labels?: TualLabels;
665
+ icons?: TualIcons;
668
666
  unstyled?: boolean;
669
- classNames?: LeafletCanvasClassNames;
670
- styles?: LeafletCanvasStyles;
671
- annotationTheme?: CanvasAnnotationTheme;
667
+ classNames?: LeafletTualClassNames;
668
+ styles?: LeafletTualStyles;
669
+ annotationTheme?: TualAnnotationTheme;
672
670
  arrowTheme?: ArrowRenderTheme;
673
671
  strokeColors?: readonly string[];
674
672
  strokeWidthOptions?: readonly number[];
675
673
  fontSizeOptions?: readonly number[];
676
- renderToolbar?: (controller: LeafletCanvasController) => React__default.ReactNode;
674
+ renderToolbar?: (controller: LeafletTualController) => React__default.ReactNode;
677
675
  renderNote?: (props: RenderNoteProps) => React__default.ReactNode;
678
676
  renderText?: (props: RenderTextProps) => React__default.ReactNode;
679
677
  clampOverlaysToViewport?: boolean;
@@ -686,7 +684,7 @@ interface LeafletCanvasProps extends UseLeafletCanvasOptions {
686
684
  interface InlineShapeLabelEditorProps {
687
685
  shape: ShapeItem;
688
686
  map: L.Map;
689
- labels?: CanvasLabels;
687
+ labels?: TualLabels;
690
688
  onUpdate: (id: string, patch: Partial<ShapeItem>) => void;
691
689
  onClose: () => void;
692
690
  }
@@ -698,11 +696,11 @@ interface NoteOverlayProps {
698
696
  isSelected: boolean;
699
697
  map: L.Map;
700
698
  readOnly?: boolean;
701
- labels?: CanvasLabels;
702
- icons?: CanvasIcons;
699
+ labels?: TualLabels;
700
+ icons?: TualIcons;
703
701
  unstyled?: boolean;
704
- classNames?: LeafletCanvasClassNames;
705
- styles?: LeafletCanvasStyles;
702
+ classNames?: LeafletTualClassNames;
703
+ styles?: LeafletTualStyles;
706
704
  clampToViewport?: boolean;
707
705
  autoMinimizeZoomThreshold?: number;
708
706
  renderNote?: (props: RenderNoteProps) => React__default.ReactNode;
@@ -721,11 +719,11 @@ interface TextOverlayProps {
721
719
  isEditingLabel?: boolean;
722
720
  map: L.Map;
723
721
  readOnly?: boolean;
724
- labels?: CanvasLabels;
725
- icons?: CanvasIcons;
722
+ labels?: TualLabels;
723
+ icons?: TualIcons;
726
724
  unstyled?: boolean;
727
- classNames?: LeafletCanvasClassNames;
728
- styles?: LeafletCanvasStyles;
725
+ classNames?: LeafletTualClassNames;
726
+ styles?: LeafletTualStyles;
729
727
  clampToViewport?: boolean;
730
728
  autoMinimizeZoomThreshold?: number;
731
729
  renderText?: (props: RenderTextProps) => React__default.ReactNode;
@@ -747,11 +745,10 @@ interface MapViewportState {
747
745
  */
748
746
  declare function useLeafletSync(map: L.Map | null): MapViewportState;
749
747
 
750
- declare function useLeafletCanvas(options?: UseLeafletCanvasOptions): LeafletCanvasController;
751
- declare const useLeafletTual: typeof useLeafletCanvas;
748
+ declare function useLeafletTual(options?: UseLeafletTualOptions): LeafletTualController;
752
749
 
753
- interface CanvasToolbarProps {
754
- controller: LeafletCanvasController;
750
+ interface TualToolbarProps {
751
+ controller: LeafletTualController;
755
752
  position?: ToolbarPosition;
756
753
  orientation?: ToolbarOrientation;
757
754
  collapsible?: boolean;
@@ -766,11 +763,11 @@ interface CanvasToolbarProps {
766
763
  showDeleteButton?: boolean;
767
764
  showClearButton?: boolean;
768
765
  showToolLabels?: boolean;
769
- labels?: CanvasLabels;
770
- icons?: CanvasIcons;
766
+ labels?: TualLabels;
767
+ icons?: TualIcons;
771
768
  unstyled?: boolean;
772
- classNames?: LeafletCanvasClassNames;
773
- styles?: LeafletCanvasStyles;
769
+ classNames?: LeafletTualClassNames;
770
+ styles?: LeafletTualStyles;
774
771
  strokeColors?: readonly string[];
775
772
  strokeWidthOptions?: readonly number[];
776
773
  fontSizeOptions?: readonly number[];
@@ -778,7 +775,7 @@ interface CanvasToolbarProps {
778
775
  style?: React__default.CSSProperties;
779
776
  }
780
777
 
781
- declare function CanvasToolbar({ controller, position, orientation: propOrientation, collapsible, defaultCollapsed, collapsed: propCollapsed, onCollapsedChange, showCollapseButton, readOnly: propReadOnly, enabledTools, customTools, showHistoryControls, showDeleteButton, showClearButton, showToolLabels: explicitShowToolLabels, labels, icons, unstyled, classNames, styles, strokeColors, strokeWidthOptions, fontSizeOptions, className, style, }: CanvasToolbarProps): React.JSX.Element;
778
+ declare function TualToolbar({ controller, position, orientation: propOrientation, collapsible, defaultCollapsed, collapsed: propCollapsed, onCollapsedChange, showCollapseButton, readOnly: propReadOnly, enabledTools, customTools, showHistoryControls, showDeleteButton, showClearButton, showToolLabels: explicitShowToolLabels, labels, icons, unstyled, classNames, styles, strokeColors, strokeWidthOptions, fontSizeOptions, className, style, }: TualToolbarProps): React.JSX.Element;
782
779
 
783
780
  interface PixelSelectProps {
784
781
  /** Visible label and accessible name. */
@@ -791,9 +788,9 @@ interface PixelSelectProps {
791
788
  /** Optional data attribute to distinguish multiple selects. */
792
789
  control?: string;
793
790
  unstyled?: boolean;
794
- classNames?: LeafletCanvasClassNames;
795
- styles?: LeafletCanvasStyles;
796
- icons?: CanvasIcons;
791
+ classNames?: LeafletTualClassNames;
792
+ styles?: LeafletTualStyles;
793
+ icons?: TualIcons;
797
794
  }
798
795
  /**
799
796
  * Labeled `<select>` listing pixel values (e.g. `1px`, `2px`, ...).
@@ -818,6 +815,6 @@ declare function getCollapseChevronRotation(position?: ToolbarPosition, orientat
818
815
  */
819
816
  declare function getExpandChevronRotation(position?: ToolbarPosition, orientation?: ToolbarOrientation): string;
820
817
 
821
- declare function LeafletCanvas(props: LeafletCanvasProps): React.JSX.Element;
818
+ declare function LeafletTual(props: LeafletTualProps): React.JSX.Element;
822
819
 
823
- export { type ArrowHandleType, type ArrowHeadStyle, type ArrowItem, type ArrowRenderTheme, type ArrowStyle, type CanvasAnnotationTheme, type CanvasIcons, type CanvasItem, type CanvasLabels, type CanvasOverlayOptions, type CanvasTool, CanvasToolbar, type CanvasToolbarProps, type CreateLeafletCanvasOptions, type CustomToolbarItem, DEFAULT_ANNOTATION_THEME, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE_OPTIONS, DEFAULT_NOTE_BG, DEFAULT_NOTE_TEXT, DEFAULT_STROKE_COLOR, DEFAULT_STROKE_WIDTH, DEFAULT_STROKE_WIDTH_OPTIONS, type DraftArrowState, type DraftRulerState, type DraftShapeState, type DragHandleTriggerProps, FONT_SIZE_OPTIONS, type FreeDrawItem, type GeoPoint, InlineShapeLabelEditor, type InlineShapeLabelEditorProps, LeafletCanvas, type LeafletCanvasClassNames, type LeafletCanvasController, type LeafletCanvasInstance, type LeafletCanvasOptions, type LeafletCanvasProps, type LeafletCanvasStore, type LeafletCanvasStyles, type MapViewportDimensions, type MapViewportState, NOTE_COLOR_THEMES, type NoteCollapseState, type NoteColorTheme, type NoteItem, NoteOverlay, type NoteOverlayProps, type PaintLeafletCanvasOptions, PixelSelect, type PixelSelectProps, type ProjectedArrow, type ProjectedRuler, type ProjectedShape, type RenderNoteProps, type RenderTextProps, type ResolvedNoteTheme, type RulerHandleType, type RulerItem, STROKE_COLORS, STROKE_WIDTH_OPTIONS, type ScreenPoint, type ShapeHandleType, type ShapeItem, type ShapeKind, TOOL_TO_ARROW_STYLE, type TextItem, TextOverlay, type TextOverlayProps, type ToolbarOrientation, type ToolbarPosition, type ToolbarToolGroupId, type UseLeafletCanvasOptions, VERSION, bindBlockMapDblClick, bindLeafletSync, buildArrowItem, buildRulerItem, calculateGeodesicDistance, calculateLineDistance, calculateZoomFontSize, clampNotePosition, clampTextPosition, computeDefaultControlGeoPoint, constrainAngleTo45Degrees, constrainToAspectRatio, createDraftNote, createDraftText, createId, createLeafletCanvas, createLeafletCanvasController, createLeafletTual, createLeafletTualController, distanceToQuadraticBezier, distanceToSegment, drawArrowHead, drawCanvasHandle, drawCanvasLabelPill, formatRealWorldDistance, geoToScreen, getCollapseChevronRotation, getDropdownChevronRotation, getExpandChevronRotation, getMapDimensions, getQuadraticBezierPoint, getQuadraticEndAngle, hitTestArrow, hitTestArrowHandle, hitTestFreeDraw, hitTestRuler, hitTestRulerHandle, hitTestShape, hitTestShapeHandle, paintLeafletCanvas, projectArrow, projectFreeDraw, projectRuler, projectShape, renderArrowOnCanvas, renderFreeDrawOnCanvas, renderRulerOnCanvas, renderShapeOnCanvas, resolveNoteTheme, screenToGeo, startArrowBodyDrag, startArrowDrag, startArrowHandleDrag, startFreeDrawBodyDrag, startFreeDrawDrag, startRulerBodyDrag, startRulerDrag, startRulerHandleDrag, startShapeBodyDrag, startShapeDrag, startShapeHandleDrag, traceArrowPath, tracePolygonShape, truncateCanvasText, useLeafletCanvas, useLeafletSync, useLeafletTual };
820
+ export { type ArrowHandleType, type ArrowHeadStyle, type ArrowItem, type ArrowRenderTheme, type ArrowStyle, type CreateLeafletTualOptions, type CustomToolbarItem, DEFAULT_ANNOTATION_THEME, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE_OPTIONS, DEFAULT_NOTE_BG, DEFAULT_NOTE_TEXT, DEFAULT_STROKE_COLOR, DEFAULT_STROKE_WIDTH, DEFAULT_STROKE_WIDTH_OPTIONS, type DraftArrowState, type DraftRulerState, type DraftShapeState, type DragHandleTriggerProps, FONT_SIZE_OPTIONS, type FreeDrawItem, type GeoPoint, InlineShapeLabelEditor, type InlineShapeLabelEditorProps, LeafletTual, type LeafletTualClassNames, type LeafletTualController, type LeafletTualInstance, type LeafletTualOptions, type LeafletTualProps, type LeafletTualStore, type LeafletTualStyles, type MapViewportDimensions, type MapViewportState, NOTE_COLOR_THEMES, type NoteCollapseState, type NoteColorTheme, type NoteItem, NoteOverlay, type NoteOverlayProps, type PaintLeafletTualOptions, PixelSelect, type PixelSelectProps, type ProjectedArrow, type ProjectedRuler, type ProjectedShape, type RenderNoteProps, type RenderTextProps, type ResolvedNoteTheme, type RulerHandleType, type RulerItem, STROKE_COLORS, STROKE_WIDTH_OPTIONS, type ScreenPoint, type ShapeHandleType, type ShapeItem, type ShapeKind, TOOL_TO_ARROW_STYLE, type TextItem, TextOverlay, type TextOverlayProps, type ToolbarOrientation, type ToolbarPosition, type ToolbarToolGroupId, type TualAnnotationTheme, type TualIcons, type TualItem, type TualLabels, type TualOverlayOptions, type TualTool, TualToolbar, type TualToolbarProps, type UseLeafletTualOptions, VERSION, bindBlockMapDblClick, bindLeafletSync, buildArrowItem, buildRulerItem, calculateGeodesicDistance, calculateLineDistance, calculateZoomFontSize, clampNotePosition, clampTextPosition, computeDefaultControlGeoPoint, constrainAngleTo45Degrees, constrainToAspectRatio, createDraftNote, createDraftText, createId, createLeafletTual, createLeafletTualController, distanceToQuadraticBezier, distanceToSegment, drawArrowHead, drawTualHandle, drawTualLabelPill, formatRealWorldDistance, geoToScreen, getCollapseChevronRotation, getDropdownChevronRotation, getExpandChevronRotation, getMapDimensions, getQuadraticBezierPoint, getQuadraticEndAngle, hitTestArrow, hitTestArrowHandle, hitTestFreeDraw, hitTestRuler, hitTestRulerHandle, hitTestShape, hitTestShapeHandle, paintLeafletTual, projectArrow, projectFreeDraw, projectRuler, projectShape, renderArrowOnCanvas, renderFreeDrawOnCanvas, renderRulerOnCanvas, renderShapeOnCanvas, resolveNoteTheme, screenToGeo, startArrowBodyDrag, startArrowDrag, startArrowHandleDrag, startFreeDrawBodyDrag, startFreeDrawDrag, startRulerBodyDrag, startRulerDrag, startRulerHandleDrag, startShapeBodyDrag, startShapeDrag, startShapeHandleDrag, traceArrowPath, tracePolygonShape, truncateTualText, useLeafletSync, useLeafletTual };