@pawkit/ui 0.0.0-stage → 0.2.1

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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +28 -2
  3. package/dist/index.d.ts +26 -0
  4. package/dist/index.js +26 -0
  5. package/dist/lib/sounds.d.ts +5 -0
  6. package/dist/lib/sounds.js +94 -0
  7. package/dist/lib/utils.d.ts +2 -0
  8. package/dist/lib/utils.js +5 -0
  9. package/dist/ui/avatar.d.ts +17 -0
  10. package/dist/ui/avatar.js +30 -0
  11. package/dist/ui/button.d.ts +15 -0
  12. package/dist/ui/button.js +38 -0
  13. package/dist/ui/card.d.ts +6 -0
  14. package/dist/ui/card.js +14 -0
  15. package/dist/ui/command.d.ts +17 -0
  16. package/dist/ui/command.js +42 -0
  17. package/dist/ui/dialog.d.ts +14 -0
  18. package/dist/ui/dialog.js +25 -0
  19. package/dist/ui/dropzone.d.ts +14 -0
  20. package/dist/ui/dropzone.js +70 -0
  21. package/dist/ui/empty-state.d.ts +10 -0
  22. package/dist/ui/empty-state.js +12 -0
  23. package/dist/ui/fluid-hover.d.ts +15 -0
  24. package/dist/ui/fluid-hover.js +69 -0
  25. package/dist/ui/input.d.ts +8 -0
  26. package/dist/ui/input.js +15 -0
  27. package/dist/ui/juicy-button.d.ts +21 -0
  28. package/dist/ui/juicy-button.js +32 -0
  29. package/dist/ui/kbd.d.ts +3 -0
  30. package/dist/ui/kbd.js +7 -0
  31. package/dist/ui/list.d.ts +24 -0
  32. package/dist/ui/list.js +20 -0
  33. package/dist/ui/menu.d.ts +20 -0
  34. package/dist/ui/menu.js +42 -0
  35. package/dist/ui/pixel-pup.d.ts +88 -0
  36. package/dist/ui/pixel-pup.js +424 -0
  37. package/dist/ui/popover.d.ts +8 -0
  38. package/dist/ui/popover.js +12 -0
  39. package/dist/ui/segmented-control.d.ts +15 -0
  40. package/dist/ui/segmented-control.js +45 -0
  41. package/dist/ui/sheet.d.ts +12 -0
  42. package/dist/ui/sheet.js +16 -0
  43. package/dist/ui/slider.d.ts +5 -0
  44. package/dist/ui/slider.js +12 -0
  45. package/dist/ui/stepper.d.ts +14 -0
  46. package/dist/ui/stepper.js +55 -0
  47. package/dist/ui/switch.d.ts +5 -0
  48. package/dist/ui/switch.js +9 -0
  49. package/dist/ui/tabs.d.ts +10 -0
  50. package/dist/ui/tabs.js +43 -0
  51. package/dist/ui/toast.d.ts +22 -0
  52. package/dist/ui/toast.js +49 -0
  53. package/dist/ui/tooltip.d.ts +17 -0
  54. package/dist/ui/tooltip.js +16 -0
  55. package/dist/ui/tuner.d.ts +39 -0
  56. package/dist/ui/tuner.js +52 -0
  57. package/package.json +63 -5
  58. package/styles.css +279 -0
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ /**
6
+ * Fluid hover — one highlight glides between items instead of blinking at every gap.
7
+ * Wrap any list of interactive children; mark each with `data-fluid-item`.
8
+ */
9
+ function FluidHover({ className, children, orientation = "vertical", activeValue, ...props }) {
10
+ const root = React.useRef(null);
11
+ const [box, setBox] = React.useState(null);
12
+ const [visible, setVisible] = React.useState(false);
13
+ const instant = React.useRef(true);
14
+ const moveTo = React.useCallback((el) => {
15
+ const r = root.current;
16
+ if (!el || !r)
17
+ return false;
18
+ const a = r.getBoundingClientRect();
19
+ const b = el.getBoundingClientRect();
20
+ setBox({ x: b.left - a.left, y: b.top - a.top, w: b.width, h: b.height });
21
+ return true;
22
+ }, []);
23
+ const rest = React.useCallback(() => {
24
+ const el = activeValue
25
+ ? root.current?.querySelector(`[data-fluid-item][data-value="${activeValue}"]`)
26
+ : null;
27
+ if (el && moveTo(el))
28
+ setVisible(true);
29
+ else {
30
+ setVisible(false);
31
+ window.setTimeout(() => {
32
+ instant.current = true;
33
+ }, 350);
34
+ }
35
+ }, [activeValue, moveTo]);
36
+ React.useLayoutEffect(() => {
37
+ rest();
38
+ }, [rest]);
39
+ const onOver = (e) => {
40
+ const el = e.target.closest("[data-fluid-item]");
41
+ if (!el || !root.current?.contains(el))
42
+ return;
43
+ moveTo(el);
44
+ if (!visible) {
45
+ setVisible(true);
46
+ requestAnimationFrame(() => {
47
+ instant.current = false;
48
+ });
49
+ }
50
+ };
51
+ return (_jsxs("div", { ref: root, "data-slot": "fluid-hover", onPointerOver: onOver, onFocus: onOver, onPointerLeave: rest, onBlur: (e) => {
52
+ if (!root.current?.contains(e.relatedTarget))
53
+ rest();
54
+ }, className: cn("relative flex", orientation === "vertical" ? "flex-col" : "flex-row items-center", className), ...props, children: [_jsx("span", { "aria-hidden": true, className: cn("pointer-events-none absolute top-0 left-0 rounded-lg bg-fill", "transition-[opacity,translate,width,height] ease-spring", instant.current ? "duration-0" : "duration-350", visible ? "opacity-100" : "opacity-0"), style: box
55
+ ? { translate: `${box.x}px ${box.y}px`, width: box.w, height: box.h }
56
+ : { width: 0, height: 0 } }), children] }));
57
+ }
58
+ function FluidItem({ className, active, asChild, ...props }) {
59
+ const cls = cn("relative z-10 flex h-8 items-center gap-2 rounded-lg px-2.5 text-left text-[14px] outline-none transition-colors duration-150", active ? "font-medium text-fg" : "text-fg-2 hover:text-fg", className);
60
+ if (asChild && React.isValidElement(props.children)) {
61
+ return React.cloneElement(props.children, {
62
+ "data-fluid-item": "",
63
+ "data-value": props.value,
64
+ className: cn(cls, props.children.props.className),
65
+ });
66
+ }
67
+ return (_jsx("button", { type: "button", "data-fluid-item": "", "data-value": props.value, className: cls, ...props }));
68
+ }
69
+ export { FluidHover, FluidItem };
@@ -0,0 +1,8 @@
1
+ import type * as React from "react";
2
+ declare function Input({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
3
+ interface SearchFieldProps extends React.ComponentProps<"input"> {
4
+ /** Rendered on the right, e.g. <Kbd>⌘K</Kbd>. Hidden while typing. */
5
+ trailing?: React.ReactNode;
6
+ }
7
+ declare function SearchField({ className, trailing, ...props }: SearchFieldProps): React.JSX.Element;
8
+ export { Input, SearchField };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Search } from "lucide-react";
4
+ import { cn } from "../lib/utils.js";
5
+ const field = "h-9 w-full min-w-0 rounded-lg bg-fill px-3 text-sm text-fg outline-none placeholder:text-fg-3 " +
6
+ "transition-[background-color,box-shadow] duration-150 ease-pk hover:bg-fill-hover " +
7
+ "focus-visible:bg-surface focus-visible:shadow-[0_0_0_3px_var(--pk-accent-soft),0_0_0_1px_var(--pk-accent)] focus-visible:outline-none " +
8
+ "disabled:opacity-40 aria-invalid:shadow-[0_0_0_1px_var(--pk-danger)]";
9
+ function Input({ className, ...props }) {
10
+ return _jsx("input", { "data-slot": "input", className: cn(field, className), ...props });
11
+ }
12
+ function SearchField({ className, trailing, ...props }) {
13
+ return (_jsxs("label", { className: cn("group relative flex items-center", className), children: [_jsx("input", { type: "search", "data-slot": "search-field", className: cn(field, "peer pl-8 [&::-webkit-search-cancel-button]:hidden", trailing && "pr-12"), ...props }), _jsx(Search, { className: "pointer-events-none absolute left-2.5 size-4 text-fg-3 transition-colors peer-focus-visible:text-fg-2" }), trailing && (_jsx("span", { className: "pointer-events-none absolute inset-y-0 right-2 flex items-center transition-opacity duration-150 peer-[:not(:placeholder-shown)]:opacity-0", children: trailing }))] }));
14
+ }
15
+ export { Input, SearchField };
@@ -0,0 +1,21 @@
1
+ import type * as React from "react";
2
+ declare const COLORS: {
3
+ readonly green: readonly ["#5fd35a", "#3fb43c", "#2a8a2e"];
4
+ readonly blue: readonly ["#5aaeff", "#2f8cf0", "#1d63b8"];
5
+ readonly orange: readonly ["#ffb347", "#ff8f1f", "#c76110"];
6
+ readonly pink: readonly ["#ff8fc4", "#f2619f", "#b83a73"];
7
+ readonly purple: readonly ["#a98bff", "#7f5cf0", "#5638b8"];
8
+ readonly gray: readonly ["#f4f4f6", "#dcdce2", "#a9a9b3"];
9
+ };
10
+ interface JuicyButtonProps extends React.ComponentProps<"button"> {
11
+ color?: keyof typeof COLORS;
12
+ size?: "md" | "lg";
13
+ /** Plays a soft pop if PawKit sounds are enabled. */
14
+ sound?: boolean;
15
+ }
16
+ /**
17
+ * A game-UI button built from layers: a deep edge, a glossy body, a highlight stripe.
18
+ * Hover lifts it, press sinks it all the way down.
19
+ */
20
+ declare function JuicyButton({ color, size, sound, className, children, onPointerDown, style, ...props }: JuicyButtonProps): React.JSX.Element;
21
+ export { JuicyButton };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { playSound } from "../lib/sounds.js";
4
+ import { cn } from "../lib/utils.js";
5
+ const COLORS = {
6
+ green: ["#5fd35a", "#3fb43c", "#2a8a2e"],
7
+ blue: ["#5aaeff", "#2f8cf0", "#1d63b8"],
8
+ orange: ["#ffb347", "#ff8f1f", "#c76110"],
9
+ pink: ["#ff8fc4", "#f2619f", "#b83a73"],
10
+ purple: ["#a98bff", "#7f5cf0", "#5638b8"],
11
+ gray: ["#f4f4f6", "#dcdce2", "#a9a9b3"],
12
+ };
13
+ /**
14
+ * A game-UI button built from layers: a deep edge, a glossy body, a highlight stripe.
15
+ * Hover lifts it, press sinks it all the way down.
16
+ */
17
+ function JuicyButton({ color = "green", size = "md", sound = true, className, children, onPointerDown, style, ...props }) {
18
+ const [top, mid, edge] = COLORS[color];
19
+ const dark = color === "gray";
20
+ const depth = size === "lg" ? 6 : 5;
21
+ return (_jsxs("button", { type: "button", "data-slot": "juicy-button", onPointerDown: (e) => {
22
+ if (sound)
23
+ playSound("pop");
24
+ onPointerDown?.(e);
25
+ }, className: cn("group/jb relative inline-flex select-none rounded-[14px] outline-offset-4 disabled:pointer-events-none disabled:opacity-50", className), style: { paddingBottom: depth, ...style }, ...props, children: [_jsx("span", { "aria-hidden": true, className: "absolute inset-0 rounded-[14px]", style: { background: edge } }), _jsxs("span", { className: cn("relative flex items-center gap-2 rounded-[14px] font-extrabold tracking-wide", "transition-transform duration-150 ease-spring group-hover/jb:-translate-y-0.5 group-active/jb:translate-y-(--jb-depth) group-active/jb:duration-75", size === "lg" ? "h-14 px-7 text-[18px]" : "h-11 px-5 text-[15px]", "[&_svg]:size-5 [&_svg]:drop-shadow-[0_1px_0_rgb(0_0_0/.15)]"), style: {
26
+ background: `linear-gradient(${top}, ${mid})`,
27
+ color: dark ? "#3a3a44" : "#fff",
28
+ textShadow: dark ? "none" : `0 1.5px 0 ${edge}`,
29
+ "--jb-depth": `${depth}px`,
30
+ }, children: [_jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute top-[3px] right-2.5 left-2.5 h-[38%] rounded-t-[11px] rounded-b-[6px] bg-white/25" }), _jsx("span", { className: "relative flex items-center gap-2", children: children })] })] }));
31
+ }
32
+ export { JuicyButton };
@@ -0,0 +1,3 @@
1
+ import type * as React from "react";
2
+ declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): React.JSX.Element;
3
+ export { Kbd };
package/dist/ui/kbd.js ADDED
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ function Kbd({ className, ...props }) {
5
+ return (_jsx("kbd", { "data-slot": "kbd", className: cn("inline-flex h-5 min-w-5 select-none items-center justify-center gap-0.5 rounded-[5px] px-1", "bg-fill font-sans font-medium text-[11px] text-fg-2 shadow-[inset_0_-1px_0_var(--pk-hairline)]", className), ...props }));
6
+ }
7
+ export { Kbd };
@@ -0,0 +1,24 @@
1
+ import type * as React from "react";
2
+ /** iOS-style grouped list. Rows are separated by an inset hairline that starts after the icon. */
3
+ declare function List({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
4
+ declare function ListSection({ title, footer, className, children, }: {
5
+ title?: React.ReactNode;
6
+ footer?: React.ReactNode;
7
+ className?: string;
8
+ children: React.ReactNode;
9
+ }): React.JSX.Element;
10
+ interface ListItemProps extends Omit<React.ComponentProps<"button">, "title" | "value"> {
11
+ /** A small rounded tile, e.g. <ListIcon color="#0a7cff"><Mail/></ListIcon> */
12
+ icon?: React.ReactNode;
13
+ title: React.ReactNode;
14
+ /** Secondary value on the right, e.g. "Connected". */
15
+ value?: React.ReactNode;
16
+ /** Any control on the right (Switch…). Rows with an accessory are not buttons. */
17
+ accessory?: React.ReactNode;
18
+ chevron?: boolean;
19
+ }
20
+ declare function ListItem({ icon, title, value, accessory, chevron, className, ...props }: ListItemProps): React.JSX.Element;
21
+ declare function ListIcon({ color, className, ...props }: React.ComponentProps<"span"> & {
22
+ color?: string;
23
+ }): React.JSX.Element;
24
+ export { List, ListIcon, ListItem, ListSection };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ChevronRight } from "lucide-react";
4
+ import { cn } from "../lib/utils.js";
5
+ /** iOS-style grouped list. Rows are separated by an inset hairline that starts after the icon. */
6
+ function List({ className, ...props }) {
7
+ return (_jsx("div", { "data-slot": "list", className: cn("overflow-hidden rounded-xl bg-surface shadow-card", className), ...props }));
8
+ }
9
+ function ListSection({ title, footer, className, children, }) {
10
+ return (_jsxs("section", { className: cn("space-y-1.5", className), children: [title && _jsx("h4", { className: "px-4 font-medium text-[12px] text-fg-3", children: title }), _jsx(List, { children: children }), footer && _jsx("p", { className: "px-4 text-[12px] text-fg-3", children: footer })] }));
11
+ }
12
+ function ListItem({ icon, title, value, accessory, chevron = !accessory, className, ...props }) {
13
+ const inner = (_jsxs(_Fragment, { children: [icon, _jsxs("span", { className: "flex min-h-11 flex-1 items-center gap-2 py-2.5 pr-4 shadow-[inset_0_-0.5px_0_var(--pk-hairline)] group-last/item:shadow-none", children: [_jsx("span", { className: "flex-1 truncate text-left text-fg", children: title }), value && _jsx("span", { className: "text-fg-2", children: value }), accessory, chevron && _jsx(ChevronRight, { className: "-mr-1 size-4 text-fg-3" })] })] }));
14
+ const cls = cn("group/item flex w-full items-center gap-3 pl-4 text-[14px]", !accessory && "transition-colors duration-100 hover:bg-fill/60 active:bg-fill", className);
15
+ return accessory ? (_jsx("div", { "data-slot": "list-item", className: cls, children: inner })) : (_jsx("button", { type: "button", "data-slot": "list-item", className: cls, ...props, children: inner }));
16
+ }
17
+ function ListIcon({ color = "var(--pk-accent)", className, ...props }) {
18
+ return (_jsx("span", { className: cn("grid size-[26px] shrink-0 place-items-center rounded-[7px] text-white [&_svg]:size-[15px]", className), style: { background: color }, ...props }));
19
+ }
20
+ export { List, ListIcon, ListItem, ListSection };
@@ -0,0 +1,20 @@
1
+ import { DropdownMenu as MenuPrimitive } from "radix-ui";
2
+ import type * as React from "react";
3
+ declare const Menu: React.FC<MenuPrimitive.DropdownMenuProps>;
4
+ declare const MenuTrigger: React.ForwardRefExoticComponent<MenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const MenuGroup: React.ForwardRefExoticComponent<MenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const MenuSub: React.FC<MenuPrimitive.DropdownMenuSubProps>;
7
+ declare const MenuRadioGroup: React.ForwardRefExoticComponent<MenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
8
+ declare function MenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof MenuPrimitive.Content>): React.JSX.Element;
9
+ declare function MenuItem({ className, shortcut, destructive, children, ...props }: React.ComponentProps<typeof MenuPrimitive.Item> & {
10
+ shortcut?: React.ReactNode;
11
+ destructive?: boolean;
12
+ }): React.JSX.Element;
13
+ declare function MenuCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>): React.JSX.Element;
14
+ declare function MenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.RadioItem>): React.JSX.Element;
15
+ declare function MenuLabel({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Label>): React.JSX.Element;
16
+ /** Groups are separated by space and a hairline, never a heavy rule. */
17
+ declare function MenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>): React.JSX.Element;
18
+ declare function MenuSubTrigger({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.SubTrigger>): React.JSX.Element;
19
+ declare function MenuSubContent({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.SubContent>): React.JSX.Element;
20
+ export { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, };
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Check, ChevronRight } from "lucide-react";
4
+ import { DropdownMenu as MenuPrimitive } from "radix-ui";
5
+ import { cn } from "../lib/utils.js";
6
+ const Menu = MenuPrimitive.Root;
7
+ const MenuTrigger = MenuPrimitive.Trigger;
8
+ const MenuGroup = MenuPrimitive.Group;
9
+ const MenuSub = MenuPrimitive.Sub;
10
+ const MenuRadioGroup = MenuPrimitive.RadioGroup;
11
+ const panel = "z-50 min-w-48 rounded-xl bg-raised p-1 text-[14px] text-fg shadow-float outline-none " +
12
+ "origin-(--radix-dropdown-menu-content-transform-origin) " +
13
+ "data-[state=open]:animate-[pk-pop-in_220ms_var(--pk-spring)] data-[state=closed]:animate-pk-out";
14
+ const item = "relative flex h-8 cursor-default select-none items-center gap-2 rounded-lg px-2 outline-none " +
15
+ "transition-colors duration-75 data-[highlighted]:bg-fill data-[disabled]:opacity-40 " +
16
+ "[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-fg-2";
17
+ function MenuContent({ className, sideOffset = 6, ...props }) {
18
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Content, { "data-slot": "menu", sideOffset: sideOffset, className: cn(panel, className), ...props }) }));
19
+ }
20
+ function MenuItem({ className, shortcut, destructive, children, ...props }) {
21
+ return (_jsxs(MenuPrimitive.Item, { className: cn(item, destructive && "text-danger [&_svg]:text-danger", className), ...props, children: [children, shortcut && _jsx("span", { className: "ml-auto pl-4 text-[12px] text-fg-3", children: shortcut })] }));
22
+ }
23
+ function MenuCheckboxItem({ className, children, ...props }) {
24
+ return (_jsxs(MenuPrimitive.CheckboxItem, { className: cn(item, "pr-8", className), ...props, children: [children, _jsx(MenuPrimitive.ItemIndicator, { className: "absolute right-2", children: _jsx(Check, { className: "!text-accent" }) })] }));
25
+ }
26
+ function MenuRadioItem({ className, children, ...props }) {
27
+ return (_jsxs(MenuPrimitive.RadioItem, { className: cn(item, "pr-8", className), ...props, children: [children, _jsx(MenuPrimitive.ItemIndicator, { className: "absolute right-2", children: _jsx(Check, { className: "!text-accent" }) })] }));
28
+ }
29
+ function MenuLabel({ className, ...props }) {
30
+ return (_jsx(MenuPrimitive.Label, { className: cn("px-2 pt-1.5 pb-1 text-[12px] text-fg-3", className), ...props }));
31
+ }
32
+ /** Groups are separated by space and a hairline, never a heavy rule. */
33
+ function MenuSeparator({ className, ...props }) {
34
+ return (_jsx(MenuPrimitive.Separator, { className: cn("mx-2 my-1 h-px bg-hairline", className), ...props }));
35
+ }
36
+ function MenuSubTrigger({ className, children, ...props }) {
37
+ return (_jsxs(MenuPrimitive.SubTrigger, { className: cn(item, "data-[state=open]:bg-fill", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto" })] }));
38
+ }
39
+ function MenuSubContent({ className, ...props }) {
40
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.SubContent, { sideOffset: 6, className: cn(panel, className), ...props }) }));
41
+ }
42
+ export { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, };
@@ -0,0 +1,88 @@
1
+ import * as React from "react";
2
+ declare const DOG: {
3
+ sit: string[];
4
+ sitWag: string[];
5
+ stand: string[];
6
+ standWag: string[];
7
+ run: string[];
8
+ sleep: string[];
9
+ };
10
+ type Pose = keyof typeof DOG;
11
+ export type PupSpecies = "dog" | "cat";
12
+ export interface PupPalette {
13
+ body: string;
14
+ belly: string;
15
+ ear: string;
16
+ eye: string;
17
+ nose?: string;
18
+ }
19
+ /** Built-in coats. Pass a name, or your own PupPalette. */
20
+ export declare const PUP_PALETTES: {
21
+ shiba: {
22
+ body: string;
23
+ belly: string;
24
+ ear: string;
25
+ eye: string;
26
+ };
27
+ cream: {
28
+ body: string;
29
+ belly: string;
30
+ ear: string;
31
+ eye: string;
32
+ };
33
+ cocoa: {
34
+ body: string;
35
+ belly: string;
36
+ ear: string;
37
+ eye: string;
38
+ };
39
+ husky: {
40
+ body: string;
41
+ belly: string;
42
+ ear: string;
43
+ eye: string;
44
+ nose: string;
45
+ };
46
+ midnight: {
47
+ body: string;
48
+ belly: string;
49
+ ear: string;
50
+ eye: string;
51
+ nose: string;
52
+ };
53
+ ginger: {
54
+ body: string;
55
+ belly: string;
56
+ ear: string;
57
+ eye: string;
58
+ nose: string;
59
+ };
60
+ };
61
+ export type PupPaletteName = keyof typeof PUP_PALETTES;
62
+ /** A static sprite, e.g. for previews or avatars. */
63
+ declare function PupSprite({ species, palette, pose, size, }: {
64
+ species?: PupSpecies;
65
+ palette?: PupPaletteName | PupPalette;
66
+ pose?: Pose;
67
+ size?: number;
68
+ }): React.JSX.Element;
69
+ interface PixelPupProps {
70
+ /** Pixel scale. 3 → 48×33px. */
71
+ size?: number;
72
+ /** Chase the cursor instead of resting. Off by default — the pup is quiet. */
73
+ follow?: boolean;
74
+ species?: PupSpecies;
75
+ /** A preset name or your own colors. */
76
+ palette?: PupPaletteName | PupPalette;
77
+ /** What it says when petted. Defaults to 汪! / 喵~ */
78
+ bark?: string;
79
+ /** Milliseconds of quiet before it dozes off. */
80
+ sleepAfter?: number;
81
+ }
82
+ /**
83
+ * A quiet pixel dog. It rests in a corner, blinks, looks toward your cursor,
84
+ * stands up and wags when you come near, and dozes off when you leave.
85
+ * Click to pet. Drag to carry it anywhere — it remembers the spot.
86
+ */
87
+ declare function PixelPup({ size, follow, species, palette, bark, sleepAfter, }: PixelPupProps): React.JSX.Element | null;
88
+ export { PixelPup, PupSprite };