@asymmetric-effort/specifyjs 0.1.3 → 0.1.10

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.
@@ -311,6 +311,8 @@ interface ColorPickerProps {
311
311
  disabled?: boolean;
312
312
  /** Label text */
313
313
  label?: string;
314
+ /** HTML id for the input element */
315
+ id?: string;
314
316
  }
315
317
  declare function ColorPicker(props: ColorPickerProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
316
318
 
@@ -327,6 +329,8 @@ interface ColorWheelProps {
327
329
  disabled?: boolean;
328
330
  /** Label text */
329
331
  label?: string;
332
+ /** HTML id for the input element */
333
+ id?: string;
330
334
  }
331
335
  declare function ColorWheel(props: ColorWheelProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
332
336
 
@@ -349,6 +353,8 @@ interface DatePickerProps {
349
353
  label?: string;
350
354
  /** Error message */
351
355
  error?: string;
356
+ /** HTML id for the input element */
357
+ id?: string;
352
358
  }
353
359
  declare function DatePicker(props: DatePickerProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
354
360
 
@@ -367,6 +373,8 @@ interface FileUploadProps {
367
373
  label?: string;
368
374
  /** Help text */
369
375
  helpText?: string;
376
+ /** HTML id for the input element */
377
+ id?: string;
370
378
  }
371
379
  declare function FileUpload(props: FileUploadProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
372
380
 
@@ -500,6 +508,8 @@ interface NumberSpinnerProps {
500
508
  label?: string;
501
509
  /** Error message */
502
510
  error?: string;
511
+ /** HTML id for the input element */
512
+ id?: string;
503
513
  }
504
514
  declare function NumberSpinner(props: NumberSpinnerProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
505
515
 
@@ -557,6 +567,8 @@ interface SelectProps {
557
567
  label?: string;
558
568
  /** Help text */
559
569
  helpText?: string;
570
+ /** HTML id for the input element */
571
+ id?: string;
560
572
  }
561
573
  declare function Select(props: SelectProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
562
574
 
@@ -589,6 +601,8 @@ interface SliderProps {
589
601
  label?: string;
590
602
  /** Error message */
591
603
  error?: string;
604
+ /** HTML id for the input element */
605
+ id?: string;
592
606
  }
593
607
  declare function Slider(props: SliderProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
594
608
 
@@ -711,6 +725,8 @@ interface TimePickerProps {
711
725
  timezones?: string[];
712
726
  /** Callback when timezone changes */
713
727
  onTimezoneChange?: (tz: string) => void;
728
+ /** HTML id for the input element */
729
+ id?: string;
714
730
  }
715
731
  declare function TimePicker(props: TimePickerProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
716
732
 
@@ -1697,8 +1713,18 @@ interface CartesianGraph2DProps {
1697
1713
  x: number;
1698
1714
  y: number;
1699
1715
  }[];
1716
+ /** Function to plot: f(x) → y */
1700
1717
  plotFunction?: (x: number) => number;
1718
+ /** Number of samples across the x range (default: 200). Ignored if xStep is set. */
1701
1719
  plotResolution?: number;
1720
+ /** Explicit step increment for function evaluation (e.g., 0.1).
1721
+ * When set, overrides plotResolution and computes f(x) at
1722
+ * x = xRange[0], xRange[0]+step, xRange[0]+2*step, ..., xRange[1]. */
1723
+ xStep?: number;
1724
+ /** If true, compute plotFunction synchronously (blocks render).
1725
+ * Default: false — computes asynchronously via requestIdleCallback,
1726
+ * rendering progressively as results arrive. */
1727
+ sync?: boolean;
1702
1728
  xRange?: [number, number];
1703
1729
  yRange?: [number, number];
1704
1730
  showGrid?: boolean;
@@ -1727,13 +1753,26 @@ interface ComplexGraph2DProps {
1727
1753
  realRange?: [number, number];
1728
1754
  imagRange?: [number, number];
1729
1755
  maxIterations?: number;
1730
- colorScheme?: 'classic' | 'fire' | 'ocean';
1756
+ colorScheme?: "classic" | "fire" | "ocean";
1731
1757
  computeFunction?: (re: number, im: number, maxIter: number) => number;
1758
+ /** Precomputed iteration grid (rows x cols). When provided, renders as SVG
1759
+ * instead of canvas. Each value is the iteration count at that pixel. */
1760
+ data?: number[][];
1761
+ /** Pixel resolution for precomputed SVG rendering (default: 2) */
1762
+ resolution?: number;
1763
+ /** If true, compute values synchronously (blocks render).
1764
+ * Default: false — uses canvas useEffect for runtime computation. */
1765
+ sync?: boolean;
1732
1766
  onPointClick?: (info: ComplexPointInfo) => void;
1733
1767
  onPointHover?: (info: ComplexPointInfo) => void;
1734
1768
  onPointDoubleClick?: (info: ComplexPointInfo) => void;
1735
1769
  onPointContextMenu?: (info: ComplexPointInfo) => void;
1736
1770
  }
1771
+ /**
1772
+ * Precompute a Mandelbrot iteration grid at a given resolution.
1773
+ * Returns a 2D array of iteration counts (rows x cols).
1774
+ */
1775
+ 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
1776
  declare function ComplexGraph2D(props: ComplexGraph2DProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
1738
1777
 
1739
1778
  interface Point {
@@ -1890,8 +1929,17 @@ interface PolarGraph2DProps {
1890
1929
  width?: number;
1891
1930
  height?: number;
1892
1931
  rRange?: [number, number];
1932
+ /** Function to plot: f(theta) → r */
1893
1933
  plotFunction?: (theta: number) => number;
1934
+ /** Number of samples around the full circle (default: 360). Ignored if thetaStep is set. */
1894
1935
  plotResolution?: number;
1936
+ /** Explicit step increment in radians for function evaluation (e.g., Math.PI/180).
1937
+ * When set, overrides plotResolution and computes f(theta) at
1938
+ * theta = 0, step, 2*step, ..., 2*PI. */
1939
+ thetaStep?: number;
1940
+ /** If true, compute plotFunction synchronously (blocks render).
1941
+ * Default: false — computes asynchronously. */
1942
+ sync?: boolean;
1895
1943
  points?: {
1896
1944
  r: number;
1897
1945
  theta: number;
@@ -2158,5 +2206,5 @@ interface TradingDashboardProps {
2158
2206
  }
2159
2207
  declare function TradingDashboard(props: TradingDashboardProps): specifyjs_shared_types.SpecElement<specifyjs_shared_types.Props>;
2160
2208
 
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 };
2209
+ 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
2210
  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 };