@nswds/app 1.29.0 → 1.30.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.d.cts CHANGED
@@ -1062,6 +1062,10 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
1062
1062
 
1063
1063
  declare function ViewToggle({ viewMode, setViewMode }: ViewToggleProps): react_jsx_runtime.JSX.Element;
1064
1064
 
1065
+ declare function useIsMobile(): boolean;
1066
+
1067
+ declare function useDisableToc(): void;
1068
+
1065
1069
  declare function cn(...inputs: ClassValue[]): string;
1066
1070
  declare function truncate(text: string, maxLength: number): string;
1067
1071
  declare function kebabCase(str: string): string;
@@ -1113,4 +1117,4 @@ declare const allPalettes: Palette[];
1113
1117
  declare const colors: ColorThemes;
1114
1118
  declare const colorThemes: ColorThemes;
1115
1119
 
1116
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useFormField, useToc };
1120
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useDisableToc, useFormField, useIsMobile, useToc };
package/dist/index.d.ts CHANGED
@@ -1062,6 +1062,10 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
1062
1062
 
1063
1063
  declare function ViewToggle({ viewMode, setViewMode }: ViewToggleProps): react_jsx_runtime.JSX.Element;
1064
1064
 
1065
+ declare function useIsMobile(): boolean;
1066
+
1067
+ declare function useDisableToc(): void;
1068
+
1065
1069
  declare function cn(...inputs: ClassValue[]): string;
1066
1070
  declare function truncate(text: string, maxLength: number): string;
1067
1071
  declare function kebabCase(str: string): string;
@@ -1113,4 +1117,4 @@ declare const allPalettes: Palette[];
1113
1117
  declare const colors: ColorThemes;
1114
1118
  declare const colorThemes: ColorThemes;
1115
1119
 
1116
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useFormField, useToc };
1120
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, type BaseCodeData, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, type BreadcrumbsProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, type CodeData, CodeDemo, type CodeDemoProps, CodeHighlight, type CodeHighlightProps, type CodeItem, type CodeVariant, Collapsible, CollapsibleContent, CollapsibleTrigger, type Color, ColorCard, type ColorCardProps, type ColorData, type ColorProperty, ColorSwatches, type ColorSwatchesProps, type ColorTheme, type ColorThemes, type ColorsDisplayProps, type ColourOutputProps, ColourScale, type ColourScaleProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataType, type DataTypeSelectProps, type DesignTokensShades, type DesignTokensTheme, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormStatus$1 as FormStatus, type FormStatusHook, type FormStore, type Format, FormatToggle, type FormatToggleProps, GenerateInterpolatedColors, Header, Heading, type HeadingNode, type HeadingTypeProps, type IFrameData, type IFrameMap, type IFrameOptions, type IFrameProps, type IconProps, Icons, Input, Label, type Language, type LayoutProps, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, type NavigationLink, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NavigationSection, type Output, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type Palette, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, type PrevNextLinksProps, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, type SidebarLinkProps, SidebarNavigation, type SimpleNode, type SingleCodeData, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, type StructuredColor, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsItem, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, type TextTypeProps, Textarea, type ThemeCategory, ThemeColorPalette, type ThemeMessage, type ThemeOption, ThemeProvider, ThemeSelector, type ThemeSelectorDropDownProps, type ThemeSelectorProps, ThemeSwitcher, Toaster, TocContext, type TocContextType, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, type TypeExampleProps, type TypeSpecs, type Variant, type VariantCodeData, type Variants, type View, type ViewMode, ViewToggle, type ViewToggleProps, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, type colorCategories, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useDisableToc, useFormField, useIsMobile, useToc };
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
7
7
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
8
8
  import * as Headless from '@headlessui/react';
9
9
  import * as React6 from 'react';
10
- import React6__default, { forwardRef, useEffect, createContext, useRef, useState, useMemo, useCallback, useContext } from 'react';
10
+ import React6__default, { forwardRef, useEffect, createContext, useRef, useState, useMemo, useCallback, useContext, useLayoutEffect } from 'react';
11
11
  import Link9 from 'next/link';
12
12
  import * as culori from 'culori';
13
13
  import { Slot } from '@radix-ui/react-slot';
@@ -9341,14 +9341,54 @@ var TocContext = createContext({
9341
9341
  function TocProvider({ children }) {
9342
9342
  const [toc, setToc] = useState(true);
9343
9343
  const pathname = usePathname();
9344
+ const isInitialMount = useRef(true);
9345
+ const tocExplicitlySet = useRef(false);
9344
9346
  useEffect(() => {
9347
+ if (isInitialMount.current) {
9348
+ isInitialMount.current = false;
9349
+ return;
9350
+ }
9351
+ tocExplicitlySet.current = false;
9345
9352
  setToc(true);
9346
9353
  }, [pathname]);
9347
- return /* @__PURE__ */ jsx(TocContext.Provider, { value: { toc, setToc }, children });
9354
+ const handleSetToc = (value) => {
9355
+ tocExplicitlySet.current = true;
9356
+ setToc(value);
9357
+ };
9358
+ return /* @__PURE__ */ jsx(TocContext.Provider, { value: { toc, setToc: handleSetToc }, children });
9348
9359
  }
9349
9360
  function useToc() {
9350
9361
  return useContext(TocContext);
9351
9362
  }
9363
+ var MOBILE_BREAKPOINT = 768;
9364
+ function useIsMobile() {
9365
+ const [isMobile, setIsMobile] = React6.useState(void 0);
9366
+ React6.useEffect(() => {
9367
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
9368
+ const onChange = () => {
9369
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
9370
+ };
9371
+ mql.addEventListener("change", onChange);
9372
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
9373
+ return () => mql.removeEventListener("change", onChange);
9374
+ }, []);
9375
+ return !!isMobile;
9376
+ }
9377
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
9378
+ function useDisableToc() {
9379
+ const { setToc } = useToc();
9380
+ useIsomorphicLayoutEffect(() => {
9381
+ setToc(false);
9382
+ }, [setToc]);
9383
+ useEffect(() => {
9384
+ const raf = requestAnimationFrame(() => {
9385
+ setToc(false);
9386
+ });
9387
+ return () => {
9388
+ cancelAnimationFrame(raf);
9389
+ };
9390
+ }, [setToc]);
9391
+ }
9352
9392
  function getNodeText(node) {
9353
9393
  let text = "";
9354
9394
  for (const child of node.children ?? []) {
@@ -9461,6 +9501,6 @@ var languages = [
9461
9501
  "html"
9462
9502
  ];
9463
9503
 
9464
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button2 as Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, CodeDemo, CodeHighlight, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorCard, ColorSwatches, ColourScale, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatToggle, GenerateInterpolatedColors, Header2 as Header, Heading, Icons, Input, Label3 as Label, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, SidebarNavigation, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, Tabs2 as Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, Textarea, ThemeColorPalette, ThemeProvider, ThemeSelector, ThemeSwitcher, Toaster, TocContext, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, ViewToggle, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useFormField, useToc };
9504
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeButton, BaseColorSwatches, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button2 as Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, CodeDemo, CodeHighlight, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorCard, ColorSwatches, ColourScale, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, DynamicFavicon, ExpandableSearch, ExpandableSearchField, Footer, FooterAcknowledgement, FooterLegalLinks, FooterSmallPrint, FooterSocialLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatToggle, GenerateInterpolatedColors, Header2 as Header, Heading, Icons, Input, Label3 as Label, Link, _List as List, Logo, Masthead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navigation, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreWithCopy, PrevNextLinks, PrevNextLinksPageLink, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarLink, SidebarNavigation, SiteSearch, Skeleton, Slider, Social, Spinner, StepIndicator, StepNavigation, Strong, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, Tabs2 as Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, Textarea, ThemeColorPalette, ThemeProvider, ThemeSelector, ThemeSwitcher, Toaster, TocContext, TocProvider, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TouchTarget, ViewToggle, aboriginal, addStartStopToColorArray, allPalettes, badgeVariants, brand, buttonVariants, camelCase, cn, colorDataArray, colorThemes, colors, createColorArray, createColorData, createFormStore, darkenColor, domToSimple, generateColorThemes, getColorValue, getHeadings, getNodeText, getSurroundingColors, humaniseVariant, interpolateColors, isLightColor, kebabCase, languages, lightenColor, navigationMenuTriggerStyle, oklchConverter, renderColorOutput, renderColorOutputToDTFM, semantic, shades, themeIndices, themeTokens, toggleVariants, truncate, useDisableToc, useFormField, useIsMobile, useToc };
9465
9505
  //# sourceMappingURL=index.js.map
9466
9506
  //# sourceMappingURL=index.js.map