@stll/ui 0.5.2 → 0.7.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/README.md +71 -2
- package/dist/components/application-shell.d.ts +27 -0
- package/dist/components/application-shell.js +25 -0
- package/dist/components/button-variants.d.ts +2 -2
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/loader.d.ts +36 -0
- package/dist/components/loader.js +54 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +12 -1
- package/dist/inspector/chrome.d.ts +6 -1
- package/dist/inspector/chrome.js +8 -3
- package/dist/inspector/layout-tokens.d.ts +1 -2
- package/dist/inspector/layout-tokens.js +1 -2
- package/dist/kanban/index.d.ts +3 -1
- package/dist/kanban/index.js +3 -1
- package/dist/kanban/sortable-edge.d.ts +39 -0
- package/dist/kanban/sortable-edge.js +27 -0
- package/dist/kanban/sortable-interactions.d.ts +75 -0
- package/dist/kanban/sortable-interactions.js +210 -0
- package/dist/kanban/touch-identity.d.ts +8 -0
- package/dist/kanban/touch-identity.js +4 -0
- package/dist/lib/initials.d.ts +16 -0
- package/dist/lib/initials.js +27 -0
- package/dist/review/review-author-avatar.d.ts +23 -0
- package/dist/review/review-author-avatar.js +30 -0
- package/dist/review/review-comment-card.d.ts +33 -0
- package/dist/review/review-comment-card.js +76 -0
- package/dist/review/review-decision-actions.d.ts +32 -0
- package/dist/review/review-decision-actions.js +74 -0
- package/dist/review/review-diff-text.d.ts +33 -0
- package/dist/review/review-diff-text.js +67 -0
- package/dist/review/review-out-of-date-notice.d.ts +28 -0
- package/dist/review/review-out-of-date-notice.js +32 -0
- package/dist/review/review-severity-dot.d.ts +27 -0
- package/dist/review/review-severity-dot.js +35 -0
- package/dist/review/review-status-badge.d.ts +30 -0
- package/dist/review/review-status-badge.js +45 -0
- package/dist/styles/theme.css +26 -0
- package/package.json +58 -5
package/README.md
CHANGED
|
@@ -10,7 +10,8 @@ be rendered and tested without a surrounding application — and a change to one
|
|
|
10
10
|
cannot reach into product code by accident. Lint enforces that boundary; the
|
|
11
11
|
export map below is what "part of the design system" means.
|
|
12
12
|
|
|
13
|
-
Peer dependencies: `react`, `react-dom`, `@base-ui/react`, `tailwindcss` (v4)
|
|
13
|
+
Peer dependencies: `react`, `react-dom`, `@base-ui/react`, `tailwindcss` (v4),
|
|
14
|
+
`@dnd-kit/core`, and `@dnd-kit/sortable`.
|
|
14
15
|
|
|
15
16
|
## Import
|
|
16
17
|
|
|
@@ -19,6 +20,7 @@ so a bundler keeps only what is imported:
|
|
|
19
20
|
|
|
20
21
|
```tsx
|
|
21
22
|
import { Button } from "@stll/ui/button";
|
|
23
|
+
import { ApplicationShell } from "@stll/ui/application-shell";
|
|
22
24
|
import { Dialog, DialogPopup } from "@stll/ui/dialog";
|
|
23
25
|
import { Inspector, InspectorDock } from "@stll/ui/inspector";
|
|
24
26
|
import { cn } from "@stll/ui/utils";
|
|
@@ -28,6 +30,25 @@ One flat subpath per module: `@stll/ui/<name>` for components, hooks, and
|
|
|
28
30
|
helpers alike. `@stll/ui` re-exports all of them under one specifier for
|
|
29
31
|
convenience; the subpaths are the real surface, and in-repo code uses those.
|
|
30
32
|
|
|
33
|
+
## Application shell
|
|
34
|
+
|
|
35
|
+
`ApplicationShell` keeps the navigation, page chrome and content, and an
|
|
36
|
+
optional inline-end inspector as sibling columns. Pass the host application's
|
|
37
|
+
surfaces as slots; route state, navigation behavior, and inspector behavior
|
|
38
|
+
remain in the host.
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { ApplicationShell } from "@stll/ui/application-shell";
|
|
42
|
+
|
|
43
|
+
<ApplicationShell
|
|
44
|
+
header={<PageHeader />}
|
|
45
|
+
inspector={<InspectorDock />}
|
|
46
|
+
sidebar={<Navigation />}
|
|
47
|
+
>
|
|
48
|
+
<Page />
|
|
49
|
+
</ApplicationShell>;
|
|
50
|
+
```
|
|
51
|
+
|
|
31
52
|
### Deprecated grouped subpaths
|
|
32
53
|
|
|
33
54
|
`@stll/ui/components/<name>`, `@stll/ui/hooks/<name>`, and
|
|
@@ -35,6 +56,50 @@ convenience; the subpaths are the real surface, and in-repo code uses those.
|
|
|
35
56
|
minor. They will be removed after that; the export guard checks that both
|
|
36
57
|
spellings land on the same module for as long as they both exist.
|
|
37
58
|
|
|
59
|
+
## Sortable boards
|
|
60
|
+
|
|
61
|
+
`@stll/ui/kanban` provides input and accessibility primitives only; the caller
|
|
62
|
+
keeps item identifiers, order changes, and persisted mutations. Wrap the board
|
|
63
|
+
in `KanbanSortableBoard`, render sortable items through `useKanbanSortable`,
|
|
64
|
+
and attach the returned bindings to `KanbanDragHandle`.
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import {
|
|
68
|
+
KanbanDragHandle,
|
|
69
|
+
KanbanSortableBoard,
|
|
70
|
+
KanbanSortableList,
|
|
71
|
+
useKanbanSortable,
|
|
72
|
+
} from "@stll/ui/kanban";
|
|
73
|
+
|
|
74
|
+
const Card = ({ id }: { id: string }) => {
|
|
75
|
+
const { dragHandle, setNodeRef } = useKanbanSortable({ id });
|
|
76
|
+
return (
|
|
77
|
+
<article ref={setNodeRef}>
|
|
78
|
+
<KanbanDragHandle bindings={dragHandle} label="Move card" />
|
|
79
|
+
</article>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
<KanbanSortableBoard onDragEnd={handleDragEnd}>
|
|
84
|
+
<KanbanSortableList items={cardIds}>
|
|
85
|
+
{cardIds.map((id) => (
|
|
86
|
+
<Card id={id} key={id} />
|
|
87
|
+
))}
|
|
88
|
+
</KanbanSortableList>
|
|
89
|
+
</KanbanSortableBoard>;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The default sensors are mouse (8px movement), touch (150ms delay with 8px
|
|
93
|
+
tolerance), and keyboard. Scroll containers retain `touch-action: auto`; only
|
|
94
|
+
`KanbanDragHandle` disables touch panning. `KanbanSortableBoard` also accepts
|
|
95
|
+
custom `sensors`, `accessibility`, collision detection, keyboard coordinates,
|
|
96
|
+
auto-scroll options, and an `overlay` render function.
|
|
97
|
+
|
|
98
|
+
`getKanbanHorizontalEdge` takes `input: "pointer"` with a current client-x and
|
|
99
|
+
`direction: "ltr" | "rtl"` for mouse and touch input. Keyboard calls use
|
|
100
|
+
`input: "keyboard"` and require source and target indices, so every move has a
|
|
101
|
+
logical edge without relying on ambiguous geometry.
|
|
102
|
+
|
|
38
103
|
## Styles
|
|
39
104
|
|
|
40
105
|
No compiled CSS ships. The components carry Tailwind class names, so the
|
|
@@ -67,7 +132,9 @@ and bidi isolation.
|
|
|
67
132
|
|
|
68
133
|
```sh
|
|
69
134
|
bun run build # tsdown, one output module per source module, with .d.ts
|
|
70
|
-
bun run test #
|
|
135
|
+
bun run test # unit tests
|
|
136
|
+
bun run test:unit # unit tests only
|
|
137
|
+
bun run test:browser # Chromium mobile-input tests
|
|
71
138
|
bun run typecheck
|
|
72
139
|
bun run lint
|
|
73
140
|
```
|
|
@@ -76,6 +143,8 @@ bun run lint
|
|
|
76
143
|
runs the publish path end to end: build, `prepare-publish`, `bun pm pack`, then
|
|
77
144
|
resolves and imports every declared subpath from the built `dist`.
|
|
78
145
|
|
|
146
|
+
`bun run pack:check` runs that published-package check for this package.
|
|
147
|
+
|
|
79
148
|
This package is published, so a change here needs a changeset:
|
|
80
149
|
|
|
81
150
|
```sh
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/components/application-shell.d.ts
|
|
3
|
+
type ApplicationShellProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The application navigation surface. It stays a direct sibling of the
|
|
6
|
+
* content column so sidebar implementations can reserve their own width.
|
|
7
|
+
*/
|
|
8
|
+
sidebar: ReactNode;
|
|
9
|
+
/** The route chrome rendered above the application content. */
|
|
10
|
+
header?: ReactNode | undefined;
|
|
11
|
+
/** An optional dock or rail at the inline-end edge. */
|
|
12
|
+
inspector?: ReactNode | undefined;
|
|
13
|
+
/** The active route or page content. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string | undefined;
|
|
16
|
+
mainClassName?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The three-column application frame: navigation, page chrome and content,
|
|
20
|
+
* then an optional inline-end inspector. Product navigation, route state, and
|
|
21
|
+
* inspector behaviour stay in the host; this primitive only owns the layout
|
|
22
|
+
* relationship that lets those surfaces share a viewport without nesting one
|
|
23
|
+
* inside another.
|
|
24
|
+
*/
|
|
25
|
+
declare const ApplicationShell: ({ children, className, header, inspector, mainClassName, sidebar }: ApplicationShellProps) => import("react").JSX.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ApplicationShell, type ApplicationShellProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/application-shell.tsx
|
|
4
|
+
/**
|
|
5
|
+
* The three-column application frame: navigation, page chrome and content,
|
|
6
|
+
* then an optional inline-end inspector. Product navigation, route state, and
|
|
7
|
+
* inspector behaviour stay in the host; this primitive only owns the layout
|
|
8
|
+
* relationship that lets those surfaces share a viewport without nesting one
|
|
9
|
+
* inside another.
|
|
10
|
+
*/
|
|
11
|
+
const ApplicationShell = ({ children, className, header, inspector, mainClassName, sidebar }) => /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: cn("flex min-h-svh w-full", className),
|
|
13
|
+
"data-slot": "application-shell",
|
|
14
|
+
children: [
|
|
15
|
+
sidebar,
|
|
16
|
+
/* @__PURE__ */ jsxs("main", {
|
|
17
|
+
className: cn("bg-background relative flex w-full flex-1 flex-col overflow-hidden", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2", mainClassName),
|
|
18
|
+
"data-slot": "application-shell-main",
|
|
19
|
+
children: [header, children]
|
|
20
|
+
}),
|
|
21
|
+
inspector
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { ApplicationShell };
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
|
|
12
12
|
declare const buttonVariants: (props?: ({
|
|
13
|
-
size?: "
|
|
14
|
-
variant?: "
|
|
13
|
+
size?: "xs" | "sm" | "icon" | "default" | "lg" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "xl" | null | undefined;
|
|
14
|
+
variant?: "destructive" | "outline" | "link" | "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 * as React$1 from "react";
|
|
|
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-
|
|
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;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/components/loader.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The one indeterminate loading indicator: the Stella mark breathing. Inline
|
|
5
|
+
* (`sm`) next to a control that is busy, `md` in a row, `lg` for a region.
|
|
6
|
+
* Content with a known shape gets a `Skeleton` instead, never a loader.
|
|
7
|
+
*/
|
|
8
|
+
declare const Loader: ({ label, size, className, ...props }: LoaderProps) => import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* A region whose content has no shape yet (a job running, a first fetch): the
|
|
11
|
+
* mark, one line saying what is happening, and at most one line of detail.
|
|
12
|
+
* Progress is stated in the detail text, never drawn as a bar that guesses.
|
|
13
|
+
*/
|
|
14
|
+
declare const LoaderState: ({ label, detail, hint, className }: LoaderStateProps) => import("react").JSX.Element;
|
|
15
|
+
declare const LOADER_SIZE: {
|
|
16
|
+
readonly sm: "size-4";
|
|
17
|
+
readonly md: "size-6";
|
|
18
|
+
readonly lg: "size-8";
|
|
19
|
+
};
|
|
20
|
+
type LoaderSize = keyof typeof LOADER_SIZE;
|
|
21
|
+
type LoaderProps = Omit<ComponentProps<"span">, "children"> & {
|
|
22
|
+
/** What is pending, for assistive technology ("Loading matters"). */
|
|
23
|
+
label: string;
|
|
24
|
+
size?: LoaderSize;
|
|
25
|
+
};
|
|
26
|
+
type LoaderStateProps = {
|
|
27
|
+
/** What is happening, shown as the title and announced. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** A short line under the title: a name, a fraction, a percentage. */
|
|
30
|
+
detail?: string | undefined;
|
|
31
|
+
/** Expectation-setting copy, kept small. */
|
|
32
|
+
hint?: string | undefined;
|
|
33
|
+
className?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Loader, LoaderState };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { StellaMark } from "./stella-mark.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/loader.tsx
|
|
5
|
+
/**
|
|
6
|
+
* The one indeterminate loading indicator: the Stella mark breathing. Inline
|
|
7
|
+
* (`sm`) next to a control that is busy, `md` in a row, `lg` for a region.
|
|
8
|
+
* Content with a known shape gets a `Skeleton` instead, never a loader.
|
|
9
|
+
*/
|
|
10
|
+
const Loader = ({ label, size = "md", className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
11
|
+
"aria-busy": "true",
|
|
12
|
+
"aria-label": label,
|
|
13
|
+
className: cn("inline-flex shrink-0 items-center justify-center", className),
|
|
14
|
+
"data-slot": "loader",
|
|
15
|
+
role: "status",
|
|
16
|
+
...props,
|
|
17
|
+
children: /* @__PURE__ */ jsx(LoaderMark, { size })
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* A region whose content has no shape yet (a job running, a first fetch): the
|
|
21
|
+
* mark, one line saying what is happening, and at most one line of detail.
|
|
22
|
+
* Progress is stated in the detail text, never drawn as a bar that guesses.
|
|
23
|
+
*/
|
|
24
|
+
const LoaderState = ({ label, detail, hint, className }) => /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
"aria-busy": "true",
|
|
26
|
+
className: cn("flex h-full flex-col items-center justify-center gap-3 px-6 text-center", className),
|
|
27
|
+
"data-slot": "loader-state",
|
|
28
|
+
role: "status",
|
|
29
|
+
children: [/* @__PURE__ */ jsx(LoaderMark, { size: "lg" }), /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "space-y-1",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx("p", {
|
|
33
|
+
className: "text-foreground text-sm font-medium",
|
|
34
|
+
children: label
|
|
35
|
+
}),
|
|
36
|
+
detail !== void 0 && /* @__PURE__ */ jsx("p", {
|
|
37
|
+
className: "text-muted-foreground truncate text-xs tabular-nums",
|
|
38
|
+
children: detail
|
|
39
|
+
}),
|
|
40
|
+
hint !== void 0 && /* @__PURE__ */ jsx("p", {
|
|
41
|
+
className: "text-muted-foreground text-[11px] text-pretty",
|
|
42
|
+
children: hint
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
})]
|
|
46
|
+
});
|
|
47
|
+
const LOADER_SIZE = {
|
|
48
|
+
sm: "size-4",
|
|
49
|
+
md: "size-6",
|
|
50
|
+
lg: "size-8"
|
|
51
|
+
};
|
|
52
|
+
const LoaderMark = ({ size }) => /* @__PURE__ */ jsx(StellaMark, { className: cn("animate-loader text-muted-foreground motion-reduce:animate-none motion-reduce:opacity-70", LOADER_SIZE[size]) });
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Loader, LoaderState };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import "./calendar/index.js";
|
|
|
5
5
|
import { Accordion, AccordionContent as AccordionPanel, AccordionItem, AccordionTrigger } from "./components/accordion.js";
|
|
6
6
|
import { OVERLAY_LAYER_CLASS_NAMES, OverlayLayer } from "./lib/overlay-layer.js";
|
|
7
7
|
import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogContent as AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport } from "./components/alert-dialog.js";
|
|
8
|
+
import { ApplicationShell, ApplicationShellProps } from "./components/application-shell.js";
|
|
8
9
|
import { Avatar, AvatarFallback, AvatarImage } from "./components/avatar.js";
|
|
9
10
|
import { BidiDirection, BidiText, BidiTextProps, UserText } from "./components/bidi-text.js";
|
|
10
11
|
import { DiscordLogoIcon, GitHubLogoIcon } from "./components/brand-icons.js";
|
|
@@ -66,10 +67,20 @@ import "./inspector/index.js";
|
|
|
66
67
|
import { KanbanCardFieldSelection, selectKanbanCardFieldIds } from "./kanban/card-properties.js";
|
|
67
68
|
import { KanbanCardShell, KanbanCardShellProps } from "./kanban/card-shell.js";
|
|
68
69
|
import { KanbanColumnHeader, KanbanColumnHeaderProps } from "./kanban/column-header.js";
|
|
70
|
+
import { KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanDragHandle, KanbanDragHandleProps, KanbanSortableBindings, KanbanSortableBoard, KanbanSortableBoardProps, KanbanSortableColumns, KanbanSortableColumnsProps, KanbanSortableList, KanbanSortableListProps, UseKanbanSortableOptions, useKanbanSortable, useKanbanSortableSensors } from "./kanban/sortable-interactions.js";
|
|
71
|
+
import { KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KanbanDirection, KanbanHorizontalEdge, getKanbanHorizontalEdge } from "./kanban/sortable-edge.js";
|
|
69
72
|
import { KANBAN_BOARD_AUTO_SCROLL_SOURCES, RegisterKanbanBoardAutoScrollOptions, RegisterKanbanCardDragOptions, registerKanbanBoardAutoScroll, registerKanbanCardDrag } from "./kanban/drag-interactions.js";
|
|
70
73
|
import { ColorVariants, OptionColor, emptyColor, optionColors, resolveOptionColor } from "./lib/option-color.js";
|
|
71
74
|
import { KanbanBuiltInGroup, KanbanGroup, KanbanGroupOption, KanbanGrouping, KanbanSchema, ResolveKanbanGroupingParams, getKanbanGroupingPropertyId, getKanbanGroups, isKanbanGroupingRenderable, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanRows } from "./kanban/grouping.js";
|
|
72
75
|
import "./kanban/index.js";
|
|
76
|
+
import { getInitials } from "./lib/initials.js";
|
|
73
77
|
import { cn, composeRefs } from "./lib/utils.js";
|
|
74
78
|
import { getFirstWeekday, getLocaleWeekInfo, getWeekendDays } from "./lib/week.js";
|
|
75
|
-
|
|
79
|
+
import { ReviewAuthorAvatar, UNKNOWN_AUTHOR_LABEL } from "./review/review-author-avatar.js";
|
|
80
|
+
import { ReviewCommentAuthor, ReviewCommentCard } from "./review/review-comment-card.js";
|
|
81
|
+
import { ReviewDecisionActions, ReviewDecisionSize, ReviewDecisionState } from "./review/review-decision-actions.js";
|
|
82
|
+
import { ReviewDiffDeletion, ReviewDiffInsertion, ReviewDiffSegment, ReviewDiffSegmentType, ReviewDiffText, TRACKED_DELETION_STYLE, TRACKED_INSERTION_STYLE, reviewDiffSegmentKeys } from "./review/review-diff-text.js";
|
|
83
|
+
import { ReviewOutOfDateNotice, ReviewOutOfDateReason, ReviewOutOfDateTone } from "./review/review-out-of-date-notice.js";
|
|
84
|
+
import { ReviewStatusBadge, ReviewStatusSize, ReviewStatusTone, ReviewStatusVariant } from "./review/review-status-badge.js";
|
|
85
|
+
import { ReviewSeverityDot, ReviewSeverityLevel, ReviewStatusDot, reviewSeverityTone } from "./review/review-severity-dot.js";
|
|
86
|
+
export { Accordion, AccordionPanel as AccordionContent, AccordionPanel, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogBackdrop, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport, AnchoredToastProvider, ApplicationShell, type ApplicationShellProps, Avatar, AvatarFallback, AvatarImage, type BidiDirection, BidiText, type BidiTextProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CalendarCell, type CalendarDateRange, CalendarEntryButton, CalendarEntrySurface, CalendarGrid, CalendarHeaderCell, CalendarHeaderRow, Checkbox, ColorPicker, ColorPickerContent, type ColorPickerContentProps, type ColorPickerProps, type ColorPreset, ColorVariants, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandCollection, CommandDialog, CommandDialogPopup, CommandDialogTrigger, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, DataTable, type DataTableAriaSort, type DataTableColumn, type DataTableProps, type DataTableRowAction, DatePickerPopover, type DatePickerPopoverProps, DestructiveActionConfirmation, DestructiveConfirmDialog, type DestructiveConfirmDialogProps, Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogHeader, DialogPanel, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DirectionalIcon, DiscordLogoIcon, Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity, Form, Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle, GitHubLogoIcon, HexColorPicker, type HexColorPickerProps, PreviewCard as HoverCard, PreviewCard, PreviewCardPopup as HoverCardContent, PreviewCardPopup, PreviewCardTrigger as HoverCardTrigger, PreviewCardTrigger, INSPECTOR_CONTENT_MIN_WIDTH, INSPECTOR_PANE_DEFAULT_WIDTH, INSPECTOR_PANE_KEYBOARD_PAGE_STEP, INSPECTOR_PANE_KEYBOARD_STEP, INSPECTOR_PANE_MAX_WIDTH, INSPECTOR_PANE_MIN_WIDTH, INSPECTOR_RAIL_WIDTH, Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Inspector, InspectorActions, InspectorContent, InspectorDescription, InspectorDock, InspectorEmptyRow, InspectorHeader, InspectorHeaderText, InspectorProperty, InspectorPropertyLabel, InspectorPropertyList, InspectorPropertyValue, InspectorRail, InspectorRailCell, InspectorRailIconButton, InspectorRailTab, InspectorSection, InspectorSectionTitle, InspectorTitle, KANBAN_BOARD_AUTO_SCROLL_SOURCES, KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, type KanbanBuiltInGroup, type KanbanCardFieldSelection, KanbanCardShell, type KanbanCardShellProps, KanbanColumnHeader, type KanbanColumnHeaderProps, type KanbanDirection, KanbanDragHandle, type KanbanDragHandleProps, type KanbanGroup, type KanbanGroupOption, type KanbanGrouping, type KanbanHorizontalEdge, type KanbanSchema, type KanbanSortableBindings, KanbanSortableBoard, type KanbanSortableBoardProps, KanbanSortableColumns, type KanbanSortableColumnsProps, KanbanSortableList, type KanbanSortableListProps, Label, MenuPreviewLayout, OVERLAY_LAYER_CLASS_NAMES, OptionColor, OutlineItem, OutlineRail, OutlineRailProps, OverlayLayer, PROPERTY_ROW_GRID, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger, PreviewCardPrimitive, PreviewPane, type RegisterKanbanBoardAutoScrollOptions, type RegisterKanbanCardDragOptions, type ResolveKanbanGroupingParams, ResourceCalendar, type ResourceCalendarColumn, type ResourceCalendarEntry, type ResourceCalendarEntryTone, type ResourceCalendarLaneLayout, type ResourceCalendarLanePlacement, type ResourceCalendarPlacement, type ResourceCalendarResource, ReviewAuthorAvatar, ReviewCommentAuthor, ReviewCommentCard, ReviewDecisionActions, ReviewDecisionSize, ReviewDecisionState, ReviewDiffDeletion, ReviewDiffInsertion, ReviewDiffSegment, ReviewDiffSegmentType, ReviewDiffText, ReviewOutOfDateNotice, ReviewOutOfDateReason, ReviewOutOfDateTone, ReviewSeverityDot, ReviewSeverityLevel, ReviewStatusBadge, ReviewStatusDot, ReviewStatusSize, ReviewStatusTone, ReviewStatusVariant, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE, SIDE_RAIL_TAB_ICON_SIZE, SIDE_RAIL_WIDTH, ScrollArea, ScrollBar, ScrollToTop, ScrollToTopProps, SecretInput, type SecretInputProps, SegmentedIconToggle, Select, SelectPopup as SelectContent, SelectPopup, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetBackdrop, SheetBackdrop as SheetOverlay, SheetClose, SheetPopup as SheetContent, SheetPopup, SheetDescription, SheetFooter, SheetHeader, SheetPanel, SheetPortal, type SheetSide, SheetTitle, SheetTrigger, Skeleton, type SortDirection, SortableHead, StellaMark, StellaWordmarkLatin, TOAST_RIGHT_OFFSET_VAR, TOOLBAR_ROW_HEIGHT, TOOLBAR_ROW_HEIGHT_PX, TRACKED_DELETION_STYLE, TRACKED_INSERTION_STYLE, Table, TableBody, TableCaption, TableCell, type TableColumnCapabilities, type TableColumnDescriptor, TableFooter, TableHead, TableHeader, TableRow, type TableSchema, Tabs, TabsPanel as TabsContent, TabsPanel, TabsList, TabsTab, TabsTab as TabsTrigger, TextSeparator, Textarea, type TextareaProps, type ToastPosition, ToastProvider, Tooltip, TooltipPopup as TooltipContent, TooltipPopup, TooltipCreateHandle, TooltipProvider, TooltipTrigger, UNKNOWN_AUTHOR_LABEL, type UseKanbanSortableOptions, UserText, assertConsecutiveCalendarDates, buttonAccessibleDisabledClass, buttonVariants, cn, composeRefs, containedEventHandler, containedHandler, contentDir, duplicateColumnIds, emptyColor, findTableColumn, getFirstWeekday, getInitials, getKanbanGroupingPropertyId, getKanbanGroups, getKanbanHorizontalEdge, getLocaleWeekInfo, getResourceCalendarPlacement, getWeekendDays, hideableColumnIds, isKanbanGroupingRenderable, isStructuredInputType, layoutResourceCalendarEntries, nextCalendarDate, optionColors, parsePersistedPaneWidth, registerKanbanBoardAutoScroll, registerKanbanCardDrag, resolveDragWidth, resolveInspectorDockWidth, resolveInspectorPaneMaxWidth, resolveInspectorPaneWidth, resolveKanbanGroupOptions, resolveKanbanGrouping, resolveKeyboardWidth, resolveOptionColor, reviewDiffSegmentKeys, reviewSeverityTone, selectKanbanCardFieldIds, selectKanbanRows, shouldForceSidebarCollapsed, sortableColumnIds, stellaToast, tableColumnIds, tableColumnSizing, useComboboxFilter, useContentDir, useDestructiveActionConfirmation, useInspectorPaneWidth, useIsMobile, useKanbanSortable, useKanbanSortableSensors, useLatest, useViewportWidth, visibleColumnIds };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Accordion, AccordionContent as AccordionPanel, AccordionItem, Accordion
|
|
|
3
3
|
import { OVERLAY_LAYER_CLASS_NAMES } from "./lib/overlay-layer.js";
|
|
4
4
|
import { Tooltip, TooltipContent as TooltipPopup, TooltipCreateHandle, TooltipProvider, TooltipTrigger } from "./components/tooltip.js";
|
|
5
5
|
import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogContent as AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport } from "./components/alert-dialog.js";
|
|
6
|
+
import { ApplicationShell } from "./components/application-shell.js";
|
|
6
7
|
import { Avatar, AvatarFallback, AvatarImage } from "./components/avatar.js";
|
|
7
8
|
import { BidiText, UserText } from "./components/bidi-text.js";
|
|
8
9
|
import { DiscordLogoIcon, GitHubLogoIcon } from "./components/brand-icons.js";
|
|
@@ -65,7 +66,17 @@ import { INSPECTOR_PANE_KEYBOARD_PAGE_STEP, INSPECTOR_PANE_KEYBOARD_STEP, parseP
|
|
|
65
66
|
import { selectKanbanCardFieldIds } from "./kanban/card-properties.js";
|
|
66
67
|
import { KanbanCardShell } from "./kanban/card-shell.js";
|
|
67
68
|
import { KanbanColumnHeader } from "./kanban/column-header.js";
|
|
69
|
+
import { KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanDragHandle, KanbanSortableBoard, KanbanSortableColumns, KanbanSortableList, useKanbanSortable, useKanbanSortableSensors } from "./kanban/sortable-interactions.js";
|
|
70
|
+
import { KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, getKanbanHorizontalEdge } from "./kanban/sortable-edge.js";
|
|
68
71
|
import { KANBAN_BOARD_AUTO_SCROLL_SOURCES, registerKanbanBoardAutoScroll, registerKanbanCardDrag } from "./kanban/drag-interactions.js";
|
|
69
72
|
import { getKanbanGroupingPropertyId, getKanbanGroups, isKanbanGroupingRenderable, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanRows } from "./kanban/grouping.js";
|
|
73
|
+
import { getInitials } from "./lib/initials.js";
|
|
70
74
|
import { emptyColor, optionColors, resolveOptionColor } from "./lib/option-color.js";
|
|
71
|
-
|
|
75
|
+
import { ReviewAuthorAvatar, UNKNOWN_AUTHOR_LABEL } from "./review/review-author-avatar.js";
|
|
76
|
+
import { ReviewCommentCard } from "./review/review-comment-card.js";
|
|
77
|
+
import { ReviewDecisionActions } from "./review/review-decision-actions.js";
|
|
78
|
+
import { ReviewDiffDeletion, ReviewDiffInsertion, ReviewDiffText, TRACKED_DELETION_STYLE, TRACKED_INSERTION_STYLE, reviewDiffSegmentKeys } from "./review/review-diff-text.js";
|
|
79
|
+
import { ReviewOutOfDateNotice } from "./review/review-out-of-date-notice.js";
|
|
80
|
+
import { ReviewSeverityDot, ReviewStatusDot, reviewSeverityTone } from "./review/review-severity-dot.js";
|
|
81
|
+
import { ReviewStatusBadge } from "./review/review-status-badge.js";
|
|
82
|
+
export { Accordion, AccordionPanel as AccordionContent, AccordionPanel, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogBackdrop, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport, AnchoredToastProvider, ApplicationShell, Avatar, AvatarFallback, AvatarImage, BidiText, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CalendarCell, CalendarEntryButton, CalendarEntrySurface, CalendarGrid, CalendarHeaderCell, CalendarHeaderRow, Checkbox, ColorPicker, ColorPickerContent, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandCollection, CommandDialog, CommandDialogPopup, CommandDialogTrigger, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, DataTable, DatePickerPopover, DestructiveActionConfirmation, DestructiveConfirmDialog, Dialog, DialogBackdrop, DialogBackdrop as DialogOverlay, DialogClose, DialogPopup as DialogContent, DialogPopup, DialogCreateHandle, DialogDescription, DialogFooter, DialogHeader, DialogPanel, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DirectionalIcon, DiscordLogoIcon, Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity, Form, Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle, GitHubLogoIcon, HexColorPicker, PreviewCard as HoverCard, PreviewCard, PreviewCardPopup as HoverCardContent, PreviewCardPopup, PreviewCardTrigger as HoverCardTrigger, PreviewCardTrigger, INSPECTOR_CONTENT_MIN_WIDTH, INSPECTOR_PANE_DEFAULT_WIDTH, INSPECTOR_PANE_KEYBOARD_PAGE_STEP, INSPECTOR_PANE_KEYBOARD_STEP, INSPECTOR_PANE_MAX_WIDTH, INSPECTOR_PANE_MIN_WIDTH, INSPECTOR_RAIL_WIDTH, Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Inspector, InspectorActions, InspectorContent, InspectorDescription, InspectorDock, InspectorEmptyRow, InspectorHeader, InspectorHeaderText, InspectorProperty, InspectorPropertyLabel, InspectorPropertyList, InspectorPropertyValue, InspectorRail, InspectorRailCell, InspectorRailIconButton, InspectorRailTab, InspectorSection, InspectorSectionTitle, InspectorTitle, KANBAN_BOARD_AUTO_SCROLL_SOURCES, KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanCardShell, KanbanColumnHeader, KanbanDragHandle, KanbanSortableBoard, KanbanSortableColumns, KanbanSortableList, Label, MenuPreviewLayout, OVERLAY_LAYER_CLASS_NAMES, OutlineRail, PROPERTY_ROW_GRID, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger, PreviewCardPrimitive, PreviewPane, ResourceCalendar, ReviewAuthorAvatar, ReviewCommentCard, ReviewDecisionActions, ReviewDiffDeletion, ReviewDiffInsertion, ReviewDiffText, ReviewOutOfDateNotice, ReviewSeverityDot, ReviewStatusBadge, ReviewStatusDot, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE, SIDE_RAIL_TAB_ICON_SIZE, SIDE_RAIL_WIDTH, ScrollArea, ScrollBar, ScrollToTop, SecretInput, SegmentedIconToggle, Select, SelectPopup as SelectContent, SelectPopup, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetBackdrop, SheetBackdrop as SheetOverlay, SheetClose, SheetPopup as SheetContent, SheetPopup, SheetDescription, SheetFooter, SheetHeader, SheetPanel, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortableHead, StellaMark, StellaWordmarkLatin, TOAST_RIGHT_OFFSET_VAR, TOOLBAR_ROW_HEIGHT, TOOLBAR_ROW_HEIGHT_PX, TRACKED_DELETION_STYLE, TRACKED_INSERTION_STYLE, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsPanel as TabsContent, TabsPanel, TabsList, TabsTab, TabsTab as TabsTrigger, TextSeparator, Textarea, ToastProvider, Tooltip, TooltipPopup as TooltipContent, TooltipPopup, TooltipCreateHandle, TooltipProvider, TooltipTrigger, UNKNOWN_AUTHOR_LABEL, UserText, assertConsecutiveCalendarDates, buttonAccessibleDisabledClass, buttonVariants, cn, composeRefs, containedEventHandler, containedHandler, contentDir, duplicateColumnIds, emptyColor, findTableColumn, getFirstWeekday, getInitials, getKanbanGroupingPropertyId, getKanbanGroups, getKanbanHorizontalEdge, getLocaleWeekInfo, getResourceCalendarPlacement, getWeekendDays, hideableColumnIds, isKanbanGroupingRenderable, isStructuredInputType, layoutResourceCalendarEntries, nextCalendarDate, optionColors, parsePersistedPaneWidth, registerKanbanBoardAutoScroll, registerKanbanCardDrag, resolveDragWidth, resolveInspectorDockWidth, resolveInspectorPaneMaxWidth, resolveInspectorPaneWidth, resolveKanbanGroupOptions, resolveKanbanGrouping, resolveKeyboardWidth, resolveOptionColor, reviewDiffSegmentKeys, reviewSeverityTone, selectKanbanCardFieldIds, selectKanbanRows, shouldForceSidebarCollapsed, sortableColumnIds, stellaToast, tableColumnIds, tableColumnSizing, useComboboxFilter, useContentDir, useDestructiveActionConfirmation, useInspectorPaneWidth, useIsMobile, useKanbanSortable, useKanbanSortableSensors, useLatest, useViewportWidth, visibleColumnIds };
|
|
@@ -30,7 +30,12 @@ declare const InspectorRail: ({ className, ...props }: React$1.ComponentProps<"n
|
|
|
30
30
|
/** A rail cell: same height as every header strip and property row. */
|
|
31
31
|
declare const InspectorRailCell: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
32
32
|
declare const InspectorRailIconButton: ({ className, ...props }: React$1.ComponentProps<"button">) => React$1.JSX.Element;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* A rail tab: one full-width row, bordered like every other rail cell, so
|
|
35
|
+
* the stack reads as boxes in every dock. The active tab carries a 2px spine
|
|
36
|
+
* on the rail's inline-start edge — the same affordance the workspace rail
|
|
37
|
+
* uses to say "this pane is showing that tab".
|
|
38
|
+
*/
|
|
34
39
|
declare const InspectorRailTab: ({ active, className, ...props }: React$1.ComponentProps<"button"> & {
|
|
35
40
|
active?: boolean;
|
|
36
41
|
}) => React$1.JSX.Element;
|
package/dist/inspector/chrome.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import { PROPERTY_ROW_GRID, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE,
|
|
2
|
+
import { PROPERTY_ROW_GRID, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE, TOOLBAR_ROW_HEIGHT } from "./layout-tokens.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/inspector/chrome.tsx
|
|
5
5
|
/**
|
|
@@ -49,10 +49,15 @@ const InspectorRailIconButton = ({ className, ...props }) => /* @__PURE__ */ jsx
|
|
|
49
49
|
type: "button",
|
|
50
50
|
...props
|
|
51
51
|
});
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* A rail tab: one full-width row, bordered like every other rail cell, so
|
|
54
|
+
* the stack reads as boxes in every dock. The active tab carries a 2px spine
|
|
55
|
+
* on the rail's inline-start edge — the same affordance the workspace rail
|
|
56
|
+
* uses to say "this pane is showing that tab".
|
|
57
|
+
*/
|
|
53
58
|
const InspectorRailTab = ({ active = false, className, ...props }) => /* @__PURE__ */ jsx("button", {
|
|
54
59
|
"aria-current": active ? "true" : void 0,
|
|
55
|
-
className: cn("group/tab relative flex items-center justify-center
|
|
60
|
+
className: cn("group/tab relative flex w-full shrink-0 items-center justify-center border-b transition-colors", TOOLBAR_ROW_HEIGHT, active ? "bg-background text-foreground before:bg-primary before:absolute before:inset-y-0 before:inset-s-0 before:w-0.5" : "text-muted-foreground hover:bg-accent hover:text-foreground", className),
|
|
56
61
|
"data-active": active ? "" : void 0,
|
|
57
62
|
"data-slot": "inspector-rail-tab",
|
|
58
63
|
type: "button",
|
|
@@ -21,9 +21,8 @@ declare const SIDE_RAIL_WIDTH: "w-12";
|
|
|
21
21
|
*/
|
|
22
22
|
declare const SIDE_RAIL_CONTAINER_CLASS: "bg-sidebar flex shrink-0 flex-col border-s border-e w-12";
|
|
23
23
|
declare const SIDE_RAIL_ICON_BUTTON_SIZE: "size-8";
|
|
24
|
-
declare const SIDE_RAIL_TAB_HIT_TARGET_SIZE: "size-12";
|
|
25
24
|
declare const SIDE_RAIL_TAB_ICON_SIZE: "size-3.5";
|
|
26
25
|
/** Two-column grid the key/value rows share. */
|
|
27
26
|
declare const PROPERTY_ROW_GRID: "grid-cols-[8rem_minmax(0,1fr)]";
|
|
28
27
|
//#endregion
|
|
29
|
-
export { PROPERTY_ROW_GRID, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE,
|
|
28
|
+
export { PROPERTY_ROW_GRID, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE, SIDE_RAIL_TAB_ICON_SIZE, SIDE_RAIL_WIDTH, TOOLBAR_ROW_HEIGHT, TOOLBAR_ROW_HEIGHT_PX };
|
|
@@ -21,9 +21,8 @@ const SIDE_RAIL_WIDTH = "w-12";
|
|
|
21
21
|
*/
|
|
22
22
|
const SIDE_RAIL_CONTAINER_CLASS = `bg-sidebar flex shrink-0 flex-col border-s border-e ${SIDE_RAIL_WIDTH}`;
|
|
23
23
|
const SIDE_RAIL_ICON_BUTTON_SIZE = "size-8";
|
|
24
|
-
const SIDE_RAIL_TAB_HIT_TARGET_SIZE = "size-12";
|
|
25
24
|
const SIDE_RAIL_TAB_ICON_SIZE = "size-3.5";
|
|
26
25
|
/** Two-column grid the key/value rows share. */
|
|
27
26
|
const PROPERTY_ROW_GRID = "grid-cols-[8rem_minmax(0,1fr)]";
|
|
28
27
|
//#endregion
|
|
29
|
-
export { PROPERTY_ROW_GRID, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE,
|
|
28
|
+
export { PROPERTY_ROW_GRID, SIDE_RAIL_CONTAINER_CLASS, SIDE_RAIL_ICON_BUTTON_SIZE, SIDE_RAIL_TAB_ICON_SIZE, SIDE_RAIL_WIDTH, TOOLBAR_ROW_HEIGHT, TOOLBAR_ROW_HEIGHT_PX };
|
package/dist/kanban/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { KanbanCardFieldSelection, selectKanbanCardFieldIds } from "./card-properties.js";
|
|
2
2
|
import { KanbanCardShell, KanbanCardShellProps } from "./card-shell.js";
|
|
3
3
|
import { KanbanColumnHeader, KanbanColumnHeaderProps } from "./column-header.js";
|
|
4
|
+
import { KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanDragHandle, KanbanDragHandleProps, KanbanSortableBindings, KanbanSortableBoard, KanbanSortableBoardProps, KanbanSortableColumns, KanbanSortableColumnsProps, KanbanSortableList, KanbanSortableListProps, UseKanbanSortableOptions, useKanbanSortable, useKanbanSortableSensors } from "./sortable-interactions.js";
|
|
5
|
+
import { KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KanbanDirection, KanbanHorizontalEdge, getKanbanHorizontalEdge } from "./sortable-edge.js";
|
|
4
6
|
import { KANBAN_BOARD_AUTO_SCROLL_SOURCES, RegisterKanbanBoardAutoScrollOptions, RegisterKanbanCardDragOptions, registerKanbanBoardAutoScroll, registerKanbanCardDrag } from "./drag-interactions.js";
|
|
5
7
|
import { KanbanBuiltInGroup, KanbanGroup, KanbanGroupOption, KanbanGrouping, KanbanSchema, ResolveKanbanGroupingParams, getKanbanGroupingPropertyId, getKanbanGroups, isKanbanGroupingRenderable, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanRows } from "./grouping.js";
|
|
6
|
-
export { KANBAN_BOARD_AUTO_SCROLL_SOURCES, type KanbanBuiltInGroup, type KanbanCardFieldSelection, KanbanCardShell, type KanbanCardShellProps, KanbanColumnHeader, type KanbanColumnHeaderProps, type KanbanGroup, type KanbanGroupOption, type KanbanGrouping, type KanbanSchema, type RegisterKanbanBoardAutoScrollOptions, type RegisterKanbanCardDragOptions, type ResolveKanbanGroupingParams, getKanbanGroupingPropertyId, getKanbanGroups, isKanbanGroupingRenderable, registerKanbanBoardAutoScroll, registerKanbanCardDrag, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanCardFieldIds, selectKanbanRows };
|
|
8
|
+
export { KANBAN_BOARD_AUTO_SCROLL_SOURCES, KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, type KanbanBuiltInGroup, type KanbanCardFieldSelection, KanbanCardShell, type KanbanCardShellProps, KanbanColumnHeader, type KanbanColumnHeaderProps, type KanbanDirection, KanbanDragHandle, type KanbanDragHandleProps, type KanbanGroup, type KanbanGroupOption, type KanbanGrouping, type KanbanHorizontalEdge, type KanbanSchema, type KanbanSortableBindings, KanbanSortableBoard, type KanbanSortableBoardProps, KanbanSortableColumns, type KanbanSortableColumnsProps, KanbanSortableList, type KanbanSortableListProps, type RegisterKanbanBoardAutoScrollOptions, type RegisterKanbanCardDragOptions, type ResolveKanbanGroupingParams, type UseKanbanSortableOptions, getKanbanGroupingPropertyId, getKanbanGroups, getKanbanHorizontalEdge, isKanbanGroupingRenderable, registerKanbanBoardAutoScroll, registerKanbanCardDrag, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanCardFieldIds, selectKanbanRows, useKanbanSortable, useKanbanSortableSensors };
|
package/dist/kanban/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { selectKanbanCardFieldIds } from "./card-properties.js";
|
|
2
2
|
import { KanbanCardShell } from "./card-shell.js";
|
|
3
3
|
import { KanbanColumnHeader } from "./column-header.js";
|
|
4
|
+
import { KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanDragHandle, KanbanSortableBoard, KanbanSortableColumns, KanbanSortableList, useKanbanSortable, useKanbanSortableSensors } from "./sortable-interactions.js";
|
|
5
|
+
import { KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, getKanbanHorizontalEdge } from "./sortable-edge.js";
|
|
4
6
|
import { KANBAN_BOARD_AUTO_SCROLL_SOURCES, registerKanbanBoardAutoScroll, registerKanbanCardDrag } from "./drag-interactions.js";
|
|
5
7
|
import { getKanbanGroupingPropertyId, getKanbanGroups, isKanbanGroupingRenderable, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanRows } from "./grouping.js";
|
|
6
|
-
export { KANBAN_BOARD_AUTO_SCROLL_SOURCES, KanbanCardShell, KanbanColumnHeader, getKanbanGroupingPropertyId, getKanbanGroups, isKanbanGroupingRenderable, registerKanbanBoardAutoScroll, registerKanbanCardDrag, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanCardFieldIds, selectKanbanRows };
|
|
8
|
+
export { KANBAN_BOARD_AUTO_SCROLL_SOURCES, KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanCardShell, KanbanColumnHeader, KanbanDragHandle, KanbanSortableBoard, KanbanSortableColumns, KanbanSortableList, getKanbanGroupingPropertyId, getKanbanGroups, getKanbanHorizontalEdge, isKanbanGroupingRenderable, registerKanbanBoardAutoScroll, registerKanbanCardDrag, resolveKanbanGroupOptions, resolveKanbanGrouping, selectKanbanCardFieldIds, selectKanbanRows, useKanbanSortable, useKanbanSortableSensors };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ClientRect } from "@dnd-kit/core";
|
|
2
|
+
//#region src/kanban/sortable-edge.d.ts
|
|
3
|
+
declare const KANBAN_HORIZONTAL_EDGES: {
|
|
4
|
+
readonly before: "before";
|
|
5
|
+
readonly after: "after";
|
|
6
|
+
};
|
|
7
|
+
type KanbanHorizontalEdge = (typeof KANBAN_HORIZONTAL_EDGES)[keyof typeof KANBAN_HORIZONTAL_EDGES];
|
|
8
|
+
declare const KANBAN_DIRECTIONS: {
|
|
9
|
+
readonly ltr: "ltr";
|
|
10
|
+
readonly rtl: "rtl";
|
|
11
|
+
};
|
|
12
|
+
type KanbanDirection = (typeof KANBAN_DIRECTIONS)[keyof typeof KANBAN_DIRECTIONS];
|
|
13
|
+
type KanbanPointerHorizontalEdgeOptions = {
|
|
14
|
+
input: "pointer";
|
|
15
|
+
/** The drag's current viewport x coordinate for mouse or touch input. */
|
|
16
|
+
currentClientX: number;
|
|
17
|
+
overRect: ClientRect;
|
|
18
|
+
/** Maps physical mouse and touch positions to the board's logical order. */
|
|
19
|
+
direction?: KanbanDirection | undefined;
|
|
20
|
+
};
|
|
21
|
+
type KanbanKeyboardHorizontalEdgeOptions = {
|
|
22
|
+
input: "keyboard";
|
|
23
|
+
/** The source item's position in logical board order. */
|
|
24
|
+
sourceIndex: number;
|
|
25
|
+
/** The target item's position in logical board order. */
|
|
26
|
+
targetIndex: number;
|
|
27
|
+
};
|
|
28
|
+
type KanbanHorizontalEdgeOptions = KanbanPointerHorizontalEdgeOptions | KanbanKeyboardHorizontalEdgeOptions;
|
|
29
|
+
/**
|
|
30
|
+
* Resolves a horizontal insertion edge without consulting application data.
|
|
31
|
+
*
|
|
32
|
+
* Mouse and touch callers pass their current viewport coordinate. Keyboard
|
|
33
|
+
* callers pass source and target indices, making every logical move
|
|
34
|
+
* unambiguous. This deliberately avoids drag deltas, which include scroll
|
|
35
|
+
* reconciliation and are not viewport coordinates.
|
|
36
|
+
*/
|
|
37
|
+
declare const getKanbanHorizontalEdge: ({ ...options }: KanbanHorizontalEdgeOptions) => KanbanHorizontalEdge;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, KanbanDirection, KanbanHorizontalEdge, KanbanHorizontalEdgeOptions, getKanbanHorizontalEdge };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/kanban/sortable-edge.ts
|
|
2
|
+
const KANBAN_HORIZONTAL_EDGES = {
|
|
3
|
+
before: "before",
|
|
4
|
+
after: "after"
|
|
5
|
+
};
|
|
6
|
+
const KANBAN_DIRECTIONS = {
|
|
7
|
+
ltr: "ltr",
|
|
8
|
+
rtl: "rtl"
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Resolves a horizontal insertion edge without consulting application data.
|
|
12
|
+
*
|
|
13
|
+
* Mouse and touch callers pass their current viewport coordinate. Keyboard
|
|
14
|
+
* callers pass source and target indices, making every logical move
|
|
15
|
+
* unambiguous. This deliberately avoids drag deltas, which include scroll
|
|
16
|
+
* reconciliation and are not viewport coordinates.
|
|
17
|
+
*/
|
|
18
|
+
const getKanbanHorizontalEdge = ({ ...options }) => {
|
|
19
|
+
if (options.input === "keyboard") return options.sourceIndex < options.targetIndex ? KANBAN_HORIZONTAL_EDGES.after : KANBAN_HORIZONTAL_EDGES.before;
|
|
20
|
+
const { currentClientX, direction = KANBAN_DIRECTIONS.ltr, overRect } = options;
|
|
21
|
+
const physicalEdge = currentClientX < getRectCenterX(overRect) ? KANBAN_HORIZONTAL_EDGES.before : KANBAN_HORIZONTAL_EDGES.after;
|
|
22
|
+
if (direction === KANBAN_DIRECTIONS.rtl) return physicalEdge === KANBAN_HORIZONTAL_EDGES.before ? KANBAN_HORIZONTAL_EDGES.after : KANBAN_HORIZONTAL_EDGES.before;
|
|
23
|
+
return physicalEdge;
|
|
24
|
+
};
|
|
25
|
+
const getRectCenterX = ({ left, width }) => left + width / 2;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { KANBAN_DIRECTIONS, KANBAN_HORIZONTAL_EDGES, getKanbanHorizontalEdge };
|