rockin 0.0.36 → 0.0.38

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/ui/image.js CHANGED
@@ -1,19 +1,77 @@
1
1
  "use client";
2
- import {
3
- JellyMini
4
- } from "../chunk-5GM3YR42.js";
5
2
  import {
6
3
  Skeleton
7
4
  } from "../chunk-3CZ2LLUN.js";
8
- import "../chunk-OSVLAX37.js";
9
- import "../chunk-G4NDAZTB.js";
10
- import "../chunk-DVNTJNDP.js";
11
5
 
12
6
  // src/ui/image.tsx
13
- import NextImage from "next/image";
14
- import { useCallback, useState } from "react";
15
7
  import { cn } from "cn";
8
+ import NextImage from "next/image";
9
+ import {
10
+ useCallback,
11
+ useState
12
+ } from "react";
16
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
+ function textHue(text) {
15
+ let hash = 2166136261;
16
+ for (const char of text) {
17
+ hash ^= char.codePointAt(0);
18
+ hash = Math.imul(hash, 16777619);
19
+ }
20
+ return (hash >>> 0) % 360;
21
+ }
22
+ function BrokenThumbnail({ className }) {
23
+ return /* @__PURE__ */ jsxs(
24
+ "svg",
25
+ {
26
+ viewBox: "0 0 48 48",
27
+ "aria-hidden": "true",
28
+ fill: "none",
29
+ stroke: "currentColor",
30
+ strokeWidth: "2",
31
+ strokeLinecap: "round",
32
+ strokeLinejoin: "round",
33
+ className,
34
+ children: [
35
+ /* @__PURE__ */ jsxs("g", { children: [
36
+ /* @__PURE__ */ jsx(
37
+ "path",
38
+ {
39
+ d: "M25 9H10a4 4 0 0 0-4 4v22a4 4 0 0 0 4 4h16l-4-9 5-7-6-6z",
40
+ fill: "currentColor",
41
+ fillOpacity: "0.1"
42
+ }
43
+ ),
44
+ /* @__PURE__ */ jsx("path", { d: "M6 33l8-8 7 7" })
45
+ ] }),
46
+ /* @__PURE__ */ jsxs("g", { transform: "translate(3 2) rotate(6 34 24)", children: [
47
+ /* @__PURE__ */ jsx(
48
+ "path",
49
+ {
50
+ d: "M25 9h13a4 4 0 0 1 4 4v22a4 4 0 0 1-4 4H26l-4-9 5-7-6-6z",
51
+ fill: "currentColor",
52
+ fillOpacity: "0.1"
53
+ }
54
+ ),
55
+ /* @__PURE__ */ jsx("circle", { cx: "34", cy: "17", r: "3" }),
56
+ /* @__PURE__ */ jsx("path", { d: "M25 35l6-7 11 8" })
57
+ ] })
58
+ ]
59
+ }
60
+ );
61
+ }
62
+ function ImagePlaceholder({ label }) {
63
+ const text = (label || "").trim();
64
+ return /* @__PURE__ */ jsx(
65
+ "div",
66
+ {
67
+ role: "img",
68
+ "aria-label": label ? `${label} (no image)` : "No image",
69
+ style: { "--ph-hue": text ? textHue(text) : 250 },
70
+ className: "flex size-full items-center justify-center bg-linear-135 from-(--ph-from) to-(--ph-to) text-(--ph-fg) [--ph-fg:oklch(0.55_0.12_var(--ph-hue))] [--ph-from:oklch(0.92_0.06_var(--ph-hue))] [--ph-to:oklch(0.97_0.025_calc(var(--ph-hue)+40))] dark:[--ph-fg:oklch(0.82_0.1_var(--ph-hue))] dark:[--ph-from:oklch(0.36_0.07_var(--ph-hue))] dark:[--ph-to:oklch(0.26_0.04_calc(var(--ph-hue)+40))]",
71
+ children: /* @__PURE__ */ jsx(BrokenThumbnail, { className: "aspect-square h-auto w-[34%] max-w-20 min-w-4" })
72
+ }
73
+ );
74
+ }
17
75
  function srcValue(src) {
18
76
  if (!src) return null;
19
77
  if (typeof src === "string") return src;
@@ -33,7 +91,7 @@ function Image({
33
91
  onLoad,
34
92
  onError,
35
93
  children,
36
- fallback = /* @__PURE__ */ jsx(JellyMini, { mood: "curious", className: "size-full p-[12%]" }),
94
+ fallback = /* @__PURE__ */ jsx(ImagePlaceholder, { label: alt }),
37
95
  ...props
38
96
  }) {
39
97
  const currentSrc = srcValue(src);
@@ -44,6 +44,10 @@ import { DndContextProps, UniqueIdentifier, DragEndEvent, DragOverlay } from '@d
44
44
  import { SortableContextProps } from '@dnd-kit/sortable';
45
45
  import * as SwipeActionsPrimitive from '@ncdai/react-swipe-actions';
46
46
  import { Switch as Switch$1 } from '@base-ui/react/switch';
47
+ import { OptionsOf, StateOf, SlotName, PropsOf } from '@ui-sdk/core';
48
+ import { tabs } from '@ui-sdk/core/tabs';
49
+ export { TabsController, TabsOrientation, TabsValueChangeReason, createTabsController } from '@ui-sdk/core/tabs';
50
+ import { PartProps } from '@ui-sdk/react/primitive';
47
51
  import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
48
52
 
49
53
  declare function Accordion({ className, ...props }: Accordion$1.Root.Props): React$1.JSX.Element;
@@ -663,7 +667,6 @@ type ImageProps = Omit<ImageProps$1, "children" | "placeholder" | "blurDataURL"
663
667
  wrapper?: string;
664
668
  showSkeleton?: boolean;
665
669
  children?: ReactNode;
666
- /** Content to render when no source is provided or the image fails to load. */
667
670
  fallback?: ReactNode;
668
671
  };
669
672
  declare function Image({ wrapper, showSkeleton, className, loading, fetchPriority, preload, quality, src, alt, onLoad, onError, children, fallback, ...props }: ImageProps): React$1.JSX.Element;
@@ -1032,8 +1035,37 @@ declare function Switch({ className, size, ...props }: Switch$1.Root.Props & {
1032
1035
  size?: "sm" | "default";
1033
1036
  }): React$1.JSX.Element;
1034
1037
 
1038
+ type TabsSlot = SlotName<typeof tabs>;
1039
+ declare const tabsVariants: (props?: ({
1040
+ variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
1041
+ size?: "default" | "xs" | "sm" | "lg" | null | undefined;
1042
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1043
+ type TabsStyleProps = {
1044
+ /** How the selected tab looks: `default`, `outline`, `secondary`, `ghost`, `destructive` or `link`. */
1045
+ variant?: VariantProps<typeof tabsVariants>["variant"];
1046
+ /** Tab height, padding and text: `xs`, `sm`, `default` or `lg`. */
1047
+ size?: VariantProps<typeof tabsVariants>["size"];
1048
+ };
1049
+ type TabsRootProps = OptionsOf<typeof tabs> & TabsStyleProps & Omit<PartProps<"div", StateOf<typeof tabs, "root">>, keyof OptionsOf<typeof tabs>>;
1050
+ type TabsPartProps<S extends TabsSlot, T extends "div" | "button" | "span"> = PropsOf<typeof tabs, S> & Omit<PartProps<T, StateOf<typeof tabs, S>>, keyof PropsOf<typeof tabs, S>>;
1051
+ declare function TabsRoot({ className, variant, size, ...props }: TabsRootProps): React$1.JSX.Element;
1052
+ declare function TabsList({ className, children, ...props }: TabsPartProps<"list", "div">): React$1.JSX.Element;
1053
+ declare function TabsTab({ className, children, ...props }: TabsPartProps<"tab", "button">): React$1.JSX.Element;
1054
+ declare function TabsIcon({ className, ...props }: TabsPartProps<"tab-icon", "span">): React$1.JSX.Element;
1055
+ declare function TabsPanel({ className, ...props }: TabsPartProps<"panel", "div">): React$1.JSX.Element;
1056
+ /** Use the named parts anywhere; `Tabs.List` and friends work in client components only. */
1057
+ declare const Tabs: typeof TabsRoot & {
1058
+ List: typeof TabsList;
1059
+ Tab: typeof TabsTab;
1060
+ Icon: typeof TabsIcon;
1061
+ Panel: typeof TabsPanel;
1062
+ };
1063
+
1035
1064
  declare function Textarea({ className, ...props }: React$1.ComponentProps<"textarea">): React$1.JSX.Element;
1036
1065
 
1066
+ type ThemeSwitcherProps = Omit<Parameters<typeof Tabs>[0], "value" | "defaultValue" | "onValueChange" | "children">;
1067
+ declare function ThemeSwitcher({ variant, ...props }: ThemeSwitcherProps): React$1.JSX.Element;
1068
+
1037
1069
  declare function ThemeToggle({ size, variant, className, }: {
1038
1070
  size?: "xs" | "sm" | "default" | "lg";
1039
1071
  variant?: VariantProps<typeof buttonVariants>["variant"];
@@ -1045,4 +1077,4 @@ declare function Tooltip({ ...props }: Tooltip$1.Root.Props): React$1.JSX.Elemen
1045
1077
  declare function TooltipTrigger({ ...props }: Tooltip$1.Trigger.Props): React$1.JSX.Element;
1046
1078
  declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React$1.JSX.Element;
1047
1079
 
1048
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedDiv, type AnimatedTAGProps, Apple, AppleHelloEffectEnglish, AppleHelloEffectHindi, AppleHelloEffectSpanish, Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BlogCardAnimation, Bottom, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CodeBlock, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CustomRendererProps, DEFAULT_I18N, DEFAULT_OPERATORS, DashedSeparator, DataTable, DataTableBody, DataTableCell, DataTableEmptyBody, DataTableHeader, DataTablePagination, DataTableRow, DataTableSearchFilter, DataTableSkeleton, DataTableToolbarSection, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dock, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EASE_DRAWER, EASE_IN_OUT, EASE_OUT, EASE_OUT_CSS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FadeContainer, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type Filter, type FilterFieldConfig, type FilterFieldGroup, type FilterFieldsConfig, type FilterGroup, type FilterI18nConfig, type FilterOperator, type FilterOption, type FilterOptionListRenderProps, Filters, FiltersContent, Image, type ImageProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, JellyAction, JellyBlob, JellyEmpty, type JellyEmptyProps, JellyGroup, JellyLink, JellyMascot, type JellyMascotConfig, JellyMini, type JellySize, Kbd, KbdGroup, Label, ListItemVariant, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeAppBridge, NumberStepper, OTPInput, type OTPInputProps, type OTPStatus, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, QuantityInput, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RollingNumber, SPRING_LAYOUT, SPRING_MOUSE, SPRING_PANEL, SPRING_PRESS, SPRING_SWAP, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShimmerSkeleton, type SkeletonProps as ShimmerSkeletonProps, Skeleton, SkeletonAvatar, SkeletonButton, type SkeletonProps, type SkeletonRounded, SkeletonText, type SkeletonVariant, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type SortableProps, SwipeAction, SwipeActions, SwipeContent, SwipeItem, SwipeRoot, type SwipeSide, type SwipeState, Switch, Textarea, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Top, activityItemAnimation, badgeVariants, buttonGroupVariants, buttonVariants, createFilter, createFilterGroup, fromLeftChildren, fromLeftVariant, fromRightVariant, fromTopVariant, getSkeletonVariantDuration, hamFastFadeContainer, headingFromLeft, kanbanOrderCardAnimation, kanbanOrderCardLayoutTransition, kanbanOrderCardReducedMotionAnimation, mobileNavItemSideways, opacityVariant, popUp, popUpFromBottomForText, resolveSkeletonA11yProps, searchBarSlideAnimation, skeletonRoundedClasses, skeletonVariantDefaultDuration, svgVariant, useAutocompleteFilter, useCarousel, useComboboxAnchor, useJellyMood };
1080
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedDiv, type AnimatedTAGProps, Apple, AppleHelloEffectEnglish, AppleHelloEffectHindi, AppleHelloEffectSpanish, Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BlogCardAnimation, Bottom, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CodeBlock, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CustomRendererProps, DEFAULT_I18N, DEFAULT_OPERATORS, DashedSeparator, DataTable, DataTableBody, DataTableCell, DataTableEmptyBody, DataTableHeader, DataTablePagination, DataTableRow, DataTableSearchFilter, DataTableSkeleton, DataTableToolbarSection, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dock, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EASE_DRAWER, EASE_IN_OUT, EASE_OUT, EASE_OUT_CSS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FadeContainer, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type Filter, type FilterFieldConfig, type FilterFieldGroup, type FilterFieldsConfig, type FilterGroup, type FilterI18nConfig, type FilterOperator, type FilterOption, type FilterOptionListRenderProps, Filters, FiltersContent, Image, type ImageProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, JellyAction, JellyBlob, JellyEmpty, type JellyEmptyProps, JellyGroup, JellyLink, JellyMascot, type JellyMascotConfig, JellyMini, type JellySize, Kbd, KbdGroup, Label, ListItemVariant, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeAppBridge, NumberStepper, OTPInput, type OTPInputProps, type OTPStatus, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, QuantityInput, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RollingNumber, SPRING_LAYOUT, SPRING_MOUSE, SPRING_PANEL, SPRING_PRESS, SPRING_SWAP, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShimmerSkeleton, type SkeletonProps as ShimmerSkeletonProps, Skeleton, SkeletonAvatar, SkeletonButton, type SkeletonProps, type SkeletonRounded, SkeletonText, type SkeletonVariant, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type SortableProps, SwipeAction, SwipeActions, SwipeContent, SwipeItem, SwipeRoot, type SwipeSide, type SwipeState, Switch, Tabs, TabsIcon, TabsList, TabsPanel, TabsTab, Textarea, ThemeSwitcher, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Top, activityItemAnimation, badgeVariants, buttonGroupVariants, buttonVariants, createFilter, createFilterGroup, fromLeftChildren, fromLeftVariant, fromRightVariant, fromTopVariant, getSkeletonVariantDuration, hamFastFadeContainer, headingFromLeft, kanbanOrderCardAnimation, kanbanOrderCardLayoutTransition, kanbanOrderCardReducedMotionAnimation, mobileNavItemSideways, opacityVariant, popUp, popUpFromBottomForText, resolveSkeletonA11yProps, searchBarSlideAnimation, skeletonRoundedClasses, skeletonVariantDefaultDuration, svgVariant, tabsVariants, useAutocompleteFilter, useCarousel, useComboboxAnchor, useJellyMood };
package/dist/ui/index.js CHANGED
@@ -17,8 +17,8 @@ export { CodeBlock } from "./code-block.js"
17
17
  export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor } from "./combobox.js"
18
18
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, useCommandState } from "./command.js"
19
19
  export { DashedSeparator } from "./dashed.js"
20
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.js"
21
20
  export { DataGrid, DataGridCell, DataGridClipboard, DataGridColumn, DataGridFillHandle, DataGridMove, DataGridRow, DataTable, DataTableBody, DataTableCell, DataTableColumnResize, DataTableEmptyBody, DataTableHeader, DataTablePagination, DataTableRoot, DataTableRow, DataTableSearchFilter, DataTableSkeleton, DataTableToolbarSection, GridAsyncComboboxCell, GridComboboxCell, GridNumberCell, GridTextCell } from "./data-table/index.js"
21
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.js"
22
22
  export { Dock } from "./dock.js"
23
23
  export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger } from "./drawer.js"
24
24
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js"
@@ -52,6 +52,8 @@ export { Toaster } from "./sonner.js"
52
52
  export { Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay } from "./sortable.js"
53
53
  export { SwipeAction, SwipeActions, SwipeContent, SwipeItem, SwipeRoot } from "./swipe-actions.js"
54
54
  export { Switch } from "./switch.js"
55
+ export { Tabs, TabsIcon, TabsList, TabsPanel, TabsTab, createTabsController, tabsVariants } from "./tabs.js"
55
56
  export { Textarea } from "./textarea.js"
57
+ export { ThemeSwitcher } from "./theme-switcher.js"
56
58
  export { ThemeToggle } from "./theme-toggle.js"
57
59
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js"
package/dist/ui/jelly.js CHANGED
@@ -1,25 +1,223 @@
1
1
  "use client";
2
+ import {
3
+ Empty,
4
+ EmptyContent,
5
+ EmptyDescription,
6
+ EmptyHeader,
7
+ EmptyTitle
8
+ } from "../chunk-OSVLAX37.js";
9
+ import {
10
+ useMounted
11
+ } from "../chunk-G4NDAZTB.js";
12
+ import {
13
+ Button
14
+ } from "../chunk-DVNTJNDP.js";
15
+
16
+ // src/ui/jelly.tsx
2
17
  import {
3
18
  BlobSpeech,
4
- JellyAction,
5
- JellyBlob,
6
- JellyBlobMascot,
7
- JellyBlobMascotDemo,
8
- JellyEmpty,
9
- JellyGroup,
10
- JellyLink,
11
- JellyMascot,
12
- JellyMini,
13
- useJellyMood
14
- } from "../chunk-5GM3YR42.js";
15
- import "../chunk-OSVLAX37.js";
16
- import "../chunk-G4NDAZTB.js";
17
- import "../chunk-DVNTJNDP.js";
19
+ JellyBlobMascot
20
+ } from "feral-blob";
21
+ import * as React from "react";
22
+ import { cn } from "cn";
23
+ import {
24
+ BlobSpeech as BlobSpeech2,
25
+ JellyBlobMascot as JellyBlobMascot2,
26
+ JellyBlobMascotDemo
27
+ } from "feral-blob";
28
+ import { jsx, jsxs } from "react/jsx-runtime";
29
+ function JellyBlob({ ...props }) {
30
+ return /* @__PURE__ */ jsx("span", { className: "inline-block", children: /* @__PURE__ */ jsx(
31
+ JellyBlobMascot,
32
+ {
33
+ ...props,
34
+ className: cn("h-auto w-full", props.className)
35
+ }
36
+ ) });
37
+ }
38
+ var MOOD_GAZE = {
39
+ neutral: { x: 0, y: 8 },
40
+ happy: { x: 18, y: -6 },
41
+ sad: { x: 0, y: 14 },
42
+ angry: { x: 10, y: 2 },
43
+ hmm: { x: 10, y: -4 },
44
+ sideEye: { x: 30, y: 0 },
45
+ password: { x: -14, y: 16 },
46
+ curious: { x: 18, y: -8 },
47
+ surprised: { x: 0, y: -10 },
48
+ sleepy: { x: 0, y: 14 },
49
+ shy: { x: -12, y: 4 },
50
+ love: { x: 0, y: -4 },
51
+ wave: { x: 20, y: -8 }
52
+ };
53
+ function JellyMini({
54
+ mood = "neutral",
55
+ gaze,
56
+ className,
57
+ ...props
58
+ }) {
59
+ const { mounted } = useMounted();
60
+ return /* @__PURE__ */ jsx(
61
+ "span",
62
+ {
63
+ "aria-hidden": "true",
64
+ className: cn(
65
+ "inline-flex size-5 shrink-0 items-center justify-center select-none",
66
+ className
67
+ ),
68
+ children: mounted ? /* @__PURE__ */ jsx(
69
+ JellyBlobMascot,
70
+ {
71
+ ...props,
72
+ mood,
73
+ gaze: gaze ?? MOOD_GAZE[mood],
74
+ className: "h-auto w-full"
75
+ }
76
+ ) : null
77
+ }
78
+ );
79
+ }
80
+ var JellyMascotContext = React.createContext(null);
81
+ function useJellyMood() {
82
+ const state = React.useContext(JellyMascotContext);
83
+ return React.useCallback(
84
+ (mood) => {
85
+ if (!mood || !state) return {};
86
+ return {
87
+ onPointerEnter: () => state.setPreview(mood),
88
+ onFocus: () => state.setPreview(mood),
89
+ onPointerLeave: () => state.setPreview(null),
90
+ onBlur: () => state.setPreview(null)
91
+ };
92
+ },
93
+ [state]
94
+ );
95
+ }
96
+ function withPreviewHandlers(preview, props) {
97
+ const handlers = preview(props.mood);
98
+ return {
99
+ onPointerEnter: props.onPointerEnter ?? handlers.onPointerEnter,
100
+ onPointerLeave: props.onPointerLeave ?? handlers.onPointerLeave,
101
+ onFocus: props.onFocus ?? handlers.onFocus,
102
+ onBlur: props.onBlur ?? handlers.onBlur
103
+ };
104
+ }
105
+ function JellyAction({
106
+ mood,
107
+ ...props
108
+ }) {
109
+ const preview = useJellyMood();
110
+ return /* @__PURE__ */ jsx(Button, { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
111
+ }
112
+ function JellyLink({
113
+ mood,
114
+ ...props
115
+ }) {
116
+ const preview = useJellyMood();
117
+ return /* @__PURE__ */ jsx("a", { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
118
+ }
119
+ function JellyMascotProvider({
120
+ mood = "neutral",
121
+ speech,
122
+ children,
123
+ ...blobProps
124
+ }) {
125
+ const { mounted } = useMounted();
126
+ const [previewMood, setPreviewMood] = React.useState(
127
+ null
128
+ );
129
+ const activeMood = previewMood ?? mood;
130
+ const value = {
131
+ mood: activeMood,
132
+ speech,
133
+ nod: blobProps.nod ?? false,
134
+ gaze: blobProps.gaze ?? MOOD_GAZE[activeMood],
135
+ mounted,
136
+ blobProps,
137
+ setPreview: setPreviewMood
138
+ };
139
+ return /* @__PURE__ */ jsx(JellyMascotContext.Provider, { value, children });
140
+ }
141
+ var SIZE_WRAPPER = {
142
+ sm: "w-20",
143
+ md: "w-28",
144
+ lg: "w-48",
145
+ auto: "w-auto"
146
+ };
147
+ function JellyMascotFace({
148
+ size = "md",
149
+ className
150
+ }) {
151
+ const mascot = React.useContext(JellyMascotContext);
152
+ if (!mascot) return null;
153
+ return /* @__PURE__ */ jsxs(
154
+ "div",
155
+ {
156
+ "aria-hidden": "true",
157
+ className: cn(
158
+ "flex flex-col items-center select-none",
159
+ SIZE_WRAPPER[size],
160
+ className
161
+ ),
162
+ children: [
163
+ mascot.speech ? /* @__PURE__ */ jsx(
164
+ BlobSpeech,
165
+ {
166
+ mood: mascot.mood,
167
+ messages: { [mascot.mood]: mascot.speech }
168
+ }
169
+ ) : null,
170
+ mascot.mounted ? /* @__PURE__ */ jsx(
171
+ JellyBlobMascot,
172
+ {
173
+ ...mascot.blobProps,
174
+ mood: mascot.mood,
175
+ gaze: mascot.gaze,
176
+ nod: mascot.nod,
177
+ className: "h-auto w-full"
178
+ }
179
+ ) : null
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ function JellyMascot({
185
+ size = "md",
186
+ className,
187
+ ...config
188
+ }) {
189
+ const existing = React.useContext(JellyMascotContext);
190
+ if (existing) return /* @__PURE__ */ jsx(JellyMascotFace, { size, className });
191
+ return /* @__PURE__ */ jsx(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsx(JellyMascotFace, { size, className }) });
192
+ }
193
+ function JellyGroup({
194
+ children,
195
+ ...config
196
+ }) {
197
+ return /* @__PURE__ */ jsx(JellyMascotProvider, { ...config, children });
198
+ }
199
+ function JellyEmpty({
200
+ title,
201
+ description,
202
+ actions,
203
+ size = "lg",
204
+ className,
205
+ ...config
206
+ }) {
207
+ return /* @__PURE__ */ jsx(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsxs(Empty, { className: cn("gap-4", className), children: [
208
+ /* @__PURE__ */ jsxs(EmptyHeader, { className: "gap-2", children: [
209
+ /* @__PURE__ */ jsx(JellyMascotFace, { size }),
210
+ title ? /* @__PURE__ */ jsx(EmptyTitle, { className: "text-base font-semibold sm:text-lg", children: title }) : null,
211
+ description ? /* @__PURE__ */ jsx(EmptyDescription, { className: "max-w-sm", children: description }) : null
212
+ ] }),
213
+ actions ? /* @__PURE__ */ jsx(EmptyContent, { children: actions }) : null
214
+ ] }) });
215
+ }
18
216
  export {
19
- BlobSpeech,
217
+ BlobSpeech2 as BlobSpeech,
20
218
  JellyAction,
21
219
  JellyBlob,
22
- JellyBlobMascot,
220
+ JellyBlobMascot2 as JellyBlobMascot,
23
221
  JellyBlobMascotDemo,
24
222
  JellyEmpty,
25
223
  JellyGroup,
package/dist/ui/sonner.js CHANGED
@@ -1,8 +1,11 @@
1
1
  "use client";
2
+ import {
3
+ useTheme
4
+ } from "../chunk-G3RYS466.js";
5
+ import "../chunk-X56ZEDOW.js";
2
6
 
3
7
  // src/ui/sonner.tsx
4
8
  import { GooeyToaster } from "goey-toast";
5
- import { useTheme } from "next-themes";
6
9
  import { jsx } from "react/jsx-runtime";
7
10
  var Toaster = ({ closeButton = "top-left", ...props }) => {
8
11
  const { theme = "system" } = useTheme();
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import {
3
+ Tabs,
4
+ TabsIcon,
5
+ TabsList,
6
+ TabsPanel,
7
+ TabsTab,
8
+ createTabsController,
9
+ tabsVariants
10
+ } from "../chunk-6JS62NO4.js";
11
+ export {
12
+ Tabs,
13
+ TabsIcon,
14
+ TabsList,
15
+ TabsPanel,
16
+ TabsTab,
17
+ createTabsController,
18
+ tabsVariants
19
+ };
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import {
3
+ Tabs
4
+ } from "../chunk-6JS62NO4.js";
5
+ import {
6
+ useTheme
7
+ } from "../chunk-G3RYS466.js";
8
+ import "../chunk-X56ZEDOW.js";
9
+
10
+ // src/ui/theme-switcher.tsx
11
+ import { Display, Moon, Sun } from "@gravity-ui/icons";
12
+ import { cn } from "cn";
13
+ import { jsx } from "react/jsx-runtime";
14
+ var THEMES = [
15
+ { label: "Light", value: "light", icon: Sun, motion: "[[data-selected]_&]:rotate-180" },
16
+ { label: "System", value: "system", icon: Display, motion: "[[data-selected]_&]:scale-115" },
17
+ { label: "Dark", value: "dark", icon: Moon, motion: "[[data-selected]_&]:-rotate-25" }
18
+ ];
19
+ var iconMotion = "transition-[rotate,scale] duration-500 ease-[cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none";
20
+ function ThemeSwitcher({
21
+ variant = "ghost",
22
+ ...props
23
+ }) {
24
+ const { theme, setTheme } = useTheme();
25
+ return /* @__PURE__ */ jsx(
26
+ Tabs,
27
+ {
28
+ variant,
29
+ value: theme,
30
+ onValueChange: (value) => value && setTheme(value),
31
+ ...props,
32
+ children: /* @__PURE__ */ jsx(Tabs.List, { "aria-label": "Theme", className: "border", children: THEMES.map(({ label, value, icon: Icon, motion }) => /* @__PURE__ */ jsx(
33
+ Tabs.Tab,
34
+ {
35
+ value,
36
+ "aria-label": label,
37
+ className: "px-1.5",
38
+ children: /* @__PURE__ */ jsx(Tabs.Icon, { children: /* @__PURE__ */ jsx(Icon, { className: cn(iconMotion, motion) }) })
39
+ },
40
+ value
41
+ )) })
42
+ }
43
+ );
44
+ }
45
+ export {
46
+ ThemeSwitcher
47
+ };
@@ -2,11 +2,14 @@
2
2
  import {
3
3
  buttonVariants
4
4
  } from "../chunk-DVNTJNDP.js";
5
+ import {
6
+ useTheme
7
+ } from "../chunk-G3RYS466.js";
8
+ import "../chunk-X56ZEDOW.js";
5
9
 
6
10
  // src/ui/theme-toggle.tsx
7
11
  import { cn } from "cn";
8
12
  import { motion, useReducedMotion } from "motion/react";
9
- import { useTheme } from "next-themes";
10
13
  import { useId } from "react";
11
14
  import { jsx, jsxs } from "react/jsx-runtime";
12
15
  var MORPH = { type: "spring", visualDuration: 0.4, bounce: 0 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rockin",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "Reusable React UI components, hooks, icons, utilities, and styles for Rock Star projects.",
5
5
  "keywords": [
6
6
  "react",
@@ -54,6 +54,10 @@
54
54
  "types": "./dist/provider.d.ts",
55
55
  "import": "./dist/provider.js"
56
56
  },
57
+ "./layout": {
58
+ "types": "./dist/layout.d.ts",
59
+ "import": "./dist/layout.js"
60
+ },
57
61
  "./lucide": {
58
62
  "types": "./dist/lucide.d.ts",
59
63
  "import": "./dist/lucide.js"
@@ -124,6 +128,8 @@
124
128
  "@radix-ui/react-scroll-area": "^1.2.18",
125
129
  "@radix-ui/react-select": "^2.3.7",
126
130
  "@shadcn/react": "^0.3.0",
131
+ "@ui-sdk/core": "^0.1.0-beta.1",
132
+ "@ui-sdk/react": "^0.1.0-beta.1",
127
133
  "@visx/curve": "4.0.1-alpha.0",
128
134
  "@visx/event": "4.0.1-alpha.0",
129
135
  "@visx/gradient": "4.0.1-alpha.0",
@@ -146,6 +152,7 @@
146
152
  "nuqs": "^2.9.4",
147
153
  "openai": "^7.4.0",
148
154
  "qrcode": "^1.5.4",
155
+ "react-aria-components": "^1.22.1",
149
156
  "react-hotkeys-hook": "^5.3.3",
150
157
  "react-resizable-panels": "^4.13.3",
151
158
  "recharts": "^3.8.0",