@nadicodeai/ui 12.1.94 → 12.1.96
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/dist/components/agent-orb-appearance.d.ts +5 -4
- package/dist/components/agent-orb-appearance.d.ts.map +1 -1
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +1 -0
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +1 -0
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +3 -1
- package/dist/components/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio.js +3 -1
- package/dist/components/brand.js +4 -4
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +2 -0
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +3 -0
- package/dist/components/chart-card.d.ts +5 -4
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +3 -4
- package/dist/components/chart-date-range-control.d.ts.map +1 -1
- package/dist/components/chart-date-range-control.js +2 -2
- package/dist/components/chart-date-range.d.ts +2 -1
- package/dist/components/chart-date-range.d.ts.map +1 -1
- package/dist/components/chart-date-range.js +5 -2
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +17 -4
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +1 -0
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +4 -1
- package/dist/components/company-card/renderer.js +2 -2
- package/dist/components/company-card.js +6 -6
- package/dist/components/dashboard-shell.js +1 -1
- package/dist/components/data-table.d.ts +3 -1
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +40 -29
- package/dist/components/empty-art.d.ts.map +1 -1
- package/dist/components/empty-art.js +2 -0
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +6 -2
- package/dist/components/file-type-icon.d.ts.map +1 -1
- package/dist/components/file-type-icon.js +34 -31
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +8 -5
- package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/calendar-heatmap.js +6 -4
- package/dist/components/house-icons.js +4 -1
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +1 -0
- package/dist/components/installer-shell.js +1 -1
- package/dist/components/model-mark.js +21 -21
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +6 -1
- package/dist/components/plugin-slot-boundary.d.ts.map +1 -1
- package/dist/components/plugin-slot-boundary.js +3 -1
- package/dist/components/product-message.d.ts.map +1 -1
- package/dist/components/product-message.js +1 -0
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +6 -7
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +1 -0
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +4 -5
- package/dist/components/settings-form.d.ts.map +1 -1
- package/dist/components/settings-form.js +1 -3
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +11 -3
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +5 -2
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +3 -1
- package/dist/components/tool-icon.d.ts.map +1 -1
- package/dist/components/tool-icon.js +39 -15
- package/dist/components/usage-meter.d.ts.map +1 -1
- package/dist/components/usage-meter.js +5 -1
- package/dist/eslint/index.js +1 -0
- package/dist/eslint/rules/jsx-class-utility.js +5 -0
- package/dist/eslint/rules/no-choice-control-wrapper.js +2 -0
- package/dist/eslint/rules/no-deprecated-zod-api.js +1 -0
- package/dist/eslint/rules/no-shadcn-appearance-override.js +1 -0
- package/dist/eslint/rules/no-subject-derived-expectation.js +1 -1
- package/dist/eslint/rules/no-write-in-subscription.js +1 -0
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +2 -1
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.js +3 -1
- package/dist/internal/assistant-ui/thread.js +3 -1
- package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +13 -13
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-group.js +3 -1
- package/dist/lib/theme-mode.js +1 -1
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/lib/use-copy-to-clipboard.js +1 -0
- package/dist/standalone/index.js +1 -1
- package/dist/standalone/orb-page.js +1 -0
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { flushSync } from "react-dom";
|
|
5
|
-
import { columnFilteringFeature, columnVisibilityFeature, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFn_arrIncludes, filterFn_equals, filterFn_inDateRange, filterFn_includesString, filterFn_inNumberRange, filterFn_weakEquals, flexRender, rowPaginationFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_datetime, sortFn_text, tableFeatures, useTable, } from "@tanstack/react-table";
|
|
5
|
+
import { columnFilteringFeature, columnVisibilityFeature, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFn_arrIncludes, filterFn_equals, filterFn_inDateRange, filterFn_includesString, filterFn_inNumberRange, filterFn_weakEquals, flexRender, metaHelper, rowPaginationFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_datetime, sortFn_text, tableFeatures, useTable, } from "@tanstack/react-table";
|
|
6
6
|
import { ChevronDown } from "lucide-react";
|
|
7
7
|
import { cn } from "../lib/utils.js";
|
|
8
8
|
import { Button } from "./button.js";
|
|
@@ -33,7 +33,7 @@ const dataTableFeatures = tableFeatures({
|
|
|
33
33
|
datetime: sortFn_datetime,
|
|
34
34
|
text: sortFn_text,
|
|
35
35
|
},
|
|
36
|
-
columnMeta:
|
|
36
|
+
columnMeta: metaHelper(),
|
|
37
37
|
});
|
|
38
38
|
function isNumericColumn(column) {
|
|
39
39
|
return column.columnDef.meta?.numeric === true;
|
|
@@ -46,6 +46,20 @@ const WRAPPING_COLUMN_CLASS = "min-w-32 whitespace-normal align-top";
|
|
|
46
46
|
const PROSE_FRAME_CLASS = "grid grid-cols-[minmax(0,max-content)]";
|
|
47
47
|
const PROSE_CONTENT_CLASS = "max-w-64 truncate";
|
|
48
48
|
const CELL_INSET_CLASS = "px-4";
|
|
49
|
+
function primaryRowLinkProps({ href, label, identity, content, }) {
|
|
50
|
+
const props = {
|
|
51
|
+
href,
|
|
52
|
+
"aria-label": label,
|
|
53
|
+
"data-row-link": "",
|
|
54
|
+
className: cn("-mx-2 -my-1.5 block rounded-md px-2 py-1.5", identity && IDENTITY_CONTENT_CLASS),
|
|
55
|
+
children: content,
|
|
56
|
+
};
|
|
57
|
+
if (identity) {
|
|
58
|
+
props.onFocus = titleWhenCut;
|
|
59
|
+
props.onPointerEnter = titleWhenCut;
|
|
60
|
+
}
|
|
61
|
+
return props;
|
|
62
|
+
}
|
|
49
63
|
function titleWhenCut(event) {
|
|
50
64
|
const element = event.currentTarget;
|
|
51
65
|
const cut = [element, ...element.querySelectorAll("*")].some((node) => node.scrollWidth > node.clientWidth);
|
|
@@ -81,6 +95,7 @@ function definitionId(column) {
|
|
|
81
95
|
}
|
|
82
96
|
export function columnMenuLabel(column) {
|
|
83
97
|
const header = column.columnDef.header;
|
|
98
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- TanStack types a column header as a string or a render function; only typeof tells them apart.
|
|
84
99
|
return typeof header === "string" ? header : column.id;
|
|
85
100
|
}
|
|
86
101
|
function collapseClass(columnId, primaryColumns, compactLayout) {
|
|
@@ -146,11 +161,10 @@ export function DataTable({ columns, data, getRowId, filterColumnId, filterPlace
|
|
|
146
161
|
// An external pager means `data` is already one bounded server page:
|
|
147
162
|
// `manualPagination` makes the paginated row model a passthrough so every
|
|
148
163
|
// row of the current page renders.
|
|
149
|
-
const
|
|
164
|
+
const tableOptions = {
|
|
150
165
|
features: dataTableFeatures,
|
|
151
166
|
data,
|
|
152
167
|
columns,
|
|
153
|
-
...(getRowId ? { getRowId } : {}),
|
|
154
168
|
manualPagination: Boolean(pagination) || pagination === false || !pageLabels,
|
|
155
169
|
onSortingChange: setSorting,
|
|
156
170
|
onColumnFiltersChange: setColumnFilters,
|
|
@@ -162,7 +176,10 @@ export function DataTable({ columns, data, getRowId, filterColumnId, filterPlace
|
|
|
162
176
|
: columnFilters,
|
|
163
177
|
columnVisibility,
|
|
164
178
|
},
|
|
165
|
-
}
|
|
179
|
+
};
|
|
180
|
+
if (getRowId)
|
|
181
|
+
tableOptions.getRowId = getRowId;
|
|
182
|
+
const table = useTable(tableOptions);
|
|
166
183
|
const balancedIdentity = showColumnHeaders && table.getVisibleLeafColumns().length > 5;
|
|
167
184
|
const hasDetailColumns = table
|
|
168
185
|
.getAllLeafColumns()
|
|
@@ -177,6 +194,7 @@ export function DataTable({ columns, data, getRowId, filterColumnId, filterPlace
|
|
|
177
194
|
const goNextPage = pagination ? pagination.onNext : () => table.nextPage();
|
|
178
195
|
const filterColumn = filterColumnId ? table.getColumn(filterColumnId) : undefined;
|
|
179
196
|
const rawFilterValue = filterColumn?.getFilterValue();
|
|
197
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- TanStack types a column filter value as unknown; this is where it is read.
|
|
180
198
|
const filterValue = typeof rawFilterValue === "string" ? rawFilterValue : "";
|
|
181
199
|
const canHideColumns = Boolean(columnsLabel) && table.getAllColumns().some((column) => column.getCanHide());
|
|
182
200
|
const columnsControl = canHideColumns ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsxs(Button, { variant: "outline", children: [columnsLabel, _jsx(ChevronDown, { "aria-hidden": "true", "data-icon": "inline-end" })] }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsx(DropdownMenuGroup, { children: table
|
|
@@ -212,14 +230,7 @@ export function DataTable({ columns, data, getRowId, filterColumnId, filterPlace
|
|
|
212
230
|
const content = flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
213
231
|
const identity = cell.column.id === identityColumnId;
|
|
214
232
|
const prose = cell.column.columnDef.meta?.prose === true;
|
|
215
|
-
return (_jsx(TableCell, { className: className, children: isPrimaryLink ? (renderRowLink({
|
|
216
|
-
href,
|
|
217
|
-
"aria-label": label,
|
|
218
|
-
"data-row-link": "",
|
|
219
|
-
className: cn("-mx-2 -my-1.5 block rounded-md px-2 py-1.5", identity && IDENTITY_CONTENT_CLASS),
|
|
220
|
-
...(identity ? { onFocus: titleWhenCut, onPointerEnter: titleWhenCut } : {}),
|
|
221
|
-
children: content,
|
|
222
|
-
})) : identity ? (_jsx("div", { className: IDENTITY_CONTENT_CLASS, onFocus: titleWhenCut, onPointerEnter: titleWhenCut, children: content })) : prose ? (_jsx("div", { className: PROSE_FRAME_CLASS, children: _jsx("div", { className: PROSE_CONTENT_CLASS, onFocus: titleWhenCut, onPointerEnter: titleWhenCut, children: content }) })) : (content) }, cell.id));
|
|
233
|
+
return (_jsx(TableCell, { className: className, children: isPrimaryLink ? (renderRowLink(primaryRowLinkProps({ href, label, identity, content }))) : identity ? (_jsx("div", { className: IDENTITY_CONTENT_CLASS, onFocus: titleWhenCut, onPointerEnter: titleWhenCut, children: content })) : prose ? (_jsx("div", { className: PROSE_FRAME_CLASS, children: _jsx("div", { className: PROSE_CONTENT_CLASS, onFocus: titleWhenCut, onPointerEnter: titleWhenCut, children: content }) })) : (content) }, cell.id));
|
|
223
234
|
}) }), rowEditor?.rowId === row.id ? (_jsx(TableRow, { "data-slot": "table-row-editor", className: "in-[tbody]:hover:bg-transparent", children: _jsx(TableCell, { colSpan: visibleCells.length, className: "p-0 whitespace-normal", children: rowEditor.render(row.original) }) })) : null, detailCells.length > 0 && shownLayout !== "columns" ? (_jsx(TableDetailRow, { layout: compactLayout, colSpan: visibleCells.filter((cell) => !collapseClass(cell.column.id, primaryColumns, compactLayout)).length, facts: detailCells.map((cell) => ({
|
|
224
235
|
id: cell.id,
|
|
225
236
|
label: columnMenuLabel(cell.column),
|
|
@@ -241,22 +252,22 @@ export function DataTable({ columns, data, getRowId, filterColumnId, filterPlace
|
|
|
241
252
|
? null
|
|
242
253
|
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }), _jsx(LayoutProbeLeadingRecords, { layout: compactLayout, probeRef: layoutProbeRef, children: rows.map(renderRow) })] }));
|
|
243
254
|
const actions = columnsControl || toolbarActions ? (_jsxs(_Fragment, { children: [columnsControl, toolbarActions] })) : null;
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
const toolbarSlots = { actions };
|
|
256
|
+
if (filterColumn) {
|
|
257
|
+
toolbarSlots.search = {
|
|
258
|
+
label: filterPlaceholder ?? "",
|
|
259
|
+
placeholder: filterPlaceholder ?? "",
|
|
260
|
+
value: filterValue,
|
|
261
|
+
onChange: (value) => filterColumn.setFilterValue(value),
|
|
262
|
+
};
|
|
263
|
+
if (clearSearchLabel) {
|
|
264
|
+
toolbarSlots.clear = {
|
|
265
|
+
label: clearSearchLabel,
|
|
266
|
+
onClear: () => filterColumn.setFilterValue(""),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const toolbarRow = renderToolbar(toolbarSlots);
|
|
260
271
|
const card = (_jsx(TableCard, { surface: embedded ? "plain" : "resting", ...(heading ? { title: heading.title } : {}), ...(heading?.description ? { description: heading.description } : {}), ...(heading && toolbarRow ? { toolbar: toolbarRow } : {}), ...(summary ? { summary } : {}), ...(footer ? { footer } : {}), children: tableNode }));
|
|
261
272
|
return (_jsxs("div", { className: "min-w-0 w-full text-body-sm", "data-slot": "data-table", children: [heading ? null : toolbarRow, wrapCard ? wrapCard(card) : card, !pageLabels || pagination === false || (!canPreviousPage && !canNextPage) ? null : (_jsxs("div", { className: "flex items-center justify-end gap-2 py-4", children: [_jsx(Button, { variant: "outline", onClick: goPreviousPage, disabled: !canPreviousPage || (pagination && pagination.isPending), children: pageLabels.previous }), _jsx(Button, { variant: "outline", onClick: goNextPage, disabled: !canNextPage || (pagination && pagination.isPending), children: pageLabels.next })] }))] }));
|
|
262
273
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-art.d.ts","sourceRoot":"","sources":["../../src/components/empty-art.ts"],"names":[],"mappings":"AAIA,iGAAiG;AACjG,eAAO,MAAM,eAAe,2JAclB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,OAAO,CAAC,MAAM,QAAQ,EAAE,OAAO,MAAM,CAAC;AAEtC,qFAAqF;AACrF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAE9D;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,GACvD,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"empty-art.d.ts","sourceRoot":"","sources":["../../src/components/empty-art.ts"],"names":[],"mappings":"AAIA,iGAAiG;AACjG,eAAO,MAAM,eAAe,2JAclB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,OAAO,CAAC,MAAM,QAAQ,EAAE,OAAO,MAAM,CAAC;AAEtC,qFAAqF;AACrF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAE9D;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,GACvD,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,CAShC"}
|
|
@@ -22,8 +22,10 @@ export const EMPTY_ART_NAMES = [
|
|
|
22
22
|
* system's imports; the bundler of each product decides their addresses.
|
|
23
23
|
*/
|
|
24
24
|
export function approveEmptyArt(imported) {
|
|
25
|
+
// SAFETY: the map holds one entry per EMPTY_ART_NAMES name, each the address of that name's imported picture; approving those addresses is this function's job, and the brand has no runtime value.
|
|
25
26
|
return Object.fromEntries(EMPTY_ART_NAMES.map((name) => {
|
|
26
27
|
const asset = imported[name];
|
|
28
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- an image import is a URL string or Next's StaticImageData depending on the bundler; only typeof tells them apart.
|
|
27
29
|
return [name, typeof asset === "string" ? asset : asset.src];
|
|
28
30
|
}));
|
|
29
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-scene.d.ts","sourceRoot":"","sources":["../../src/components/entry-scene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAItE;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,SA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AAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAeA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
export function EntryScene({ aspectRatio = "1220 / 800", minHeight, picture, pictureFeet = 906, wordmark, title, presence, view, className, children, }) {
|
|
4
|
-
return (_jsx("div", { "data-slot": "entry-scene", className: cn("nc-entry-scene", className),
|
|
4
|
+
return (_jsx("div", { "data-slot": "entry-scene", className: cn("nc-entry-scene", className),
|
|
5
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
6
|
+
style: {
|
|
5
7
|
aspectRatio,
|
|
6
8
|
minHeight,
|
|
7
9
|
"--entry-picture-feet": pictureFeet,
|
|
@@ -12,7 +14,9 @@ export function EntryScene({ aspectRatio = "1220 / 800", minHeight, picture, pic
|
|
|
12
14
|
* translation needs, so nothing below it moves between stages.
|
|
13
15
|
*/
|
|
14
16
|
export function EntryMessage({ lines, live = false, className, children, }) {
|
|
15
|
-
return (_jsx("p", { className: cn("nc-entry-message", className), role: live ? "status" : undefined,
|
|
17
|
+
return (_jsx("p", { className: cn("nc-entry-message", className), role: live ? "status" : undefined,
|
|
18
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
19
|
+
style: lines ? { "--entry-message-lines": lines } : undefined, children: children }));
|
|
16
20
|
}
|
|
17
21
|
export function EntryActions({ className, children }) {
|
|
18
22
|
return _jsx("div", { className: cn("nc-entry-actions", className), children: children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-type-icon.d.ts","sourceRoot":"","sources":["../../src/components/file-type-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"file-type-icon.d.ts","sourceRoot":"","sources":["../../src/components/file-type-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA6GpC,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAW/E;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -43,35 +43,38 @@ const ICON_BY_LANGUAGE = {
|
|
|
43
43
|
dockerfile: PackageIcon,
|
|
44
44
|
mermaid: Share2Icon,
|
|
45
45
|
};
|
|
46
|
-
const LANGUAGE_BY_EXTENSION =
|
|
47
|
-
bash
|
|
48
|
-
cfg
|
|
49
|
-
conf
|
|
50
|
-
css
|
|
51
|
-
dockerfile
|
|
52
|
-
env
|
|
53
|
-
gql
|
|
54
|
-
graphql
|
|
55
|
-
ini
|
|
56
|
-
json
|
|
57
|
-
json5
|
|
58
|
-
less
|
|
59
|
-
markdown
|
|
60
|
-
md
|
|
61
|
-
mdx
|
|
62
|
-
mmd
|
|
63
|
-
ps1
|
|
64
|
-
psql
|
|
65
|
-
sass
|
|
66
|
-
scss
|
|
67
|
-
sh
|
|
68
|
-
sql
|
|
69
|
-
svg
|
|
70
|
-
toml
|
|
71
|
-
yaml
|
|
72
|
-
yml
|
|
73
|
-
zsh
|
|
74
|
-
|
|
46
|
+
const LANGUAGE_BY_EXTENSION = new Map([
|
|
47
|
+
["bash", "bash"],
|
|
48
|
+
["cfg", "ini"],
|
|
49
|
+
["conf", "ini"],
|
|
50
|
+
["css", "css"],
|
|
51
|
+
["dockerfile", "dockerfile"],
|
|
52
|
+
["env", "env"],
|
|
53
|
+
["gql", "graphql"],
|
|
54
|
+
["graphql", "graphql"],
|
|
55
|
+
["ini", "ini"],
|
|
56
|
+
["json", "json"],
|
|
57
|
+
["json5", "json5"],
|
|
58
|
+
["less", "less"],
|
|
59
|
+
["markdown", "markdown"],
|
|
60
|
+
["md", "markdown"],
|
|
61
|
+
["mdx", "markdown"],
|
|
62
|
+
["mmd", "mermaid"],
|
|
63
|
+
["ps1", "powershell"],
|
|
64
|
+
["psql", "sql"],
|
|
65
|
+
["sass", "sass"],
|
|
66
|
+
["scss", "scss"],
|
|
67
|
+
["sh", "bash"],
|
|
68
|
+
["sql", "sql"],
|
|
69
|
+
["svg", "svg"],
|
|
70
|
+
["toml", "toml"],
|
|
71
|
+
["yaml", "yaml"],
|
|
72
|
+
["yml", "yml"],
|
|
73
|
+
["zsh", "zsh"],
|
|
74
|
+
]);
|
|
75
|
+
function isIconLanguage(key) {
|
|
76
|
+
return Object.hasOwn(ICON_BY_LANGUAGE, key);
|
|
77
|
+
}
|
|
75
78
|
function normalizeLanguage(language) {
|
|
76
79
|
const first = language?.trim().split(/\s/, 1)[0]?.toLowerCase() ?? "";
|
|
77
80
|
return /^[a-z0-9][a-z0-9+#-]*$/i.test(first) && first.length <= 16 ? first : "";
|
|
@@ -80,11 +83,11 @@ function languageForPath(path) {
|
|
|
80
83
|
const base = (path ?? "").replace(/\\/g, "/").split("/").pop()?.trim().toLowerCase() ?? "";
|
|
81
84
|
const dot = base.lastIndexOf(".");
|
|
82
85
|
const token = dot > 0 ? base.slice(dot + 1) : base;
|
|
83
|
-
return LANGUAGE_BY_EXTENSION
|
|
86
|
+
return LANGUAGE_BY_EXTENSION.get(token) ?? token;
|
|
84
87
|
}
|
|
85
88
|
function FileTypeIcon({ className, language, path, ...props }) {
|
|
86
89
|
const key = normalizeLanguage(path ? languageForPath(path) : language);
|
|
87
|
-
const Icon = ICON_BY_LANGUAGE[key]
|
|
90
|
+
const Icon = isIconLanguage(key) ? ICON_BY_LANGUAGE[key] : CodeIcon;
|
|
88
91
|
return (_jsx(Icon, { "aria-hidden": "true", className: cn("size-4 shrink-0", className), "data-slot": "file-type-icon", ...props }));
|
|
89
92
|
}
|
|
90
93
|
export { FileTypeIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,QAAA,MAAM,IAAI,yaAAe,CAAC;AAW1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,QAAA,MAAM,IAAI,yaAAe,CAAC;AAW1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAuBjB,CAAC;AAQF,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,qBAY7E;AAED,iBAAS,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,0EAoBzE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW1E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,4BAkBtE;AAED,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
|
package/dist/components/form.js
CHANGED
|
@@ -7,19 +7,22 @@ import { Controller, FormProvider, useFormContext, useFormState, } from "react-h
|
|
|
7
7
|
import { cn } from "../lib/utils.js";
|
|
8
8
|
import { Label } from "./label.js";
|
|
9
9
|
const Form = FormProvider;
|
|
10
|
-
const FormFieldContext = React.createContext(
|
|
10
|
+
const FormFieldContext = React.createContext(null);
|
|
11
11
|
const FormField = ({ ...props }) => {
|
|
12
12
|
return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
|
|
13
13
|
};
|
|
14
14
|
const useFormField = () => {
|
|
15
15
|
const fieldContext = React.useContext(FormFieldContext);
|
|
16
16
|
const itemContext = React.useContext(FormItemContext);
|
|
17
|
-
const { getFieldState } = useFormContext();
|
|
18
|
-
const formState = useFormState({ name: fieldContext.name });
|
|
19
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
20
17
|
if (!fieldContext) {
|
|
21
18
|
throw new Error("useFormField should be used within <FormField>");
|
|
22
19
|
}
|
|
20
|
+
if (!itemContext) {
|
|
21
|
+
throw new Error("useFormField should be used within <FormItem>");
|
|
22
|
+
}
|
|
23
|
+
const { getFieldState } = useFormContext();
|
|
24
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
25
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
23
26
|
const { id } = itemContext;
|
|
24
27
|
return {
|
|
25
28
|
id,
|
|
@@ -30,7 +33,7 @@ const useFormField = () => {
|
|
|
30
33
|
...fieldState,
|
|
31
34
|
};
|
|
32
35
|
};
|
|
33
|
-
const FormItemContext = React.createContext(
|
|
36
|
+
const FormItemContext = React.createContext(null);
|
|
34
37
|
function FormItem({ className, ...props }) {
|
|
35
38
|
const id = React.useId();
|
|
36
39
|
return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-heatmap.d.ts","sourceRoot":"","sources":["../../../src/components/heatmap/calendar-heatmap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AAWvD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAItE,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,iBAAiB,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+C5B,CAAC"}
|
|
@@ -282,14 +282,14 @@ export const CalendarHeatmap = ({ data, weekStart = 0, continuousMonths = true,
|
|
|
282
282
|
const dataWithLevels = useMemo(() => {
|
|
283
283
|
if (data.length === 0)
|
|
284
284
|
return [];
|
|
285
|
-
const measuredValues = data.flatMap((activity) =>
|
|
285
|
+
const measuredValues = data.flatMap((activity) => activity.value !== null && Number.isFinite(activity.value) ? [activity.value] : []);
|
|
286
286
|
const maxCount = measuredValues.reduce((max, value) => Math.max(max, value), 1);
|
|
287
287
|
const minCount = isNormalized
|
|
288
288
|
? measuredValues.reduce((min, value) => Math.min(min, value), Infinity)
|
|
289
289
|
: 0;
|
|
290
290
|
return data.map((activity) => {
|
|
291
291
|
const value = activity.value;
|
|
292
|
-
const measured =
|
|
292
|
+
const measured = value !== null && Number.isFinite(value);
|
|
293
293
|
return {
|
|
294
294
|
...activity,
|
|
295
295
|
measured,
|
|
@@ -314,7 +314,7 @@ export const CalendarHeatmap = ({ data, weekStart = 0, continuousMonths = true,
|
|
|
314
314
|
const labelHeight = fontSize + LABEL_MARGIN;
|
|
315
315
|
const firstDatum = data[0];
|
|
316
316
|
const year = firstDatum ? getYear(parseISO(firstDatum.date)) : new Date().getFullYear();
|
|
317
|
-
const totalCount =
|
|
317
|
+
const totalCount = totalCountProp !== undefined
|
|
318
318
|
? totalCountProp
|
|
319
319
|
: dataWithLevels.reduce((sum, activity) => sum + (activity.value ?? 0), 0);
|
|
320
320
|
const blockWidth = blockSize * blockAspectRatio;
|
|
@@ -376,7 +376,9 @@ export const CalendarHeatmapBlock = ({ ref, activity, dayIndex, weekIndex, highl
|
|
|
376
376
|
const { blockSize, blockWidth, blockMargin, blockRadius, labelHeight, labels, levels, isNormalized, colors, } = useCalendarHeatmap();
|
|
377
377
|
const level = Math.max(0, Math.min(colorStepCount(levels, isNormalized), activity.level));
|
|
378
378
|
const cellLabel = labels.cellLabel ?? "{{date}}: {{value}} contributions";
|
|
379
|
-
const ariaLabel =
|
|
379
|
+
const ariaLabel =
|
|
380
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- cellLabel is our own string | (activity => string) union, told apart only by typeof.
|
|
381
|
+
typeof cellLabel === "function"
|
|
380
382
|
? cellLabel(activity)
|
|
381
383
|
: cellLabel
|
|
382
384
|
.replace("{{date}}", activity.date)
|
|
@@ -14,7 +14,10 @@ import { createLucideIcon } from "lucide-react";
|
|
|
14
14
|
* React and nowhere else. Without it every house icon logs a missing-key
|
|
15
15
|
* warning the first time it renders.
|
|
16
16
|
*/
|
|
17
|
-
const toNode = (node) => node.map(([element, attributes], index) => [
|
|
17
|
+
const toNode = (node) => node.map(([element, attributes], index) => [
|
|
18
|
+
element,
|
|
19
|
+
{ ...attributes, key: `${element}-${index}` },
|
|
20
|
+
]);
|
|
18
21
|
/** The company and its doors. */
|
|
19
22
|
export const ArchIcon = createLucideIcon("arch", toNode(houseIcons.arch));
|
|
20
23
|
/** The arch with a check: work waiting on a person. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYvE;AAED,QAAA,MAAM,uBAAuB;;8EAiB5B,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"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e,EACf,kBAAkB,GACnB,CAAC"}
|
|
@@ -23,6 +23,7 @@ const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justif
|
|
|
23
23
|
});
|
|
24
24
|
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
25
25
|
return (_jsx("div", { role: "group", "data-slot": "input-group-addon", "data-align": align, className: cn(inputGroupAddonVariants({ align }), className), onClick: (e) => {
|
|
26
|
+
// SAFETY: a click reaches this handler only from the addon or a node inside it, and React reports a text node's parent element as the target (react-dom's getEventTarget), so the target is an Element in whichever document the addon renders.
|
|
26
27
|
if (e.target.closest("button")) {
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
@@ -26,7 +26,7 @@ function InstallerShellStepList({ steps }) {
|
|
|
26
26
|
}) }));
|
|
27
27
|
}
|
|
28
28
|
function InstallerShell({ state, title, description, progressValue, steps, actions, aside, children, progressLabel = "Installer progress", className, contentClassName, ...props }) {
|
|
29
|
-
const showProgress = state === "progress" &&
|
|
29
|
+
const showProgress = state === "progress" && progressValue !== undefined;
|
|
30
30
|
return (_jsx("section", { "data-slot": "installer-shell", "data-state": state, className: cn("grid min-h-svh place-items-center bg-background p-4 text-foreground md:p-6", className), ...props, children: _jsxs(Card, { className: "w-full max-w-3xl overflow-hidden", children: [_jsx(CardHeader, { children: _jsx(FeedbackState, { "data-slot": "installer-shell-feedback", status: installerStateMeta[state].status, title: title, description: description, icon: installerStateMeta[state].icon, actions: actions, compact: true, className: "rounded-none border-0 bg-transparent p-0 md:p-0" }) }), _jsxs(CardContent, { "data-slot": "installer-shell-content", className: cn("grid gap-5", contentClassName), children: [showProgress && (_jsxs("div", { "data-slot": "installer-shell-progress", className: "grid gap-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-sm", children: [_jsx("span", { className: "font-medium", children: progressLabel }), _jsxs("span", { className: "text-muted-foreground", children: [Math.round(progressValue), "%"] })] }), _jsx(Progress, { value: progressValue, "aria-label": progressLabel })] })), steps?.length ? _jsx(InstallerShellStepList, { steps: steps }) : null, children && (_jsx("div", { "data-slot": "installer-shell-primary", className: "min-w-0", children: children })), aside && (_jsx("div", { "data-slot": "installer-shell-aside", className: "rounded-md border bg-muted/30 p-4 text-sm text-muted-foreground", children: aside }))] })] }) }));
|
|
31
31
|
}
|
|
32
32
|
export { InstallerShell };
|
|
@@ -5,26 +5,26 @@ import { cn } from "../lib/utils.js";
|
|
|
5
5
|
* The one table of names: an OpenRouter author slug whose maker LobeHub's icon
|
|
6
6
|
* set files under another name. Every other author is looked up by its slug.
|
|
7
7
|
*/
|
|
8
|
-
const LOBEHUB_NAMES =
|
|
9
|
-
"aion-labs"
|
|
10
|
-
amazon
|
|
11
|
-
anthropic
|
|
12
|
-
"arcee-ai"
|
|
13
|
-
"bytedance-seed"
|
|
14
|
-
cognitivecomputations
|
|
15
|
-
"dots-studio"
|
|
16
|
-
google
|
|
17
|
-
"ibm-granite"
|
|
18
|
-
"inference-net"
|
|
19
|
-
meituan
|
|
20
|
-
"meta-llama"
|
|
21
|
-
mistralai
|
|
22
|
-
moonshotai
|
|
23
|
-
rekaai
|
|
24
|
-
"x-ai"
|
|
25
|
-
xiaomi
|
|
26
|
-
"z-ai"
|
|
27
|
-
|
|
8
|
+
const LOBEHUB_NAMES = new Map([
|
|
9
|
+
["aion-labs", "aionlabs"],
|
|
10
|
+
["amazon", "nova"],
|
|
11
|
+
["anthropic", "claude"],
|
|
12
|
+
["arcee-ai", "arcee"],
|
|
13
|
+
["bytedance-seed", "bytedance"],
|
|
14
|
+
["cognitivecomputations", "dolphin"],
|
|
15
|
+
["dots-studio", "dotsstudio"],
|
|
16
|
+
["google", "gemini"],
|
|
17
|
+
["ibm-granite", "ibm"],
|
|
18
|
+
["inference-net", "inference"],
|
|
19
|
+
["meituan", "longcat"],
|
|
20
|
+
["meta-llama", "meta"],
|
|
21
|
+
["mistralai", "mistral"],
|
|
22
|
+
["moonshotai", "moonshot"],
|
|
23
|
+
["rekaai", "reka"],
|
|
24
|
+
["x-ai", "grok"],
|
|
25
|
+
["xiaomi", "xiaomimimo"],
|
|
26
|
+
["z-ai", "zai"],
|
|
27
|
+
]);
|
|
28
28
|
/** The shape of every file name in LobeHub's set, without its variant suffix. */
|
|
29
29
|
const LOBEHUB_NAME = /^[a-z0-9]+$/;
|
|
30
30
|
const MODEL_MARK_SIZE = 24;
|
|
@@ -34,7 +34,7 @@ function normalizedAuthor(author) {
|
|
|
34
34
|
return author.trim().toLowerCase().replace(/^~+/, "");
|
|
35
35
|
}
|
|
36
36
|
function lobehubName(slug) {
|
|
37
|
-
const name =
|
|
37
|
+
const name = LOBEHUB_NAMES.get(slug) ?? slug;
|
|
38
38
|
return name && LOBEHUB_NAME.test(name) ? name : undefined;
|
|
39
39
|
}
|
|
40
40
|
function authorInitials(author) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,CAAC;AAEF,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,CAAC;AAEF,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAiEtF;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAQlF;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAQtF;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -7,13 +7,17 @@ function NativeSelect({ className, size = "default", ref, ...props }) {
|
|
|
7
7
|
const select = React.useRef(null);
|
|
8
8
|
const setRef = React.useCallback((node) => {
|
|
9
9
|
select.current = node;
|
|
10
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
|
|
10
11
|
const cleanup = typeof ref === "function" ? ref(node) : undefined;
|
|
12
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
|
|
11
13
|
if (ref && typeof ref !== "function")
|
|
12
14
|
ref.current = node;
|
|
13
15
|
return () => {
|
|
14
16
|
select.current = null;
|
|
17
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
|
|
15
18
|
if (typeof cleanup === "function")
|
|
16
19
|
cleanup();
|
|
20
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
|
|
17
21
|
else if (typeof ref === "function")
|
|
18
22
|
ref(null);
|
|
19
23
|
else if (ref)
|
|
@@ -32,8 +36,9 @@ function NativeSelect({ className, size = "default", ref, ...props }) {
|
|
|
32
36
|
if (defaultKey === undefined || !node || defaultKey === appliedDefault.current)
|
|
33
37
|
return;
|
|
34
38
|
const options = [...node.options];
|
|
35
|
-
const shown = options.
|
|
39
|
+
const shown = options.flatMap((option) => (option.selected ? [option.value] : []));
|
|
36
40
|
const stillShowsOldDefault = JSON.stringify(shown) === appliedDefault.current;
|
|
41
|
+
// SAFETY: defaultKey is JSON.stringify of an array of String() values, built above, so it parses back to a string[].
|
|
37
42
|
const wanted = new Set(JSON.parse(defaultKey));
|
|
38
43
|
for (const option of options)
|
|
39
44
|
option.defaultSelected = wanted.has(option.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-slot-boundary.d.ts","sourceRoot":"","sources":["../../src/components/plugin-slot-boundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,KAAK,wBAAwB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAC3E,KAAK,qBAAqB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnE,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B,CAAC;AAEF,KAAK,uBAAuB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAC9E,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iBAAiB,CAAC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AE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAeF,iBAAS,kBAAkB,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,MAAgB,EAChB,WAAgB,EAChB,OAAO,EACP,KAAK,EACL,iBAA4C,EAC5C,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAA+B,EAC/B,SAAS,EACT,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,uBAAuB,qBAoGzB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,GACzB,CAAC"}
|
|
@@ -16,7 +16,9 @@ function PluginSlotBoundary({ title, description, status = "ready", permissions
|
|
|
16
16
|
const statusIcon = status === "error" ? (_jsx(ShieldAlertIcon, { "data-icon": true, className: "size-4" })) : status === "warning" ? (_jsx(AlertTriangleIcon, { "data-icon": true, className: "size-4" })) : status === "disabled" ? (_jsx(LockKeyholeIcon, { "data-icon": true, className: "size-4" })) : (_jsx(ShieldCheckIcon, { "data-icon": true, className: "size-4" }));
|
|
17
17
|
return (_jsx("section", { "data-slot": "plugin-slot-boundary", "data-status": status, className: className, ...props, children: _jsxs(Card, { className: "overflow-hidden", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "grid min-w-0 gap-1", children: [_jsxs(CardTitle, { className: "flex items-center gap-2", children: [statusIcon, _jsx("span", { className: "min-w-0 truncate", children: title })] }), description && _jsx(CardDescription, { children: description })] }), actions && (_jsx("div", { "data-slot": "plugin-slot-boundary-actions", className: "flex shrink-0 items-center gap-2", children: actions }))] }), permissions.length > 0 && (_jsx("div", { "data-slot": "plugin-slot-boundary-permissions", className: "flex flex-wrap items-center gap-2", "aria-label": "Plugin permissions", children: permissions.map((permission) => {
|
|
18
18
|
const level = permission.level ?? "review";
|
|
19
|
-
return (_jsx(Badge, { "data-slot": "plugin-slot-boundary-permission", "data-level": level, variant: permissionBadgeVariants[level], title:
|
|
19
|
+
return (_jsx(Badge, { "data-slot": "plugin-slot-boundary-permission", "data-level": level, variant: permissionBadgeVariants[level], title:
|
|
20
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- description is a ReactNode; only a string can be a title attribute.
|
|
21
|
+
typeof permission.description === "string"
|
|
20
22
|
? permission.description
|
|
21
23
|
: undefined, children: permission.label }, permission.id));
|
|
22
24
|
}) }))] }), _jsxs(CardContent, { className: "grid gap-4", children: [warning && (_jsxs(Alert, { "data-slot": "plugin-slot-boundary-warning", children: [_jsx(AlertTriangleIcon, { "data-icon": true }), _jsx(AlertTitle, { children: "Review before continuing" }), _jsx(AlertDescription, { children: warning })] })), error && (_jsxs(Alert, { "data-slot": "plugin-slot-boundary-error", variant: "destructive", children: [_jsx(ShieldAlertIcon, { "data-icon": true }), _jsx(AlertTitle, { children: "Plugin content unavailable" }), _jsx(AlertDescription, { children: error })] })), _jsx("div", { "data-slot": "plugin-slot-boundary-content", "aria-label": contentLabel, className: cn("max-h-96 min-w-0 overflow-auto rounded-sm border bg-background p-4 text-sm break-words", status === "disabled" && "pointer-events-none opacity-60", contentClassName), children: children })] }), (redactionGuidance || footer) && (_jsxs(CardFooter, { className: "flex flex-col items-start gap-2 border-t text-sm text-muted-foreground", children: [redactionGuidance && (_jsx("p", { "data-slot": "plugin-slot-boundary-redaction", children: redactionGuidance })), footer && _jsx("div", { "data-slot": "plugin-slot-boundary-footer", children: footer })] }))] }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-message.d.ts","sourceRoot":"","sources":["../../src/components/product-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;AAEtE,MAAM,MAAM,cAAc,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,IAAI;IACzD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC;AAExC,OAAO,CAAC,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC;AAEpC,uGAAuG;AACvG,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CACpC,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"product-message.d.ts","sourceRoot":"","sources":["../../src/components/product-message.ts"],"names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ordMessage(parts) {
|
|
2
|
+
// SAFETY: the `worded` brand has no runtime value; this function is the only place that mints it, which is the guarantee ResolvedMessage carries, and the fields are the parts given.
|
|
2
3
|
return { ...parts, actions: parts.actions ?? [] };
|
|
3
4
|
}
|
|
4
5
|
/** The body a surface shows: none when it would repeat the title. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE;;;;;;;GAOG;AAEH,QAAA,MAAM,yBAAyB;;8EAc9B,CAAC;AAEF,KAAK,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAiBxF,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAO,EACP,GAAS,EACT,IAAgB,EAChB,cAAc,EACd,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,GAAG;IAAE,IAAI,CAAC,EAAE,YAAY,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,+BAwBjF;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAW5E;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE;;;;;;;GAOG;AAEH,QAAA,MAAM,yBAAyB;;8EAc9B,CAAC;AAEF,KAAK,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAiBxF,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAO,EACP,GAAS,EACT,IAAgB,EAChB,cAAc,EACd,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,GAAG;IAAE,IAAI,CAAC,EAAE,YAAY,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,+BAwBjF;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAW5E;AAOD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,SAAS,CAAC,KAAK,+BA8B3F;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAQ5E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAQ5E;AAED,OAAO,EACL,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,yBAAyB,GAC1B,CAAC;AACF,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -31,7 +31,7 @@ const ProgressStateContext = createContext({
|
|
|
31
31
|
overCap: false,
|
|
32
32
|
});
|
|
33
33
|
function Progress({ className, children, value, min = 0, max = 100, tone = "default", indicatorColor, ...props }) {
|
|
34
|
-
const measured =
|
|
34
|
+
const measured = value !== null && Number.isFinite(value);
|
|
35
35
|
const scale = measured && max > min ? Math.min(1, Math.max(0, (value - min) / (max - min))) : 0;
|
|
36
36
|
const overCap = measured && value > max;
|
|
37
37
|
return (_jsx(ProgressPrimitive.Root, { value: value, min: min, max: max, "data-slot": "progress", "data-tone": tone, "data-over-cap": overCap || undefined, className: cn("flex flex-wrap gap-3", className), ...props, children: _jsxs(ProgressStateContext.Provider, { value: { scale, tone, overCap, indicatorColor }, children: [children, _jsx(ProgressTrack, { children: _jsx(ProgressIndicator, {}) })] }) }));
|
|
@@ -42,13 +42,12 @@ function ProgressTrack({ className, ...props }) {
|
|
|
42
42
|
function ProgressIndicator({ className, style, ...props }) {
|
|
43
43
|
const { scale, tone, overCap, indicatorColor } = useContext(ProgressStateContext);
|
|
44
44
|
const indicatorStyle = (state) => {
|
|
45
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- Base UI's style prop is a CSSProperties | (state => CSSProperties) union, told apart only by typeof.
|
|
45
46
|
const resolvedStyle = typeof style === "function" ? style(state) : style;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"--progress-
|
|
49
|
-
|
|
50
|
-
...resolvedStyle,
|
|
51
|
-
};
|
|
47
|
+
const base = { width: "100%", "--progress-scale": scale };
|
|
48
|
+
if (indicatorColor)
|
|
49
|
+
base["--progress-indicator-color"] = indicatorColor;
|
|
50
|
+
return { ...base, ...resolvedStyle };
|
|
52
51
|
};
|
|
53
52
|
return (_jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", "data-tone": overCap ? "over-cap" : tone, "data-over-cap": overCap || undefined, className: cn(progressIndicatorVariants({ tone }), indicatorColor && "bg-(--progress-indicator-color)",
|
|
54
53
|
// After the variant, so the merge keeps this one paint: an allowance
|