fix: memoized tools and other components as they were causing again more re-renders, this improves performance a touch

This commit is contained in:
Stan
2026-01-31 10:51:44 +00:00
parent 91cdf8a062
commit e011f8cea2
203 changed files with 101 additions and 15386 deletions

1
packages/fossflow-lib/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
dist

View File

@@ -1,19 +0,0 @@
import { IsoflowProps } from './types';
export declare const Isoflow: (props: IsoflowProps) => import("react/jsx-runtime").JSX.Element;
declare const useIsoflow: () => {
Model: {
get: () => import("./types").ModelStoreWithHistory;
set: (model: Partial<import("./types").Model>, skipHistory?: boolean) => void;
undo: () => boolean;
redo: () => boolean;
canUndo: () => boolean;
canRedo: () => boolean;
saveToHistory: () => void;
clearHistory: () => void;
};
uiState: import("./types").UiStateActions;
rendererEl: HTMLDivElement | null;
};
export { useIsoflow };
export * from './standaloneExports';
export default Isoflow;

View File

@@ -1,8 +0,0 @@
import React from 'react';
import { Coords } from '../../types';
interface Props {
tile: Coords;
radius?: number;
}
export declare const Circle: ({ tile, radius, ...rest }: Props & React.SVGProps<SVGCircleElement>) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
import { MuiColorInputProps } from 'mui-color-input';
interface Props extends Omit<MuiColorInputProps, 'ref'> {
}
export declare const ColorPicker: ({ value, onChange }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,6 +0,0 @@
interface Props {
onChange: (color: string) => void;
activeColor?: string;
}
export declare const ColorSelector: ({ onChange, activeColor }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,7 +0,0 @@
import React from 'react';
export type Props = {
hex: string;
isActive?: boolean;
onClick: React.MouseEventHandler<HTMLButtonElement> | undefined;
};
export declare const ColorSwatch: ({ hex, onClick, isActive }: Props) => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,20 +0,0 @@
interface EyeDropper {
open: (options?: {
signal?: AbortSignal;
}) => Promise<{
sRGBHex: string;
}>;
}
declare global {
interface Window {
EyeDropper?: {
new (): EyeDropper;
};
}
}
interface Props {
value: string;
onChange: (color: string) => void;
}
export declare const CustomColorInput: ({ value, onChange }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const ConnectorEmptySpaceTooltip: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,6 +0,0 @@
import React from 'react';
interface Props {
toolMenuRef?: React.RefObject<HTMLElement>;
}
export declare const ConnectorHintTooltip: ({ toolMenuRef }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1 +0,0 @@
export declare const ConnectorRerouteTooltip: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1 +0,0 @@
export declare const ConnectorSettings: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,11 +0,0 @@
interface MenuItemI {
label: string;
onClick: () => void;
}
interface Props {
onClose: () => void;
anchorEl?: HTMLElement | null;
menuItems: MenuItemI[];
}
export declare const ContextMenu: ({ onClose, anchorEl, menuItems }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
anchorEl?: HTMLElement | null;
}
export declare const ContextMenuManager: ({ anchorEl }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const Cursor: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const DebugUtils: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,6 +0,0 @@
interface Props {
title: string;
value: string | number;
}
export declare const LineItem: ({ title, value }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const SizeIndicator: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,5 +0,0 @@
interface Props {
value: string;
}
export declare const Value: ({ value }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,7 +0,0 @@
import { Coords } from '../../types';
interface Props {
iconId: string;
tile: Coords;
}
export declare const DragAndDrop: ({ iconId, tile }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,6 +0,0 @@
interface Props {
quality?: number;
onClose: () => void;
}
export declare const ExportImageDialog: ({ onClose, quality }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const FreehandLasso: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,6 +0,0 @@
import { SxProps } from '@mui/material';
interface Props {
sx?: SxProps;
}
export declare const Gradient: ({ sx }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const Grid: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const HelpDialog: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const HotkeySettings: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,12 +0,0 @@
import React from 'react';
import { TooltipProps } from '@mui/material/Tooltip';
interface Props {
name: string;
Icon: React.ReactNode;
isActive?: boolean;
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
tooltipPosition?: TooltipProps['placement'];
disabled?: boolean;
}
export declare const IconButton: ({ name, Icon, onClick, isActive, disabled, tooltipPosition }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,16 +0,0 @@
import React from 'react';
export interface IconPackSettingsProps {
lazyLoadingEnabled: boolean;
onToggleLazyLoading: (enabled: boolean) => void;
packInfo: Array<{
name: string;
displayName: string;
loaded: boolean;
loading: boolean;
error: string | null;
iconCount: number;
}>;
enabledPacks: string[];
onTogglePack: (packName: string, enabled: boolean) => void;
}
export declare const IconPackSettings: React.FC<IconPackSettingsProps>;

View File

@@ -1 +0,0 @@
export declare const ImportHintTooltip: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,15 +0,0 @@
import { Coords } from '../../types';
interface Props {
from: Coords;
to: Coords;
origin?: Coords;
fill?: string;
cornerRadius?: number;
stroke?: {
width: number;
color: string;
dashArray?: string;
};
}
export declare const IsoTileArea: ({ from, to, fill, cornerRadius, stroke }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const ConnectorControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,9 +0,0 @@
import { Icon as IconI } from '../../../types';
interface Props {
icon: IconI;
onClick?: () => void;
onMouseDown?: () => void;
onDoubleClick?: () => void;
}
export declare const Icon: ({ icon, onClick, onMouseDown, onDoubleClick }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,10 +0,0 @@
import { Icon as IconI } from '../../../types';
interface Props {
id?: string;
icons: IconI[];
onClick?: (icon: IconI) => void;
onMouseDown?: (icon: IconI) => void;
isExpanded: boolean;
}
export declare const IconCollection: ({ id, icons, onClick, onMouseDown, isExpanded: _isExpanded }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,11 +0,0 @@
import { Icon as IconI } from '../../../types';
interface Props {
icons: IconI[];
onMouseDown?: (icon: IconI) => void;
onClick?: (icon: IconI) => void;
onDoubleClick?: (icon: IconI) => void;
hoveredIndex?: number;
onHover?: (index: number) => void;
}
export declare const IconGrid: ({ icons, onMouseDown, onClick, onDoubleClick, hoveredIndex, onHover }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const IconSelectionControls: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,8 +0,0 @@
import { IconCollectionStateWithIcons, Icon } from '../../../types';
interface Props {
iconCategories: IconCollectionStateWithIcons[];
onClick?: (icon: Icon) => void;
onMouseDown?: (icon: Icon) => void;
}
export declare const Icons: ({ iconCategories, onClick, onMouseDown }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,6 +0,0 @@
interface Props {
value: string;
onChange: (value: string) => void;
}
export declare const Searchbox: ({ value, onChange }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const ItemControlsManager: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const NodeControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,13 +0,0 @@
import { ModelItem, ViewItem } from '../../../../types';
export type NodeUpdates = {
model: Partial<ModelItem>;
view: Partial<ViewItem>;
};
interface Props {
node: ViewItem;
onModelItemUpdated: (updates: Partial<ModelItem>) => void;
onViewItemUpdated: (updates: Partial<ViewItem>) => void;
onDeleted: () => void;
}
export declare const NodeSettings: ({ node, onModelItemUpdated, onViewItemUpdated, onDeleted }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,8 +0,0 @@
import { Icon } from '../../../types';
interface Props {
onIconSelected: (icon: Icon) => void;
onClose?: () => void;
currentIconId?: string;
}
export declare const QuickIconSelector: ({ onIconSelected, onClose, currentIconId }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const RectangleControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const TextBoxControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,7 +0,0 @@
import React from 'react';
interface Props {
header?: React.ReactNode;
children: React.ReactNode;
}
export declare const ControlsContainer: ({ header, children }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
onClick: () => void;
}
export declare const DeleteButton: ({ onClick }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
title: string;
}
export declare const Header: ({ title }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { SxProps } from '@mui/material';
interface Props {
children: React.ReactNode;
title?: string;
sx?: SxProps;
}
export declare const Section: ({ children, sx, title }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,8 +0,0 @@
import { SxProps } from '@mui/material';
interface Props {
isExpanded: boolean;
onClick: () => void;
sx?: SxProps;
}
export declare const ExpandButton: ({ isExpanded, onClick, sx }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,6 +0,0 @@
import { Props as LabelProps } from './Label';
type Props = Omit<LabelProps, 'maxHeight'> & {
onToggleExpand?: (isExpanded: boolean) => void;
};
export declare const ExpandableLabel: ({ children, onToggleExpand, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,12 +0,0 @@
import React from 'react';
import { SxProps } from '@mui/material';
export interface Props {
labelHeight?: number;
maxWidth: number;
maxHeight?: number;
expandDirection?: 'CENTER' | 'BOTTOM';
children: React.ReactNode;
sx?: SxProps;
showLine?: boolean;
}
export declare const Label: ({ children, maxWidth, maxHeight, expandDirection, labelHeight, sx, showLine }: Props) => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const LabelSettings: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const Lasso: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,6 +0,0 @@
import React from 'react';
interface Props {
toolMenuRef?: React.RefObject<HTMLElement>;
}
export declare const LassoHintTooltip: ({ toolMenuRef }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1 +0,0 @@
export declare const LazyLoadingWelcomeNotification: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,8 +0,0 @@
import { CircularProgressProps } from '@mui/material';
interface Props {
size?: number;
color?: CircularProgressProps['color'];
isInline?: boolean;
}
export declare const Loader: ({ size, color, isInline }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const MainMenu: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,8 +0,0 @@
import React from 'react';
export interface Props {
onClick?: () => void;
Icon?: React.ReactNode;
children: string | React.ReactNode;
disabled?: boolean;
}
export declare const MenuItem: ({ onClick, Icon, children, disabled }: Props) => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const PanSettings: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,2 +0,0 @@
import { RendererProps } from '../../types/rendererProps';
export declare const Renderer: ({ showGrid, backgroundColor }: RendererProps) => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,10 +0,0 @@
import React from 'react';
interface Props {
value?: string;
onChange?: (value: string) => void;
readOnly?: boolean;
height?: number;
styles?: React.CSSProperties;
}
export declare const RichTextEditor: ({ value, onChange, readOnly, height, styles }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,17 +0,0 @@
import React, { Component, ReactNode } from 'react';
interface ErrorBoundaryProps {
children: ReactNode;
fallback?: ReactNode;
}
interface ErrorBoundaryState {
hasError: boolean;
errorCount: number;
}
declare class RichTextEditorErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
constructor(props: ErrorBoundaryProps);
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> | null;
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
componentDidUpdate(_prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
}
export default RichTextEditorErrorBoundary;

View File

@@ -1 +0,0 @@
export { RichTextEditor } from './RichTextEditor';

View File

@@ -1,10 +0,0 @@
import React from 'react';
import { SxProps } from '@mui/material';
interface Props {
children?: React.ReactNode;
order?: number;
sx?: SxProps;
disableAnimation?: boolean;
}
export declare const SceneLayer: React.MemoExoticComponent<({ children, order, sx, disableAnimation }: Props) => import("react/jsx-runtime").JSX.Element>;
export {};

View File

@@ -1,7 +0,0 @@
import React from 'react';
import { useScene } from '../../../hooks/useScene';
interface Props {
connector: ReturnType<typeof useScene>['connectors'][0];
}
export declare const ConnectorLabel: React.MemoExoticComponent<({ connector: sceneConnector }: Props) => import("react/jsx-runtime").JSX.Element>;
export {};

View File

@@ -1,6 +0,0 @@
import { useScene } from '../../../hooks/useScene';
interface Props {
connectors: ReturnType<typeof useScene>['connectors'];
}
export declare const ConnectorLabels: ({ connectors }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,8 +0,0 @@
import React from 'react';
import { useScene } from '../../../hooks/useScene';
interface Props {
connector: ReturnType<typeof useScene>['connectors'][0];
isSelected?: boolean;
}
export declare const Connector: React.MemoExoticComponent<({ connector: _connector, isSelected }: Props) => import("react/jsx-runtime").JSX.Element | null>;
export {};

View File

@@ -1,6 +0,0 @@
import type { useScene } from '../../../hooks/useScene';
interface Props {
connectors: ReturnType<typeof useScene>['connectors'];
}
export declare const Connectors: ({ connectors }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,7 +0,0 @@
interface Props {
url: string;
scale?: number;
onImageLoaded?: () => void;
}
export declare const IsometricIcon: ({ url, scale, onImageLoaded }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,6 +0,0 @@
import { Icon } from '../../../../../types';
interface Props {
icon: Icon;
}
export declare const NonIsometricIcon: ({ icon }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,8 +0,0 @@
import React from 'react';
import { ViewItem } from '../../../../types';
interface Props {
node: ViewItem;
order: number;
}
export declare const Node: React.MemoExoticComponent<({ node, order }: Props) => import("react/jsx-runtime").JSX.Element | null>;
export {};

View File

@@ -1,6 +0,0 @@
import { ViewItem } from '../../../types';
interface Props {
nodes: ViewItem[];
}
export declare const Nodes: ({ nodes }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,5 +0,0 @@
import React from 'react';
import { useScene } from '../../../hooks/useScene';
type Props = ReturnType<typeof useScene>['rectangles'][0];
export declare const Rectangle: React.MemoExoticComponent<({ from, to, color: colorId, customColor }: Props) => import("react/jsx-runtime").JSX.Element | null>;
export {};

View File

@@ -1,6 +0,0 @@
import { useScene } from '../../../hooks/useScene';
interface Props {
rectangles: ReturnType<typeof useScene>['rectangles'];
}
export declare const Rectangles: ({ rectangles }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,7 +0,0 @@
import React from 'react';
import { useScene } from '../../../hooks/useScene';
interface Props {
textBox: ReturnType<typeof useScene>['textBoxes'][0];
}
export declare const TextBox: React.MemoExoticComponent<({ textBox }: Props) => import("react/jsx-runtime").JSX.Element>;
export {};

View File

@@ -1,6 +0,0 @@
import { useScene } from '../../../hooks/useScene';
interface Props {
textBoxes: ReturnType<typeof useScene>['textBoxes'];
}
export declare const TextBoxes: ({ textBoxes }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,17 +0,0 @@
export interface SettingsDialogProps {
iconPackManager?: {
lazyLoadingEnabled: boolean;
onToggleLazyLoading: (enabled: boolean) => void;
packInfo: Array<{
name: string;
displayName: string;
loaded: boolean;
loading: boolean;
error: string | null;
iconCount: number;
}>;
enabledPacks: string[];
onTogglePack: (packName: string, enabled: boolean) => void;
};
}
export declare const SettingsDialog: ({ iconPackManager }: SettingsDialogProps) => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { Size } from '../../types';
type Props = React.SVGProps<SVGSVGElement> & {
children: React.ReactNode;
style?: React.CSSProperties;
viewboxSize?: Size;
};
export declare const Svg: ({ children, style, viewboxSize, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const ToolMenu: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const NodeTransformControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const RectangleTransformControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,5 +0,0 @@
interface Props {
id: string;
}
export declare const TextBoxTransformControls: ({ id }: Props) => import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -1,7 +0,0 @@
import { Coords } from '../../types';
interface Props {
position: Coords;
onMouseDown: () => void;
}
export declare const TransformAnchor: ({ position, onMouseDown }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1,8 +0,0 @@
import { Coords, AnchorPosition } from '../../types';
interface Props {
from: Coords;
to: Coords;
onAnchorMouseDown?: (anchorPosition: AnchorPosition) => void;
}
export declare const TransformControls: ({ from, to, onAnchorMouseDown }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const TransformControlsManager: () => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { SxProps } from '@mui/material';
interface Props {
children: React.ReactNode;
sx?: SxProps;
style?: React.CSSProperties;
}
export declare const UiElement: ({ children, sx, style }: Props) => import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -1 +0,0 @@
export declare const UiOverlay: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const ZoomControls: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const ZoomSettings: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,48 +0,0 @@
import { Size, InitialData, MainMenuOptions, Icon, Connector, TextBox, ViewItem, View, Rectangle, Colors } from './types';
export declare const UNPROJECTED_TILE_SIZE = 100;
export declare const TILE_PROJECTION_MULTIPLIERS: Size;
export declare const PROJECTED_TILE_SIZE: {
width: number;
height: number;
};
export declare const DEFAULT_COLOR: Colors[0];
export declare const DEFAULT_FONT_FAMILY = "Roboto, Arial, sans-serif";
export declare const VIEW_DEFAULTS: Required<Omit<View, 'id' | 'description' | 'lastUpdated'>>;
export declare const VIEW_ITEM_DEFAULTS: Required<Omit<ViewItem, 'id' | 'tile'>>;
export declare const CONNECTOR_DEFAULTS: Required<Omit<Connector, 'id' | 'color'>>;
export declare const CONNECTOR_SEARCH_OFFSET: {
x: number;
y: number;
};
export declare const TEXTBOX_DEFAULTS: Required<Omit<TextBox, 'id' | 'tile'>>;
export declare const TEXTBOX_PADDING = 0.2;
export declare const TEXTBOX_FONT_WEIGHT = "bold";
export declare const RECTANGLE_DEFAULTS: Required<Omit<Rectangle, 'id' | 'from' | 'to' | 'color'>>;
export declare const ZOOM_INCREMENT = 0.05;
export declare const MIN_ZOOM = 0.1;
export declare const MAX_ZOOM = 1;
export declare const TRANSFORM_ANCHOR_SIZE = 30;
export declare const TRANSFORM_CONTROLS_COLOR = "#0392ff";
export declare const INITIAL_DATA: InitialData;
export declare const INITIAL_UI_STATE: {
zoom: number;
scroll: {
position: {
x: number;
y: number;
};
offset: {
x: number;
y: number;
};
};
};
export declare const INITIAL_SCENE_STATE: {
connectors: {};
textBoxes: {};
};
export declare const MAIN_MENU_OPTIONS: MainMenuOptions;
export declare const DEFAULT_ICON: Icon;
export declare const DEFAULT_LABEL_HEIGHT = 20;
export declare const PROJECT_BOUNDING_BOX_PADDING = 3;
export declare const MARKDOWN_EMPTY_VALUE = "<p><br></p>";

View File

@@ -1,13 +0,0 @@
export type HotkeyProfile = 'qwerty' | 'smnrct' | 'none';
export interface HotkeyMapping {
select: string | null;
pan: string | null;
addItem: string | null;
rectangle: string | null;
connector: string | null;
text: string | null;
lasso: string | null;
freehandLasso: string | null;
}
export declare const HOTKEY_PROFILES: Record<HotkeyProfile, HotkeyMapping>;
export declare const DEFAULT_HOTKEY_PROFILE: HotkeyProfile;

View File

@@ -1,4 +0,0 @@
export interface LabelSettings {
expandButtonPadding: number;
}
export declare const DEFAULT_LABEL_SETTINGS: LabelSettings;

View File

@@ -1,12 +0,0 @@
export interface PanSettings {
middleClickPan: boolean;
rightClickPan: boolean;
ctrlClickPan: boolean;
altClickPan: boolean;
emptyAreaClickPan: boolean;
arrowKeysPan: boolean;
wasdPan: boolean;
ijklPan: boolean;
keyboardPanSpeed: number;
}
export declare const DEFAULT_PAN_SETTINGS: PanSettings;

View File

@@ -1,4 +0,0 @@
export interface ZoomSettings {
zoomToCursor: boolean;
}
export declare const DEFAULT_ZOOM_SETTINGS: ZoomSettings;

View File

@@ -1 +0,0 @@
export declare const BasicEditor: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const DebugTools: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const ReadonlyMode: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1 +0,0 @@
export declare const Examples: () => import("react/jsx-runtime").JSX.Element;

View File

@@ -1,4 +0,0 @@
import { Colors, Icons, InitialData } from '../Isoflow';
export declare const colors: Colors;
export declare const icons: Icons;
export declare const initialData: InitialData;

View File

@@ -1,2 +0,0 @@
import { Colors } from '../types';
export declare const colors: Colors;

View File

@@ -1,2 +0,0 @@
import { Model } from '../types';
export declare const icons: Model['icons'];

View File

@@ -1,2 +0,0 @@
import { Model } from '../types';
export declare const model: Model;

Some files were not shown because too many files have changed in this diff Show More