@ciridae/ui 0.15.0 → 0.16.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.
@@ -58,7 +58,7 @@ export function GeneratedConnectLink({ access, createConnectLink, currentTools,
58
58
  // well above this button, and this is the click that acts on it.
59
59
  // Keyed on whether the grant can write rather than on the mode, so
60
60
  // a Custom set holding an action tool does not read as read-only.
61
- variant: writeGranting ? "destructive" : "default", children: generateLabel(link !== undefined, access, writeGranting) }), createConnectLink.isPending ? (_jsx(Spinner, { "aria-label": "Generating connection code", className: "text-muted-foreground" })) : null, link === undefined ? null : (_jsxs("p", { className: "text-muted-foreground/70 text-xs", children: [_jsxs("span", { className: "font-medium", children: [ACCESS_LABEL[link.access], " access"] }), " \u00B7 single use \u00B7 expires ", expiryFormatter.format(new Date(link.expiresAt))] }))] }), staleLabel === null ? null : (_jsxs("p", { className: "text-destructive text-xs", children: ["This code was generated before you changed the access above. Generate a new one to share", " ", staleLabel, " access."] }))] }));
61
+ variant: writeGranting ? "destructive" : "default", children: generateLabel(link !== undefined, access, writeGranting) }), createConnectLink.isPending ? (_jsx(Spinner, { "aria-label": "Generating connection code", className: "text-muted-foreground" })) : null, link === undefined ? null : (_jsxs("p", { className: "text-muted-foreground/70 text-xs", children: [_jsxs("span", { className: "font-medium", children: [ACCESS_LABEL[link.access], " access"] }), " \u00B7 single use \u00B7 expires ", expiryFormatter.format(link.expiresAtEpochMilliseconds)] }))] }), staleLabel === null ? null : (_jsxs("p", { className: "text-destructive text-xs", children: ["This code was generated before you changed the access above. Generate a new one to share", " ", staleLabel, " access."] }))] }));
62
62
  }
63
63
  function sameSelection(left, right) {
64
64
  if (left === null || right === null)
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /* eslint-disable react-hooks/refs -- dnd-kit drag handlers need a mutable ref to suppress the click fired after a drag. */
3
2
  import * as React from "react";
4
3
  import { DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
5
4
  import { sortableKeyboardCoordinates } from "@dnd-kit/sortable";
@@ -29,13 +29,14 @@ export type McpAccessToolListing = {
29
29
  * code was stamped with, and when it stops working. The code itself is not
30
30
  * here — the app shows it through its own `CopyField`, and a type that never
31
31
  * carries the credential cannot leak it. Discriminated on `access`: only a
32
- * selected link carries tools, and it always does.
32
+ * selected link carries tools, and it always does. Expiry is integer Unix
33
+ * epoch milliseconds.
33
34
  */
34
35
  export type McpConnectLink = {
35
36
  access: Exclude<McpAccessMode, "selected">;
36
- expiresAt: string;
37
+ expiresAtEpochMilliseconds: number;
37
38
  } | {
38
39
  access: "selected";
39
40
  tools: McpAccessToolSelector[];
40
- expiresAt: string;
41
+ expiresAtEpochMilliseconds: number;
41
42
  };
@@ -48,7 +48,6 @@ function useDataTable() {
48
48
  if (context === null) {
49
49
  throw new Error("This control must be rendered inside a <TanStackDataTable />.");
50
50
  }
51
- // eslint-disable-next-line no-restricted-syntax -- restores the row type erased by the context above; the provider only ever stores a TanStackTable.
52
51
  return context.table;
53
52
  }
54
53
  export { DataTableProvider, useDataTable };
@@ -70,7 +70,6 @@ function useClampedPageIndex(table, enabled, loading, onCorrected) {
70
70
  table.setPageIndex(lastPageIndex);
71
71
  }, [lastPageIndex, outOfRange, table]);
72
72
  }
73
- // eslint-disable-next-line complexity -- TanStack table setup is declarative option wiring.
74
73
  function useDataTableInstance(props) {
75
74
  const [sorting, setSorting] = React.useState(props.state?.sorting ?? []);
76
75
  const [columnFilters, setColumnFilters] = React.useState(props.state?.columnFilters ?? []);
@@ -79,7 +78,6 @@ function useDataTableInstance(props) {
79
78
  const [rowSelection, setRowSelection] = React.useState(props.state?.rowSelection ?? {});
80
79
  const [globalFilter, setGlobalFilter] = React.useState(props.state?.globalFilter ?? "");
81
80
  const [pagination, setPagination] = React.useState(props.state?.pagination ?? { pageIndex: 0, pageSize: props.defaultPageSize ?? 10 });
82
- // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table intentionally returns imperative table helpers.
83
81
  return useReactTable({
84
82
  data: props.data,
85
83
  columns: props.columns,
@@ -46,6 +46,6 @@ function getAccountLabel(username, email) {
46
46
  return "Account";
47
47
  }
48
48
  function getAccountMark(label) {
49
- return label.match(/[A-Za-z0-9]/)?.[0]?.toUpperCase() ?? "U";
49
+ return label.match(/[a-z0-9]/i)?.[0]?.toUpperCase() ?? "U";
50
50
  }
51
51
  export { SidebarAccountMenu };
@@ -6,7 +6,7 @@ function WorkflowTimeline({ className, steps, ...props }) {
6
6
  if (!steps.length) {
7
7
  return null;
8
8
  }
9
- return (_jsx("section", { "data-slot": "workflow-timeline", className: cn("bg-background", className), ...props, children: _jsx("ol", { className: "flex w-full min-w-max items-stretch overflow-x-auto px-4 py-3 md:px-6 lg:px-8", children: steps.map((step, index) => (_jsx(WorkflowTimelineStepItem, { expanded: step.id === expandedStepId, showConnector: index > 0, step: step, previousStep: steps[index - 1] }, step.id))) }) }));
9
+ return (_jsx("section", { "data-slot": "workflow-timeline", className: cn("min-w-0 overflow-x-auto bg-background", className), ...props, children: _jsx("ol", { className: "flex w-full min-w-max items-stretch px-4 py-3 md:px-6 lg:px-8", children: steps.map((step, index) => (_jsx(WorkflowTimelineStepItem, { expanded: step.id === expandedStepId, showConnector: index > 0, step: step, previousStep: steps[index - 1] }, step.id))) }) }));
10
10
  }
11
11
  function WorkflowTimelineStepItem({ expanded, previousStep, showConnector, step, }) {
12
12
  return (_jsxs("li", { className: cn("flex min-w-0 items-stretch", expanded && "flex-1"), children: [showConnector ? (_jsx(WorkflowTimelineConnector, { complete: previousStep?.state === "complete" })) : null, expanded ? _jsx(ExpandedWorkflowStep, { step: step }) : _jsx(CompactWorkflowStep, { step: step })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciridae/ui",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "engines": {