@stll/ui 0.9.0 → 0.9.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?: "xs" | "sm" | "icon" | "default" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "xl" | null | undefined;
14
- variant?: "destructive" | "outline" | "link" | "default" | "destructive-outline" | "ghost" | "secondary" | null | undefined;
13
+ size?: "xs" | "sm" | "icon" | "default" | "lg" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "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 };
@@ -8,7 +8,7 @@ import { Tabs } from "@base-ui/react/tabs";
8
8
  */
9
9
  declare const InspectorTabs: ({ className, ...props }: Omit<Tabs.Root.Props, "orientation">) => React$1.JSX.Element;
10
10
  declare const INSPECTOR_RAIL_MEDIA_QUERY: "(min-width: 48rem)";
11
- declare const resolveInspectorTabOrientation: (isRailLayout: boolean) => "horizontal" | "vertical";
11
+ declare const resolveInspectorTabOrientation: (isRailLayout: boolean) => "vertical" | "horizontal";
12
12
  declare const InspectorTabList: ({ className, ...props }: Tabs.List.Props) => React$1.JSX.Element;
13
13
  declare const InspectorTab: ({ className, ...props }: Tabs.Tab.Props) => React$1.JSX.Element;
14
14
  declare const InspectorTabPanel: ({ className, ...props }: Tabs.Panel.Props) => React$1.JSX.Element;
@@ -25,9 +25,9 @@ type KanbanGroup = {
25
25
  * built-in grouping is a data declaration rather than a branch this module has
26
26
  * to know about.
27
27
  */
28
- type KanbanBuiltInGroup<TRow> = {
28
+ type KanbanBuiltInGroup<TRow, TGroupId extends string = string> = {
29
29
  /** Reserved group id, distinct from any property id. */
30
- id: string;
30
+ id: TGroupId;
31
31
  /** Ordered columns, without the uncategorized bucket. */
32
32
  options: readonly KanbanGroupOption[];
33
33
  /**
@@ -43,43 +43,43 @@ type KanbanBuiltInGroup<TRow> = {
43
43
  * which keeps the decision — and the property model it depends on — with the
44
44
  * caller.
45
45
  */
46
- type KanbanSchema<TRow, TProperty> = {
47
- builtInGroups: readonly KanbanBuiltInGroup<TRow>[];
46
+ type KanbanSchema<TRow, TProperty, TGroupId extends string = string> = {
47
+ builtInGroups: readonly KanbanBuiltInGroup<TRow, TGroupId>[];
48
48
  properties: readonly TProperty[];
49
- getPropertyId: (property: TProperty) => string;
49
+ getPropertyId: (property: TProperty) => TGroupId;
50
50
  getPropertyOptions: (property: TProperty) => readonly KanbanGroupOption[] | null;
51
51
  };
52
- type KanbanGrouping<TRow, TProperty> = {
52
+ type KanbanGrouping<TRow, TProperty, TGroupId extends string = string> = {
53
53
  type: "none";
54
54
  } | {
55
55
  type: "built-in";
56
- propertyId: string;
57
- group: KanbanBuiltInGroup<TRow>;
56
+ propertyId: TGroupId;
57
+ group: KanbanBuiltInGroup<TRow, TGroupId>;
58
58
  } | {
59
59
  type: "property";
60
- propertyId: string;
60
+ propertyId: TGroupId;
61
61
  property: TProperty;
62
62
  options: readonly KanbanGroupOption[];
63
63
  };
64
- type ResolveKanbanGroupingParams<TRow, TProperty> = {
64
+ type ResolveKanbanGroupingParams<TRow, TProperty, TGroupId extends string = string> = {
65
65
  /** The group-by id the view carries; empty means no grouping. */
66
- groupBy: string;
67
- schema: KanbanSchema<TRow, TProperty>;
66
+ groupBy: TGroupId | "";
67
+ schema: KanbanSchema<TRow, TProperty, TGroupId>;
68
68
  };
69
69
  /** Resolve a stored group-by id against a schema. */
70
- declare const resolveKanbanGrouping: <TRow, TProperty>({ groupBy, schema }: ResolveKanbanGroupingParams<TRow, TProperty>) => KanbanGrouping<TRow, TProperty>;
71
- declare const getKanbanGroupingPropertyId: <TRow, TProperty>(grouping: KanbanGrouping<TRow, TProperty>) => string | null;
70
+ declare const resolveKanbanGrouping: <TRow, TProperty, TGroupId extends string = string>({ groupBy, schema }: ResolveKanbanGroupingParams<TRow, TProperty, TGroupId>) => KanbanGrouping<TRow, TProperty, TGroupId>;
71
+ declare const getKanbanGroupingPropertyId: <TRow, TProperty, TGroupId extends string = string>(grouping: KanbanGrouping<TRow, TProperty, TGroupId>) => TGroupId | null;
72
72
  /**
73
73
  * A grouping with no columns is not a board. A built-in grouping declares its
74
74
  * columns up front, so an empty declaration is the signal that the board cannot
75
75
  * be drawn; a property grouping always draws, even when the property has no
76
76
  * options yet, because rows still land in the uncategorized bucket.
77
77
  */
78
- declare const isKanbanGroupingRenderable: <TRow, TProperty>(grouping: KanbanGrouping<TRow, TProperty>) => boolean;
78
+ declare const isKanbanGroupingRenderable: <TRow, TProperty, TGroupId extends string = string>(grouping: KanbanGrouping<TRow, TProperty, TGroupId>) => boolean;
79
79
  /** The rows a grouping can place on the board, in their incoming order. */
80
- declare const selectKanbanRows: <TRow, TProperty>(rows: readonly TRow[], grouping: KanbanGrouping<TRow, TProperty>) => TRow[];
80
+ declare const selectKanbanRows: <TRow, TProperty, TGroupId extends string = string>(rows: readonly TRow[], grouping: KanbanGrouping<TRow, TProperty, TGroupId>) => TRow[];
81
81
  /** The static column options for a grouping, excluding uncategorized. */
82
- declare const resolveKanbanGroupOptions: <TRow, TProperty>(grouping: KanbanGrouping<TRow, TProperty>) => readonly KanbanGroupOption[];
82
+ declare const resolveKanbanGroupOptions: <TRow, TProperty, TGroupId extends string = string>(grouping: KanbanGrouping<TRow, TProperty, TGroupId>) => readonly KanbanGroupOption[];
83
83
  /** Append the uncategorized bucket (null value) after the options. */
84
84
  declare const getKanbanGroups: (options: readonly KanbanGroupOption[], uncategorizedLabel: string) => KanbanGroup[];
85
85
  //#endregion
@@ -32,18 +32,18 @@ type KanbanBoardMatrix<TRow> = {
32
32
  lanes: KanbanBoardLane[];
33
33
  rows: TRow[];
34
34
  };
35
- type ResolveKanbanGroupValueParams<TRow, TProperty> = {
36
- grouping: KanbanGrouping<TRow, TProperty>;
35
+ type ResolveKanbanGroupValueParams<TRow, TProperty, TGroupId extends string = string> = {
36
+ grouping: KanbanGrouping<TRow, TProperty, TGroupId>;
37
37
  row: TRow;
38
38
  };
39
- type BuildKanbanBoardMatrixParams<TRow, TProperty> = {
39
+ type BuildKanbanBoardMatrixParams<TRow, TProperty, TGroupId extends string = string> = {
40
40
  /** The vertical board columns. This must be a renderable grouping. */
41
- group: KanbanGrouping<TRow, TProperty>;
41
+ group: KanbanGrouping<TRow, TProperty, TGroupId>;
42
42
  /** Optional horizontal swimlanes. `none` makes this a one-lane board. */
43
- subgroup: KanbanGrouping<TRow, TProperty>;
43
+ subgroup: KanbanGrouping<TRow, TProperty, TGroupId>;
44
44
  rows: readonly TRow[];
45
45
  uncategorizedLabel: string;
46
- resolveGroupValue: (params: ResolveKanbanGroupValueParams<TRow, TProperty>) => string | null;
46
+ resolveGroupValue: (params: ResolveKanbanGroupValueParams<TRow, TProperty, TGroupId>) => string | null;
47
47
  };
48
48
  type OrderKanbanCellsByColumnsParams<TRow> = {
49
49
  cells: readonly KanbanBoardCell<TRow>[];
@@ -57,22 +57,22 @@ declare const orderKanbanCellsByColumns: <TRow>({ cells, columns }: OrderKanbanC
57
57
  * A subgroup never filters the primary board scope. A row outside a subgroup's
58
58
  * declared values goes to its explicit No value lane, rather than disappearing.
59
59
  */
60
- declare const buildKanbanBoardMatrix: <TRow, TProperty>({ group, subgroup, rows, uncategorizedLabel, resolveGroupValue }: BuildKanbanBoardMatrixParams<TRow, TProperty>) => KanbanBoardMatrix<TRow>;
61
- type KanbanDropAxisChange = {
62
- groupBy: string;
60
+ declare const buildKanbanBoardMatrix: <TRow, TProperty, TGroupId extends string = string>({ group, subgroup, rows, uncategorizedLabel, resolveGroupValue }: BuildKanbanBoardMatrixParams<TRow, TProperty, TGroupId>) => KanbanBoardMatrix<TRow>;
61
+ type KanbanDropAxisChange<TGroupId extends string = string> = {
62
+ groupBy: TGroupId;
63
63
  value: string | null;
64
64
  };
65
65
  /** A complete, atomic move request for a domain mutation adapter. */
66
- type KanbanDropIntent<TCardId> = {
66
+ type KanbanDropIntent<TCardId, TGroupId extends string = string> = {
67
67
  cardId: TCardId;
68
- changes: readonly KanbanDropAxisChange[];
68
+ changes: readonly KanbanDropAxisChange<TGroupId>[];
69
69
  type: "move";
70
70
  };
71
- type CreateKanbanDropIntentParams<TRow, TProperty, TCardId> = {
71
+ type CreateKanbanDropIntentParams<TRow, TProperty, TCardId, TGroupId extends string = string> = {
72
72
  cardId: TCardId;
73
- group: KanbanGrouping<TRow, TProperty>;
73
+ group: KanbanGrouping<TRow, TProperty, TGroupId>;
74
74
  source: KanbanBoardCoordinate;
75
- subgroup: KanbanGrouping<TRow, TProperty>;
75
+ subgroup: KanbanGrouping<TRow, TProperty, TGroupId>;
76
76
  target: KanbanBoardCoordinate;
77
77
  };
78
78
  /**
@@ -80,6 +80,6 @@ type CreateKanbanDropIntentParams<TRow, TProperty, TCardId> = {
80
80
  * Diagonal drops carry both changes together; an adapter must commit this
81
81
  * intent atomically or reject it as a whole.
82
82
  */
83
- declare const createKanbanDropIntent: <TRow, TProperty, TCardId>({ cardId, group, source, subgroup, target }: CreateKanbanDropIntentParams<TRow, TProperty, TCardId>) => KanbanDropIntent<TCardId> | null;
83
+ declare const createKanbanDropIntent: <TRow, TProperty, TCardId, TGroupId extends string = string>({ cardId, group, source, subgroup, target }: CreateKanbanDropIntentParams<TRow, TProperty, TCardId, TGroupId>) => KanbanDropIntent<TCardId, TGroupId> | null;
84
84
  //#endregion
85
85
  export { BuildKanbanBoardMatrixParams, CreateKanbanDropIntentParams, KANBAN_BOARD_AXES, KanbanBoardAxis, KanbanBoardCell, KanbanBoardCoordinate, KanbanBoardLane, KanbanBoardMatrix, KanbanDropAxisChange, KanbanDropIntent, OrderKanbanCellsByColumnsParams, ResolveKanbanGroupValueParams, buildKanbanBoardMatrix, createKanbanDropIntent, orderKanbanCellsByColumns };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.9.0",
3
+ "version": "0.9.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",