@cyber-harbour/ui 1.0.50 → 1.0.51

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/index.d.mts CHANGED
@@ -951,6 +951,53 @@ interface Graph2DRef {
951
951
  */
952
952
  removeNodes: (nodeIds: (string | number)[]) => void;
953
953
  }
954
+ /**
955
+ * Интерфейс для внутреннего состояния компонента Graph2D
956
+ */
957
+ interface GraphState {
958
+ /** Трансформация графа (позиционирование и масштаб) */
959
+ transform: {
960
+ x: number;
961
+ y: number;
962
+ k: number;
963
+ };
964
+ /** Флаг режима панорамирования */
965
+ isPanning: boolean;
966
+ /** Узел, над которым находится курсор */
967
+ hoveredNode: NodeObject | null;
968
+ /** Связь, над которой находится курсор */
969
+ hoveredLink: LinkObject | null;
970
+ /** Узел, который в данный момент перетаскивается */
971
+ draggedNode: NodeObject | null;
972
+ /** Выбранный узел */
973
+ selectedNode: NodeObject | null;
974
+ /** Индекс кнопки, над которой находится курсор */
975
+ hoveredButtonIndex: number | null;
976
+ /** Набор узлов, которые должны быть подсвечены */
977
+ highlightNodes: Set<NodeObject>;
978
+ /** Набор связей, которые должны быть подсвечены */
979
+ highlightLinks: Set<any>;
980
+ /** Последняя позиция курсора */
981
+ lastMousePos: {
982
+ x: number;
983
+ y: number;
984
+ };
985
+ /** Флаг необходимости остановки распространения события */
986
+ mustBeStoppedPropagation: boolean;
987
+ /** Последний узел, над которым был курсор */
988
+ lastHoveredNode: NodeObject | null;
989
+ /** Кэшированная ссылка на последний узел, над которым был курсор (для избежания лишних вычислений) */
990
+ lastHoveredNodeRef: NodeObject | null;
991
+ /** Начальная позиция курсора при начале перетаскивания */
992
+ mouseStartPos: {
993
+ x: number;
994
+ y: number;
995
+ } | null;
996
+ /** Флаг режима перетаскивания */
997
+ isDragging: boolean;
998
+ width: number;
999
+ height: number;
1000
+ }
954
1001
  interface Graph2DProps {
955
1002
  graphData: GraphData;
956
1003
  loading?: boolean;
@@ -960,6 +1007,8 @@ interface Graph2DProps {
960
1007
  onNodeClick?: (node: NodeObject) => void;
961
1008
  onBackgroundClick?: () => void;
962
1009
  onNodeHover?: (node: NodeObject | null) => void;
1010
+ onLinkHover?: (link: LinkObject | null) => void;
1011
+ onLinkClick?: (link: LinkObject) => void;
963
1012
  }
964
1013
  interface NodeButton {
965
1014
  img: string;
@@ -998,4 +1047,4 @@ interface FullscreenCardProps {
998
1047
  }
999
1048
  declare const FullscreenCard: ({ isActive, position, top, left, right, bottom, ...props }: FullscreenCardProps) => react_jsx_runtime.JSX.Element;
1000
1049
 
1001
- export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
1050
+ export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
package/dist/index.d.ts CHANGED
@@ -951,6 +951,53 @@ interface Graph2DRef {
951
951
  */
952
952
  removeNodes: (nodeIds: (string | number)[]) => void;
953
953
  }
954
+ /**
955
+ * Интерфейс для внутреннего состояния компонента Graph2D
956
+ */
957
+ interface GraphState {
958
+ /** Трансформация графа (позиционирование и масштаб) */
959
+ transform: {
960
+ x: number;
961
+ y: number;
962
+ k: number;
963
+ };
964
+ /** Флаг режима панорамирования */
965
+ isPanning: boolean;
966
+ /** Узел, над которым находится курсор */
967
+ hoveredNode: NodeObject | null;
968
+ /** Связь, над которой находится курсор */
969
+ hoveredLink: LinkObject | null;
970
+ /** Узел, который в данный момент перетаскивается */
971
+ draggedNode: NodeObject | null;
972
+ /** Выбранный узел */
973
+ selectedNode: NodeObject | null;
974
+ /** Индекс кнопки, над которой находится курсор */
975
+ hoveredButtonIndex: number | null;
976
+ /** Набор узлов, которые должны быть подсвечены */
977
+ highlightNodes: Set<NodeObject>;
978
+ /** Набор связей, которые должны быть подсвечены */
979
+ highlightLinks: Set<any>;
980
+ /** Последняя позиция курсора */
981
+ lastMousePos: {
982
+ x: number;
983
+ y: number;
984
+ };
985
+ /** Флаг необходимости остановки распространения события */
986
+ mustBeStoppedPropagation: boolean;
987
+ /** Последний узел, над которым был курсор */
988
+ lastHoveredNode: NodeObject | null;
989
+ /** Кэшированная ссылка на последний узел, над которым был курсор (для избежания лишних вычислений) */
990
+ lastHoveredNodeRef: NodeObject | null;
991
+ /** Начальная позиция курсора при начале перетаскивания */
992
+ mouseStartPos: {
993
+ x: number;
994
+ y: number;
995
+ } | null;
996
+ /** Флаг режима перетаскивания */
997
+ isDragging: boolean;
998
+ width: number;
999
+ height: number;
1000
+ }
954
1001
  interface Graph2DProps {
955
1002
  graphData: GraphData;
956
1003
  loading?: boolean;
@@ -960,6 +1007,8 @@ interface Graph2DProps {
960
1007
  onNodeClick?: (node: NodeObject) => void;
961
1008
  onBackgroundClick?: () => void;
962
1009
  onNodeHover?: (node: NodeObject | null) => void;
1010
+ onLinkHover?: (link: LinkObject | null) => void;
1011
+ onLinkClick?: (link: LinkObject) => void;
963
1012
  }
964
1013
  interface NodeButton {
965
1014
  img: string;
@@ -998,4 +1047,4 @@ interface FullscreenCardProps {
998
1047
  }
999
1048
  declare const FullscreenCard: ({ isActive, position, top, left, right, bottom, ...props }: FullscreenCardProps) => react_jsx_runtime.JSX.Element;
1000
1049
 
1001
- export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };
1050
+ export { type Action, Alert, AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlexContainer, FlexItem, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, Line, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlaneIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, darkTheme, darkThemePx, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, pxToRem, remToPx, resolveThemeColor, useContextMenuControl };