hazo_ui 4.6.1 → 4.7.0
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/CHANGE_LOG.md +25 -0
- package/README.md +4 -0
- package/dist/index.cjs +233 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +99 -3
- package/dist/index.d.ts +99 -3
- package/dist/index.js +233 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -430,10 +430,16 @@ interface CanvasTextToolbarProps {
|
|
|
430
430
|
onUnderline?: () => void;
|
|
431
431
|
onColor?: (color: string) => void;
|
|
432
432
|
onAlign?: (align: "left" | "center" | "right") => void;
|
|
433
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
434
|
+
font?: string;
|
|
435
|
+
bullet?: boolean;
|
|
436
|
+
onVerticalAlign?: (v: "top" | "middle" | "bottom") => void;
|
|
437
|
+
onFont?: (font: string) => void;
|
|
438
|
+
onBullet?: () => void;
|
|
433
439
|
className?: string;
|
|
434
440
|
style?: React$1.CSSProperties;
|
|
435
441
|
}
|
|
436
|
-
declare function CanvasTextToolbar({ bold, italic, underline, color, align, onBold, onItalic, onUnderline, onColor, onAlign, className, style, }: CanvasTextToolbarProps): React$1.JSX.Element;
|
|
442
|
+
declare function CanvasTextToolbar({ bold, italic, underline, color, align, onBold, onItalic, onUnderline, onColor, onAlign, verticalAlign, font, bullet, onVerticalAlign, onFont, onBullet, className, style, }: CanvasTextToolbarProps): React$1.JSX.Element;
|
|
437
443
|
|
|
438
444
|
/** A toolbar button that inserts a snippet at the cursor. */
|
|
439
445
|
interface MarkdownEmbed {
|
|
@@ -917,6 +923,24 @@ interface HazoUiDialogProps {
|
|
|
917
923
|
actionButtonVariant?: ButtonVariant;
|
|
918
924
|
cancelButtonText?: string;
|
|
919
925
|
showCancelButton?: boolean;
|
|
926
|
+
/**
|
|
927
|
+
* Shows the action (confirm) button. Defaults to true.
|
|
928
|
+
* Set false to render a cancel-only footer, or combine with
|
|
929
|
+
* showCancelButton=false for a footer with no default buttons.
|
|
930
|
+
* Ignored if footerContent is provided.
|
|
931
|
+
*/
|
|
932
|
+
showActionButton?: boolean;
|
|
933
|
+
/**
|
|
934
|
+
* When true, clicking the action button closes the dialog (calls
|
|
935
|
+
* onOpenChange(false)) after invoking onConfirm. Defaults to false so
|
|
936
|
+
* existing consumers keep controlling close themselves.
|
|
937
|
+
*
|
|
938
|
+
* Enables the common "acknowledge / Okay" pattern: pair with
|
|
939
|
+
* showCancelButton={false} and actionButtonText="Okay" for a single
|
|
940
|
+
* self-closing button.
|
|
941
|
+
* Ignored if footerContent is provided.
|
|
942
|
+
*/
|
|
943
|
+
closeOnConfirm?: boolean;
|
|
920
944
|
/**
|
|
921
945
|
* Shows a loading spinner and disables the action button.
|
|
922
946
|
* When true, renders a spinner icon before the action button text.
|
|
@@ -983,7 +1007,7 @@ interface HazoUiDialogProps {
|
|
|
983
1007
|
*
|
|
984
1008
|
* A flexible dialog component with standardized layout and customizable behavior
|
|
985
1009
|
*/
|
|
986
|
-
declare function HazoUiDialog({ open, onOpenChange, children, onConfirm, onCancel, title, description, actionButtonText, actionButtonVariant, cancelButtonText, showCancelButton, actionButtonLoading, actionButtonDisabled, actionButtonIcon, footerContent, sizeWidth, sizeHeight, fixedSize, compact, openAnimation, closeAnimation, variant, splitHeader, headerBackgroundColor, descriptionBackgroundColor, headerTextColor, bodyBackgroundColor, footerBackgroundColor, borderColor, accentColor, headerBar, headerBarColor, className, contentClassName, overlayClassName, headerClassName, footerClassName, showCloseButton, }: HazoUiDialogProps): React$1.JSX.Element;
|
|
1010
|
+
declare function HazoUiDialog({ open, onOpenChange, children, onConfirm, onCancel, title, description, actionButtonText, actionButtonVariant, cancelButtonText, showCancelButton, showActionButton, closeOnConfirm, actionButtonLoading, actionButtonDisabled, actionButtonIcon, footerContent, sizeWidth, sizeHeight, fixedSize, compact, openAnimation, closeAnimation, variant, splitHeader, headerBackgroundColor, descriptionBackgroundColor, headerTextColor, bodyBackgroundColor, footerBackgroundColor, borderColor, accentColor, headerBar, headerBarColor, className, contentClassName, overlayClassName, headerClassName, footerClassName, showCloseButton, }: HazoUiDialogProps): React$1.JSX.Element;
|
|
987
1011
|
|
|
988
1012
|
/**
|
|
989
1013
|
* hazo_ui_confirm_dialog/index.tsx
|
|
@@ -2496,4 +2520,76 @@ interface HazoUiEtaProgressProps {
|
|
|
2496
2520
|
*/
|
|
2497
2521
|
declare function HazoUiEtaProgress({ estimateKey, unitCount, concurrency, windowSize, fallbackUnitMs, level, label, endpoint, handleRef, className, }: HazoUiEtaProgressProps): React$1.JSX.Element;
|
|
2498
2522
|
|
|
2499
|
-
|
|
2523
|
+
/**
|
|
2524
|
+
* Pure list helpers for HazoUiMemoryDropdown history entries.
|
|
2525
|
+
* No React dependency — safe to import in unit tests without a DOM.
|
|
2526
|
+
*/
|
|
2527
|
+
/** A single history entry stored in hazo_state. */
|
|
2528
|
+
interface MemoryEntry {
|
|
2529
|
+
/** Stable unique identifier for the entry. */
|
|
2530
|
+
id: string;
|
|
2531
|
+
/** Human-readable label shown in the dropdown list. */
|
|
2532
|
+
label: string;
|
|
2533
|
+
/** Optional structured value associated with the entry. */
|
|
2534
|
+
value?: unknown;
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* Upsert an entry into the list:
|
|
2538
|
+
* - If an entry with the same `id` already exists, replace it and move it to the front.
|
|
2539
|
+
* - Otherwise prepend it to the front.
|
|
2540
|
+
* - Enforces a maximum of {@link MAX_ENTRIES} entries — excess entries are dropped from the tail.
|
|
2541
|
+
*
|
|
2542
|
+
* @param entries - Current list.
|
|
2543
|
+
* @param entry - Entry to add or update.
|
|
2544
|
+
* @returns New list (original is not mutated).
|
|
2545
|
+
*/
|
|
2546
|
+
declare function upsertEntry(entries: MemoryEntry[], entry: MemoryEntry): MemoryEntry[];
|
|
2547
|
+
|
|
2548
|
+
/**
|
|
2549
|
+
* Props for {@link HazoUiMemoryDropdown}.
|
|
2550
|
+
*/
|
|
2551
|
+
interface HazoUiMemoryDropdownProps {
|
|
2552
|
+
/**
|
|
2553
|
+
* hazo_state key used to persist the history list, scoped to the current org.
|
|
2554
|
+
* Choose a key that is unique to the context where the dropdown is used.
|
|
2555
|
+
*/
|
|
2556
|
+
history_key: string;
|
|
2557
|
+
/** Placeholder text shown inside the search input. */
|
|
2558
|
+
placeholder?: string;
|
|
2559
|
+
/**
|
|
2560
|
+
* Called when the user clicks a history entry row (excluding the delete button).
|
|
2561
|
+
* The full entry object is passed so consumers can populate a form field.
|
|
2562
|
+
*/
|
|
2563
|
+
on_select: (entry: MemoryEntry) => void;
|
|
2564
|
+
/**
|
|
2565
|
+
* When non-null, upsert this entry into the persisted history list.
|
|
2566
|
+
* Typical usage: pass the just-confirmed selection here to record it.
|
|
2567
|
+
* Set to `null` (or omit) to skip any write.
|
|
2568
|
+
*/
|
|
2569
|
+
add_entry?: MemoryEntry | null;
|
|
2570
|
+
/**
|
|
2571
|
+
* Message shown when the filtered list is empty.
|
|
2572
|
+
* Defaults to `"No history yet"`.
|
|
2573
|
+
*/
|
|
2574
|
+
empty_label?: string;
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* A search-filtered history dropdown backed by hazo_state at the org level.
|
|
2578
|
+
*
|
|
2579
|
+
* Renders a search input and a scrollable list of previously used entries.
|
|
2580
|
+
* Entries are persisted per-org under `history_key`. Up to 50 entries are kept;
|
|
2581
|
+
* new entries are prepended (or promoted to front on repeat use).
|
|
2582
|
+
*
|
|
2583
|
+
* Usage:
|
|
2584
|
+
* ```tsx
|
|
2585
|
+
* <HazoUiMemoryDropdown
|
|
2586
|
+
* history_key="invoice_ref"
|
|
2587
|
+
* placeholder="Search past references..."
|
|
2588
|
+
* on_select={(entry) => setRef(entry.label)}
|
|
2589
|
+
* add_entry={confirmedEntry}
|
|
2590
|
+
* />
|
|
2591
|
+
* ```
|
|
2592
|
+
*/
|
|
2593
|
+
declare function HazoUiMemoryDropdown({ history_key, placeholder, on_select, add_entry, empty_label, }: HazoUiMemoryDropdownProps): React$1.JSX.Element;
|
|
2594
|
+
|
|
2595
|
+
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AnimationPreset, type BaseCommandInputProps, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, type CanvasTextToolbarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CelebrationPayload, CelebrationProvider, type CelebrationProviderProps, type CelebrationShareableCard, type ChartDataPoint, type ChartDataSeries, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type CommandEditContext, type CommandItem$1 as CommandItem, CommandNodeExtension, CommandPill, type CommandPillProps, CommandPopover, type CommandPopoverProps, type CommandTextOutput, type ConfirmDialogVariant, type DateRangeOption, DateRangeSelector, type DateRangeSelectorProps, type DialogVariant, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, type ErrorBannerSeverity, ErrorPage, type ErrorPageProps, type EtaProgressHandle, type FilterConfig, type FilterField, FunnelChart, type FunnelChartProps, type FunnelStep, HazoContextProvider, type HazoContextProviderProps, type HazoUiConfig, HazoUiConfirmDialog, type HazoUiConfirmDialogProps, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, type HazoUiDialogProps, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, type HazoUiEtaProgressProps, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiImageCropper, HazoUiImageCropperDialog, type HazoUiImageCropperDialogProps, type HazoUiImageCropperHandle, type HazoUiImageCropperProps, HazoUiKanban, HazoUiKanbanFilter, type HazoUiKanbanFilterProps, type HazoUiKanbanProps, HazoUiMemoryDropdown, type HazoUiMemoryDropdownProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, type HazoUiPillRadioItem, type HazoUiPillRadioProps, HazoUiProgressBar, type HazoUiProgressBarProps, HazoUiRte, type HazoUiRteProps, HazoUiTable, type HazoUiTablePagination, type HazoUiTableProps, type HazoUiTableServerLoadArgs, type HazoUiTableServerLoadResult, HazoUiTextarea, type HazoUiTextareaProps, HazoUiTextbox, type HazoUiTextboxProps, HazoUiToaster, type HazoUiToasterProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, type InputAffixProps, type InsertedCommand, InverseSparkline, type InverseSparklineProps, type KanbanAnnouncements, type KanbanColumn, type KanbanEditorCtx, type KanbanEditorField, type KanbanEditorFieldType, type KanbanFilterValue, type KanbanItem, type KanbanMoveEvent, type KanbanMoveHandle, type KanbanPriority, type KanbanReorderEvent, type KanbanSaveEvent, Label, LoadingTimeout, type LoadingTimeoutProps, type Logger, MarkdownEditor, type MarkdownEditorProps, type MarkdownEmbed, type MemoryEntry, NotificationCountBadge, type NotificationCountBadgeProps, NotificationItem, type NotificationItemProps, NotificationPanel, type NotificationPanelProps, Popover, PopoverContent, PopoverTrigger, type PrefixColor, type PrefixConfig, ProgressiveImage, type ProgressiveImageProps, RadioGroup, RadioGroupItem, type RteAttachment, type RteOutput, type RteVariable, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, type SkeletonBarProps, SkeletonCircle, type SkeletonCircleProps, SkeletonGroup, type SkeletonGroupProps, SkeletonRect, type SkeletonRectProps, Slider, type SortConfig, type SortField, Sparkline, type SparklineProps, Spinner, type StackedBar, StackedBars, type StackedBarsProps, type SuggestionState, Switch, Table, TableBody, TableCaption, TableCell, type TableColumn, type TableFilter, TableFooter, type TableFormatter, TableHead, TableHeader, TableRow, type TableSort, type TableSortEntry, type TableSortProp, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ToastOptions, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseCopyToClipboardResult, type UseErrorDisplayResult, type UseEtaProgressOptions, type UseFullscreenRefResult, type UseFullscreenResult, type UseLoadingStateResult, type UseWakeLockResult, applyKanbanFilter, buttonGroupVariants, celebrate, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
|
package/dist/index.d.ts
CHANGED
|
@@ -430,10 +430,16 @@ interface CanvasTextToolbarProps {
|
|
|
430
430
|
onUnderline?: () => void;
|
|
431
431
|
onColor?: (color: string) => void;
|
|
432
432
|
onAlign?: (align: "left" | "center" | "right") => void;
|
|
433
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
434
|
+
font?: string;
|
|
435
|
+
bullet?: boolean;
|
|
436
|
+
onVerticalAlign?: (v: "top" | "middle" | "bottom") => void;
|
|
437
|
+
onFont?: (font: string) => void;
|
|
438
|
+
onBullet?: () => void;
|
|
433
439
|
className?: string;
|
|
434
440
|
style?: React$1.CSSProperties;
|
|
435
441
|
}
|
|
436
|
-
declare function CanvasTextToolbar({ bold, italic, underline, color, align, onBold, onItalic, onUnderline, onColor, onAlign, className, style, }: CanvasTextToolbarProps): React$1.JSX.Element;
|
|
442
|
+
declare function CanvasTextToolbar({ bold, italic, underline, color, align, onBold, onItalic, onUnderline, onColor, onAlign, verticalAlign, font, bullet, onVerticalAlign, onFont, onBullet, className, style, }: CanvasTextToolbarProps): React$1.JSX.Element;
|
|
437
443
|
|
|
438
444
|
/** A toolbar button that inserts a snippet at the cursor. */
|
|
439
445
|
interface MarkdownEmbed {
|
|
@@ -917,6 +923,24 @@ interface HazoUiDialogProps {
|
|
|
917
923
|
actionButtonVariant?: ButtonVariant;
|
|
918
924
|
cancelButtonText?: string;
|
|
919
925
|
showCancelButton?: boolean;
|
|
926
|
+
/**
|
|
927
|
+
* Shows the action (confirm) button. Defaults to true.
|
|
928
|
+
* Set false to render a cancel-only footer, or combine with
|
|
929
|
+
* showCancelButton=false for a footer with no default buttons.
|
|
930
|
+
* Ignored if footerContent is provided.
|
|
931
|
+
*/
|
|
932
|
+
showActionButton?: boolean;
|
|
933
|
+
/**
|
|
934
|
+
* When true, clicking the action button closes the dialog (calls
|
|
935
|
+
* onOpenChange(false)) after invoking onConfirm. Defaults to false so
|
|
936
|
+
* existing consumers keep controlling close themselves.
|
|
937
|
+
*
|
|
938
|
+
* Enables the common "acknowledge / Okay" pattern: pair with
|
|
939
|
+
* showCancelButton={false} and actionButtonText="Okay" for a single
|
|
940
|
+
* self-closing button.
|
|
941
|
+
* Ignored if footerContent is provided.
|
|
942
|
+
*/
|
|
943
|
+
closeOnConfirm?: boolean;
|
|
920
944
|
/**
|
|
921
945
|
* Shows a loading spinner and disables the action button.
|
|
922
946
|
* When true, renders a spinner icon before the action button text.
|
|
@@ -983,7 +1007,7 @@ interface HazoUiDialogProps {
|
|
|
983
1007
|
*
|
|
984
1008
|
* A flexible dialog component with standardized layout and customizable behavior
|
|
985
1009
|
*/
|
|
986
|
-
declare function HazoUiDialog({ open, onOpenChange, children, onConfirm, onCancel, title, description, actionButtonText, actionButtonVariant, cancelButtonText, showCancelButton, actionButtonLoading, actionButtonDisabled, actionButtonIcon, footerContent, sizeWidth, sizeHeight, fixedSize, compact, openAnimation, closeAnimation, variant, splitHeader, headerBackgroundColor, descriptionBackgroundColor, headerTextColor, bodyBackgroundColor, footerBackgroundColor, borderColor, accentColor, headerBar, headerBarColor, className, contentClassName, overlayClassName, headerClassName, footerClassName, showCloseButton, }: HazoUiDialogProps): React$1.JSX.Element;
|
|
1010
|
+
declare function HazoUiDialog({ open, onOpenChange, children, onConfirm, onCancel, title, description, actionButtonText, actionButtonVariant, cancelButtonText, showCancelButton, showActionButton, closeOnConfirm, actionButtonLoading, actionButtonDisabled, actionButtonIcon, footerContent, sizeWidth, sizeHeight, fixedSize, compact, openAnimation, closeAnimation, variant, splitHeader, headerBackgroundColor, descriptionBackgroundColor, headerTextColor, bodyBackgroundColor, footerBackgroundColor, borderColor, accentColor, headerBar, headerBarColor, className, contentClassName, overlayClassName, headerClassName, footerClassName, showCloseButton, }: HazoUiDialogProps): React$1.JSX.Element;
|
|
987
1011
|
|
|
988
1012
|
/**
|
|
989
1013
|
* hazo_ui_confirm_dialog/index.tsx
|
|
@@ -2496,4 +2520,76 @@ interface HazoUiEtaProgressProps {
|
|
|
2496
2520
|
*/
|
|
2497
2521
|
declare function HazoUiEtaProgress({ estimateKey, unitCount, concurrency, windowSize, fallbackUnitMs, level, label, endpoint, handleRef, className, }: HazoUiEtaProgressProps): React$1.JSX.Element;
|
|
2498
2522
|
|
|
2499
|
-
|
|
2523
|
+
/**
|
|
2524
|
+
* Pure list helpers for HazoUiMemoryDropdown history entries.
|
|
2525
|
+
* No React dependency — safe to import in unit tests without a DOM.
|
|
2526
|
+
*/
|
|
2527
|
+
/** A single history entry stored in hazo_state. */
|
|
2528
|
+
interface MemoryEntry {
|
|
2529
|
+
/** Stable unique identifier for the entry. */
|
|
2530
|
+
id: string;
|
|
2531
|
+
/** Human-readable label shown in the dropdown list. */
|
|
2532
|
+
label: string;
|
|
2533
|
+
/** Optional structured value associated with the entry. */
|
|
2534
|
+
value?: unknown;
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* Upsert an entry into the list:
|
|
2538
|
+
* - If an entry with the same `id` already exists, replace it and move it to the front.
|
|
2539
|
+
* - Otherwise prepend it to the front.
|
|
2540
|
+
* - Enforces a maximum of {@link MAX_ENTRIES} entries — excess entries are dropped from the tail.
|
|
2541
|
+
*
|
|
2542
|
+
* @param entries - Current list.
|
|
2543
|
+
* @param entry - Entry to add or update.
|
|
2544
|
+
* @returns New list (original is not mutated).
|
|
2545
|
+
*/
|
|
2546
|
+
declare function upsertEntry(entries: MemoryEntry[], entry: MemoryEntry): MemoryEntry[];
|
|
2547
|
+
|
|
2548
|
+
/**
|
|
2549
|
+
* Props for {@link HazoUiMemoryDropdown}.
|
|
2550
|
+
*/
|
|
2551
|
+
interface HazoUiMemoryDropdownProps {
|
|
2552
|
+
/**
|
|
2553
|
+
* hazo_state key used to persist the history list, scoped to the current org.
|
|
2554
|
+
* Choose a key that is unique to the context where the dropdown is used.
|
|
2555
|
+
*/
|
|
2556
|
+
history_key: string;
|
|
2557
|
+
/** Placeholder text shown inside the search input. */
|
|
2558
|
+
placeholder?: string;
|
|
2559
|
+
/**
|
|
2560
|
+
* Called when the user clicks a history entry row (excluding the delete button).
|
|
2561
|
+
* The full entry object is passed so consumers can populate a form field.
|
|
2562
|
+
*/
|
|
2563
|
+
on_select: (entry: MemoryEntry) => void;
|
|
2564
|
+
/**
|
|
2565
|
+
* When non-null, upsert this entry into the persisted history list.
|
|
2566
|
+
* Typical usage: pass the just-confirmed selection here to record it.
|
|
2567
|
+
* Set to `null` (or omit) to skip any write.
|
|
2568
|
+
*/
|
|
2569
|
+
add_entry?: MemoryEntry | null;
|
|
2570
|
+
/**
|
|
2571
|
+
* Message shown when the filtered list is empty.
|
|
2572
|
+
* Defaults to `"No history yet"`.
|
|
2573
|
+
*/
|
|
2574
|
+
empty_label?: string;
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* A search-filtered history dropdown backed by hazo_state at the org level.
|
|
2578
|
+
*
|
|
2579
|
+
* Renders a search input and a scrollable list of previously used entries.
|
|
2580
|
+
* Entries are persisted per-org under `history_key`. Up to 50 entries are kept;
|
|
2581
|
+
* new entries are prepended (or promoted to front on repeat use).
|
|
2582
|
+
*
|
|
2583
|
+
* Usage:
|
|
2584
|
+
* ```tsx
|
|
2585
|
+
* <HazoUiMemoryDropdown
|
|
2586
|
+
* history_key="invoice_ref"
|
|
2587
|
+
* placeholder="Search past references..."
|
|
2588
|
+
* on_select={(entry) => setRef(entry.label)}
|
|
2589
|
+
* add_entry={confirmedEntry}
|
|
2590
|
+
* />
|
|
2591
|
+
* ```
|
|
2592
|
+
*/
|
|
2593
|
+
declare function HazoUiMemoryDropdown({ history_key, placeholder, on_select, add_entry, empty_label, }: HazoUiMemoryDropdownProps): React$1.JSX.Element;
|
|
2594
|
+
|
|
2595
|
+
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AnimationPreset, type BaseCommandInputProps, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, type CanvasTextToolbarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CelebrationPayload, CelebrationProvider, type CelebrationProviderProps, type CelebrationShareableCard, type ChartDataPoint, type ChartDataSeries, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type CommandEditContext, type CommandItem$1 as CommandItem, CommandNodeExtension, CommandPill, type CommandPillProps, CommandPopover, type CommandPopoverProps, type CommandTextOutput, type ConfirmDialogVariant, type DateRangeOption, DateRangeSelector, type DateRangeSelectorProps, type DialogVariant, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, type ErrorBannerSeverity, ErrorPage, type ErrorPageProps, type EtaProgressHandle, type FilterConfig, type FilterField, FunnelChart, type FunnelChartProps, type FunnelStep, HazoContextProvider, type HazoContextProviderProps, type HazoUiConfig, HazoUiConfirmDialog, type HazoUiConfirmDialogProps, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, type HazoUiDialogProps, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, type HazoUiEtaProgressProps, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiImageCropper, HazoUiImageCropperDialog, type HazoUiImageCropperDialogProps, type HazoUiImageCropperHandle, type HazoUiImageCropperProps, HazoUiKanban, HazoUiKanbanFilter, type HazoUiKanbanFilterProps, type HazoUiKanbanProps, HazoUiMemoryDropdown, type HazoUiMemoryDropdownProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, type HazoUiPillRadioItem, type HazoUiPillRadioProps, HazoUiProgressBar, type HazoUiProgressBarProps, HazoUiRte, type HazoUiRteProps, HazoUiTable, type HazoUiTablePagination, type HazoUiTableProps, type HazoUiTableServerLoadArgs, type HazoUiTableServerLoadResult, HazoUiTextarea, type HazoUiTextareaProps, HazoUiTextbox, type HazoUiTextboxProps, HazoUiToaster, type HazoUiToasterProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, type InputAffixProps, type InsertedCommand, InverseSparkline, type InverseSparklineProps, type KanbanAnnouncements, type KanbanColumn, type KanbanEditorCtx, type KanbanEditorField, type KanbanEditorFieldType, type KanbanFilterValue, type KanbanItem, type KanbanMoveEvent, type KanbanMoveHandle, type KanbanPriority, type KanbanReorderEvent, type KanbanSaveEvent, Label, LoadingTimeout, type LoadingTimeoutProps, type Logger, MarkdownEditor, type MarkdownEditorProps, type MarkdownEmbed, type MemoryEntry, NotificationCountBadge, type NotificationCountBadgeProps, NotificationItem, type NotificationItemProps, NotificationPanel, type NotificationPanelProps, Popover, PopoverContent, PopoverTrigger, type PrefixColor, type PrefixConfig, ProgressiveImage, type ProgressiveImageProps, RadioGroup, RadioGroupItem, type RteAttachment, type RteOutput, type RteVariable, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, type SkeletonBarProps, SkeletonCircle, type SkeletonCircleProps, SkeletonGroup, type SkeletonGroupProps, SkeletonRect, type SkeletonRectProps, Slider, type SortConfig, type SortField, Sparkline, type SparklineProps, Spinner, type StackedBar, StackedBars, type StackedBarsProps, type SuggestionState, Switch, Table, TableBody, TableCaption, TableCell, type TableColumn, type TableFilter, TableFooter, type TableFormatter, TableHead, TableHeader, TableRow, type TableSort, type TableSortEntry, type TableSortProp, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ToastOptions, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseCopyToClipboardResult, type UseErrorDisplayResult, type UseEtaProgressOptions, type UseFullscreenRefResult, type UseFullscreenResult, type UseLoadingStateResult, type UseWakeLockResult, applyKanbanFilter, buttonGroupVariants, celebrate, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
|
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ import TableCell from '@tiptap/extension-table-cell';
|
|
|
50
50
|
import TableHeader from '@tiptap/extension-table-header';
|
|
51
51
|
import TaskList from '@tiptap/extension-task-list';
|
|
52
52
|
import TaskItem from '@tiptap/extension-task-item';
|
|
53
|
-
import { LuBold, LuItalic, LuUnderline, LuAlignLeft, LuAlignCenter, LuAlignRight, LuUndo2, LuRedo2, LuMinus, LuPlus, LuStrikethrough, LuSubscript, LuSuperscript, LuLink, LuRemoveFormatting, LuPalette, LuHighlighter, LuAlignJustify,
|
|
53
|
+
import { LuBold, LuItalic, LuUnderline, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignVerticalJustifyStart, LuAlignVerticalJustifyCenter, LuAlignVerticalJustifyEnd, LuList, LuUndo2, LuRedo2, LuMinus, LuPlus, LuStrikethrough, LuSubscript, LuSuperscript, LuLink, LuRemoveFormatting, LuPalette, LuHighlighter, LuAlignJustify, LuListOrdered, LuListChecks, LuIndentDecrease, LuIndentIncrease, LuTable, LuTableRowsSplit, LuTableColumnsSplit, LuTrash2, LuGrid3X3, LuVariable, LuPaperclip, LuX, LuImage, LuFileText, LuFileCode, LuFile } from 'react-icons/lu';
|
|
54
54
|
import { RxDividerHorizontal } from 'react-icons/rx';
|
|
55
55
|
import { Extension, Node, mergeAttributes } from '@tiptap/core';
|
|
56
56
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
@@ -4634,6 +4634,12 @@ function CanvasTextToolbar({
|
|
|
4634
4634
|
onUnderline,
|
|
4635
4635
|
onColor,
|
|
4636
4636
|
onAlign,
|
|
4637
|
+
verticalAlign = "middle",
|
|
4638
|
+
font = "sans-serif",
|
|
4639
|
+
bullet,
|
|
4640
|
+
onVerticalAlign,
|
|
4641
|
+
onFont,
|
|
4642
|
+
onBullet,
|
|
4637
4643
|
className,
|
|
4638
4644
|
style
|
|
4639
4645
|
}) {
|
|
@@ -4714,7 +4720,55 @@ function CanvasTextToolbar({
|
|
|
4714
4720
|
)
|
|
4715
4721
|
]
|
|
4716
4722
|
}
|
|
4717
|
-
)
|
|
4723
|
+
),
|
|
4724
|
+
/* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
|
|
4725
|
+
/* @__PURE__ */ jsx(
|
|
4726
|
+
ToolbarButton,
|
|
4727
|
+
{
|
|
4728
|
+
is_active: verticalAlign === "top",
|
|
4729
|
+
onClick: () => onVerticalAlign?.("top"),
|
|
4730
|
+
tooltip: "Align top",
|
|
4731
|
+
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyStart, { className: "h-4 w-4" })
|
|
4732
|
+
}
|
|
4733
|
+
),
|
|
4734
|
+
/* @__PURE__ */ jsx(
|
|
4735
|
+
ToolbarButton,
|
|
4736
|
+
{
|
|
4737
|
+
is_active: verticalAlign === "middle",
|
|
4738
|
+
onClick: () => onVerticalAlign?.("middle"),
|
|
4739
|
+
tooltip: "Align middle",
|
|
4740
|
+
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyCenter, { className: "h-4 w-4" })
|
|
4741
|
+
}
|
|
4742
|
+
),
|
|
4743
|
+
/* @__PURE__ */ jsx(
|
|
4744
|
+
ToolbarButton,
|
|
4745
|
+
{
|
|
4746
|
+
is_active: verticalAlign === "bottom",
|
|
4747
|
+
onClick: () => onVerticalAlign?.("bottom"),
|
|
4748
|
+
tooltip: "Align bottom",
|
|
4749
|
+
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyEnd, { className: "h-4 w-4" })
|
|
4750
|
+
}
|
|
4751
|
+
),
|
|
4752
|
+
/* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
|
|
4753
|
+
/* @__PURE__ */ jsxs(
|
|
4754
|
+
"select",
|
|
4755
|
+
{
|
|
4756
|
+
value: font,
|
|
4757
|
+
onChange: (e) => onFont?.(e.target.value),
|
|
4758
|
+
className: "h-8 text-xs rounded-md border border-border bg-background px-1 text-foreground focus:outline-none",
|
|
4759
|
+
title: "Font family",
|
|
4760
|
+
children: [
|
|
4761
|
+
/* @__PURE__ */ jsx("option", { value: "sans-serif", children: "Sans" }),
|
|
4762
|
+
/* @__PURE__ */ jsx("option", { value: "serif", children: "Serif" }),
|
|
4763
|
+
/* @__PURE__ */ jsx("option", { value: "monospace", children: "Mono" }),
|
|
4764
|
+
/* @__PURE__ */ jsx("option", { value: "Arial", children: "Arial" }),
|
|
4765
|
+
/* @__PURE__ */ jsx("option", { value: "Georgia", children: "Georgia" }),
|
|
4766
|
+
/* @__PURE__ */ jsx("option", { value: "Courier New", children: "Courier" })
|
|
4767
|
+
]
|
|
4768
|
+
}
|
|
4769
|
+
),
|
|
4770
|
+
/* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
|
|
4771
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: "Bullet list", children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
|
|
4718
4772
|
]
|
|
4719
4773
|
}
|
|
4720
4774
|
) });
|
|
@@ -6688,6 +6742,8 @@ function HazoUiDialog({
|
|
|
6688
6742
|
actionButtonVariant,
|
|
6689
6743
|
cancelButtonText = "Cancel",
|
|
6690
6744
|
showCancelButton = true,
|
|
6745
|
+
showActionButton = true,
|
|
6746
|
+
closeOnConfirm = false,
|
|
6691
6747
|
actionButtonLoading = false,
|
|
6692
6748
|
actionButtonDisabled = false,
|
|
6693
6749
|
actionButtonIcon,
|
|
@@ -6721,6 +6777,9 @@ function HazoUiDialog({
|
|
|
6721
6777
|
const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
|
|
6722
6778
|
const handleConfirm = () => {
|
|
6723
6779
|
onConfirm?.();
|
|
6780
|
+
if (closeOnConfirm) {
|
|
6781
|
+
onOpenChange?.(false);
|
|
6782
|
+
}
|
|
6724
6783
|
};
|
|
6725
6784
|
const handleCancel = () => {
|
|
6726
6785
|
onCancel?.();
|
|
@@ -6903,7 +6962,7 @@ function HazoUiDialog({
|
|
|
6903
6962
|
children: cancelButtonText
|
|
6904
6963
|
}
|
|
6905
6964
|
),
|
|
6906
|
-
/* @__PURE__ */ jsxs(
|
|
6965
|
+
showActionButton && /* @__PURE__ */ jsxs(
|
|
6907
6966
|
Button,
|
|
6908
6967
|
{
|
|
6909
6968
|
type: "button",
|
|
@@ -7038,14 +7097,14 @@ function HazoUiConfirmDialog({
|
|
|
7038
7097
|
"bg-background shadow-lg",
|
|
7039
7098
|
"duration-200",
|
|
7040
7099
|
animation_classes,
|
|
7041
|
-
"overflow-hidden"
|
|
7042
|
-
"focus:outline-none"
|
|
7100
|
+
"overflow-hidden"
|
|
7043
7101
|
),
|
|
7044
7102
|
style: {
|
|
7045
7103
|
width: "min(90vw, 420px)",
|
|
7046
7104
|
borderRadius: "12px",
|
|
7047
7105
|
borderTop: `4px solid ${resolved_accent_color}`,
|
|
7048
|
-
boxShadow: "0 20px 60px rgba(0,0,0,0.15)"
|
|
7106
|
+
boxShadow: "0 20px 60px rgba(0,0,0,0.15)",
|
|
7107
|
+
outline: "none"
|
|
7049
7108
|
},
|
|
7050
7109
|
onOpenAutoFocus: (e) => {
|
|
7051
7110
|
if ((variant === "destructive" || variant === "warning") && showCancelButton && cancel_ref.current) {
|
|
@@ -7065,7 +7124,7 @@ function HazoUiConfirmDialog({
|
|
|
7065
7124
|
{
|
|
7066
7125
|
ref: cancel_ref,
|
|
7067
7126
|
type: "button",
|
|
7068
|
-
className: "cls_confirm_cancel_button",
|
|
7127
|
+
className: "cls_confirm_cancel_button focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
7069
7128
|
variant: "outline",
|
|
7070
7129
|
onClick: handle_cancel,
|
|
7071
7130
|
disabled: is_loading,
|
|
@@ -11097,6 +11156,172 @@ function HazoUiEtaProgress({
|
|
|
11097
11156
|
);
|
|
11098
11157
|
}
|
|
11099
11158
|
|
|
11100
|
-
|
|
11159
|
+
// src/components/hazo_ui_memory_dropdown/store.ts
|
|
11160
|
+
var MAX_ENTRIES = 50;
|
|
11161
|
+
function filterEntries(entries, query) {
|
|
11162
|
+
const q = query.trim().toLowerCase();
|
|
11163
|
+
if (!q) return entries;
|
|
11164
|
+
return entries.filter((e) => e.label.toLowerCase().includes(q));
|
|
11165
|
+
}
|
|
11166
|
+
function upsertEntry(entries, entry) {
|
|
11167
|
+
const without = entries.filter((e) => e.id !== entry.id);
|
|
11168
|
+
const updated = [entry, ...without];
|
|
11169
|
+
return updated.slice(0, MAX_ENTRIES);
|
|
11170
|
+
}
|
|
11171
|
+
function removeEntry(entries, id) {
|
|
11172
|
+
return entries.filter((e) => e.id !== id);
|
|
11173
|
+
}
|
|
11174
|
+
function HazoUiMemoryDropdown({
|
|
11175
|
+
history_key,
|
|
11176
|
+
placeholder = "Search history\u2026",
|
|
11177
|
+
on_select,
|
|
11178
|
+
add_entry,
|
|
11179
|
+
empty_label = "No history yet"
|
|
11180
|
+
}) {
|
|
11181
|
+
const { value: stored, setValue } = useHazoState(history_key, {
|
|
11182
|
+
level: "scope",
|
|
11183
|
+
fallback: []
|
|
11184
|
+
});
|
|
11185
|
+
const storedEntries = Array.isArray(stored) ? stored : [];
|
|
11186
|
+
const [query, setQuery] = React26.useState("");
|
|
11187
|
+
React26.useEffect(() => {
|
|
11188
|
+
if (!add_entry) return;
|
|
11189
|
+
const updated = upsertEntry(storedEntries, add_entry);
|
|
11190
|
+
setValue(updated);
|
|
11191
|
+
}, [add_entry, setValue]);
|
|
11192
|
+
const filtered = filterEntries(storedEntries, query);
|
|
11193
|
+
function handleDelete(id, e) {
|
|
11194
|
+
e.stopPropagation();
|
|
11195
|
+
const updated = removeEntry(storedEntries, id);
|
|
11196
|
+
setValue(updated);
|
|
11197
|
+
}
|
|
11198
|
+
return /* @__PURE__ */ jsxs(
|
|
11199
|
+
"div",
|
|
11200
|
+
{
|
|
11201
|
+
style: {
|
|
11202
|
+
display: "flex",
|
|
11203
|
+
flexDirection: "column",
|
|
11204
|
+
border: "1px solid #DAE1E7",
|
|
11205
|
+
borderRadius: 6,
|
|
11206
|
+
background: "#F0F4F8",
|
|
11207
|
+
overflow: "hidden",
|
|
11208
|
+
fontSize: 14,
|
|
11209
|
+
color: "#1A202C"
|
|
11210
|
+
},
|
|
11211
|
+
children: [
|
|
11212
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px 10px", borderBottom: "1px solid #DAE1E7" }, children: /* @__PURE__ */ jsx(
|
|
11213
|
+
"input",
|
|
11214
|
+
{
|
|
11215
|
+
type: "text",
|
|
11216
|
+
value: query,
|
|
11217
|
+
onChange: (e) => setQuery(e.target.value),
|
|
11218
|
+
placeholder,
|
|
11219
|
+
style: {
|
|
11220
|
+
width: "100%",
|
|
11221
|
+
background: "#FFFFFF",
|
|
11222
|
+
border: "1px solid #DAE1E7",
|
|
11223
|
+
borderRadius: 4,
|
|
11224
|
+
padding: "5px 8px",
|
|
11225
|
+
fontSize: 13,
|
|
11226
|
+
color: "#1A202C",
|
|
11227
|
+
outline: "none",
|
|
11228
|
+
boxSizing: "border-box"
|
|
11229
|
+
}
|
|
11230
|
+
}
|
|
11231
|
+
) }),
|
|
11232
|
+
/* @__PURE__ */ jsx(
|
|
11233
|
+
"div",
|
|
11234
|
+
{
|
|
11235
|
+
style: {
|
|
11236
|
+
overflowY: "auto",
|
|
11237
|
+
maxHeight: 240
|
|
11238
|
+
},
|
|
11239
|
+
children: filtered.length === 0 ? /* @__PURE__ */ jsx(
|
|
11240
|
+
"div",
|
|
11241
|
+
{
|
|
11242
|
+
style: {
|
|
11243
|
+
padding: "10px 12px",
|
|
11244
|
+
color: "#94A3B8",
|
|
11245
|
+
fontStyle: "italic",
|
|
11246
|
+
fontSize: 13
|
|
11247
|
+
},
|
|
11248
|
+
children: empty_label
|
|
11249
|
+
}
|
|
11250
|
+
) : filtered.map((entry) => /* @__PURE__ */ jsx(
|
|
11251
|
+
EntryRow,
|
|
11252
|
+
{
|
|
11253
|
+
entry,
|
|
11254
|
+
on_select,
|
|
11255
|
+
onDelete: handleDelete
|
|
11256
|
+
},
|
|
11257
|
+
entry.id
|
|
11258
|
+
))
|
|
11259
|
+
}
|
|
11260
|
+
)
|
|
11261
|
+
]
|
|
11262
|
+
}
|
|
11263
|
+
);
|
|
11264
|
+
}
|
|
11265
|
+
function EntryRow({ entry, on_select, onDelete }) {
|
|
11266
|
+
const [deleteHovered, setDeleteHovered] = React26.useState(false);
|
|
11267
|
+
const [rowHovered, setRowHovered] = React26.useState(false);
|
|
11268
|
+
return /* @__PURE__ */ jsxs(
|
|
11269
|
+
"div",
|
|
11270
|
+
{
|
|
11271
|
+
onClick: () => on_select(entry),
|
|
11272
|
+
onMouseEnter: () => setRowHovered(true),
|
|
11273
|
+
onMouseLeave: () => setRowHovered(false),
|
|
11274
|
+
style: {
|
|
11275
|
+
display: "flex",
|
|
11276
|
+
alignItems: "center",
|
|
11277
|
+
justifyContent: "space-between",
|
|
11278
|
+
padding: "7px 12px",
|
|
11279
|
+
cursor: "pointer",
|
|
11280
|
+
background: rowHovered ? "#DAE1E7" : "transparent",
|
|
11281
|
+
borderBottom: "1px solid #DAE1E7",
|
|
11282
|
+
gap: 8
|
|
11283
|
+
},
|
|
11284
|
+
children: [
|
|
11285
|
+
/* @__PURE__ */ jsx(
|
|
11286
|
+
"span",
|
|
11287
|
+
{
|
|
11288
|
+
style: {
|
|
11289
|
+
flex: 1,
|
|
11290
|
+
overflow: "hidden",
|
|
11291
|
+
textOverflow: "ellipsis",
|
|
11292
|
+
whiteSpace: "nowrap",
|
|
11293
|
+
fontSize: 13,
|
|
11294
|
+
color: "#1A202C"
|
|
11295
|
+
},
|
|
11296
|
+
children: entry.label
|
|
11297
|
+
}
|
|
11298
|
+
),
|
|
11299
|
+
/* @__PURE__ */ jsx(
|
|
11300
|
+
"button",
|
|
11301
|
+
{
|
|
11302
|
+
onClick: (e) => onDelete(entry.id, e),
|
|
11303
|
+
onMouseEnter: () => setDeleteHovered(true),
|
|
11304
|
+
onMouseLeave: () => setDeleteHovered(false),
|
|
11305
|
+
"aria-label": `Remove ${entry.label} from history`,
|
|
11306
|
+
style: {
|
|
11307
|
+
flexShrink: 0,
|
|
11308
|
+
background: "none",
|
|
11309
|
+
border: "none",
|
|
11310
|
+
cursor: "pointer",
|
|
11311
|
+
padding: "2px 4px",
|
|
11312
|
+
borderRadius: 3,
|
|
11313
|
+
color: deleteHovered ? "#EF4444" : "#94A3B8",
|
|
11314
|
+
fontSize: 14,
|
|
11315
|
+
lineHeight: 1
|
|
11316
|
+
},
|
|
11317
|
+
children: "\xD7"
|
|
11318
|
+
}
|
|
11319
|
+
)
|
|
11320
|
+
]
|
|
11321
|
+
}
|
|
11322
|
+
);
|
|
11323
|
+
}
|
|
11324
|
+
|
|
11325
|
+
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LoadingTimeout, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
|
|
11101
11326
|
//# sourceMappingURL=index.js.map
|
|
11102
11327
|
//# sourceMappingURL=index.js.map
|