@baseline-ui/core 0.50.0 → 0.52.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.
@@ -9817,7 +9817,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
9817
9817
 
9818
9818
  ---
9819
9819
 
9820
- The following software may be included in this product: markdown-it (14.1.0)
9820
+ The following software may be included in this product: markdown-it (14.1.1)
9821
9821
  This software contains the following license and notice below:
9822
9822
 
9823
9823
  Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
@@ -11685,33 +11685,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
11685
11685
 
11686
11686
  ---
11687
11687
 
11688
- The following software may be included in this product: react-complex-tree (2.6.0)
11689
- This software contains the following license and notice below:
11690
-
11691
- MIT License
11692
-
11693
- Copyright (c) 2023 Lukas Bach
11694
-
11695
- Permission is hereby granted, free of charge, to any person obtaining a copy
11696
- of this software and associated documentation files (the "Software"), to deal
11697
- in the Software without restriction, including without limitation the rights
11698
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11699
- copies of the Software, and to permit persons to whom the Software is
11700
- furnished to do so, subject to the following conditions:
11701
-
11702
- The above copyright notice and this permission notice shall be included in all
11703
- copies or substantial portions of the Software.
11704
-
11705
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11706
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11707
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11708
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11709
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11710
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
11711
- SOFTWARE.
11712
-
11713
- ---
11714
-
11715
11688
  The following software may be included in this product: react-docgen (8.0.2)
11716
11689
  This software contains the following license and notice below:
11717
11690
 
package/dist/index.d.mts CHANGED
@@ -4,7 +4,6 @@ import { Time, CalendarDateTime, ZonedDateTime, CalendarDate, CalendarIdentifier
4
4
  import { NumberFormatOptions } from '@internationalized/number';
5
5
  import { LocalizedStrings } from '@internationalized/message';
6
6
  import { Theme, Sprinkles } from '@baseline-ui/tokens';
7
- import { TreeItem } from 'react-complex-tree';
8
7
  import { PanelProps as PanelProps$1, ImperativePanelHandle as ImperativePanelHandle$1, PanelGroupProps as PanelGroupProps$1, ImperativePanelGroupHandle as ImperativePanelGroupHandle$1, PanelResizeHandleProps as PanelResizeHandleProps$1 } from 'react-resizable-panels';
9
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
9
  export { MotionGlobalConfig } from 'motion/react';
@@ -3071,6 +3070,12 @@ interface AriaMenuTriggerProps {
3071
3070
  trigger?: MenuTriggerType;
3072
3071
  }
3073
3072
 
3073
+ /**
3074
+ * Controls which axes the boundary element constrains when calculating overlay
3075
+ * position.
3076
+ */
3077
+ type BoundaryAxis = 'horizontal' | 'vertical' | 'both';
3078
+
3074
3079
  interface AriaPositionProps extends PositionProps {
3075
3080
  /**
3076
3081
  * Cross size of the overlay arrow in pixels.
@@ -3078,10 +3083,23 @@ interface AriaPositionProps extends PositionProps {
3078
3083
  */
3079
3084
  arrowSize?: number;
3080
3085
  /**
3081
- * Element that that serves as the positioning boundary.
3086
+ * Element that serves as the positioning boundary. The overlay is shifted or
3087
+ * flipped to stay within this element's bounds on the axes selected by
3088
+ * `boundaryAxis`. Pass `null` to disable all boundary constraints.
3082
3089
  * @default document.body
3083
3090
  */
3084
- boundaryElement?: Element;
3091
+ boundaryElement?: Element | null;
3092
+ /**
3093
+ * Controls which axes `boundaryElement` constrains.
3094
+ *
3095
+ * - `"both"` — constrains horizontal and vertical (default)
3096
+ * - `"horizontal"` — constrains only horizontal overflow
3097
+ * - `"vertical"` — constrains only vertical overflow
3098
+ *
3099
+ * Has no effect when `boundaryElement` is `null`.
3100
+ * @default "both"
3101
+ */
3102
+ boundaryAxis?: BoundaryAxis;
3085
3103
  /**
3086
3104
  * The ref for the element which the overlay positions itself with respect to.
3087
3105
  */
@@ -5449,7 +5467,7 @@ type ClassName$1 = string | ((state: {
5449
5467
  type Style = React__default.CSSProperties | ((state: {
5450
5468
  isOpen: boolean;
5451
5469
  }) => React__default.CSSProperties | undefined);
5452
- interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef" | "arrowSize" | "arrowBoundaryOffset" | "shouldCloseOnScroll">, Pick<OverlayProps, "shouldContainFocus" | "disableFocusManagement">, Pick<ModalContentProps, "disableAnimation">, BlockProps {
5470
+ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef" | "arrowSize" | "arrowBoundaryOffset" | "shouldCloseOnScroll" | "boundaryElement">, Pick<OverlayProps, "shouldContainFocus" | "disableFocusManagement">, Pick<ModalContentProps, "disableAnimation">, BlockProps {
5453
5471
  /** The class name for the popover element. */
5454
5472
  className?: ClassName$1;
5455
5473
  /** The style for the popover element. */
@@ -5506,6 +5524,29 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
5506
5524
  * trigger popover position recalculation.
5507
5525
  */
5508
5526
  elementHandle?: React__default.Ref<PopoverContentHandle>;
5527
+ /**
5528
+ * The element used as the boundary when calculating popover position. The
5529
+ * popover is shifted or flipped to stay within this element's bounds on the
5530
+ * axes specified by `boundaryAxis`.
5531
+ *
5532
+ * Pass `null` to disable all boundary constraints.
5533
+ *
5534
+ * @default document.body
5535
+ */
5536
+ boundaryElement?: Element | null;
5537
+ /**
5538
+ * Controls which axes the `boundaryElement` constrains. Has no effect when
5539
+ * `boundaryElement` is `null`.
5540
+ *
5541
+ * - `"both"` — constrains horizontal and vertical (default)
5542
+ * - `"horizontal"` — constrains only horizontal overflow; popover may overflow
5543
+ * vertically
5544
+ * - `"vertical"` — constrains only vertical overflow; popover may overflow
5545
+ * horizontally
5546
+ *
5547
+ * @default "both"
5548
+ */
5549
+ boundaryAxis?: BoundaryAxis;
5509
5550
  }
5510
5551
  interface PopoverTriggerProps {
5511
5552
  /** The contents of the popover trigger. */
@@ -5534,7 +5575,7 @@ type MenuSection = Omit<ListSection, "children"> & {
5534
5575
  children: MenuOption[];
5535
5576
  };
5536
5577
  type MenuItem = MenuOption | MenuSection;
5537
- type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer">;
5578
+ type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "boundaryAxis" | "crossOffset" | "offset" | "portalContainer">;
5538
5579
  interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
5539
5580
  /** The `className` property assigned to the root element of the component. */
5540
5581
  className?: string;
@@ -6995,6 +7036,13 @@ interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "vari
6995
7036
  labelClassName?: string;
6996
7037
  /** The style to apply to the label. */
6997
7038
  labelStyle?: React__default.CSSProperties;
7039
+ /**
7040
+ * Maximum allowed file size in bytes. Files exceeding this limit will be
7041
+ * rejected.
7042
+ */
7043
+ maxFileSize?: number;
7044
+ /** Callback fired when a dropped/pasted/selected file exceeds `maxFileSize`. */
7045
+ onFileSizeError?: (file: File) => void;
6998
7046
  }
6999
7047
 
7000
7048
  declare const ImageDropZone: React__default.ForwardRefExoticComponent<ImageDropZoneProps & React__default.RefAttributes<HTMLDivElement>>;
@@ -8037,15 +8085,6 @@ interface TreeViewProps extends StylingProps, Omit<AriaLabelingProps, "aria-desc
8037
8085
  * ```;
8038
8086
  */
8039
8087
  items: TreeListItem;
8040
- /**
8041
- * The id of the root item. If not provided, the id of the first item will be
8042
- * used.
8043
- */
8044
- rootId?: string;
8045
- /** The callback function that is called when the item is collapsed. */
8046
- onCollapse?: (key: Key$1) => void;
8047
- /** The callback function that is called when the item is expanded. */
8048
- onExpand?: (key: Key$1) => void;
8049
8088
  /**
8050
8089
  * The callback function that is called when the primary action is triggered.
8051
8090
  * If not provided, the primary action will not be shown.
@@ -8067,7 +8106,7 @@ interface TreeViewProps extends StylingProps, Omit<AriaLabelingProps, "aria-desc
8067
8106
  /**
8068
8107
  * The position of the actions.
8069
8108
  *
8070
- * @default "end"
8109
+ * @default "start"
8071
8110
  */
8072
8111
  actionsPosition?: "start" | "end";
8073
8112
  /**
@@ -8085,22 +8124,20 @@ interface TreeViewProps extends StylingProps, Omit<AriaLabelingProps, "aria-desc
8085
8124
  *
8086
8125
  * @default item => item.label
8087
8126
  */
8088
- renderItemTitle?: (item: ReactComplexTreeItem) => ReactNode;
8127
+ renderItemTitle?: (item: TreeListItem) => ReactNode;
8089
8128
  }
8090
8129
 
8091
- type ReactComplexTreeItem = TreeItem<{
8092
- label: string;
8093
- description?: string;
8094
- icon?: React__default.ElementType;
8095
- posInset: number;
8096
- setSize: number;
8097
- [key: string]: unknown;
8098
- }>;
8099
8130
  declare const TreeView: React__default.ForwardRefExoticComponent<TreeViewProps & React__default.RefAttributes<HTMLDivElement>>;
8100
8131
 
8101
8132
  interface PanelProps extends StylingProps {
8102
8133
  /** Content */
8103
8134
  children: ReactNode;
8135
+ /**
8136
+ * Unique identifier for the panel. Required for localStorage persistence when
8137
+ * using `PanelGroup` with `autoSaveId`. Must remain stable across page
8138
+ * loads.
8139
+ */
8140
+ id?: PanelProps$1["id"];
8104
8141
  /**
8105
8142
  * Panel collapses to this size
8106
8143
  *
@@ -8144,7 +8181,8 @@ interface PanelGroupProps extends StylingProps {
8144
8181
  onLayout?: PanelGroupProps$1["onLayout"];
8145
8182
  /**
8146
8183
  * When passed, automatically persists layouts, should be unique amongst other
8147
- * `PanelGroup`
8184
+ * `PanelGroup`. Each `Panel` should have a stable `id` prop for persistence
8185
+ * to work correctly.
8148
8186
  */
8149
8187
  autoSaveId?: PanelGroupProps$1["autoSaveId"];
8150
8188
  }
@@ -8426,6 +8464,12 @@ declare const VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS: {
8426
8464
  rowHeight: number;
8427
8465
  };
8428
8466
  };
8467
+ TREE_VIEW: {
8468
+ layout: typeof ListLayout;
8469
+ layoutOptions: {
8470
+ rowHeight: number;
8471
+ };
8472
+ };
8429
8473
  IMAGE_GALLERY: {
8430
8474
  layout: typeof GridLayout;
8431
8475
  layoutOptions: {
@@ -8727,11 +8771,12 @@ declare function useIsFirstRender(): boolean;
8727
8771
 
8728
8772
  /**
8729
8773
  * A hook that provides internationalization functionality. It returns a
8730
- * function to format messages and the current locale. The hook can be used with
8731
- * or without a messages object. If no messages object is provided, the hook
8732
- * will use the messages provided by the `I18nProvider`. If a messages object is
8733
- * provided, the hook will use those messages instead of the ones provided by
8734
- * the `I18nProvider`.
8774
+ * function to format messages and the current locale.
8775
+ *
8776
+ * When both a local `messages` object and provider messages (from
8777
+ * `I18nProvider`) are present, they are merged per locale: provider messages
8778
+ * win on key conflicts, while unmatched local keys are preserved. When only one
8779
+ * source is present the behavior is unchanged (backwards compatible).
8735
8780
  *
8736
8781
  * @example
8737
8782
  * ```tsx
@@ -8754,8 +8799,11 @@ declare function useIsFirstRender(): boolean;
8754
8799
  * ```;
8755
8800
  *
8756
8801
  * @template T - A type that represents the shape of the translation messages.
8757
- * @param {Object<string, T>} [messages] - An optional object containing
8758
- * translation messages for different languages.
8802
+ * @param messages - An optional object containing translation messages for
8803
+ * different locales. When provider messages (from `I18nProvider`) are also
8804
+ * present, local and provider messages are merged per locale — provider
8805
+ * values take precedence on key conflicts. If omitted, the hook reads
8806
+ * entirely from the provider.
8759
8807
  * @returns {I18nResult<T>} An object containing a function to format messages
8760
8808
  * and the current locale.
8761
8809
  */
@@ -8958,4 +9006,4 @@ declare namespace reactStately {
8958
9006
  export { type reactStately_Color as Color, type reactStately_ListData as ListData, type reactStately_TreeData as TreeData, reactStately_useListData as useListData, reactStately_useTreeData as useTreeData };
8959
9007
  }
8960
9008
 
8961
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, Actionable, type ActionableProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Autocomplete, type AutocompleteProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateField, type DateFieldProps, DateFormat, type DateFormatProps, DefaultListOption, type Device, DeviceProvider, DeviceProviderContext, type DeviceProviderProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, type DisclosureProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FocusScope, Focusable, type FocusableProps, FrameProvider, type FrameProviderProps, FreehandCanvas, type FreehandCanvasProps, GlobalToastRegion, GridLayout, GridList, type GridListProps, Group, type GroupProps, I18nProvider, type I18nProviderProps, type I18nResult, Icon, IconColorInput, IconColorInputButton, type IconColorInputProps, type IconComponentProps$1 as IconComponentProps, type IconProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Kbd, type KbdProps, type Key, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle$1 as ListHandle, ListLayout, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, type MessageFormatter, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, PointPicker, PointPickerContent, type PointPickerContentProps, PointPickerDisplay, type PointPickerDisplayProps, type PointPickerProps, Popover, PopoverContent, type PopoverContentHandle, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, type PressEvent, Pressable, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, type ReactComplexTreeItem, Reaction, type ReactionProps, type Rect, type SVGRProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Size, Slider, type SliderProps, StatusCard, type StatusCardProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, TableLayout, Tabs, type TabsProps, TagGroup, type TagGroupProps, TaggedPagination, type TaggedPaginationProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, TimeField, type TimeFieldProps, type ToastProps, ToastQueue, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, TreeView, type TreeViewProps, UNSAFE_ListBox, type UNSAFE_ListBoxProps, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS, Virtualizer, type VirtualizerProps, VisuallyHidden, WaterfallLayout, announce, booleanOrObjectToConfig, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, iconMap, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useDragAndDrop, useFilter, useFocusRing, useFocusVisible, useFrameDimensions, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useListData, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, usePreventFocus, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
9009
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, Actionable, type ActionableProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Autocomplete, type AutocompleteProps, Avatar, type AvatarProps, type BlockProps, type BoundaryAxis, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateField, type DateFieldProps, DateFormat, type DateFormatProps, DefaultListOption, type Device, DeviceProvider, DeviceProviderContext, type DeviceProviderProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, type DisclosureProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FocusScope, Focusable, type FocusableProps, FrameProvider, type FrameProviderProps, FreehandCanvas, type FreehandCanvasProps, GlobalToastRegion, GridLayout, GridList, type GridListProps, Group, type GroupProps, I18nProvider, type I18nProviderProps, type I18nResult, Icon, IconColorInput, IconColorInputButton, type IconColorInputProps, type IconComponentProps$1 as IconComponentProps, type IconProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Kbd, type KbdProps, type Key, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle$1 as ListHandle, ListLayout, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, type MessageFormatter, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, PointPicker, PointPickerContent, type PointPickerContentProps, PointPickerDisplay, type PointPickerDisplayProps, type PointPickerProps, Popover, PopoverContent, type PopoverContentHandle, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, type PressEvent, Pressable, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, type Rect, type SVGRProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Size, Slider, type SliderProps, StatusCard, type StatusCardProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, TableLayout, Tabs, type TabsProps, TagGroup, type TagGroupProps, TaggedPagination, type TaggedPaginationProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, TimeField, type TimeFieldProps, type ToastProps, ToastQueue, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, type TreeListItem, TreeView, type TreeViewProps, UNSAFE_ListBox, type UNSAFE_ListBoxProps, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS, Virtualizer, type VirtualizerProps, VisuallyHidden, WaterfallLayout, announce, booleanOrObjectToConfig, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, iconMap, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useDragAndDrop, useFilter, useFocusRing, useFocusVisible, useFrameDimensions, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useListData, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, usePreventFocus, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import { Time, CalendarDateTime, ZonedDateTime, CalendarDate, CalendarIdentifier
4
4
  import { NumberFormatOptions } from '@internationalized/number';
5
5
  import { LocalizedStrings } from '@internationalized/message';
6
6
  import { Theme, Sprinkles } from '@baseline-ui/tokens';
7
- import { TreeItem } from 'react-complex-tree';
8
7
  import { PanelProps as PanelProps$1, ImperativePanelHandle as ImperativePanelHandle$1, PanelGroupProps as PanelGroupProps$1, ImperativePanelGroupHandle as ImperativePanelGroupHandle$1, PanelResizeHandleProps as PanelResizeHandleProps$1 } from 'react-resizable-panels';
9
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
9
  export { MotionGlobalConfig } from 'motion/react';
@@ -3071,6 +3070,12 @@ interface AriaMenuTriggerProps {
3071
3070
  trigger?: MenuTriggerType;
3072
3071
  }
3073
3072
 
3073
+ /**
3074
+ * Controls which axes the boundary element constrains when calculating overlay
3075
+ * position.
3076
+ */
3077
+ type BoundaryAxis = 'horizontal' | 'vertical' | 'both';
3078
+
3074
3079
  interface AriaPositionProps extends PositionProps {
3075
3080
  /**
3076
3081
  * Cross size of the overlay arrow in pixels.
@@ -3078,10 +3083,23 @@ interface AriaPositionProps extends PositionProps {
3078
3083
  */
3079
3084
  arrowSize?: number;
3080
3085
  /**
3081
- * Element that that serves as the positioning boundary.
3086
+ * Element that serves as the positioning boundary. The overlay is shifted or
3087
+ * flipped to stay within this element's bounds on the axes selected by
3088
+ * `boundaryAxis`. Pass `null` to disable all boundary constraints.
3082
3089
  * @default document.body
3083
3090
  */
3084
- boundaryElement?: Element;
3091
+ boundaryElement?: Element | null;
3092
+ /**
3093
+ * Controls which axes `boundaryElement` constrains.
3094
+ *
3095
+ * - `"both"` — constrains horizontal and vertical (default)
3096
+ * - `"horizontal"` — constrains only horizontal overflow
3097
+ * - `"vertical"` — constrains only vertical overflow
3098
+ *
3099
+ * Has no effect when `boundaryElement` is `null`.
3100
+ * @default "both"
3101
+ */
3102
+ boundaryAxis?: BoundaryAxis;
3085
3103
  /**
3086
3104
  * The ref for the element which the overlay positions itself with respect to.
3087
3105
  */
@@ -5449,7 +5467,7 @@ type ClassName$1 = string | ((state: {
5449
5467
  type Style = React__default.CSSProperties | ((state: {
5450
5468
  isOpen: boolean;
5451
5469
  }) => React__default.CSSProperties | undefined);
5452
- interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef" | "arrowSize" | "arrowBoundaryOffset" | "shouldCloseOnScroll">, Pick<OverlayProps, "shouldContainFocus" | "disableFocusManagement">, Pick<ModalContentProps, "disableAnimation">, BlockProps {
5470
+ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef" | "arrowSize" | "arrowBoundaryOffset" | "shouldCloseOnScroll" | "boundaryElement">, Pick<OverlayProps, "shouldContainFocus" | "disableFocusManagement">, Pick<ModalContentProps, "disableAnimation">, BlockProps {
5453
5471
  /** The class name for the popover element. */
5454
5472
  className?: ClassName$1;
5455
5473
  /** The style for the popover element. */
@@ -5506,6 +5524,29 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
5506
5524
  * trigger popover position recalculation.
5507
5525
  */
5508
5526
  elementHandle?: React__default.Ref<PopoverContentHandle>;
5527
+ /**
5528
+ * The element used as the boundary when calculating popover position. The
5529
+ * popover is shifted or flipped to stay within this element's bounds on the
5530
+ * axes specified by `boundaryAxis`.
5531
+ *
5532
+ * Pass `null` to disable all boundary constraints.
5533
+ *
5534
+ * @default document.body
5535
+ */
5536
+ boundaryElement?: Element | null;
5537
+ /**
5538
+ * Controls which axes the `boundaryElement` constrains. Has no effect when
5539
+ * `boundaryElement` is `null`.
5540
+ *
5541
+ * - `"both"` — constrains horizontal and vertical (default)
5542
+ * - `"horizontal"` — constrains only horizontal overflow; popover may overflow
5543
+ * vertically
5544
+ * - `"vertical"` — constrains only vertical overflow; popover may overflow
5545
+ * horizontally
5546
+ *
5547
+ * @default "both"
5548
+ */
5549
+ boundaryAxis?: BoundaryAxis;
5509
5550
  }
5510
5551
  interface PopoverTriggerProps {
5511
5552
  /** The contents of the popover trigger. */
@@ -5534,7 +5575,7 @@ type MenuSection = Omit<ListSection, "children"> & {
5534
5575
  children: MenuOption[];
5535
5576
  };
5536
5577
  type MenuItem = MenuOption | MenuSection;
5537
- type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset" | "portalContainer">;
5578
+ type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "boundaryAxis" | "crossOffset" | "offset" | "portalContainer">;
5538
5579
  interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
5539
5580
  /** The `className` property assigned to the root element of the component. */
5540
5581
  className?: string;
@@ -6995,6 +7036,13 @@ interface ImageDropZoneProps extends Omit<SharedFileUploadProps, "label" | "vari
6995
7036
  labelClassName?: string;
6996
7037
  /** The style to apply to the label. */
6997
7038
  labelStyle?: React__default.CSSProperties;
7039
+ /**
7040
+ * Maximum allowed file size in bytes. Files exceeding this limit will be
7041
+ * rejected.
7042
+ */
7043
+ maxFileSize?: number;
7044
+ /** Callback fired when a dropped/pasted/selected file exceeds `maxFileSize`. */
7045
+ onFileSizeError?: (file: File) => void;
6998
7046
  }
6999
7047
 
7000
7048
  declare const ImageDropZone: React__default.ForwardRefExoticComponent<ImageDropZoneProps & React__default.RefAttributes<HTMLDivElement>>;
@@ -8037,15 +8085,6 @@ interface TreeViewProps extends StylingProps, Omit<AriaLabelingProps, "aria-desc
8037
8085
  * ```;
8038
8086
  */
8039
8087
  items: TreeListItem;
8040
- /**
8041
- * The id of the root item. If not provided, the id of the first item will be
8042
- * used.
8043
- */
8044
- rootId?: string;
8045
- /** The callback function that is called when the item is collapsed. */
8046
- onCollapse?: (key: Key$1) => void;
8047
- /** The callback function that is called when the item is expanded. */
8048
- onExpand?: (key: Key$1) => void;
8049
8088
  /**
8050
8089
  * The callback function that is called when the primary action is triggered.
8051
8090
  * If not provided, the primary action will not be shown.
@@ -8067,7 +8106,7 @@ interface TreeViewProps extends StylingProps, Omit<AriaLabelingProps, "aria-desc
8067
8106
  /**
8068
8107
  * The position of the actions.
8069
8108
  *
8070
- * @default "end"
8109
+ * @default "start"
8071
8110
  */
8072
8111
  actionsPosition?: "start" | "end";
8073
8112
  /**
@@ -8085,22 +8124,20 @@ interface TreeViewProps extends StylingProps, Omit<AriaLabelingProps, "aria-desc
8085
8124
  *
8086
8125
  * @default item => item.label
8087
8126
  */
8088
- renderItemTitle?: (item: ReactComplexTreeItem) => ReactNode;
8127
+ renderItemTitle?: (item: TreeListItem) => ReactNode;
8089
8128
  }
8090
8129
 
8091
- type ReactComplexTreeItem = TreeItem<{
8092
- label: string;
8093
- description?: string;
8094
- icon?: React__default.ElementType;
8095
- posInset: number;
8096
- setSize: number;
8097
- [key: string]: unknown;
8098
- }>;
8099
8130
  declare const TreeView: React__default.ForwardRefExoticComponent<TreeViewProps & React__default.RefAttributes<HTMLDivElement>>;
8100
8131
 
8101
8132
  interface PanelProps extends StylingProps {
8102
8133
  /** Content */
8103
8134
  children: ReactNode;
8135
+ /**
8136
+ * Unique identifier for the panel. Required for localStorage persistence when
8137
+ * using `PanelGroup` with `autoSaveId`. Must remain stable across page
8138
+ * loads.
8139
+ */
8140
+ id?: PanelProps$1["id"];
8104
8141
  /**
8105
8142
  * Panel collapses to this size
8106
8143
  *
@@ -8144,7 +8181,8 @@ interface PanelGroupProps extends StylingProps {
8144
8181
  onLayout?: PanelGroupProps$1["onLayout"];
8145
8182
  /**
8146
8183
  * When passed, automatically persists layouts, should be unique amongst other
8147
- * `PanelGroup`
8184
+ * `PanelGroup`. Each `Panel` should have a stable `id` prop for persistence
8185
+ * to work correctly.
8148
8186
  */
8149
8187
  autoSaveId?: PanelGroupProps$1["autoSaveId"];
8150
8188
  }
@@ -8426,6 +8464,12 @@ declare const VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS: {
8426
8464
  rowHeight: number;
8427
8465
  };
8428
8466
  };
8467
+ TREE_VIEW: {
8468
+ layout: typeof ListLayout;
8469
+ layoutOptions: {
8470
+ rowHeight: number;
8471
+ };
8472
+ };
8429
8473
  IMAGE_GALLERY: {
8430
8474
  layout: typeof GridLayout;
8431
8475
  layoutOptions: {
@@ -8727,11 +8771,12 @@ declare function useIsFirstRender(): boolean;
8727
8771
 
8728
8772
  /**
8729
8773
  * A hook that provides internationalization functionality. It returns a
8730
- * function to format messages and the current locale. The hook can be used with
8731
- * or without a messages object. If no messages object is provided, the hook
8732
- * will use the messages provided by the `I18nProvider`. If a messages object is
8733
- * provided, the hook will use those messages instead of the ones provided by
8734
- * the `I18nProvider`.
8774
+ * function to format messages and the current locale.
8775
+ *
8776
+ * When both a local `messages` object and provider messages (from
8777
+ * `I18nProvider`) are present, they are merged per locale: provider messages
8778
+ * win on key conflicts, while unmatched local keys are preserved. When only one
8779
+ * source is present the behavior is unchanged (backwards compatible).
8735
8780
  *
8736
8781
  * @example
8737
8782
  * ```tsx
@@ -8754,8 +8799,11 @@ declare function useIsFirstRender(): boolean;
8754
8799
  * ```;
8755
8800
  *
8756
8801
  * @template T - A type that represents the shape of the translation messages.
8757
- * @param {Object<string, T>} [messages] - An optional object containing
8758
- * translation messages for different languages.
8802
+ * @param messages - An optional object containing translation messages for
8803
+ * different locales. When provider messages (from `I18nProvider`) are also
8804
+ * present, local and provider messages are merged per locale — provider
8805
+ * values take precedence on key conflicts. If omitted, the hook reads
8806
+ * entirely from the provider.
8759
8807
  * @returns {I18nResult<T>} An object containing a function to format messages
8760
8808
  * and the current locale.
8761
8809
  */
@@ -8958,4 +9006,4 @@ declare namespace reactStately {
8958
9006
  export { type reactStately_Color as Color, type reactStately_ListData as ListData, type reactStately_TreeData as TreeData, reactStately_useListData as useListData, reactStately_useTreeData as useTreeData };
8959
9007
  }
8960
9008
 
8961
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, Actionable, type ActionableProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Autocomplete, type AutocompleteProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateField, type DateFieldProps, DateFormat, type DateFormatProps, DefaultListOption, type Device, DeviceProvider, DeviceProviderContext, type DeviceProviderProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, type DisclosureProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FocusScope, Focusable, type FocusableProps, FrameProvider, type FrameProviderProps, FreehandCanvas, type FreehandCanvasProps, GlobalToastRegion, GridLayout, GridList, type GridListProps, Group, type GroupProps, I18nProvider, type I18nProviderProps, type I18nResult, Icon, IconColorInput, IconColorInputButton, type IconColorInputProps, type IconComponentProps$1 as IconComponentProps, type IconProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Kbd, type KbdProps, type Key, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle$1 as ListHandle, ListLayout, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, type MessageFormatter, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, PointPicker, PointPickerContent, type PointPickerContentProps, PointPickerDisplay, type PointPickerDisplayProps, type PointPickerProps, Popover, PopoverContent, type PopoverContentHandle, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, type PressEvent, Pressable, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, type ReactComplexTreeItem, Reaction, type ReactionProps, type Rect, type SVGRProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Size, Slider, type SliderProps, StatusCard, type StatusCardProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, TableLayout, Tabs, type TabsProps, TagGroup, type TagGroupProps, TaggedPagination, type TaggedPaginationProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, TimeField, type TimeFieldProps, type ToastProps, ToastQueue, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, TreeView, type TreeViewProps, UNSAFE_ListBox, type UNSAFE_ListBoxProps, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS, Virtualizer, type VirtualizerProps, VisuallyHidden, WaterfallLayout, announce, booleanOrObjectToConfig, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, iconMap, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useDragAndDrop, useFilter, useFocusRing, useFocusVisible, useFrameDimensions, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useListData, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, usePreventFocus, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
9009
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, Actionable, type ActionableProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Autocomplete, type AutocompleteProps, Avatar, type AvatarProps, type BlockProps, type BoundaryAxis, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateField, type DateFieldProps, DateFormat, type DateFormatProps, DefaultListOption, type Device, DeviceProvider, DeviceProviderContext, type DeviceProviderProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, type DisclosureProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FocusScope, Focusable, type FocusableProps, FrameProvider, type FrameProviderProps, FreehandCanvas, type FreehandCanvasProps, GlobalToastRegion, GridLayout, GridList, type GridListProps, Group, type GroupProps, I18nProvider, type I18nProviderProps, type I18nResult, Icon, IconColorInput, IconColorInputButton, type IconColorInputProps, type IconComponentProps$1 as IconComponentProps, type IconProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Kbd, type KbdProps, type Key, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle$1 as ListHandle, ListLayout, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, type MessageFormatter, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, PointPicker, PointPickerContent, type PointPickerContentProps, PointPickerDisplay, type PointPickerDisplayProps, type PointPickerProps, Popover, PopoverContent, type PopoverContentHandle, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, type PressEvent, Pressable, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, type Rect, type SVGRProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Size, Slider, type SliderProps, StatusCard, type StatusCardProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, TableLayout, Tabs, type TabsProps, TagGroup, type TagGroupProps, TaggedPagination, type TaggedPaginationProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, TimeField, type TimeFieldProps, type ToastProps, ToastQueue, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, type TreeListItem, TreeView, type TreeViewProps, UNSAFE_ListBox, type UNSAFE_ListBoxProps, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS, Virtualizer, type VirtualizerProps, VisuallyHidden, WaterfallLayout, announce, booleanOrObjectToConfig, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, iconMap, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useDragAndDrop, useFilter, useFocusRing, useFocusVisible, useFrameDimensions, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useListData, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, usePreventFocus, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };