@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;GAQG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,+
|
|
1
|
+
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;GAQG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,+BA2BA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { cn } from "../lib/utils.js";
|
|
|
10
10
|
* row, is read whole.
|
|
11
11
|
*/
|
|
12
12
|
function RecordIdentity({ name, mark, hint, detail, wraps = false, }) {
|
|
13
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- name is a ReactNode; only a string can be a title attribute.
|
|
13
14
|
const title = typeof name === "string" ? (hint ? `${name} · ${hint}` : name) : undefined;
|
|
14
15
|
return (_jsxs("span", { className: "flex min-w-0 items-center gap-2.5", "data-slot": "record-identity", children: [mark, _jsxs("span", { className: "grid min-w-0", children: [_jsx("span", { className: cn("min-w-0 font-medium", wraps ? "break-words whitespace-pre-wrap" : "truncate"), title: wraps ? undefined : title, children: name }), detail ? (_jsx("span", { className: "text-xs break-words whitespace-normal text-muted-foreground", "data-slot": "record-identity-detail", children: detail })) : null] })] }));
|
|
15
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-time.d.ts","sourceRoot":"","sources":["../../src/components/record-time.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,eAAe,GAAG;IAC5B,wBAAwB;IACxB,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3B;;;OAGG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"record-time.d.ts","sourceRoot":"","sources":["../../src/components/record-time.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,eAAe,GAAG;IAC5B,wBAAwB;IACxB,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3B;;;OAGG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,MAAM,CAapF;AAED,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAIrF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,eAAe,sCAwCtE"}
|
|
@@ -19,11 +19,10 @@ export function formatRecordTime(at, locale, now = Date.now()) {
|
|
|
19
19
|
return relative.format(0, "minute");
|
|
20
20
|
}
|
|
21
21
|
const sameYear = at.getFullYear() === new Date(now).getFullYear();
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}).format(at);
|
|
22
|
+
const format = { day: "numeric", month: "short" };
|
|
23
|
+
if (!sameYear)
|
|
24
|
+
format.year = "numeric";
|
|
25
|
+
return new Intl.DateTimeFormat(locale, format).format(at);
|
|
27
26
|
}
|
|
28
27
|
/** The moment `at` names, or null when it names none, such as an empty or malformed time. */
|
|
29
28
|
export function recordDate(at) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../src/components/settings-form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmD,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG7F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../src/components/settings-form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmD,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG7F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA0DlC,iBAAS,YAAY,CAAC,EACpB,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC,GAAG;IACrD,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;CACxE,+BAsCA;AAED,iBAAS,sBAAsB,YAM9B;AAED,iBAAS,oBAAoB,CAAC,EAC5B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,+BAY5D;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -43,9 +43,7 @@ function editableValues(form) {
|
|
|
43
43
|
.filter(([name]) => names.has(name))
|
|
44
44
|
.map(([name, value]) => [
|
|
45
45
|
name,
|
|
46
|
-
|
|
47
|
-
? value
|
|
48
|
-
: [value.name, value.size, value.type, value.lastModified],
|
|
46
|
+
value instanceof File ? [value.name, value.size, value.type, value.lastModified] : value,
|
|
49
47
|
]));
|
|
50
48
|
}
|
|
51
49
|
function SettingsForm({ action, onChange, onReset, onSubmit, children, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAS,YAAY,EAA6C,MAAM,oBAAoB,CAAC;AAEpG,OAAO,EAAW,cAAc,EAAmC,MAAM,sBAAsB,CAAC;AAUhG,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAIF,iBAAS,UAAU,wBAOlB;AAED,iBAAS,eAAe,CAAC,EACvB,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,WAAW,EACzB,OAAe,EACf,WAAkB,EAClB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EA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,CAAC,EAAE,OAAO,CAAC;CACpB,qBA0BA;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAY1E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAS9E;AAED,iBAAS,oBAAoB,CAAC,EAC5B,MAAM,EACN,IAAW,EACX,QAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,GAC9B,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,0EAoBF;AAED,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC"}
|
|
@@ -35,6 +35,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
35
35
|
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
36
36
|
const open = openProp ?? _open;
|
|
37
37
|
const setOpen = React.useCallback((value) => {
|
|
38
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- value is React's boolean | updater union, told apart only by typeof.
|
|
38
39
|
const openState = typeof value === "function" ? value(open) : value;
|
|
39
40
|
if (setOpenProp) {
|
|
40
41
|
setOpenProp(openState);
|
|
@@ -76,7 +77,9 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
76
77
|
setOpenMobile,
|
|
77
78
|
toggleSidebar,
|
|
78
79
|
}), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
|
|
79
|
-
return (_jsx(SidebarContext.Provider, { value: contextValue, children: _jsx(TooltipProvider, { delay: 0, children: _jsx("div", { "data-slot": "sidebar-wrapper",
|
|
80
|
+
return (_jsx(SidebarContext.Provider, { value: contextValue, children: _jsx(TooltipProvider, { delay: 0, children: _jsx("div", { "data-slot": "sidebar-wrapper",
|
|
81
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
82
|
+
style: {
|
|
80
83
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
81
84
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
82
85
|
...style,
|
|
@@ -88,7 +91,9 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
88
91
|
return (_jsx("div", { "data-slot": "sidebar", className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className), ...props, children: children }));
|
|
89
92
|
}
|
|
90
93
|
if (isMobile) {
|
|
91
|
-
return (_jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: _jsxs(SheetContent, { closeLabel: mobileCloseLabel ?? "Close", finalFocus: mobileFinalFocus, dir: dir, "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground",
|
|
94
|
+
return (_jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: _jsxs(SheetContent, { closeLabel: mobileCloseLabel ?? "Close", finalFocus: mobileFinalFocus, dir: dir, "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground",
|
|
95
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
96
|
+
style: {
|
|
92
97
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
|
93
98
|
}, side: side, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: mobileTitle ?? "Sidebar" }), _jsx(SheetDescription, { children: mobileDescription ?? "Displays the mobile sidebar." })] }), _jsx("div", { className: "flex h-full w-full flex-col", children: children })] }) }));
|
|
94
99
|
}
|
|
@@ -212,6 +217,7 @@ function SidebarMenuButton({ render, isActive = false, variant = "default", size
|
|
|
212
217
|
if (!tooltip) {
|
|
213
218
|
return comp;
|
|
214
219
|
}
|
|
220
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- tooltip is our own string | TooltipContent props union, told apart only by typeof.
|
|
215
221
|
if (typeof tooltip === "string") {
|
|
216
222
|
tooltip = {
|
|
217
223
|
children: tooltip,
|
|
@@ -241,7 +247,9 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
241
247
|
const [width] = React.useState(() => {
|
|
242
248
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
243
249
|
});
|
|
244
|
-
return (_jsxs("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn("flex h-8 items-center gap-2 rounded-sm px-2", className), ...props, children: [showIcon && _jsx(Skeleton, { className: "size-4 rounded-sm", "data-sidebar": "menu-skeleton-icon" }), _jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text",
|
|
250
|
+
return (_jsxs("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn("flex h-8 items-center gap-2 rounded-sm px-2", className), ...props, children: [showIcon && _jsx(Skeleton, { className: "size-4 rounded-sm", "data-sidebar": "menu-skeleton-icon" }), _jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text",
|
|
251
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
252
|
+
style: {
|
|
245
253
|
"--skeleton-width": width,
|
|
246
254
|
} })] }));
|
|
247
255
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAM9D,QAAA,MAAM,OAAO,GAAI,cAAc,YAAY,gCAiC1C,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -4,9 +4,10 @@ import { useTheme } from "next-themes";
|
|
|
4
4
|
import { Toaster as Sonner } from "sonner";
|
|
5
5
|
import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon } from "lucide-react";
|
|
6
6
|
import { WaitingLine } from "./waiting-line.js";
|
|
7
|
+
import { isThemeMode } from "../lib/theme-mode.js";
|
|
7
8
|
const Toaster = ({ ...props }) => {
|
|
8
9
|
const { theme = "system" } = useTheme();
|
|
9
|
-
return (_jsx(Sonner, { theme: theme, className: "toaster group", icons: {
|
|
10
|
+
return (_jsx(Sonner, { theme: isThemeMode(theme) ? theme : "system", className: "toaster group", icons: {
|
|
10
11
|
success: _jsx(CircleCheckIcon, { className: "size-4 text-success-soft-foreground" }),
|
|
11
12
|
info: _jsx(InfoIcon, { className: "size-4 text-info-soft-foreground" }),
|
|
12
13
|
warning: _jsx(TriangleAlertIcon, { className: "size-4 text-warning-soft-foreground" }),
|
|
@@ -14,7 +15,9 @@ const Toaster = ({ ...props }) => {
|
|
|
14
15
|
// A toast that stays up is already past a second, so its mark is the
|
|
15
16
|
// one waiting line rather than a spinning glyph.
|
|
16
17
|
loading: _jsx(WaitingLine, { className: "w-8", decorative: true }),
|
|
17
|
-
},
|
|
18
|
+
},
|
|
19
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
20
|
+
style: {
|
|
18
21
|
"--normal-bg": "var(--popover)",
|
|
19
22
|
"--normal-text": "var(--popover-foreground)",
|
|
20
23
|
"--normal-border": "transparent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/components/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAcrD,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAW,EACX,WAA0B,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,GAC3B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC,
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/components/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAcrD,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAW,EACX,WAA0B,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,GAC3B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC,qBA2BF;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,qBAsB7D;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -12,7 +12,9 @@ const ToggleGroupContext = React.createContext({
|
|
|
12
12
|
orientation: "horizontal",
|
|
13
13
|
});
|
|
14
14
|
function ToggleGroup({ className, variant, size, spacing = 2, orientation = "horizontal", style, children, ...props }) {
|
|
15
|
-
return (_jsx(ToggleGroupPrimitive, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, "data-orientation": orientation, orientation: orientation,
|
|
15
|
+
return (_jsx(ToggleGroupPrimitive, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, "data-orientation": orientation, orientation: orientation,
|
|
16
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
17
|
+
style: {
|
|
16
18
|
...style,
|
|
17
19
|
"--gap": spacing,
|
|
18
20
|
}, className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-sm data-vertical:flex-col data-vertical:items-stretch", className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing, orientation }, children: children }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-icon.d.ts","sourceRoot":"","sources":["../../src/components/tool-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-icon.d.ts","sourceRoot":"","sources":["../../src/components/tool-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAgDpC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AACD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAiB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBAevF;AACD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -2,22 +2,46 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
const FILE_PATH = "M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z";
|
|
4
4
|
const QUESTION_PATH = "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z";
|
|
5
|
-
const TOOL_ICON_PATHS =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
const TOOL_ICON_PATHS = new Map([
|
|
6
|
+
[
|
|
7
|
+
"diff",
|
|
8
|
+
"M118.18,213.08A8,8,0,0,1,112,216H64a8,8,0,0,1,0-16H92.69L55,162.34a23.85,23.85,0,0,1-7-17V95a32,32,0,1,1,16,0v50.38A8,8,0,0,0,66.34,151L104,188.69V160a8,8,0,0,1,16,0v48a8,8,0,0,1-1.82,5.08ZM208,161V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Z",
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"edit",
|
|
12
|
+
"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z",
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"eye",
|
|
16
|
+
"M247.31,124.76C246.96,123.97,213,48,128,48S9,123.97,8.69,124.76a8,8,0,0,0,0,6.5C9,132.05,43,208,128,208s119-75.95,119.31-76.74a8,8,0,0,0,0-6.5ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",
|
|
17
|
+
],
|
|
18
|
+
["file", FILE_PATH],
|
|
19
|
+
["file-media", FILE_PATH],
|
|
20
|
+
["files", FILE_PATH],
|
|
21
|
+
[
|
|
22
|
+
"globe",
|
|
23
|
+
"M128,24a104,104,0,1,0,104,104A104.12,104.12,0,0,0,128,24Zm0,19c10,11,19,27,26,45h-52c7-18,16-34,26-45Zm0,170c-10-11-19-27-26-45h52c-7,18-16,34-26,45Zm-30-61a141,141,0,0,1,0-48h60a141,141,0,0,1,0,48Z",
|
|
24
|
+
],
|
|
25
|
+
["question", QUESTION_PATH],
|
|
26
|
+
[
|
|
27
|
+
"search",
|
|
28
|
+
"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z",
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"terminal",
|
|
32
|
+
"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-91,94.25-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32a8,8,0,0,1,0,12.5ZM176,168H136a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Z",
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"tools",
|
|
36
|
+
"M232,96a72,72,0,0,1-100.94,66L79,222.22a32,32,0,0,1-45.65-44.84L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z",
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"watch",
|
|
40
|
+
"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z",
|
|
41
|
+
],
|
|
42
|
+
]);
|
|
19
43
|
function ToolIcon({ className, name, size = "0.875rem", style, ...props }) {
|
|
20
|
-
const path = TOOL_ICON_PATHS
|
|
44
|
+
const path = TOOL_ICON_PATHS.get(name) ?? QUESTION_PATH;
|
|
21
45
|
return (_jsx("svg", { "aria-hidden": "true", className: cn("shrink-0", className), "data-slot": "tool-icon", fill: "currentColor", style: { height: size, width: size, ...style }, viewBox: "0 0 256 256", ...props, children: _jsx("path", { d: path }) }));
|
|
22
46
|
}
|
|
23
47
|
export { ToolIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-meter.d.ts","sourceRoot":"","sources":["../../src/components/usage-meter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,MAAW,EACX,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,
|
|
1
|
+
{"version":3,"file":"usage-meter.d.ts","sourceRoot":"","sources":["../../src/components/usage-meter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,MAAW,EACX,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBAqCA;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -3,6 +3,10 @@ import * as React from "react";
|
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
function UsageMeter({ className, fields = [], trailing, usage, children, ...props }) {
|
|
5
5
|
const hasMeta = fields.length > 0 || trailing != null || children != null;
|
|
6
|
-
return (_jsxs("div", { "data-slot": "usage-meter", className: cn("nc-usage-meter", className), ...props, children: [hasMeta && (_jsxs("div", { className: "nc-usage-meter-meta", children: [fields.map((field, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx("span", { className: "nc-usage-meter-sep", children: "/" }), _jsx("span", { children: field })] }, index))), trailing != null && (_jsxs(_Fragment, { children: [_jsx("span", { className: "nc-usage-meter-spacer" }), _jsx("span", { children: trailing })] })), children != null && _jsx("span", { "data-slot": "usage-meter-slot", children: children })] })), usage != null && (_jsx("div", { className: "nc-usage-meter-track", children: _jsx("div", { className: "nc-usage-meter-fill",
|
|
6
|
+
return (_jsxs("div", { "data-slot": "usage-meter", className: cn("nc-usage-meter", className), ...props, children: [hasMeta && (_jsxs("div", { className: "nc-usage-meter-meta", children: [fields.map((field, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx("span", { className: "nc-usage-meter-sep", children: "/" }), _jsx("span", { children: field })] }, index))), trailing != null && (_jsxs(_Fragment, { children: [_jsx("span", { className: "nc-usage-meter-spacer" }), _jsx("span", { children: trailing })] })), children != null && _jsx("span", { "data-slot": "usage-meter-slot", children: children })] })), usage != null && (_jsx("div", { className: "nc-usage-meter-track", children: _jsx("div", { className: "nc-usage-meter-fill",
|
|
7
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
8
|
+
style:
|
|
9
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- usage is our own number | string prop: a number is a percentage, a string a CSS length.
|
|
10
|
+
{ "--nc-usage": typeof usage === "number" ? `${usage}%` : usage } }) }))] }));
|
|
7
11
|
}
|
|
8
12
|
export { UsageMeter };
|
package/dist/eslint/index.js
CHANGED
|
@@ -35,6 +35,7 @@ function readPublishedVersion() {
|
|
|
35
35
|
} catch {
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- parses package.json at its boundary; this package has no schema library.
|
|
38
39
|
if (manifest?.name === PUBLISHING_PACKAGE && typeof manifest.version === "string") {
|
|
39
40
|
return manifest.version;
|
|
40
41
|
}
|
|
@@ -59,6 +59,7 @@ function objectStringValues(objectExpression) {
|
|
|
59
59
|
const values = [];
|
|
60
60
|
for (const property of objectExpression.properties) {
|
|
61
61
|
if (property.type !== "Property") continue;
|
|
62
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- ESTree types Literal.value as string | number | boolean | RegExp | bigint | null; only typeof picks the string.
|
|
62
63
|
if (property.value.type === "Literal" && typeof property.value.value === "string") {
|
|
63
64
|
values.push(property.value.value);
|
|
64
65
|
}
|
|
@@ -80,9 +81,11 @@ function resolvedFragments(identifier, context, { objectsOnly = false } = {}) {
|
|
|
80
81
|
|
|
81
82
|
/** Every string literal and template chunk in the subtree, in source order. */
|
|
82
83
|
function literalFragments(node, fragments, { skipPropertyKeys, context }) {
|
|
84
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- walks the generic AST, where only an object whose type is a string is a node.
|
|
83
85
|
if (!node || typeof node.type !== "string") return;
|
|
84
86
|
|
|
85
87
|
if (node.type === "Literal") {
|
|
88
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- ESTree types Literal.value as string | number | boolean | RegExp | bigint | null; only typeof picks the string.
|
|
86
89
|
if (typeof node.value === "string") fragments.push(node.value);
|
|
87
90
|
return;
|
|
88
91
|
}
|
|
@@ -124,6 +127,7 @@ function literalFragments(node, fragments, { skipPropertyKeys, context }) {
|
|
|
124
127
|
if (skipPropertyKeys && key === "key" && node.type === "Property" && !node.computed) continue;
|
|
125
128
|
if (Array.isArray(value)) {
|
|
126
129
|
for (const child of value) literalFragments(child, fragments, { skipPropertyKeys, context });
|
|
130
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- walks the generic AST, where only an object whose type is a string is a node.
|
|
127
131
|
} else if (value && typeof value === "object") {
|
|
128
132
|
literalFragments(value, fragments, { skipPropertyKeys, context });
|
|
129
133
|
}
|
|
@@ -160,6 +164,7 @@ function spreadClassUtilities(attribute, context, includeSlots) {
|
|
|
160
164
|
if (property.type !== "Property" || property.computed) continue;
|
|
161
165
|
const name = property.key.type === "Identifier" ? property.key.name : property.key.value;
|
|
162
166
|
if (!isClassProperty(name, includeSlots) && name !== "class") continue;
|
|
167
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- ESTree types Literal.value as string | number | boolean | RegExp | bigint | null; only typeof picks the string.
|
|
163
168
|
if (property.value.type !== "Literal" || typeof property.value.value !== "string") continue;
|
|
164
169
|
values.push(...property.value.value.split(/\s+/).filter(Boolean));
|
|
165
170
|
}
|
|
@@ -25,6 +25,7 @@ function handedTo(element, owner) {
|
|
|
25
25
|
function invoked(handler) {
|
|
26
26
|
const found = [];
|
|
27
27
|
const visit = (node) => {
|
|
28
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- walks the generic AST, where only an object whose type is a string is a node.
|
|
28
29
|
if (!node || typeof node.type !== "string") return;
|
|
29
30
|
if (node.type === "Identifier") {
|
|
30
31
|
const parent = node.parent;
|
|
@@ -39,6 +40,7 @@ function invoked(handler) {
|
|
|
39
40
|
for (const [key, value] of Object.entries(node)) {
|
|
40
41
|
if (key === "parent") continue;
|
|
41
42
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
43
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- walks the generic AST, where only an object whose type is a string is a node.
|
|
42
44
|
if (child && typeof child.type === "string") visit(child);
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -103,6 +103,7 @@ function memberName(node) {
|
|
|
103
103
|
return node.property.name;
|
|
104
104
|
}
|
|
105
105
|
if (node.computed && node.property.type === "Literal") {
|
|
106
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- ESTree types Literal.value as string | number | boolean | RegExp | bigint | null; only typeof picks the string.
|
|
106
107
|
return typeof node.property.value === "string" ? node.property.value : undefined;
|
|
107
108
|
}
|
|
108
109
|
return undefined;
|
|
@@ -138,6 +138,7 @@ function inlineAppearanceProperties(attribute) {
|
|
|
138
138
|
: undefined;
|
|
139
139
|
if (!appearanceStyleProperties.has(name)) return false;
|
|
140
140
|
const value = staticStyleValue(property.value);
|
|
141
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- staticStyleValue returns the literal's string, number or undefined; only typeof tells them apart.
|
|
141
142
|
return typeof value === "number" || (typeof value === "string" && value.trim() !== "");
|
|
142
143
|
});
|
|
143
144
|
}
|
|
@@ -43,6 +43,7 @@ import { dirname, resolve, sep } from "node:path";
|
|
|
43
43
|
function propertyName(member) {
|
|
44
44
|
if (!member.computed && member.property.type === "Identifier") return member.property.name;
|
|
45
45
|
if (member.computed && member.property.type === "Literal") {
|
|
46
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- ESTree types Literal.value as string | number | boolean | RegExp | bigint | null; only typeof picks the string.
|
|
46
47
|
return typeof member.property.value === "string" ? member.property.value : undefined;
|
|
47
48
|
}
|
|
48
49
|
return undefined;
|
|
@@ -148,7 +149,6 @@ export const noSubjectDerivedExpectation = {
|
|
|
148
149
|
if (statement.type !== "ImportDeclaration") continue;
|
|
149
150
|
if (statement.importKind === "type") continue;
|
|
150
151
|
const source = statement.source.value;
|
|
151
|
-
if (typeof source !== "string") continue;
|
|
152
152
|
if (!source.startsWith("./") && !source.startsWith("../")) continue;
|
|
153
153
|
if (isHarnessModule(context.filename, source)) continue;
|
|
154
154
|
for (const specifier of statement.specifiers) {
|
|
@@ -77,6 +77,7 @@ function* writesIn(node, keys) {
|
|
|
77
77
|
for (const key of keys[node.type] ?? []) {
|
|
78
78
|
const child = node[key];
|
|
79
79
|
for (const each of Array.isArray(child) ? child : [child]) {
|
|
80
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- walks the generic AST, where only an object whose type is a string is a node.
|
|
80
81
|
if (each && typeof each.type === "string") yield* writesIn(each, keys);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../../src/internal/agent-orb.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EAEb,KAAK,QAAQ,EAId,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAC;AAE5B,QAAA,MAAM,aAAa;;;;;;;;CAQ0B,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,aAAa,CAAC;AACtD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;AAE7D,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,cAAc,CAAC;AACxD,+FAA+F;AAC/F,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAiDlD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAuDpF;
|
|
1
|
+
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../../src/internal/agent-orb.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EAEb,KAAK,QAAQ,EAId,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAC;AAE5B,QAAA,MAAM,aAAa;;;;;;;;CAQ0B,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,aAAa,CAAC;AACtD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;AAE7D,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,cAAc,CAAC;AACxD,+FAA+F;AAC/F,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAiDlD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAuDpF;AAqGD,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,cAAc,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAClD,CAAC;IAAE,MAAM,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAExF,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB;;sBAIzC,OAAO;qBAAuB,aAAa;EAoMvF"}
|
|
@@ -149,7 +149,8 @@ function paintAgentOrb(context, input) {
|
|
|
149
149
|
context.lineTo(...project(line.x2, line.y2));
|
|
150
150
|
context.stroke();
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
const dots = frame.dots;
|
|
153
|
+
for (const dot of dots) {
|
|
153
154
|
context.fillStyle = dot.stripe === undefined ? color : (stripeColors[dot.stripe] ?? color);
|
|
154
155
|
context.globalAlpha = Math.min(1, Math.max(0, (1 - dot.white) * (dot.a ?? 1) * ink * presence.alpha));
|
|
155
156
|
context.beginPath();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+C,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+C,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAqN7F,eAAO,MAAM,sBAAsB,EAAE,EAMpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,EAMjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAiBnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/reasoning.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAiB,KAAK,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM/F,QAAA,MAAM,iBAAiB;;8EAWrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/reasoning.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAiB,KAAK,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM/F,QAAA,MAAM,iBAAiB;;8EAWrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAuDpB;AAkCD,iBAAS,gBAAgB,CAAC,EACxB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,+BAmCA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,+BAmBjD;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BA6DpF;AAID,QAAA,MAAM,SAAS,EAAE,6BAAmD,CAAC;AAIrE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -49,7 +49,9 @@ function ReasoningRoot({ className, variant, open: controlledOpen, onOpenChange:
|
|
|
49
49
|
}
|
|
50
50
|
controlledOnOpenChange?.(open);
|
|
51
51
|
}, [lockScroll, isControlled, controlledOnOpenChange]);
|
|
52
|
-
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "reasoning-root", "data-variant": variant, open: isOpen, onOpenChange: handleOpenChange, className: cn("group/reasoning-root", reasoningVariants({ variant, className })),
|
|
52
|
+
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "reasoning-root", "data-variant": variant, open: isOpen, onOpenChange: handleOpenChange, className: cn("group/reasoning-root", reasoningVariants({ variant, className })),
|
|
53
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
54
|
+
style: {
|
|
53
55
|
"--animation-duration": disclosureDuration,
|
|
54
56
|
}, ...props, children: _jsx(ReasoningPreviewContext.Provider, { value: isPreview, children: children }) }));
|
|
55
57
|
}
|
|
@@ -25,7 +25,9 @@ export const Thread = ({ components = EMPTY_COMPONENTS }) => {
|
|
|
25
25
|
};
|
|
26
26
|
const ThreadRoot = ({ isEmpty }) => {
|
|
27
27
|
const { Welcome = ThreadWelcome } = useContext(ThreadComponentsContext);
|
|
28
|
-
return (_jsx(ThreadPrimitive.Root, { className: "aui-root aui-thread-root bg-background @container flex h-full flex-col",
|
|
28
|
+
return (_jsx(ThreadPrimitive.Root, { className: "aui-root aui-thread-root bg-background @container flex h-full flex-col",
|
|
29
|
+
// SAFETY: CSSProperties lists only standard properties; widening each `--` key to string lets the literal pass as a style object, and React sets each through style.setProperty.
|
|
30
|
+
style: {
|
|
29
31
|
["--thread-max-width"]: "44rem",
|
|
30
32
|
["--composer-bg"]: "var(--color-muted)",
|
|
31
33
|
["--composer-radius"]: "var(--radius-md)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-fallback.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-fallback.tsx"],"names":[],"mappings":"AAUA,OAAO,EAOL,KAAK,4BAA4B,EAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAA0C,MAAM,0BAA0B,CAAC;AAO/F,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GAAG;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-fallback.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-fallback.tsx"],"names":[],"mappings":"AAUA,OAAO,EAOL,KAAK,4BAA4B,EAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAA0C,MAAM,0BAA0B,CAAC;AAO/F,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GAAG;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAudF,QAAA,MAAM,YAAY,EAAE,4BAAqD,CAAC;AAI1E,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -21,7 +21,9 @@ function ToolFallbackRoot({ className, open: controlledOpen, onOpenChange: contr
|
|
|
21
21
|
}
|
|
22
22
|
controlledOnOpenChange?.(open);
|
|
23
23
|
}, [lockScroll, isControlled, controlledOnOpenChange]);
|
|
24
|
-
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-fallback-root", open: isOpen, onOpenChange: handleOpenChange, className: cn("aui-tool-fallback-root group/tool-fallback-root w-full", className),
|
|
24
|
+
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-fallback-root", open: isOpen, onOpenChange: handleOpenChange, className: cn("aui-tool-fallback-root group/tool-fallback-root w-full", className),
|
|
25
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
26
|
+
style: {
|
|
25
27
|
"--animation-duration": disclosureDuration,
|
|
26
28
|
}, ...props, children: children }));
|
|
27
29
|
}
|
|
@@ -73,6 +75,7 @@ function ToolFallbackError({ status, className, ...props }) {
|
|
|
73
75
|
if (status?.type !== "incomplete")
|
|
74
76
|
return null;
|
|
75
77
|
const error = status.error;
|
|
78
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- assistant-ui types a tool error as unknown; a string shows as is and anything else as JSON.
|
|
76
79
|
const errorText = error ? (typeof error === "string" ? error : JSON.stringify(error)) : null;
|
|
77
80
|
if (!errorText)
|
|
78
81
|
return null;
|
|
@@ -82,18 +85,14 @@ function ToolFallbackError({ status, className, ...props }) {
|
|
|
82
85
|
}
|
|
83
86
|
const APPROVED_RESULT = "Approved by user";
|
|
84
87
|
const DENIED_RESULT = "User denied tool execution";
|
|
85
|
-
const APPROVAL_OPTION_DEFAULT_LABELS =
|
|
86
|
-
"allow-once"
|
|
87
|
-
"allow-always"
|
|
88
|
-
"reject-once"
|
|
89
|
-
"reject-always"
|
|
90
|
-
|
|
88
|
+
const APPROVAL_OPTION_DEFAULT_LABELS = new Map([
|
|
89
|
+
["allow-once", "Allow"],
|
|
90
|
+
["allow-always", "Always allow"],
|
|
91
|
+
["reject-once", "Deny"],
|
|
92
|
+
["reject-always", "Always deny"],
|
|
93
|
+
]);
|
|
91
94
|
const isAllowKind = (kind) => kind === "allow-once" || kind === "allow-always";
|
|
92
|
-
const approvalOptionLabel = (option) => option.label ??
|
|
93
|
-
(Object.hasOwn(APPROVAL_OPTION_DEFAULT_LABELS, option.kind)
|
|
94
|
-
? APPROVAL_OPTION_DEFAULT_LABELS[option.kind]
|
|
95
|
-
: undefined) ??
|
|
96
|
-
option.id;
|
|
95
|
+
const approvalOptionLabel = (option) => option.label ?? APPROVAL_OPTION_DEFAULT_LABELS.get(option.kind) ?? option.id;
|
|
97
96
|
function ToolFallbackApproval({ className, addResult, resume, interrupt, approval, respondToApproval, ...props }) {
|
|
98
97
|
const [submitted, setSubmitted] = useState(false);
|
|
99
98
|
const [confirmingId, setConfirmingId] = useState(null);
|
|
@@ -104,7 +103,7 @@ function ToolFallbackApproval({ className, addResult, resume, interrupt, approva
|
|
|
104
103
|
// a host constraint: the kit never adds an approval path beyond it, but
|
|
105
104
|
// always preserves a refusal path.
|
|
106
105
|
const declaredOptions = respondToApproval ? approval?.options : undefined;
|
|
107
|
-
const options = declaredOptions?.filter((o) =>
|
|
106
|
+
const options = declaredOptions?.filter((o) => APPROVAL_OPTION_DEFAULT_LABELS.has(o.kind));
|
|
108
107
|
const respond = (approved) => {
|
|
109
108
|
if (submitted)
|
|
110
109
|
return;
|
|
@@ -136,6 +135,7 @@ function ToolFallbackApproval({ className, addResult, resume, interrupt, approva
|
|
|
136
135
|
};
|
|
137
136
|
const confirming = confirmingId != null ? options?.find((o) => o.id === confirmingId) : undefined;
|
|
138
137
|
if (confirming) {
|
|
138
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- an approval option's confirm is a boolean or a details object; only typeof tells them apart.
|
|
139
139
|
const confirmMeta = typeof confirming.confirm === "object" ? confirming.confirm : undefined;
|
|
140
140
|
const confirmDescription = confirmMeta?.description ?? confirming.description;
|
|
141
141
|
return (_jsxs("div", { "data-slot": "tool-fallback-approval-confirm", className: cn("aui-tool-fallback-approval-confirm flex flex-col gap-2 pt-1", className), ...props, children: [_jsx("p", { className: "aui-tool-fallback-approval-confirm-title font-semibold", children: confirmMeta?.title ?? `${approvalOptionLabel(confirming)}?` }), confirmDescription && (_jsx("p", { className: "aui-tool-fallback-approval-confirm-description text-muted-foreground", children: confirmDescription })), confirming.grants && confirming.grants.length > 0 && (_jsx("ul", { className: "aui-tool-fallback-approval-confirm-grants flex flex-col gap-1", children: confirming.grants.map((grant) => (_jsx("li", { children: _jsx("code", { className: "aui-tool-fallback-approval-confirm-grant bg-muted rounded px-1.5 py-0.5 text-xs", children: grant }) }, grant))) })), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { size: "sm", className: pressable, onClick: () => respondWithOption(confirming), disabled: submitted, children: "Confirm" }), _jsx(Button, { size: "sm", variant: "outline", className: pressable, onClick: () => setConfirmingId(null), disabled: submitted, children: "Back" })] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-group.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-group.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI/F,QAAA,MAAM,iBAAiB;;8EASrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"tool-group.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/tool-group.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI/F,QAAA,MAAM,iBAAiB;;8EASrB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EACxC,MAAM,GAAG,cAAc,CACxB,GACC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,YAAY,EAAE,sBAAsB,EACpC,WAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAsCpB;AAED,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,MAAc,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,+BAwCA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,+BAyBjD;AAED,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -30,7 +30,9 @@ function ToolGroupRoot({ className, variant, open: controlledOpen, onOpenChange:
|
|
|
30
30
|
}
|
|
31
31
|
controlledOnOpenChange?.(open);
|
|
32
32
|
}, [lockScroll, isControlled, controlledOnOpenChange]);
|
|
33
|
-
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-group-root", "data-variant": variant ?? "outline", open: isOpen, onOpenChange: handleOpenChange, className: cn(toolGroupVariants({ variant }), "group/tool-group-root", className),
|
|
33
|
+
return (_jsx(Collapsible, { ref: collapsibleRef, "data-slot": "tool-group-root", "data-variant": variant ?? "outline", open: isOpen, onOpenChange: handleOpenChange, className: cn(toolGroupVariants({ variant }), "group/tool-group-root", className),
|
|
34
|
+
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
35
|
+
style: {
|
|
34
36
|
"--animation-duration": disclosureDuration,
|
|
35
37
|
}, ...props, children: children }));
|
|
36
38
|
}
|
package/dist/lib/theme-mode.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"AA6BA,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAuB,GACxB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;EAsCA"}
|
|
@@ -11,6 +11,7 @@ async function attemptCopy(input) {
|
|
|
11
11
|
return { kind: "copied" };
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|
|
14
|
+
// SAFETY: writeText is navigator.clipboard.writeText, which useCopyToClipboard, the only caller, passes bound; its promise rejects with a DOMException, which is an Error.
|
|
14
15
|
return { kind: "failed", error: error };
|
|
15
16
|
}
|
|
16
17
|
}
|