@stll/ui 0.25.0 → 0.25.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.
@@ -10,8 +10,8 @@
10
10
  */
11
11
  declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
12
12
  declare const buttonVariants: (props?: ({
13
- size?: "default" | "chip" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "sm" | "xl" | "xs" | null | undefined;
14
- variant?: "link" | "default" | "destructive" | "destructive-outline" | "ghost" | "outline" | "secondary" | null | undefined;
13
+ size?: "xs" | "sm" | "icon" | "default" | "chip" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "xl" | null | undefined;
14
+ variant?: "link" | "destructive" | "outline" | "default" | "destructive-outline" | "ghost" | "secondary" | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
16
  //#endregion
17
17
  export { buttonAccessibleDisabledClass, buttonVariants };
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
5
5
  //#region src/components/input-group.d.ts
6
6
  declare const InputGroup: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
7
7
  declare const inputGroupAddonVariants: (props?: ({
8
- align?: "inline-end" | "inline-start" | "block-start" | "block-end" | null | undefined;
8
+ align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  declare const InputGroupAddon: ({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) => React$1.JSX.Element;
11
11
  declare const InputGroupText: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
@@ -30,7 +30,7 @@ declare function useSidebar(): SidebarContextProps;
30
30
  * left for the content column. Mobile reports 0: there the sidebar is an
31
31
  * overlay sheet and occupies no layout width.
32
32
  */
33
- declare function useSidebarInlineSize(): 0 | 256 | 48;
33
+ declare function useSidebarInlineSize(): 0 | 48 | 256;
34
34
  declare const SidebarProvider: ({ defaultOpen, forceCollapsed, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
35
35
  defaultOpen?: boolean;
36
36
  forceCollapsed?: boolean;
@@ -82,8 +82,8 @@ declare const SidebarGroupContent: ({ className, ...props }: React.ComponentProp
82
82
  declare const SidebarMenu: ({ className, ...props }: React.ComponentProps<"ul">) => import("react").JSX.Element;
83
83
  declare const SidebarMenuItem: ({ className, ...props }: React.ComponentProps<"li">) => import("react").JSX.Element;
84
84
  declare const sidebarMenuButtonVariants: (props?: ({
85
- variant?: "default" | "outline" | null | undefined;
86
- size?: "default" | "lg" | "sm" | "rail" | null | undefined;
85
+ variant?: "outline" | "default" | null | undefined;
86
+ size?: "sm" | "default" | "lg" | "rail" | null | undefined;
87
87
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
88
88
  declare const SidebarMenuButton: ({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
89
89
  asChild?: boolean;
@@ -45,7 +45,7 @@ const InspectorRailCell = ({ className, ...props }) => /* @__PURE__ */ jsx("div"
45
45
  });
46
46
  /** Scroll owner for rail tabs and other middle actions. */
47
47
  const InspectorRailContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
48
- className: cn("flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain", className),
48
+ className: cn("scrollbar-subtle flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain", className),
49
49
  "data-slot": "inspector-rail-content",
50
50
  ...props
51
51
  });
@@ -110,7 +110,7 @@ const InspectorActions = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
110
110
  * being navigable.
111
111
  */
112
112
  const InspectorContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
113
- className: cn("flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain", className),
113
+ className: cn("scrollbar-subtle flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-contain", className),
114
114
  "data-slot": "inspector-content",
115
115
  ...props
116
116
  });
@@ -1,4 +1,15 @@
1
+ import { panic } from "better-result";
1
2
  //#region src/kanban/grouping.ts
3
+ /**
4
+ * Kanban grouping: which columns a board has, and which rows may appear on it.
5
+ *
6
+ * The module never inspects a row. A caller describes its board with a
7
+ * `KanbanSchema`: the properties a board may group by, plus the built-in group
8
+ * resolvers for columns that do not come from a property (a status enum, a kind
9
+ * enum). The column list, the uncategorized bucket, and the row scope all
10
+ * derive from that description, so grouping has no opinion about what is being
11
+ * grouped.
12
+ */
2
13
  /** Resolve a stored group-by id against a schema. */
3
14
  const resolveKanbanGrouping = ({ groupBy, schema }) => {
4
15
  if (groupBy === "") return { type: "none" };
@@ -22,7 +33,7 @@ const getKanbanGroupingPropertyId = (grouping) => {
22
33
  case "none": return null;
23
34
  case "built-in":
24
35
  case "property": return grouping.propertyId;
25
- default: return grouping;
36
+ default: return panic(`Unhandled grouping: ${String(grouping)}`);
26
37
  }
27
38
  };
28
39
  /**
@@ -36,7 +47,7 @@ const isKanbanGroupingRenderable = (grouping) => {
36
47
  case "none": return false;
37
48
  case "built-in": return grouping.group.options.length > 0;
38
49
  case "property": return true;
39
- default: return grouping;
50
+ default: return panic(`Unhandled grouping: ${String(grouping)}`);
40
51
  }
41
52
  };
42
53
  /** The rows a grouping can place on the board, in their incoming order. */
@@ -45,7 +56,7 @@ const selectKanbanRows = (rows, grouping) => {
45
56
  case "none": return [];
46
57
  case "built-in": return grouping.group.selectRows ? grouping.group.selectRows(rows) : [...rows];
47
58
  case "property": return [...rows];
48
- default: return grouping;
59
+ default: return panic(`Unhandled grouping: ${String(grouping)}`);
49
60
  }
50
61
  };
51
62
  /** The static column options for a grouping, excluding uncategorized. */
@@ -54,7 +65,7 @@ const resolveKanbanGroupOptions = (grouping) => {
54
65
  case "none": return [];
55
66
  case "built-in": return grouping.group.options;
56
67
  case "property": return grouping.options;
57
- default: return grouping;
68
+ default: return panic(`Unhandled grouping: ${String(grouping)}`);
58
69
  }
59
70
  };
60
71
  /** Append the uncategorized bucket (null value) after the options. */
@@ -5,6 +5,6 @@ declare const CONTROL_SIZE: Readonly<{
5
5
  readonly lg: "lg";
6
6
  }>;
7
7
  type ControlSize = (typeof CONTROL_SIZE)[keyof typeof CONTROL_SIZE];
8
- declare const CONTROL_SIZES: readonly ("default" | "lg" | "sm")[];
8
+ declare const CONTROL_SIZES: readonly ("sm" | "default" | "lg")[];
9
9
  //#endregion
10
10
  export { CONTROL_SIZE, CONTROL_SIZES, type ControlSize };
@@ -2,6 +2,7 @@ import { cn } from "../lib/utils.js";
2
2
  import { Button } from "../components/button.js";
3
3
  import { CheckIcon, RotateCcwIcon, XIcon } from "lucide-react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { panic } from "better-result";
5
6
  //#region src/review/review-decision-actions.tsx
6
7
  /** Accept / reject / revert / reopen, in one shape, for every review surface. */
7
8
  const ReviewDecisionActions = ({ state, onAccept, onReject, onRevert, onReopen, size = "sm", acceptLabel, rejectLabel, revertLabel, reopenLabel, acceptTooltip, rejectTooltip, disabled = false, className }) => {
@@ -67,7 +68,7 @@ const renderControls = ({ acceptLabel, acceptTooltip, disabled, onAccept, onReje
67
68
  variant: "ghost",
68
69
  children: /* @__PURE__ */ jsx(RotateCcwIcon, {})
69
70
  })] });
70
- default: return null;
71
+ default: return panic(`Unhandled state: ${String(state)}`);
71
72
  }
72
73
  };
73
74
  //#endregion
@@ -1,5 +1,6 @@
1
1
  import { cn } from "../lib/utils.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
+ import { panic } from "better-result";
3
4
  //#region src/review/review-diff-text.tsx
4
5
  const TRACKED_DELETION_STYLE = {
5
6
  color: "color-mix(in oklch, var(--destructive) 35%, var(--muted-foreground))",
@@ -60,7 +61,7 @@ const ReviewDiffSegmentSpan = ({ segment }) => {
60
61
  case "equal": return /* @__PURE__ */ jsx("span", { children: segment.text });
61
62
  default:
62
63
  segment.type;
63
- return null;
64
+ return panic(`Unhandled type: ${String(segment.type)}`);
64
65
  }
65
66
  };
66
67
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Stella's design system: bidi-aware React primitives built on Base UI, the dockable inspector pane, and the Tailwind v4 theme they are styled with.",
5
5
  "keywords": [
6
6
  "base-ui",
@@ -604,7 +604,7 @@
604
604
  "@tanstack/react-virtual": "^3.14.10",
605
605
  "@types/react": "^19.2.17",
606
606
  "@types/react-dom": "^19.2.3",
607
- "bun-types": "1.4.1",
607
+ "bun-types": "1.4.2",
608
608
  "react": "^19.2.8",
609
609
  "react-dom": "^19.2.8",
610
610
  "tailwindcss": "4.3.3",