@cloudvoyant/helical-ui 0.19.0 → 0.20.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/dist/index.cjs CHANGED
@@ -34,6 +34,8 @@ __export(index_exports, {
34
34
  ExitHeading: () => ExitHeading,
35
35
  HeadingWithId: () => HeadingWithId,
36
36
  SIDEBAR_KEYBOARD_SHORTCUT: () => SIDEBAR_KEYBOARD_SHORTCUT,
37
+ SIDEBAR_WIDGET_DEFAULT_SNAP_POINT: () => SIDEBAR_WIDGET_DEFAULT_SNAP_POINT,
38
+ SIDEBAR_WIDGET_SNAP_POINTS: () => SIDEBAR_WIDGET_SNAP_POINTS,
37
39
  SIDEBAR_WIDTH: () => SIDEBAR_WIDTH,
38
40
  SIDEBAR_WIDTH_ICON: () => SIDEBAR_WIDTH_ICON,
39
41
  SIDEBAR_WIDTH_MOBILE: () => SIDEBAR_WIDTH_MOBILE,
@@ -684,6 +686,8 @@ var SIDEBAR_WIDTH = "16rem";
684
686
  var SIDEBAR_WIDTH_MOBILE = "18rem";
685
687
  var SIDEBAR_WIDTH_ICON = "3rem";
686
688
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
689
+ var SIDEBAR_WIDGET_SNAP_POINTS = [0.35, 0.5];
690
+ var SIDEBAR_WIDGET_DEFAULT_SNAP_POINT = 0.5;
687
691
  var sidebarMenuButtonVariants = (0, import_class_variance_authority7.cva)(
688
692
  "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
689
693
  {
@@ -706,11 +710,12 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority7.cva)(
706
710
  );
707
711
  var sidebarStyles = {
708
712
  wrapperClass: "group/sidebar-wrapper min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
709
- // Base (static) classes for the desktop sidebar container. Side- and
710
- // variant-specific classes are applied inline in the framework wrappers via
711
- // ternaries, exactly as in the shadcn source. The `flex` direction bases are
712
- // provided by the Row/Col layout primitives at render time.
713
713
  containerClass: "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
714
+ mobileBackdropClass: "fixed inset-0 bg-black/50 select-none data-[state=open]:animate-[helical-fade-in_200ms_ease-out] data-[state=closed]:animate-[helical-fade-out_200ms_ease-in]",
715
+ mobilePositionerClass: "fixed inset-0 z-50 flex data-[swipe-direction=left]:justify-start data-[swipe-direction=left]:items-stretch data-[swipe-direction=down]:justify-center data-[swipe-direction=down]:items-end",
716
+ mobileContentClass: "relative flex h-full w-full flex-col bg-sidebar p-0 text-sidebar-foreground shadow-xl data-[swipe-direction=left]:w-(--sidebar-width) data-[swipe-direction=down]:max-h-[96svh] data-[swipe-direction=left]:data-[state=open]:animate-[helical-drawer-in-left_200ms_ease-out] data-[swipe-direction=left]:data-[state=closed]:animate-[helical-drawer-out-left_200ms_ease-in] data-[swipe-direction=down]:rounded-t-2xl data-[swipe-direction=down]:data-[state=open]:animate-[helical-drawer-in-down_200ms_ease-out] data-[swipe-direction=down]:data-[state=closed]:animate-[helical-drawer-out-down_200ms_ease-in]",
717
+ mobileGrabberClass: "flex w-full shrink-0 cursor-grab touch-none select-none items-center justify-center py-3 data-[dragging]:cursor-grabbing",
718
+ mobileGrabberIndicatorClass: "h-1 w-10 shrink-0 rounded-full bg-sidebar-border",
714
719
  gapClass: "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0",
715
720
  innerClass: "flex h-full w-full flex-col bg-sidebar data-[variant=floating]:rounded-lg data-[variant=floating]:border data-[variant=floating]:border-sidebar-border data-[variant=floating]:shadow-sm",
716
721
  headerClass: "gap-2 p-2",
@@ -2568,6 +2573,8 @@ function lockEditorOverlayScroll(editorElement, overlayElement) {
2568
2573
  ExitHeading,
2569
2574
  HeadingWithId,
2570
2575
  SIDEBAR_KEYBOARD_SHORTCUT,
2576
+ SIDEBAR_WIDGET_DEFAULT_SNAP_POINT,
2577
+ SIDEBAR_WIDGET_SNAP_POINTS,
2571
2578
  SIDEBAR_WIDTH,
2572
2579
  SIDEBAR_WIDTH_ICON,
2573
2580
  SIDEBAR_WIDTH_MOBILE,
package/dist/index.d.cts CHANGED
@@ -173,6 +173,8 @@ declare const SIDEBAR_WIDTH = "16rem";
173
173
  declare const SIDEBAR_WIDTH_MOBILE = "18rem";
174
174
  declare const SIDEBAR_WIDTH_ICON = "3rem";
175
175
  declare const SIDEBAR_KEYBOARD_SHORTCUT = "b";
176
+ declare const SIDEBAR_WIDGET_SNAP_POINTS: number[];
177
+ declare const SIDEBAR_WIDGET_DEFAULT_SNAP_POINT = 0.5;
176
178
  declare const sidebarMenuButtonVariants: (props?: ({
177
179
  variant?: "outline" | "default" | null | undefined;
178
180
  size?: "sm" | "lg" | "default" | null | undefined;
@@ -186,10 +188,16 @@ interface SidebarContextProps {
186
188
  setOpenMobile: (open: boolean) => void;
187
189
  isMobile: boolean;
188
190
  toggleSidebar: () => void;
191
+ isControlled: boolean;
189
192
  }
190
193
  declare const sidebarStyles: {
191
194
  readonly wrapperClass: "group/sidebar-wrapper min-h-svh w-full has-data-[variant=inset]:bg-sidebar";
192
195
  readonly containerClass: "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex";
196
+ readonly mobileBackdropClass: "fixed inset-0 bg-black/50 select-none data-[state=open]:animate-[helical-fade-in_200ms_ease-out] data-[state=closed]:animate-[helical-fade-out_200ms_ease-in]";
197
+ readonly mobilePositionerClass: "fixed inset-0 z-50 flex data-[swipe-direction=left]:justify-start data-[swipe-direction=left]:items-stretch data-[swipe-direction=down]:justify-center data-[swipe-direction=down]:items-end";
198
+ readonly mobileContentClass: "relative flex h-full w-full flex-col bg-sidebar p-0 text-sidebar-foreground shadow-xl data-[swipe-direction=left]:w-(--sidebar-width) data-[swipe-direction=down]:max-h-[96svh] data-[swipe-direction=left]:data-[state=open]:animate-[helical-drawer-in-left_200ms_ease-out] data-[swipe-direction=left]:data-[state=closed]:animate-[helical-drawer-out-left_200ms_ease-in] data-[swipe-direction=down]:rounded-t-2xl data-[swipe-direction=down]:data-[state=open]:animate-[helical-drawer-in-down_200ms_ease-out] data-[swipe-direction=down]:data-[state=closed]:animate-[helical-drawer-out-down_200ms_ease-in]";
199
+ readonly mobileGrabberClass: "flex w-full shrink-0 cursor-grab touch-none select-none items-center justify-center py-3 data-[dragging]:cursor-grabbing";
200
+ readonly mobileGrabberIndicatorClass: "h-1 w-10 shrink-0 rounded-full bg-sidebar-border";
193
201
  readonly gapClass: "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0";
194
202
  readonly innerClass: "flex h-full w-full flex-col bg-sidebar data-[variant=floating]:rounded-lg data-[variant=floating]:border data-[variant=floating]:border-sidebar-border data-[variant=floating]:shadow-sm";
195
203
  readonly headerClass: "gap-2 p-2";
@@ -962,4 +970,4 @@ declare module '@tiptap/core' {
962
970
  }
963
971
  declare const createNoticeNode: (nodeView?: NodeViewFactory) => Node<any, any>;
964
972
 
965
- export { type BadgeProps, type BadgeVariants, type BuildExtensionsOptions, type ButtonProps, type ButtonVariants, type CardCoverProps, type CardProps, type CardVariants, type ChartProps, type ChartSeries, type CheckboxProps, type CheckboxVariants, type CodeBlockProps, type ComboboxItemVariants, type ComboboxProps, type EditorCounts, EditorHeading, type EditorNodeViews, type EditorSeams, ExitHeading, type FigureProps, type FileEntry, HeadingWithId, type ImageUploadResult, type InputProps, type InputVariants, type ItemProps, type ItemVariants, type LaTeXProps, type LanguageTab, type LinkPreviewAttributes, type LinkPreviewFetcher, type ListboxItemData, type ManimModule, type ManimProps, type ManimRecordingScene, type MentionItem, type MentionListElement, type MermaidProps, type MultipleChoiceQuestionData, type NativeSelectVariants, type NavbarDensity, type NavbarMenuDensity, type NavbarMenuVariant, type NavbarVariant, type NodeViewFactory, type NoticeAttributes, type NoticeProps, type NoticeVariant, type NoticeVariants, type NumberInputProps, type NumericQuestionData, type OverlayPlacementOptions, type OverlayPosition, type PageGutterContentVariants, type PageGutterVariants, type PageVariants, type PrevNextProps, type ProseProps, type ProseVariants, type Question, type RevealProps, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, type SelectItemData, type SelectProps, type SidebarContextProps, type SidebarMenuButtonVariants, type SingleChoiceQuestionData, type SlashCommandItem, type SwitchProps, type SwitchVariants, THEMES, THEME_NAMES, type TabsIndicatorVariants, type TabsListVariants, type TagsInputProps, type TextareaProps, type ThemeMeta, TitleHeading, type ToggleButtonProps, type ToggleButtonVariants, type ToggleGroupProps, type ToggleGroupRootVariants, type UrlMentionAttributes, type YouTubeChapter, type YouTubeProps, badgeVariants, buildChartDefinition, buildExtensions, buttonVariants, cardBodyBase, cardCoverVariants, cardDescriptionBase, cardFooterBase, cardHeaderBase, cardTitleBase, cardVariants, centerBase, chartPlaceholderBase, chartPlaceholderLabelBase, chartRootBase, checkboxGroupBase, checkboxIndicatorBase, checkboxLabelBase, checkboxVariants, clipboardTriggerBase, cn, codeBlockBodyBase, codeBlockBodyScrollableBase, codeBlockContentBase, codeBlockCopyFloatBase, codeBlockHeaderBase, codeBlockHeaderInfoBase, codeBlockHighlightBase, codeBlockLineNumbersBase, codeBlockLoadingBase, codeBlockRootBase, codeBlockSpinnerBase, codeBlockTitleBase, colBase, comboboxClearTriggerBase, comboboxContentBase, comboboxControlBase, comboboxEmptyBase, comboboxInputBase, comboboxItemGroupLabelBase, comboboxItemIndicatorBase, comboboxItemVariants, comboboxListBase, comboboxPositionerBase, comboboxTriggerBase, containerBase, createCodeBlockCustom, createImageNode, createInternalMention, createLinkPreview, createNoticeNode, createUrlMention, defaultChartColor, defaultListboxFilter, dialogBackdropBase, dialogCloseTriggerBase, dialogContentBase, dialogDescriptionBase, dialogFooterBase, dialogFooterStickyBase, dialogFullscreenContentBase, dialogHeaderBase, dialogHeaderStickyBase, dialogPositionerBase, dialogTitleBase, extractYouTubeId, feedbackCorrectBase, feedbackExplanationBase, feedbackIncorrectBase, fetchYouTubeMetadata, fieldErrorBase, fieldHelperBase, fieldLabelBase, fieldRequiredIndicatorBase, fieldRootBase, fieldsetErrorBase, fieldsetHelperBase, fieldsetLegendBase, fieldsetRootBase, figureCaptionBase, figureImageBase, figureRootBase, findEditorScrollContainer, formatTime, hstackBase, injectCodeBlockStyles, inputVariants, insertPastedUrlAsLink, itemVariants, latexDisplayBase, latexErrorBase, latexInlineBase, latexRootBase, listboxContentBase, listboxEmptyBase, listboxInputBase, listboxItemBase, listboxItemIndicatorBase, listboxItemTextBase, listboxLabelBase, listboxRootBase, lockEditorOverlayScroll, manimCaptionBase, manimContainerBase, manimErrorBase, manimPlaceholderBase, manimPlaceholderLabelBase, manimRootBase, mermaidLoadingBase, mermaidRootBase, mermaidSourceBase, mermaidSvgAspectRatio, mermaidSvgBase, nativeSelectIconBase, nativeSelectVariants, nativeSelectWrapperBase, navbarActionsBase, navbarActivationAreaBase, navbarBrandBase, navbarContainerBase, navbarDensityVariants, navbarMenuBase, navbarMenuContentBase, navbarMenuIndicatorBase, navbarMenuItemBase, navbarMenuLinkBase, navbarMenuListBase, navbarMenuPlacementVariants, navbarMenuRootBase, navbarMenuTriggerStyle, navbarMenuViewportBase, navbarMenuViewportPositionerBase, navbarMobileActionsBase, navbarMobileBase, navbarMobileContentBase, navbarMobileHeaderBase, navbarMobileMenuBase, navbarMobileMenuContentBase, navbarMobileMenuTriggerBase, navbarShrunkBase, navbarTriggerVariants, navbarVariants, noticeDescriptionBase, noticeTitleBase, noticeVariants, numberInputControlBase, numberInputInputBase, numberInputRootBase, numberInputTriggerBase, pageContentBase, pageFooterBase, pageGutterAreaBase, pageGutterContentVariants, pageGutterVariants, pageSectionBase, pageVariants, paginationEllipsisBase, paginationItemBase, paginationRootBase, paginationTriggerBase, parseYouTubeChapters, placeEditorOverlay, placeEditorOverlayAt, popoverArrowBase, popoverCloseTriggerBase, popoverContentBase, popoverDescriptionBase, popoverIndicatorBase, popoverPositionerBase, popoverTitleBase, prevNextDirectionBase, prevNextLinkBase, prevNextLinkNextBase, prevNextRootBase, prevNextSpacerBase, prevNextTitleBase, proseVariants, questionCardBase, questionCheckButtonBase, questionGroupBase, questionInputBase, questionOptionBase, questionOptionCorrectBase, questionOptionIncorrectBase, questionPromptBase, questionUnitBase, quizHeaderBase, quizResetButtonBase, quizResultBase, quizResultTextBase, quizResultTitleBase, quizRootBase, quizScoreBase, quizSubmitButtonBase, quizTitleBase, radioGroupItemControlBase, radioGroupItemTextBase, radioGroupRootBase, registerImageInsertCallback, registerYouTubeInsertCallback, renderChartSvgString, renderCodeToHtml, renderMermaidSource, resolveMermaidThemeVariables, revealChevronBase, revealContentBase, revealRootBase, revealTriggerBase, rowBase, scrollContentBase, scrollCornerBase, scrollRootBase, scrollScrollbarBase, scrollThumbBase, scrollViewportBase, selectClearTriggerBase, selectContentBase, selectIndicatorBase, selectItemBase, selectItemGroupLabelBase, selectItemIndicatorBase, selectItemTextBase, selectPositionerBase, selectTriggerBase, selectValueBase, sidebarMenuButtonVariants, sidebarStyles, slashCommands, splitterPanelBase, splitterResizeTriggerBase, splitterResizeTriggerIndicatorBase, splitterResizeTriggerSeparatorBase, splitterRootBase, stackBase, switchControlBase, switchLabelBase, switchThumbBase, switchVariants, tabsContentBase, tabsIndicatorBase, tabsIndicatorVariants, tabsListBase, tabsListVariants, tabsRootBase, tabsTriggerBase, tagsInputClearTriggerBase, tagsInputControlBase, tagsInputInputBase, tagsInputItemBase, tagsInputItemDeleteTriggerBase, tagsInputItemInputBase, tagsInputItemTextBase, tagsInputRootBase, textareaBase, toLaTeX, toggleButtonVariants, toggleGroupRootVariants, tooltipArrowBase, tooltipContentBase, tooltipPositionerBase, unregisterImageInsertCallback, unregisterYouTubeInsertCallback, vstackBase, windowBodyBase, windowCloseTriggerBase, windowContentBase, windowControlBase, windowDragTriggerBase, windowHeaderBase, windowPositionerBase, windowResizeTriggerBase, windowStageTriggerBase, windowTitleBase, youtubeChapterButtonBase, youtubeChapterLabelBase, youtubeChapterTimeBase, youtubeChaptersBase, youtubeChaptersChevronBase, youtubeChaptersListBase, youtubeChaptersSummaryBase, youtubeDescriptionBase, youtubeFacadeBase, youtubePlayButtonBase, youtubePlayButtonInnerBase, youtubeRootBase, youtubeTitleBase };
973
+ export { type BadgeProps, type BadgeVariants, type BuildExtensionsOptions, type ButtonProps, type ButtonVariants, type CardCoverProps, type CardProps, type CardVariants, type ChartProps, type ChartSeries, type CheckboxProps, type CheckboxVariants, type CodeBlockProps, type ComboboxItemVariants, type ComboboxProps, type EditorCounts, EditorHeading, type EditorNodeViews, type EditorSeams, ExitHeading, type FigureProps, type FileEntry, HeadingWithId, type ImageUploadResult, type InputProps, type InputVariants, type ItemProps, type ItemVariants, type LaTeXProps, type LanguageTab, type LinkPreviewAttributes, type LinkPreviewFetcher, type ListboxItemData, type ManimModule, type ManimProps, type ManimRecordingScene, type MentionItem, type MentionListElement, type MermaidProps, type MultipleChoiceQuestionData, type NativeSelectVariants, type NavbarDensity, type NavbarMenuDensity, type NavbarMenuVariant, type NavbarVariant, type NodeViewFactory, type NoticeAttributes, type NoticeProps, type NoticeVariant, type NoticeVariants, type NumberInputProps, type NumericQuestionData, type OverlayPlacementOptions, type OverlayPosition, type PageGutterContentVariants, type PageGutterVariants, type PageVariants, type PrevNextProps, type ProseProps, type ProseVariants, type Question, type RevealProps, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDGET_DEFAULT_SNAP_POINT, SIDEBAR_WIDGET_SNAP_POINTS, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, type SelectItemData, type SelectProps, type SidebarContextProps, type SidebarMenuButtonVariants, type SingleChoiceQuestionData, type SlashCommandItem, type SwitchProps, type SwitchVariants, THEMES, THEME_NAMES, type TabsIndicatorVariants, type TabsListVariants, type TagsInputProps, type TextareaProps, type ThemeMeta, TitleHeading, type ToggleButtonProps, type ToggleButtonVariants, type ToggleGroupProps, type ToggleGroupRootVariants, type UrlMentionAttributes, type YouTubeChapter, type YouTubeProps, badgeVariants, buildChartDefinition, buildExtensions, buttonVariants, cardBodyBase, cardCoverVariants, cardDescriptionBase, cardFooterBase, cardHeaderBase, cardTitleBase, cardVariants, centerBase, chartPlaceholderBase, chartPlaceholderLabelBase, chartRootBase, checkboxGroupBase, checkboxIndicatorBase, checkboxLabelBase, checkboxVariants, clipboardTriggerBase, cn, codeBlockBodyBase, codeBlockBodyScrollableBase, codeBlockContentBase, codeBlockCopyFloatBase, codeBlockHeaderBase, codeBlockHeaderInfoBase, codeBlockHighlightBase, codeBlockLineNumbersBase, codeBlockLoadingBase, codeBlockRootBase, codeBlockSpinnerBase, codeBlockTitleBase, colBase, comboboxClearTriggerBase, comboboxContentBase, comboboxControlBase, comboboxEmptyBase, comboboxInputBase, comboboxItemGroupLabelBase, comboboxItemIndicatorBase, comboboxItemVariants, comboboxListBase, comboboxPositionerBase, comboboxTriggerBase, containerBase, createCodeBlockCustom, createImageNode, createInternalMention, createLinkPreview, createNoticeNode, createUrlMention, defaultChartColor, defaultListboxFilter, dialogBackdropBase, dialogCloseTriggerBase, dialogContentBase, dialogDescriptionBase, dialogFooterBase, dialogFooterStickyBase, dialogFullscreenContentBase, dialogHeaderBase, dialogHeaderStickyBase, dialogPositionerBase, dialogTitleBase, extractYouTubeId, feedbackCorrectBase, feedbackExplanationBase, feedbackIncorrectBase, fetchYouTubeMetadata, fieldErrorBase, fieldHelperBase, fieldLabelBase, fieldRequiredIndicatorBase, fieldRootBase, fieldsetErrorBase, fieldsetHelperBase, fieldsetLegendBase, fieldsetRootBase, figureCaptionBase, figureImageBase, figureRootBase, findEditorScrollContainer, formatTime, hstackBase, injectCodeBlockStyles, inputVariants, insertPastedUrlAsLink, itemVariants, latexDisplayBase, latexErrorBase, latexInlineBase, latexRootBase, listboxContentBase, listboxEmptyBase, listboxInputBase, listboxItemBase, listboxItemIndicatorBase, listboxItemTextBase, listboxLabelBase, listboxRootBase, lockEditorOverlayScroll, manimCaptionBase, manimContainerBase, manimErrorBase, manimPlaceholderBase, manimPlaceholderLabelBase, manimRootBase, mermaidLoadingBase, mermaidRootBase, mermaidSourceBase, mermaidSvgAspectRatio, mermaidSvgBase, nativeSelectIconBase, nativeSelectVariants, nativeSelectWrapperBase, navbarActionsBase, navbarActivationAreaBase, navbarBrandBase, navbarContainerBase, navbarDensityVariants, navbarMenuBase, navbarMenuContentBase, navbarMenuIndicatorBase, navbarMenuItemBase, navbarMenuLinkBase, navbarMenuListBase, navbarMenuPlacementVariants, navbarMenuRootBase, navbarMenuTriggerStyle, navbarMenuViewportBase, navbarMenuViewportPositionerBase, navbarMobileActionsBase, navbarMobileBase, navbarMobileContentBase, navbarMobileHeaderBase, navbarMobileMenuBase, navbarMobileMenuContentBase, navbarMobileMenuTriggerBase, navbarShrunkBase, navbarTriggerVariants, navbarVariants, noticeDescriptionBase, noticeTitleBase, noticeVariants, numberInputControlBase, numberInputInputBase, numberInputRootBase, numberInputTriggerBase, pageContentBase, pageFooterBase, pageGutterAreaBase, pageGutterContentVariants, pageGutterVariants, pageSectionBase, pageVariants, paginationEllipsisBase, paginationItemBase, paginationRootBase, paginationTriggerBase, parseYouTubeChapters, placeEditorOverlay, placeEditorOverlayAt, popoverArrowBase, popoverCloseTriggerBase, popoverContentBase, popoverDescriptionBase, popoverIndicatorBase, popoverPositionerBase, popoverTitleBase, prevNextDirectionBase, prevNextLinkBase, prevNextLinkNextBase, prevNextRootBase, prevNextSpacerBase, prevNextTitleBase, proseVariants, questionCardBase, questionCheckButtonBase, questionGroupBase, questionInputBase, questionOptionBase, questionOptionCorrectBase, questionOptionIncorrectBase, questionPromptBase, questionUnitBase, quizHeaderBase, quizResetButtonBase, quizResultBase, quizResultTextBase, quizResultTitleBase, quizRootBase, quizScoreBase, quizSubmitButtonBase, quizTitleBase, radioGroupItemControlBase, radioGroupItemTextBase, radioGroupRootBase, registerImageInsertCallback, registerYouTubeInsertCallback, renderChartSvgString, renderCodeToHtml, renderMermaidSource, resolveMermaidThemeVariables, revealChevronBase, revealContentBase, revealRootBase, revealTriggerBase, rowBase, scrollContentBase, scrollCornerBase, scrollRootBase, scrollScrollbarBase, scrollThumbBase, scrollViewportBase, selectClearTriggerBase, selectContentBase, selectIndicatorBase, selectItemBase, selectItemGroupLabelBase, selectItemIndicatorBase, selectItemTextBase, selectPositionerBase, selectTriggerBase, selectValueBase, sidebarMenuButtonVariants, sidebarStyles, slashCommands, splitterPanelBase, splitterResizeTriggerBase, splitterResizeTriggerIndicatorBase, splitterResizeTriggerSeparatorBase, splitterRootBase, stackBase, switchControlBase, switchLabelBase, switchThumbBase, switchVariants, tabsContentBase, tabsIndicatorBase, tabsIndicatorVariants, tabsListBase, tabsListVariants, tabsRootBase, tabsTriggerBase, tagsInputClearTriggerBase, tagsInputControlBase, tagsInputInputBase, tagsInputItemBase, tagsInputItemDeleteTriggerBase, tagsInputItemInputBase, tagsInputItemTextBase, tagsInputRootBase, textareaBase, toLaTeX, toggleButtonVariants, toggleGroupRootVariants, tooltipArrowBase, tooltipContentBase, tooltipPositionerBase, unregisterImageInsertCallback, unregisterYouTubeInsertCallback, vstackBase, windowBodyBase, windowCloseTriggerBase, windowContentBase, windowControlBase, windowDragTriggerBase, windowHeaderBase, windowPositionerBase, windowResizeTriggerBase, windowStageTriggerBase, windowTitleBase, youtubeChapterButtonBase, youtubeChapterLabelBase, youtubeChapterTimeBase, youtubeChaptersBase, youtubeChaptersChevronBase, youtubeChaptersListBase, youtubeChaptersSummaryBase, youtubeDescriptionBase, youtubeFacadeBase, youtubePlayButtonBase, youtubePlayButtonInnerBase, youtubeRootBase, youtubeTitleBase };
package/dist/index.d.ts CHANGED
@@ -173,6 +173,8 @@ declare const SIDEBAR_WIDTH = "16rem";
173
173
  declare const SIDEBAR_WIDTH_MOBILE = "18rem";
174
174
  declare const SIDEBAR_WIDTH_ICON = "3rem";
175
175
  declare const SIDEBAR_KEYBOARD_SHORTCUT = "b";
176
+ declare const SIDEBAR_WIDGET_SNAP_POINTS: number[];
177
+ declare const SIDEBAR_WIDGET_DEFAULT_SNAP_POINT = 0.5;
176
178
  declare const sidebarMenuButtonVariants: (props?: ({
177
179
  variant?: "outline" | "default" | null | undefined;
178
180
  size?: "sm" | "lg" | "default" | null | undefined;
@@ -186,10 +188,16 @@ interface SidebarContextProps {
186
188
  setOpenMobile: (open: boolean) => void;
187
189
  isMobile: boolean;
188
190
  toggleSidebar: () => void;
191
+ isControlled: boolean;
189
192
  }
190
193
  declare const sidebarStyles: {
191
194
  readonly wrapperClass: "group/sidebar-wrapper min-h-svh w-full has-data-[variant=inset]:bg-sidebar";
192
195
  readonly containerClass: "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex";
196
+ readonly mobileBackdropClass: "fixed inset-0 bg-black/50 select-none data-[state=open]:animate-[helical-fade-in_200ms_ease-out] data-[state=closed]:animate-[helical-fade-out_200ms_ease-in]";
197
+ readonly mobilePositionerClass: "fixed inset-0 z-50 flex data-[swipe-direction=left]:justify-start data-[swipe-direction=left]:items-stretch data-[swipe-direction=down]:justify-center data-[swipe-direction=down]:items-end";
198
+ readonly mobileContentClass: "relative flex h-full w-full flex-col bg-sidebar p-0 text-sidebar-foreground shadow-xl data-[swipe-direction=left]:w-(--sidebar-width) data-[swipe-direction=down]:max-h-[96svh] data-[swipe-direction=left]:data-[state=open]:animate-[helical-drawer-in-left_200ms_ease-out] data-[swipe-direction=left]:data-[state=closed]:animate-[helical-drawer-out-left_200ms_ease-in] data-[swipe-direction=down]:rounded-t-2xl data-[swipe-direction=down]:data-[state=open]:animate-[helical-drawer-in-down_200ms_ease-out] data-[swipe-direction=down]:data-[state=closed]:animate-[helical-drawer-out-down_200ms_ease-in]";
199
+ readonly mobileGrabberClass: "flex w-full shrink-0 cursor-grab touch-none select-none items-center justify-center py-3 data-[dragging]:cursor-grabbing";
200
+ readonly mobileGrabberIndicatorClass: "h-1 w-10 shrink-0 rounded-full bg-sidebar-border";
193
201
  readonly gapClass: "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0";
194
202
  readonly innerClass: "flex h-full w-full flex-col bg-sidebar data-[variant=floating]:rounded-lg data-[variant=floating]:border data-[variant=floating]:border-sidebar-border data-[variant=floating]:shadow-sm";
195
203
  readonly headerClass: "gap-2 p-2";
@@ -962,4 +970,4 @@ declare module '@tiptap/core' {
962
970
  }
963
971
  declare const createNoticeNode: (nodeView?: NodeViewFactory) => Node<any, any>;
964
972
 
965
- export { type BadgeProps, type BadgeVariants, type BuildExtensionsOptions, type ButtonProps, type ButtonVariants, type CardCoverProps, type CardProps, type CardVariants, type ChartProps, type ChartSeries, type CheckboxProps, type CheckboxVariants, type CodeBlockProps, type ComboboxItemVariants, type ComboboxProps, type EditorCounts, EditorHeading, type EditorNodeViews, type EditorSeams, ExitHeading, type FigureProps, type FileEntry, HeadingWithId, type ImageUploadResult, type InputProps, type InputVariants, type ItemProps, type ItemVariants, type LaTeXProps, type LanguageTab, type LinkPreviewAttributes, type LinkPreviewFetcher, type ListboxItemData, type ManimModule, type ManimProps, type ManimRecordingScene, type MentionItem, type MentionListElement, type MermaidProps, type MultipleChoiceQuestionData, type NativeSelectVariants, type NavbarDensity, type NavbarMenuDensity, type NavbarMenuVariant, type NavbarVariant, type NodeViewFactory, type NoticeAttributes, type NoticeProps, type NoticeVariant, type NoticeVariants, type NumberInputProps, type NumericQuestionData, type OverlayPlacementOptions, type OverlayPosition, type PageGutterContentVariants, type PageGutterVariants, type PageVariants, type PrevNextProps, type ProseProps, type ProseVariants, type Question, type RevealProps, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, type SelectItemData, type SelectProps, type SidebarContextProps, type SidebarMenuButtonVariants, type SingleChoiceQuestionData, type SlashCommandItem, type SwitchProps, type SwitchVariants, THEMES, THEME_NAMES, type TabsIndicatorVariants, type TabsListVariants, type TagsInputProps, type TextareaProps, type ThemeMeta, TitleHeading, type ToggleButtonProps, type ToggleButtonVariants, type ToggleGroupProps, type ToggleGroupRootVariants, type UrlMentionAttributes, type YouTubeChapter, type YouTubeProps, badgeVariants, buildChartDefinition, buildExtensions, buttonVariants, cardBodyBase, cardCoverVariants, cardDescriptionBase, cardFooterBase, cardHeaderBase, cardTitleBase, cardVariants, centerBase, chartPlaceholderBase, chartPlaceholderLabelBase, chartRootBase, checkboxGroupBase, checkboxIndicatorBase, checkboxLabelBase, checkboxVariants, clipboardTriggerBase, cn, codeBlockBodyBase, codeBlockBodyScrollableBase, codeBlockContentBase, codeBlockCopyFloatBase, codeBlockHeaderBase, codeBlockHeaderInfoBase, codeBlockHighlightBase, codeBlockLineNumbersBase, codeBlockLoadingBase, codeBlockRootBase, codeBlockSpinnerBase, codeBlockTitleBase, colBase, comboboxClearTriggerBase, comboboxContentBase, comboboxControlBase, comboboxEmptyBase, comboboxInputBase, comboboxItemGroupLabelBase, comboboxItemIndicatorBase, comboboxItemVariants, comboboxListBase, comboboxPositionerBase, comboboxTriggerBase, containerBase, createCodeBlockCustom, createImageNode, createInternalMention, createLinkPreview, createNoticeNode, createUrlMention, defaultChartColor, defaultListboxFilter, dialogBackdropBase, dialogCloseTriggerBase, dialogContentBase, dialogDescriptionBase, dialogFooterBase, dialogFooterStickyBase, dialogFullscreenContentBase, dialogHeaderBase, dialogHeaderStickyBase, dialogPositionerBase, dialogTitleBase, extractYouTubeId, feedbackCorrectBase, feedbackExplanationBase, feedbackIncorrectBase, fetchYouTubeMetadata, fieldErrorBase, fieldHelperBase, fieldLabelBase, fieldRequiredIndicatorBase, fieldRootBase, fieldsetErrorBase, fieldsetHelperBase, fieldsetLegendBase, fieldsetRootBase, figureCaptionBase, figureImageBase, figureRootBase, findEditorScrollContainer, formatTime, hstackBase, injectCodeBlockStyles, inputVariants, insertPastedUrlAsLink, itemVariants, latexDisplayBase, latexErrorBase, latexInlineBase, latexRootBase, listboxContentBase, listboxEmptyBase, listboxInputBase, listboxItemBase, listboxItemIndicatorBase, listboxItemTextBase, listboxLabelBase, listboxRootBase, lockEditorOverlayScroll, manimCaptionBase, manimContainerBase, manimErrorBase, manimPlaceholderBase, manimPlaceholderLabelBase, manimRootBase, mermaidLoadingBase, mermaidRootBase, mermaidSourceBase, mermaidSvgAspectRatio, mermaidSvgBase, nativeSelectIconBase, nativeSelectVariants, nativeSelectWrapperBase, navbarActionsBase, navbarActivationAreaBase, navbarBrandBase, navbarContainerBase, navbarDensityVariants, navbarMenuBase, navbarMenuContentBase, navbarMenuIndicatorBase, navbarMenuItemBase, navbarMenuLinkBase, navbarMenuListBase, navbarMenuPlacementVariants, navbarMenuRootBase, navbarMenuTriggerStyle, navbarMenuViewportBase, navbarMenuViewportPositionerBase, navbarMobileActionsBase, navbarMobileBase, navbarMobileContentBase, navbarMobileHeaderBase, navbarMobileMenuBase, navbarMobileMenuContentBase, navbarMobileMenuTriggerBase, navbarShrunkBase, navbarTriggerVariants, navbarVariants, noticeDescriptionBase, noticeTitleBase, noticeVariants, numberInputControlBase, numberInputInputBase, numberInputRootBase, numberInputTriggerBase, pageContentBase, pageFooterBase, pageGutterAreaBase, pageGutterContentVariants, pageGutterVariants, pageSectionBase, pageVariants, paginationEllipsisBase, paginationItemBase, paginationRootBase, paginationTriggerBase, parseYouTubeChapters, placeEditorOverlay, placeEditorOverlayAt, popoverArrowBase, popoverCloseTriggerBase, popoverContentBase, popoverDescriptionBase, popoverIndicatorBase, popoverPositionerBase, popoverTitleBase, prevNextDirectionBase, prevNextLinkBase, prevNextLinkNextBase, prevNextRootBase, prevNextSpacerBase, prevNextTitleBase, proseVariants, questionCardBase, questionCheckButtonBase, questionGroupBase, questionInputBase, questionOptionBase, questionOptionCorrectBase, questionOptionIncorrectBase, questionPromptBase, questionUnitBase, quizHeaderBase, quizResetButtonBase, quizResultBase, quizResultTextBase, quizResultTitleBase, quizRootBase, quizScoreBase, quizSubmitButtonBase, quizTitleBase, radioGroupItemControlBase, radioGroupItemTextBase, radioGroupRootBase, registerImageInsertCallback, registerYouTubeInsertCallback, renderChartSvgString, renderCodeToHtml, renderMermaidSource, resolveMermaidThemeVariables, revealChevronBase, revealContentBase, revealRootBase, revealTriggerBase, rowBase, scrollContentBase, scrollCornerBase, scrollRootBase, scrollScrollbarBase, scrollThumbBase, scrollViewportBase, selectClearTriggerBase, selectContentBase, selectIndicatorBase, selectItemBase, selectItemGroupLabelBase, selectItemIndicatorBase, selectItemTextBase, selectPositionerBase, selectTriggerBase, selectValueBase, sidebarMenuButtonVariants, sidebarStyles, slashCommands, splitterPanelBase, splitterResizeTriggerBase, splitterResizeTriggerIndicatorBase, splitterResizeTriggerSeparatorBase, splitterRootBase, stackBase, switchControlBase, switchLabelBase, switchThumbBase, switchVariants, tabsContentBase, tabsIndicatorBase, tabsIndicatorVariants, tabsListBase, tabsListVariants, tabsRootBase, tabsTriggerBase, tagsInputClearTriggerBase, tagsInputControlBase, tagsInputInputBase, tagsInputItemBase, tagsInputItemDeleteTriggerBase, tagsInputItemInputBase, tagsInputItemTextBase, tagsInputRootBase, textareaBase, toLaTeX, toggleButtonVariants, toggleGroupRootVariants, tooltipArrowBase, tooltipContentBase, tooltipPositionerBase, unregisterImageInsertCallback, unregisterYouTubeInsertCallback, vstackBase, windowBodyBase, windowCloseTriggerBase, windowContentBase, windowControlBase, windowDragTriggerBase, windowHeaderBase, windowPositionerBase, windowResizeTriggerBase, windowStageTriggerBase, windowTitleBase, youtubeChapterButtonBase, youtubeChapterLabelBase, youtubeChapterTimeBase, youtubeChaptersBase, youtubeChaptersChevronBase, youtubeChaptersListBase, youtubeChaptersSummaryBase, youtubeDescriptionBase, youtubeFacadeBase, youtubePlayButtonBase, youtubePlayButtonInnerBase, youtubeRootBase, youtubeTitleBase };
973
+ export { type BadgeProps, type BadgeVariants, type BuildExtensionsOptions, type ButtonProps, type ButtonVariants, type CardCoverProps, type CardProps, type CardVariants, type ChartProps, type ChartSeries, type CheckboxProps, type CheckboxVariants, type CodeBlockProps, type ComboboxItemVariants, type ComboboxProps, type EditorCounts, EditorHeading, type EditorNodeViews, type EditorSeams, ExitHeading, type FigureProps, type FileEntry, HeadingWithId, type ImageUploadResult, type InputProps, type InputVariants, type ItemProps, type ItemVariants, type LaTeXProps, type LanguageTab, type LinkPreviewAttributes, type LinkPreviewFetcher, type ListboxItemData, type ManimModule, type ManimProps, type ManimRecordingScene, type MentionItem, type MentionListElement, type MermaidProps, type MultipleChoiceQuestionData, type NativeSelectVariants, type NavbarDensity, type NavbarMenuDensity, type NavbarMenuVariant, type NavbarVariant, type NodeViewFactory, type NoticeAttributes, type NoticeProps, type NoticeVariant, type NoticeVariants, type NumberInputProps, type NumericQuestionData, type OverlayPlacementOptions, type OverlayPosition, type PageGutterContentVariants, type PageGutterVariants, type PageVariants, type PrevNextProps, type ProseProps, type ProseVariants, type Question, type RevealProps, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDGET_DEFAULT_SNAP_POINT, SIDEBAR_WIDGET_SNAP_POINTS, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, type SelectItemData, type SelectProps, type SidebarContextProps, type SidebarMenuButtonVariants, type SingleChoiceQuestionData, type SlashCommandItem, type SwitchProps, type SwitchVariants, THEMES, THEME_NAMES, type TabsIndicatorVariants, type TabsListVariants, type TagsInputProps, type TextareaProps, type ThemeMeta, TitleHeading, type ToggleButtonProps, type ToggleButtonVariants, type ToggleGroupProps, type ToggleGroupRootVariants, type UrlMentionAttributes, type YouTubeChapter, type YouTubeProps, badgeVariants, buildChartDefinition, buildExtensions, buttonVariants, cardBodyBase, cardCoverVariants, cardDescriptionBase, cardFooterBase, cardHeaderBase, cardTitleBase, cardVariants, centerBase, chartPlaceholderBase, chartPlaceholderLabelBase, chartRootBase, checkboxGroupBase, checkboxIndicatorBase, checkboxLabelBase, checkboxVariants, clipboardTriggerBase, cn, codeBlockBodyBase, codeBlockBodyScrollableBase, codeBlockContentBase, codeBlockCopyFloatBase, codeBlockHeaderBase, codeBlockHeaderInfoBase, codeBlockHighlightBase, codeBlockLineNumbersBase, codeBlockLoadingBase, codeBlockRootBase, codeBlockSpinnerBase, codeBlockTitleBase, colBase, comboboxClearTriggerBase, comboboxContentBase, comboboxControlBase, comboboxEmptyBase, comboboxInputBase, comboboxItemGroupLabelBase, comboboxItemIndicatorBase, comboboxItemVariants, comboboxListBase, comboboxPositionerBase, comboboxTriggerBase, containerBase, createCodeBlockCustom, createImageNode, createInternalMention, createLinkPreview, createNoticeNode, createUrlMention, defaultChartColor, defaultListboxFilter, dialogBackdropBase, dialogCloseTriggerBase, dialogContentBase, dialogDescriptionBase, dialogFooterBase, dialogFooterStickyBase, dialogFullscreenContentBase, dialogHeaderBase, dialogHeaderStickyBase, dialogPositionerBase, dialogTitleBase, extractYouTubeId, feedbackCorrectBase, feedbackExplanationBase, feedbackIncorrectBase, fetchYouTubeMetadata, fieldErrorBase, fieldHelperBase, fieldLabelBase, fieldRequiredIndicatorBase, fieldRootBase, fieldsetErrorBase, fieldsetHelperBase, fieldsetLegendBase, fieldsetRootBase, figureCaptionBase, figureImageBase, figureRootBase, findEditorScrollContainer, formatTime, hstackBase, injectCodeBlockStyles, inputVariants, insertPastedUrlAsLink, itemVariants, latexDisplayBase, latexErrorBase, latexInlineBase, latexRootBase, listboxContentBase, listboxEmptyBase, listboxInputBase, listboxItemBase, listboxItemIndicatorBase, listboxItemTextBase, listboxLabelBase, listboxRootBase, lockEditorOverlayScroll, manimCaptionBase, manimContainerBase, manimErrorBase, manimPlaceholderBase, manimPlaceholderLabelBase, manimRootBase, mermaidLoadingBase, mermaidRootBase, mermaidSourceBase, mermaidSvgAspectRatio, mermaidSvgBase, nativeSelectIconBase, nativeSelectVariants, nativeSelectWrapperBase, navbarActionsBase, navbarActivationAreaBase, navbarBrandBase, navbarContainerBase, navbarDensityVariants, navbarMenuBase, navbarMenuContentBase, navbarMenuIndicatorBase, navbarMenuItemBase, navbarMenuLinkBase, navbarMenuListBase, navbarMenuPlacementVariants, navbarMenuRootBase, navbarMenuTriggerStyle, navbarMenuViewportBase, navbarMenuViewportPositionerBase, navbarMobileActionsBase, navbarMobileBase, navbarMobileContentBase, navbarMobileHeaderBase, navbarMobileMenuBase, navbarMobileMenuContentBase, navbarMobileMenuTriggerBase, navbarShrunkBase, navbarTriggerVariants, navbarVariants, noticeDescriptionBase, noticeTitleBase, noticeVariants, numberInputControlBase, numberInputInputBase, numberInputRootBase, numberInputTriggerBase, pageContentBase, pageFooterBase, pageGutterAreaBase, pageGutterContentVariants, pageGutterVariants, pageSectionBase, pageVariants, paginationEllipsisBase, paginationItemBase, paginationRootBase, paginationTriggerBase, parseYouTubeChapters, placeEditorOverlay, placeEditorOverlayAt, popoverArrowBase, popoverCloseTriggerBase, popoverContentBase, popoverDescriptionBase, popoverIndicatorBase, popoverPositionerBase, popoverTitleBase, prevNextDirectionBase, prevNextLinkBase, prevNextLinkNextBase, prevNextRootBase, prevNextSpacerBase, prevNextTitleBase, proseVariants, questionCardBase, questionCheckButtonBase, questionGroupBase, questionInputBase, questionOptionBase, questionOptionCorrectBase, questionOptionIncorrectBase, questionPromptBase, questionUnitBase, quizHeaderBase, quizResetButtonBase, quizResultBase, quizResultTextBase, quizResultTitleBase, quizRootBase, quizScoreBase, quizSubmitButtonBase, quizTitleBase, radioGroupItemControlBase, radioGroupItemTextBase, radioGroupRootBase, registerImageInsertCallback, registerYouTubeInsertCallback, renderChartSvgString, renderCodeToHtml, renderMermaidSource, resolveMermaidThemeVariables, revealChevronBase, revealContentBase, revealRootBase, revealTriggerBase, rowBase, scrollContentBase, scrollCornerBase, scrollRootBase, scrollScrollbarBase, scrollThumbBase, scrollViewportBase, selectClearTriggerBase, selectContentBase, selectIndicatorBase, selectItemBase, selectItemGroupLabelBase, selectItemIndicatorBase, selectItemTextBase, selectPositionerBase, selectTriggerBase, selectValueBase, sidebarMenuButtonVariants, sidebarStyles, slashCommands, splitterPanelBase, splitterResizeTriggerBase, splitterResizeTriggerIndicatorBase, splitterResizeTriggerSeparatorBase, splitterRootBase, stackBase, switchControlBase, switchLabelBase, switchThumbBase, switchVariants, tabsContentBase, tabsIndicatorBase, tabsIndicatorVariants, tabsListBase, tabsListVariants, tabsRootBase, tabsTriggerBase, tagsInputClearTriggerBase, tagsInputControlBase, tagsInputInputBase, tagsInputItemBase, tagsInputItemDeleteTriggerBase, tagsInputItemInputBase, tagsInputItemTextBase, tagsInputRootBase, textareaBase, toLaTeX, toggleButtonVariants, toggleGroupRootVariants, tooltipArrowBase, tooltipContentBase, tooltipPositionerBase, unregisterImageInsertCallback, unregisterYouTubeInsertCallback, vstackBase, windowBodyBase, windowCloseTriggerBase, windowContentBase, windowControlBase, windowDragTriggerBase, windowHeaderBase, windowPositionerBase, windowResizeTriggerBase, windowStageTriggerBase, windowTitleBase, youtubeChapterButtonBase, youtubeChapterLabelBase, youtubeChapterTimeBase, youtubeChaptersBase, youtubeChaptersChevronBase, youtubeChaptersListBase, youtubeChaptersSummaryBase, youtubeDescriptionBase, youtubeFacadeBase, youtubePlayButtonBase, youtubePlayButtonInnerBase, youtubeRootBase, youtubeTitleBase };
package/dist/index.js CHANGED
@@ -353,6 +353,8 @@ var SIDEBAR_WIDTH = "16rem";
353
353
  var SIDEBAR_WIDTH_MOBILE = "18rem";
354
354
  var SIDEBAR_WIDTH_ICON = "3rem";
355
355
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
356
+ var SIDEBAR_WIDGET_SNAP_POINTS = [0.35, 0.5];
357
+ var SIDEBAR_WIDGET_DEFAULT_SNAP_POINT = 0.5;
356
358
  var sidebarMenuButtonVariants = cva7(
357
359
  "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
358
360
  {
@@ -375,11 +377,12 @@ var sidebarMenuButtonVariants = cva7(
375
377
  );
376
378
  var sidebarStyles = {
377
379
  wrapperClass: "group/sidebar-wrapper min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
378
- // Base (static) classes for the desktop sidebar container. Side- and
379
- // variant-specific classes are applied inline in the framework wrappers via
380
- // ternaries, exactly as in the shadcn source. The `flex` direction bases are
381
- // provided by the Row/Col layout primitives at render time.
382
380
  containerClass: "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
381
+ mobileBackdropClass: "fixed inset-0 bg-black/50 select-none data-[state=open]:animate-[helical-fade-in_200ms_ease-out] data-[state=closed]:animate-[helical-fade-out_200ms_ease-in]",
382
+ mobilePositionerClass: "fixed inset-0 z-50 flex data-[swipe-direction=left]:justify-start data-[swipe-direction=left]:items-stretch data-[swipe-direction=down]:justify-center data-[swipe-direction=down]:items-end",
383
+ mobileContentClass: "relative flex h-full w-full flex-col bg-sidebar p-0 text-sidebar-foreground shadow-xl data-[swipe-direction=left]:w-(--sidebar-width) data-[swipe-direction=down]:max-h-[96svh] data-[swipe-direction=left]:data-[state=open]:animate-[helical-drawer-in-left_200ms_ease-out] data-[swipe-direction=left]:data-[state=closed]:animate-[helical-drawer-out-left_200ms_ease-in] data-[swipe-direction=down]:rounded-t-2xl data-[swipe-direction=down]:data-[state=open]:animate-[helical-drawer-in-down_200ms_ease-out] data-[swipe-direction=down]:data-[state=closed]:animate-[helical-drawer-out-down_200ms_ease-in]",
384
+ mobileGrabberClass: "flex w-full shrink-0 cursor-grab touch-none select-none items-center justify-center py-3 data-[dragging]:cursor-grabbing",
385
+ mobileGrabberIndicatorClass: "h-1 w-10 shrink-0 rounded-full bg-sidebar-border",
383
386
  gapClass: "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0",
384
387
  innerClass: "flex h-full w-full flex-col bg-sidebar data-[variant=floating]:rounded-lg data-[variant=floating]:border data-[variant=floating]:border-sidebar-border data-[variant=floating]:shadow-sm",
385
388
  headerClass: "gap-2 p-2",
@@ -2244,6 +2247,8 @@ export {
2244
2247
  ExitHeading,
2245
2248
  HeadingWithId,
2246
2249
  SIDEBAR_KEYBOARD_SHORTCUT,
2250
+ SIDEBAR_WIDGET_DEFAULT_SNAP_POINT,
2251
+ SIDEBAR_WIDGET_SNAP_POINTS,
2247
2252
  SIDEBAR_WIDTH,
2248
2253
  SIDEBAR_WIDTH_ICON,
2249
2254
  SIDEBAR_WIDTH_MOBILE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudvoyant/helical-ui",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "helical-ui shared component interfaces, cva variants, and theme",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -127,3 +127,52 @@
127
127
  :root.dark .ProseMirror [data-code-block] :is(.hljs-variable, .hljs-template-variable) {
128
128
  color: #ffa657;
129
129
  }
130
+
131
+ @keyframes helical-drawer-in-left {
132
+ from {
133
+ translate: -100% 0;
134
+ }
135
+ to {
136
+ translate: 0 0;
137
+ }
138
+ }
139
+ @keyframes helical-drawer-out-left {
140
+ from {
141
+ translate: 0 0;
142
+ }
143
+ to {
144
+ translate: -100% 0;
145
+ }
146
+ }
147
+ @keyframes helical-drawer-in-down {
148
+ from {
149
+ translate: 0 100%;
150
+ }
151
+ to {
152
+ translate: 0 0;
153
+ }
154
+ }
155
+ @keyframes helical-drawer-out-down {
156
+ from {
157
+ translate: 0 0;
158
+ }
159
+ to {
160
+ translate: 0 100%;
161
+ }
162
+ }
163
+ @keyframes helical-fade-in {
164
+ from {
165
+ opacity: 0;
166
+ }
167
+ to {
168
+ opacity: 1;
169
+ }
170
+ }
171
+ @keyframes helical-fade-out {
172
+ from {
173
+ opacity: 1;
174
+ }
175
+ to {
176
+ opacity: 0;
177
+ }
178
+ }