@texturehq/edges 1.1.1 → 1.2.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.
Binary file
Binary file
Binary file
@@ -35,10 +35,10 @@ interface IconProps extends Omit<IconProps$1, "size"> {
35
35
  ariaLabel?: string;
36
36
  }
37
37
  /**
38
- * Icon - A wrapper around Phosphor icons that provides:
39
- * - Access to ALL Phosphor icons without maintaining an allow list
40
- * - Tree-shaking support (icons are only included if used)
41
- * - Consistent sizing and theming
38
+ * Icon
39
+ *
40
+ * Phosphor icon wrapper component with standardized sizing and styling.
41
+ * Provides access to the full Phosphor icon library with tree-shaking support and design system presets.
42
42
  * - TypeScript autocomplete for all icon names
43
43
  *
44
44
  * Usage:
@@ -145,8 +145,10 @@ type SideNavProps = {
145
145
  sidebarCollapseId?: string;
146
146
  };
147
147
  /**
148
- * Isomorphic SideNav component
149
- * Works in both server and client components with CSS-only interactions
148
+ * SideNav
149
+ *
150
+ * Vertical navigation component for application sidebars.
151
+ * Supports nested navigation items, sections, collapsible categories, and mobile-responsive behavior.
150
152
  */
151
153
  declare const SideNav: React$1.FC<SideNavProps>;
152
154
 
@@ -162,8 +164,10 @@ type TopNavProps = {
162
164
  mobileMenuId?: string;
163
165
  };
164
166
  /**
165
- * Isomorphic TopNav component
166
- * Works in both server and client components
167
+ * TopNav
168
+ *
169
+ * Horizontal navigation bar component for application headers.
170
+ * Includes mobile menu toggle, user avatar, theme switcher, and customizable action areas.
167
171
  */
168
172
  declare const TopNav: React$1.FC<TopNavProps>;
169
173
 
@@ -602,6 +606,12 @@ interface LoaderProps {
602
606
  */
603
607
  color?: string;
604
608
  }
609
+ /**
610
+ * Loader
611
+ *
612
+ * Animated loading spinner component.
613
+ * Displays a circular spinner with customizable size and color for loading states.
614
+ */
605
615
  declare const Loader: ({ className, size, color }: LoaderProps) => react_jsx_runtime.JSX.Element;
606
616
 
607
617
  interface LogoProps {
@@ -610,8 +620,223 @@ interface LogoProps {
610
620
  width?: number;
611
621
  fill?: string;
612
622
  }
623
+ /**
624
+ * Logo
625
+ *
626
+ * Brand logo component with optional wordmark.
627
+ * Supports customizable sizing and fill colors with theme-aware defaults.
628
+ */
613
629
  declare const Logo: ({ className, showWordmark, width, fill }: LogoProps) => react_jsx_runtime.JSX.Element;
614
630
 
631
+ interface MapPoint {
632
+ id: string;
633
+ latitude: number;
634
+ longitude: number;
635
+ properties?: Record<string, any>;
636
+ }
637
+
638
+ /**
639
+ * Map style configuration for all map components
640
+ * Centralized configuration for theme and color mode handling
641
+ */
642
+ /**
643
+ * MAPBOX_THEMES
644
+ *
645
+ * Semantic map style themes that automatically adapt to light/dark mode.
646
+ * The visual appearance (light/dark) is determined by the global ColorModeProvider.
647
+ */
648
+ declare const MAPBOX_THEMES$1: {
649
+ readonly streets: "mapbox://styles/mapbox/streets-v12";
650
+ readonly satellite: "mapbox://styles/mapbox/satellite-streets-v12";
651
+ readonly neutral: "mapbox://styles/mapbox/light-v11";
652
+ };
653
+
654
+ interface InteractiveMapProps {
655
+ data?: MapPoint[];
656
+ initialViewState?: ViewState;
657
+ viewState?: ViewState;
658
+ onViewStateChange?: (viewState: ViewState) => void;
659
+ onPointClick?: (pointId: string) => void;
660
+ selectedPointId?: string | null;
661
+ onCloseDrawer?: () => void;
662
+ drawerComponent?: React__default.ReactNode;
663
+ scrollEnabled?: boolean;
664
+ className?: string;
665
+ previewMode?: boolean;
666
+ previewModeCta?: React__default.ReactNode;
667
+ onPreviewModePress?: () => void;
668
+ workspaceId?: string;
669
+ mapFilters?: {
670
+ city?: string[];
671
+ state?: string[];
672
+ search?: string;
673
+ };
674
+ serverSideClusteringEnabled?: boolean;
675
+ /**
676
+ * Semantic map theme - automatically adapts to light/dark mode
677
+ * @default "streets"
678
+ */
679
+ theme?: keyof typeof MAPBOX_THEMES$1;
680
+ mapboxAccessToken?: string;
681
+ transformRequest?: (url: string, resourceType?: string) => {
682
+ url: string;
683
+ headers?: Record<string, string>;
684
+ };
685
+ /**
686
+ * Show loading state
687
+ * @default false
688
+ */
689
+ isLoading?: boolean;
690
+ /**
691
+ * Map controls configuration
692
+ */
693
+ controls?: {
694
+ /**
695
+ * Show navigation control (compass and geolocate)
696
+ * @default true
697
+ */
698
+ navigation?: boolean;
699
+ /**
700
+ * Show layers control
701
+ * @default false
702
+ */
703
+ layers?: boolean;
704
+ /**
705
+ * Show search control
706
+ * @default false
707
+ */
708
+ search?: boolean;
709
+ /**
710
+ * Show list control
711
+ * @default false
712
+ */
713
+ list?: boolean;
714
+ /**
715
+ * Show reset zoom control
716
+ * @default true
717
+ */
718
+ resetZoom?: boolean;
719
+ };
720
+ /**
721
+ * Available map layers for the layers control
722
+ */
723
+ mapLayers?: Array<{
724
+ id: string;
725
+ name: string;
726
+ visible: boolean;
727
+ onToggle: (id: string, visible: boolean) => void;
728
+ }>;
729
+ /**
730
+ * List items for the list control
731
+ */
732
+ listItems?: Array<{
733
+ id: string;
734
+ name: string;
735
+ onClick: () => void;
736
+ }>;
737
+ /**
738
+ * Callback when search is triggered
739
+ */
740
+ onSearch?: (query: string) => void;
741
+ /**
742
+ * Callback when list toggle is clicked
743
+ */
744
+ onListToggle?: (isOpen: boolean) => void;
745
+ /**
746
+ * Callback when map theme is changed
747
+ */
748
+ onThemeChange?: (theme: keyof typeof MAPBOX_THEMES$1) => void;
749
+ /**
750
+ * ISO RTO regions visibility
751
+ */
752
+ isoRtoVisible?: boolean;
753
+ /**
754
+ * Callback when ISO RTO regions visibility changes
755
+ */
756
+ onIsoRtoToggle?: (visible: boolean) => void;
757
+ /**
758
+ * Vermont substations visibility
759
+ */
760
+ vermontSubstationsVisible?: boolean;
761
+ /**
762
+ * Callback when Vermont substations visibility changes
763
+ */
764
+ onVermontSubstationsToggle?: (visible: boolean) => void;
765
+ /**
766
+ * Transformers visibility
767
+ */
768
+ transformersVisible?: boolean;
769
+ /**
770
+ * Callback when transformers visibility changes
771
+ */
772
+ onTransformersToggle?: (visible: boolean) => void;
773
+ /**
774
+ * Feeders visibility
775
+ */
776
+ feedersVisible?: boolean;
777
+ /**
778
+ * Callback when feeders visibility changes
779
+ */
780
+ onFeedersToggle?: (visible: boolean) => void;
781
+ /**
782
+ * Spans visibility
783
+ */
784
+ spansVisible?: boolean;
785
+ /**
786
+ * Callback when spans visibility changes
787
+ */
788
+ onSpansToggle?: (visible: boolean) => void;
789
+ /**
790
+ * Minimum zoom level to show substations
791
+ * @default 8
792
+ */
793
+ substationsMinZoom?: number;
794
+ /**
795
+ * Minimum zoom level to show transformers
796
+ * @default 12
797
+ */
798
+ transformersMinZoom?: number;
799
+ /**
800
+ * Minimum zoom level to show feeders
801
+ * @default 12
802
+ */
803
+ feedersMinZoom?: number;
804
+ /**
805
+ * Minimum zoom level to show spans
806
+ * @default 12
807
+ */
808
+ spansMinZoom?: number;
809
+ /**
810
+ * Placeholder text for search input
811
+ * @default "Search places..."
812
+ */
813
+ searchPlaceholder?: string;
814
+ /**
815
+ * Custom positioning for controls
816
+ */
817
+ controlStyles?: {
818
+ navigation?: React__default.CSSProperties;
819
+ layers?: React__default.CSSProperties;
820
+ search?: React__default.CSSProperties;
821
+ list?: React__default.CSSProperties;
822
+ };
823
+ /**
824
+ * Custom Mapbox tileset to render
825
+ */
826
+ customTileset?: {
827
+ id: string;
828
+ url: string;
829
+ sourceLayer?: string;
830
+ layers?: Array<{
831
+ id: string;
832
+ type: "circle" | "fill" | "line" | "symbol" | "raster";
833
+ paint?: Record<string, any>;
834
+ layout?: Record<string, any>;
835
+ }>;
836
+ };
837
+ }
838
+ declare function InteractiveMap({ data, initialViewState, onViewStateChange, onPointClick, selectedPointId, onCloseDrawer, drawerComponent, scrollEnabled, className, previewMode, previewModeCta, onPreviewModePress, workspaceId, mapFilters, serverSideClusteringEnabled, theme, mapboxAccessToken, transformRequest, isLoading, controls, mapLayers: layersData, listItems, onSearch, onListToggle, onThemeChange, isoRtoVisible: propIsoRtoVisible, onIsoRtoToggle, vermontSubstationsVisible: propVermontSubstationsVisible, onVermontSubstationsToggle, transformersVisible: propTransformersVisible, onTransformersToggle, feedersVisible: propFeedersVisible, onFeedersToggle, spansVisible: propSpansVisible, onSpansToggle, substationsMinZoom, transformersMinZoom, feedersMinZoom, spansMinZoom, searchPlaceholder, controlStyles, customTileset, }: InteractiveMapProps): react_jsx_runtime.JSX.Element;
839
+
615
840
  declare const MAPBOX_THEMES: {
616
841
  dark: string;
617
842
  light: string;
@@ -668,73 +893,6 @@ interface StaticMapProps {
668
893
  */
669
894
  declare function StaticMap({ width, height, initialViewState, isLoading, theme, mapboxAccessToken, showMarker, className, }: StaticMapProps): react_jsx_runtime.JSX.Element;
670
895
 
671
- interface MapPoint {
672
- id: string;
673
- latitude: number;
674
- longitude: number;
675
- properties?: Record<string, unknown>;
676
- }
677
- interface InteractiveMapProps {
678
- /**
679
- * Array of points to display on the map
680
- */
681
- data: MapPoint[];
682
- /**
683
- * Initial viewport configuration
684
- */
685
- initialViewState?: ViewState;
686
- /**
687
- * Controlled viewport state
688
- */
689
- viewState?: ViewState;
690
- /**
691
- * Callback when viewport changes
692
- */
693
- onViewStateChange?: (viewState: ViewState) => void;
694
- /**
695
- * Callback when a point is clicked
696
- */
697
- onPointClick?: (pointId: string) => void;
698
- /**
699
- * Currently selected point ID
700
- */
701
- selectedPointId?: string | null;
702
- /**
703
- * Enable scroll zoom
704
- * @default true
705
- */
706
- scrollEnabled?: boolean;
707
- /**
708
- * Additional CSS classes
709
- */
710
- className?: string;
711
- /**
712
- * Map theme
713
- * @default "streets"
714
- */
715
- theme?: keyof typeof MAPBOX_THEMES;
716
- /**
717
- * Mapbox access token
718
- */
719
- mapboxAccessToken?: string;
720
- /**
721
- * Enable clustering for many points
722
- * @default true
723
- */
724
- enableClustering?: boolean;
725
- /**
726
- * Custom marker component
727
- */
728
- renderMarker?: (point: MapPoint, isSelected: boolean) => React__default.ReactNode;
729
- }
730
- /**
731
- * InteractiveMap
732
- *
733
- * An interactive map component for displaying multiple locations with clustering support.
734
- * Supports point selection, custom markers, and viewport control.
735
- */
736
- declare function InteractiveMap({ data, initialViewState, viewState, onViewStateChange, onPointClick, selectedPointId, scrollEnabled, className, theme, mapboxAccessToken, enableClustering, renderMarker, }: InteractiveMapProps): react_jsx_runtime.JSX.Element;
737
-
738
896
  interface MeterProps extends MeterProps$1 {
739
897
  /** Label displayed above the meter */
740
898
  label?: string;
@@ -843,6 +1001,12 @@ interface TextLinkProps {
843
1001
  onPress?: () => void;
844
1002
  showArrow?: boolean;
845
1003
  }
1004
+ /**
1005
+ * TextLink
1006
+ *
1007
+ * Styled text link component for navigation and actions.
1008
+ * Supports internal/external links, button mode, and multiple visual variants.
1009
+ */
846
1010
  declare const TextLink: ({ href, children, className, external, title, variant, onClick, asButton, onPress, showArrow, }: TextLinkProps) => react_jsx_runtime.JSX.Element;
847
1011
 
848
1012
  /**