@asymmetric-effort/specifyjs 0.1.3 → 0.1.9

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.
@@ -1697,8 +1697,18 @@ interface CartesianGraph2DProps {
1697
1697
  x: number;
1698
1698
  y: number;
1699
1699
  }[];
1700
+ /** Function to plot: f(x) → y */
1700
1701
  plotFunction?: (x: number) => number;
1702
+ /** Number of samples across the x range (default: 200). Ignored if xStep is set. */
1701
1703
  plotResolution?: number;
1704
+ /** Explicit step increment for function evaluation (e.g., 0.1).
1705
+ * When set, overrides plotResolution and computes f(x) at
1706
+ * x = xRange[0], xRange[0]+step, xRange[0]+2*step, ..., xRange[1]. */
1707
+ xStep?: number;
1708
+ /** If true, compute plotFunction synchronously (blocks render).
1709
+ * Default: false — computes asynchronously via requestIdleCallback,
1710
+ * rendering progressively as results arrive. */
1711
+ sync?: boolean;
1702
1712
  xRange?: [number, number];
1703
1713
  yRange?: [number, number];
1704
1714
  showGrid?: boolean;
@@ -1727,13 +1737,26 @@ interface ComplexGraph2DProps {
1727
1737
  realRange?: [number, number];
1728
1738
  imagRange?: [number, number];
1729
1739
  maxIterations?: number;
1730
- colorScheme?: 'classic' | 'fire' | 'ocean';
1740
+ colorScheme?: "classic" | "fire" | "ocean";
1731
1741
  computeFunction?: (re: number, im: number, maxIter: number) => number;
1742
+ /** Precomputed iteration grid (rows x cols). When provided, renders as SVG
1743
+ * instead of canvas. Each value is the iteration count at that pixel. */
1744
+ data?: number[][];
1745
+ /** Pixel resolution for precomputed SVG rendering (default: 2) */
1746
+ resolution?: number;
1747
+ /** If true, compute values synchronously (blocks render).
1748
+ * Default: false — uses canvas useEffect for runtime computation. */
1749
+ sync?: boolean;
1732
1750
  onPointClick?: (info: ComplexPointInfo) => void;
1733
1751
  onPointHover?: (info: ComplexPointInfo) => void;
1734
1752
  onPointDoubleClick?: (info: ComplexPointInfo) => void;
1735
1753
  onPointContextMenu?: (info: ComplexPointInfo) => void;
1736
1754
  }
1755
+ /**
1756
+ * Precompute a Mandelbrot iteration grid at a given resolution.
1757
+ * Returns a 2D array of iteration counts (rows x cols).
1758
+ */
1759
+ declare function computeMandelbrotGrid(cols: number, rows: number, realRange?: [number, number], imagRange?: [number, number], maxIter?: number, computeFn?: (re: number, im: number, maxIter: number) => number): number[][];
1737
1760
  declare function ComplexGraph2D(props: ComplexGraph2DProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
1738
1761
 
1739
1762
  interface Point {
@@ -1890,8 +1913,17 @@ interface PolarGraph2DProps {
1890
1913
  width?: number;
1891
1914
  height?: number;
1892
1915
  rRange?: [number, number];
1916
+ /** Function to plot: f(theta) → r */
1893
1917
  plotFunction?: (theta: number) => number;
1918
+ /** Number of samples around the full circle (default: 360). Ignored if thetaStep is set. */
1894
1919
  plotResolution?: number;
1920
+ /** Explicit step increment in radians for function evaluation (e.g., Math.PI/180).
1921
+ * When set, overrides plotResolution and computes f(theta) at
1922
+ * theta = 0, step, 2*step, ..., 2*PI. */
1923
+ thetaStep?: number;
1924
+ /** If true, compute plotFunction synchronously (blocks render).
1925
+ * Default: false — computes asynchronously. */
1926
+ sync?: boolean;
1895
1927
  points?: {
1896
1928
  r: number;
1897
1929
  theta: number;
@@ -2158,5 +2190,5 @@ interface TradingDashboardProps {
2158
2190
  }
2159
2191
  declare function TradingDashboard(props: TradingDashboardProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
2160
2192
 
2161
- export { Accordion, Alert, AnalogClock, Avatar, Badge, BarGraph, Breadcrumb, Card, Carousel, CartesianGraph2D, Checkbox, ColorPicker, ColorWheel, ComplexGraph2D, ContextMenu, DataGrid, DatePicker, DigitalClock, Drawer, Dropdown, EmptyState, FileUpload, FlexContainer, FlexItem, Footer, FormFieldWrapper, GoogleAnalytics, Grid, GridItem, HypercubeGraph, IDE, Image, LineGraph, ListView, Menubar, Modal, MultilineField, NavWrapper, NumberSpinner, Pagination, Panel, PieGraph, PolarGraph2D, Popover, ProgressBar, RadioGroup, ScrollContainer, Select, Sidebar, Skeleton, Slider, Spinner, Splitter, Stepper, Tabs, Tag, TextEditor, TextField, TimePicker, ToastContainer, Toggle, Toolbar, Tooltip, TradingDashboard, TreeNav, TreeNode, UnityDesktop, VideoPlayer, VirtualScroll, VizWrapper, WordProcessor, buildInputStyle, buildNavItemStyle, buildRotationMatrix, computeSlices, createToaster, describeArc, generateEdges, generateHypercube, generatePalette, generateVertices, numRotationAngles, projectTo2D, transformVec, useBarGraphScales, useHover, useHypercube, useLineGraphScales, useToast };
2193
+ export { Accordion, Alert, AnalogClock, Avatar, Badge, BarGraph, Breadcrumb, Card, Carousel, CartesianGraph2D, Checkbox, ColorPicker, ColorWheel, ComplexGraph2D, ContextMenu, DataGrid, DatePicker, DigitalClock, Drawer, Dropdown, EmptyState, FileUpload, FlexContainer, FlexItem, Footer, FormFieldWrapper, GoogleAnalytics, Grid, GridItem, HypercubeGraph, IDE, Image, LineGraph, ListView, Menubar, Modal, MultilineField, NavWrapper, NumberSpinner, Pagination, Panel, PieGraph, PolarGraph2D, Popover, ProgressBar, RadioGroup, ScrollContainer, Select, Sidebar, Skeleton, Slider, Spinner, Splitter, Stepper, Tabs, Tag, TextEditor, TextField, TimePicker, ToastContainer, Toggle, Toolbar, Tooltip, TradingDashboard, TreeNav, TreeNode, UnityDesktop, VideoPlayer, VirtualScroll, VizWrapper, WordProcessor, buildInputStyle, buildNavItemStyle, buildRotationMatrix, computeMandelbrotGrid, computeSlices, createToaster, describeArc, generateEdges, generateHypercube, generatePalette, generateVertices, numRotationAngles, projectTo2D, transformVec, useBarGraphScales, useHover, useHypercube, useLineGraphScales, useToast };
2162
2194
  export type { AccordionContentStyle, AccordionHeaderStyle, AccordionProps, AccordionSection, AlertProps, AnalogClockProps, AvatarProps, BadgeProps, BarDatum, BarGraphProps, BarGraphScales, BreadcrumbItem, BreadcrumbProps, BreadcrumbSize, CardProps, CarouselProps, CartesianGraph2DProps, CheckboxProps, ColorPickerProps, ColorWheelProps, ComplexGraph2DProps, ComplexPointInfo, ComputedSlice, ContextMenuItem, ContextMenuProps, DataGridColumn, DataGridProps, DatePickerProps, DigitalClockProps, DrawerPosition, DrawerProps, DropdownItem, DropdownProps, Edge, EmptyStateProps, FileUploadProps, FlexContainerProps, FlexItemProps, FooterProps, FormFieldWrapperProps, FormFieldWrapperStyle, GoogleAnalyticsProps, GridBreakpoint, GridItemProps, GridProps, HypercubeData, HypercubeGraphProps, IDEProps, ImageProps, InputBaseStyle, LegendItem, LineGraphProps, LineSeries, ListViewProps, MenuDefinition, MenuItem, MenubarProps, ModalProps, ModalSize, MultilineFieldProps, NavItemStyle, NavOrientation, NavWrapperProps, NavWrapperStyle, NumberSpinnerProps, PaginationProps, PanelProps, PieGraphProps, PieSliceDatum, Point, PointEvent, PolarGraph2DProps, PolarPointInfo, PopoverPlacement, PopoverProps, Position, ProgressBarProps, RadioGroupProps, RadioOption, ScrollContainerProps, SelectOption, SelectProps, SidebarItem, SidebarProps, SkeletonProps, SliderMark, SliderProps, SpinnerProps, SplitterProps, StackedBarDatum, StepItem, StepperOrientation, StepperProps, StepperVariant, TabDefinition, TabsProps, TagProps, TextEditorProps, TextFieldProps, TimePickerProps, ToastAction, ToastItem, ToastOptions, ToastPosition, ToastType, Toaster, ToasterConfig, ToggleProps, ToolbarButton, ToolbarItem, ToolbarProps, ToolbarSize, ToolbarVariant, TooltipPlacement, TooltipProps, TradingDashboardProps, TreeNavProps, TreeNodeData, UnityDesktopProps, UseHypercubeOptions, Vec, Vertex, VideoPlayerProps, VirtualScrollProps, VizWrapperProps, WordProcessorProps };