@murabei-data-science/pumpwood-ui 1.4.6 → 1.4.8

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.
@@ -1,10 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import { ReactNode, ReactElement, ComponentType, HTMLAttributes, InputHTMLAttributes, TimeHTMLAttributes } from 'react';
3
+ import { ReactNode, CSSProperties, ReactElement, ComponentType, HTMLAttributes, InputHTMLAttributes, TimeHTMLAttributes } from 'react';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
  import { FileWithPath, Accept } from 'react-dropzone';
7
7
  import { FieldError } from 'react-hook-form';
8
+ import { StyleSpecification } from 'maplibre-gl';
8
9
  import { IFKSelectProps as IFKSelectProps$1 } from '@/components/FKSelect';
9
10
  import { LucideIcon } from 'lucide-react';
10
11
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
@@ -406,6 +407,71 @@ interface IMarkdownEditorProps {
406
407
  */
407
408
  declare function MarkdownEditor({ value, onChange, placeholder, error, disabled, className, theme, }: IMarkdownEditorProps): react_jsx_runtime.JSX.Element;
408
409
 
410
+ type GeoJsonGeometryType = "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon";
411
+ interface IGeoJsonGeometry {
412
+ type: GeoJsonGeometryType;
413
+ coordinates: unknown;
414
+ }
415
+ interface IGeoJsonFeature {
416
+ type: "Feature";
417
+ id?: string | number;
418
+ geometry: IGeoJsonGeometry | null;
419
+ properties?: Record<string, unknown> | null;
420
+ }
421
+ interface IGeoJsonFeatureCollection {
422
+ type: "FeatureCollection";
423
+ features: IGeoJsonFeature[];
424
+ }
425
+ type GeoJsonMapData = IGeoJsonFeatureCollection | IGeoJsonFeature | IGeoJsonGeometry;
426
+ interface IGeoJsonMapViewState {
427
+ longitude: number;
428
+ latitude: number;
429
+ zoom: number;
430
+ }
431
+ interface IGeoJsonMapPosition {
432
+ lng: number;
433
+ lat: number;
434
+ }
435
+ type GeoJsonMapStyle = string | StyleSpecification;
436
+ interface IGeoJsonMapProps {
437
+ data: GeoJsonMapData;
438
+ mapStyle?: GeoJsonMapStyle;
439
+ fitToData?: boolean;
440
+ maxZoom?: number;
441
+ initialViewState?: IGeoJsonMapViewState;
442
+ className?: string;
443
+ style?: CSSProperties;
444
+ /**
445
+ * MapLibre GL JS v6 worker asset URL. Required when the app is bundled
446
+ * (Next.js, Vite, webpack). Omit for MapLibre v5.
447
+ */
448
+ workerUrl?: string;
449
+ testId?: string;
450
+ popupTestId?: string;
451
+ polygonFillColor?: string;
452
+ polygonFillOpacity?: number;
453
+ polygonLineColor?: string;
454
+ polygonLineWidth?: number;
455
+ renderPopup?: (feature: IGeoJsonFeature) => ReactNode;
456
+ getFeatureId?: (feature: IGeoJsonFeature, index: number) => string;
457
+ getPointTestId?: (feature: IGeoJsonFeature, index: number, vertexIndex: number) => string;
458
+ onFeatureClick?: (feature: IGeoJsonFeature) => void;
459
+ }
460
+ interface IGeoJsonPointMarker {
461
+ key: string;
462
+ feature: IGeoJsonFeature;
463
+ featureIndex: number;
464
+ vertexIndex: number;
465
+ position: IGeoJsonMapPosition;
466
+ label: string;
467
+ }
468
+
469
+ /**
470
+ * Map canvas that renders GeoJSON points as HTML pins and polygons as
471
+ * shaded fill layers. MapLibre is loaded on the client only.
472
+ */
473
+ declare function GeoJsonMap(props: IGeoJsonMapProps): react_jsx_runtime.JSX.Element;
474
+
409
475
  interface IMultiSelectOption {
410
476
  label: string;
411
477
  value: string;
@@ -757,16 +823,6 @@ declare const Sidebar: {
757
823
  Action: typeof Action;
758
824
  };
759
825
 
760
- type StackProps = HTMLAttributes<HTMLDivElement> & {
761
- children: ReactNode;
762
- /** The direction of the stack. Defaults to 'col'. */
763
- direction?: "row" | "col";
764
- /** The gap between elements. Maps to Tailwind gap utility (e.g. 4 -> gap-4). */
765
- gap?: number;
766
- /** Click handler. When set, the stack becomes keyboard-accessible (role="button"). */
767
- onClick?: () => void;
768
- className?: string;
769
- };
770
826
  /**
771
827
  * A layout component that arranges children in a stack (vertical or horizontal).
772
828
  *
@@ -782,7 +838,16 @@ type StackProps = HTMLAttributes<HTMLDivElement> & {
782
838
  * </Stack>
783
839
  * ```
784
840
  */
785
- declare function Stack({ children, onClick, direction, gap, className, ...props }: StackProps): react_jsx_runtime.JSX.Element;
841
+ declare const Stack: React$1.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
842
+ children: ReactNode;
843
+ /** The direction of the stack. Defaults to 'col'. */
844
+ direction?: "row" | "col";
845
+ /** The gap between elements. Maps to Tailwind gap utility (e.g. 4 -> gap-4). */
846
+ gap?: number;
847
+ /** Click handler. When set, the stack becomes keyboard-accessible (role="button"). */
848
+ onClick?: () => void;
849
+ className?: string;
850
+ } & React$1.RefAttributes<HTMLDivElement>>;
786
851
 
787
852
  /**
788
853
  * Column definition for Table.
@@ -1345,5 +1410,5 @@ declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
1345
1410
  declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1346
1411
  declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1347
1412
 
1348
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertWithIcon, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ClearButton, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmationDialog, DatePicker, DeleteDialog, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DownloadButton, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, PumpwoodDropzone as Dropzone, Empty, EmptyContainer, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, ErrorBoundary, ErrorMessage, ErrorToastContent, FKSelect, FileDropzone, Input, Label, Loading, MarkdownEditor, MultiSelectDropdown, NoResult, Pagination, PopConfirm, Popover, PopoverContent, PopoverTrigger, PumpwoodBadge, PumpwoodCard, PumpwoodTable, Radio, RangePicker, Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, Select as SelectPrimitive, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, Skeleton, Spinner, Stack, Table$1 as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, Table as TablePrimitive, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TagInput, Textarea, Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle, Tooltip, TooltipComponent, TooltipContent, TooltipProvider, TooltipTrigger, Typography, badgeVariants, createFKSelectFetcher, fkSelectFetcher, pumpwoodBadgeVariants, useSidebarCollapse };
1349
- export type { ComboboxItem, CreateFKSelectFetcherOptions, DynamicListFn, DynamicListPagination, FKFetcherPageResult, FKFetcherParams, FKFetcherReturn, FKSelectFetcherParams, IAlertWithIconProps, IDatePickerProps, IFKSelectProps, IMarkdownEditorProps, IMultiSelectOption, IRangePickerProps, ISelectFKProps, ISelectProps, IStaticSelectProps, ITableColumn, ITableProps, ITagItem, IUseSidebarCollapseOptions, PopConfirmProps, RetrieveFileFn };
1413
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertWithIcon, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ClearButton, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmationDialog, DatePicker, DeleteDialog, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DownloadButton, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, PumpwoodDropzone as Dropzone, Empty, EmptyContainer, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, ErrorBoundary, ErrorMessage, ErrorToastContent, FKSelect, FileDropzone, GeoJsonMap, Input, Label, Loading, MarkdownEditor, MultiSelectDropdown, NoResult, Pagination, PopConfirm, Popover, PopoverContent, PopoverTrigger, PumpwoodBadge, PumpwoodCard, PumpwoodTable, Radio, RangePicker, Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, Select as SelectPrimitive, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, Skeleton, Spinner, Stack, Table$1 as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, Table as TablePrimitive, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TagInput, Textarea, Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle, Tooltip, TooltipComponent, TooltipContent, TooltipProvider, TooltipTrigger, Typography, badgeVariants, createFKSelectFetcher, fkSelectFetcher, pumpwoodBadgeVariants, useSidebarCollapse };
1414
+ export type { ComboboxItem, CreateFKSelectFetcherOptions, DynamicListFn, DynamicListPagination, FKFetcherPageResult, FKFetcherParams, FKFetcherReturn, FKSelectFetcherParams, GeoJsonGeometryType, GeoJsonMapData, GeoJsonMapStyle, IAlertWithIconProps, IDatePickerProps, IFKSelectProps, IGeoJsonFeature, IGeoJsonFeatureCollection, IGeoJsonGeometry, IGeoJsonMapPosition, IGeoJsonMapProps, IGeoJsonMapViewState, IGeoJsonPointMarker, IMarkdownEditorProps, IMultiSelectOption, IRangePickerProps, ISelectFKProps, ISelectProps, IStaticSelectProps, ITableColumn, ITableProps, ITagItem, IUseSidebarCollapseOptions, PopConfirmProps, RetrieveFileFn };