@ai-matrx/design-system 0.50.7 → 0.50.11
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/CHANGELOG.md +24 -0
- package/dist/data-table/index.cjs +5 -2
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +5 -2
- package/dist/data-table/index.js.map +1 -1
- package/dist/index.cjs +11 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2019,8 +2019,11 @@ interface AppRailItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEle
|
|
|
2019
2019
|
}
|
|
2020
2020
|
declare const AppRailItem: React.ForwardRefExoticComponent<AppRailItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
2021
2021
|
interface AppRailAvatarProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
2022
|
-
|
|
2022
|
+
/** Up to two letters. Ignored when `children` is given. */
|
|
2023
|
+
initials?: string;
|
|
2023
2024
|
label: string;
|
|
2025
|
+
/** A glyph instead of initials (e.g. a neutral person while signed out). */
|
|
2026
|
+
children?: React.ReactNode;
|
|
2024
2027
|
}
|
|
2025
2028
|
/** The person, at the bottom of the rail (Codex's initials circle). */
|
|
2026
2029
|
declare const AppRailAvatar: React.ForwardRefExoticComponent<AppRailAvatarProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -2034,6 +2037,10 @@ interface BrowserTab {
|
|
|
2034
2037
|
title: string;
|
|
2035
2038
|
/** A favicon URL; a globe is drawn without one. */
|
|
2036
2039
|
icon?: string | null;
|
|
2040
|
+
/** A glyph instead of a favicon (a terminal tab draws its prompt icon). */
|
|
2041
|
+
glyph?: React.ReactNode;
|
|
2042
|
+
/** Small trailing state after the title, e.g. "exited". */
|
|
2043
|
+
note?: string;
|
|
2037
2044
|
}
|
|
2038
2045
|
interface BrowserTabsProps {
|
|
2039
2046
|
tabs: BrowserTab[];
|
|
@@ -2041,9 +2048,16 @@ interface BrowserTabsProps {
|
|
|
2041
2048
|
onSelect: (id: string) => void;
|
|
2042
2049
|
onClose: (id: string) => void;
|
|
2043
2050
|
onNew: () => void;
|
|
2051
|
+
/** The "+" button's name (default "New tab"). */
|
|
2052
|
+
newLabel?: string;
|
|
2053
|
+
/** The tab list's name (default "Tabs"). */
|
|
2054
|
+
label?: string;
|
|
2044
2055
|
className?: string;
|
|
2045
2056
|
}
|
|
2046
|
-
|
|
2057
|
+
/**
|
|
2058
|
+
* Codex's tab strip, for any panel with tabs: the browser's pages, the terminal's shells.
|
|
2059
|
+
*/
|
|
2060
|
+
declare function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, newLabel, label, className }: BrowserTabsProps): React.JSX.Element;
|
|
2047
2061
|
interface BrowserBarProps {
|
|
2048
2062
|
url: string;
|
|
2049
2063
|
canGoBack: boolean;
|
|
@@ -2053,9 +2067,11 @@ interface BrowserBarProps {
|
|
|
2053
2067
|
onReload: () => void;
|
|
2054
2068
|
/** Called with the typed address when the person presses Enter. */
|
|
2055
2069
|
onNavigate: (address: string) => void;
|
|
2070
|
+
/** Controls after the address (Codex: screenshot, open in browser, more). */
|
|
2071
|
+
trailing?: React.ReactNode;
|
|
2056
2072
|
className?: string;
|
|
2057
2073
|
}
|
|
2058
|
-
declare function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, className }: BrowserBarProps): React.JSX.Element;
|
|
2074
|
+
declare function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, trailing, className }: BrowserBarProps): React.JSX.Element;
|
|
2059
2075
|
|
|
2060
2076
|
/**
|
|
2061
2077
|
* The canvas: a right-hand workspace of panels (terminal, files, browser, info) beside the
|
package/dist/index.d.ts
CHANGED
|
@@ -2019,8 +2019,11 @@ interface AppRailItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEle
|
|
|
2019
2019
|
}
|
|
2020
2020
|
declare const AppRailItem: React.ForwardRefExoticComponent<AppRailItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
2021
2021
|
interface AppRailAvatarProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
2022
|
-
|
|
2022
|
+
/** Up to two letters. Ignored when `children` is given. */
|
|
2023
|
+
initials?: string;
|
|
2023
2024
|
label: string;
|
|
2025
|
+
/** A glyph instead of initials (e.g. a neutral person while signed out). */
|
|
2026
|
+
children?: React.ReactNode;
|
|
2024
2027
|
}
|
|
2025
2028
|
/** The person, at the bottom of the rail (Codex's initials circle). */
|
|
2026
2029
|
declare const AppRailAvatar: React.ForwardRefExoticComponent<AppRailAvatarProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -2034,6 +2037,10 @@ interface BrowserTab {
|
|
|
2034
2037
|
title: string;
|
|
2035
2038
|
/** A favicon URL; a globe is drawn without one. */
|
|
2036
2039
|
icon?: string | null;
|
|
2040
|
+
/** A glyph instead of a favicon (a terminal tab draws its prompt icon). */
|
|
2041
|
+
glyph?: React.ReactNode;
|
|
2042
|
+
/** Small trailing state after the title, e.g. "exited". */
|
|
2043
|
+
note?: string;
|
|
2037
2044
|
}
|
|
2038
2045
|
interface BrowserTabsProps {
|
|
2039
2046
|
tabs: BrowserTab[];
|
|
@@ -2041,9 +2048,16 @@ interface BrowserTabsProps {
|
|
|
2041
2048
|
onSelect: (id: string) => void;
|
|
2042
2049
|
onClose: (id: string) => void;
|
|
2043
2050
|
onNew: () => void;
|
|
2051
|
+
/** The "+" button's name (default "New tab"). */
|
|
2052
|
+
newLabel?: string;
|
|
2053
|
+
/** The tab list's name (default "Tabs"). */
|
|
2054
|
+
label?: string;
|
|
2044
2055
|
className?: string;
|
|
2045
2056
|
}
|
|
2046
|
-
|
|
2057
|
+
/**
|
|
2058
|
+
* Codex's tab strip, for any panel with tabs: the browser's pages, the terminal's shells.
|
|
2059
|
+
*/
|
|
2060
|
+
declare function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, newLabel, label, className }: BrowserTabsProps): React.JSX.Element;
|
|
2047
2061
|
interface BrowserBarProps {
|
|
2048
2062
|
url: string;
|
|
2049
2063
|
canGoBack: boolean;
|
|
@@ -2053,9 +2067,11 @@ interface BrowserBarProps {
|
|
|
2053
2067
|
onReload: () => void;
|
|
2054
2068
|
/** Called with the typed address when the person presses Enter. */
|
|
2055
2069
|
onNavigate: (address: string) => void;
|
|
2070
|
+
/** Controls after the address (Codex: screenshot, open in browser, more). */
|
|
2071
|
+
trailing?: React.ReactNode;
|
|
2056
2072
|
className?: string;
|
|
2057
2073
|
}
|
|
2058
|
-
declare function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, className }: BrowserBarProps): React.JSX.Element;
|
|
2074
|
+
declare function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, trailing, className }: BrowserBarProps): React.JSX.Element;
|
|
2059
2075
|
|
|
2060
2076
|
/**
|
|
2061
2077
|
* The canvas: a right-hand workspace of panels (terminal, files, browser, info) beside the
|
package/dist/index.js
CHANGED
|
@@ -5074,7 +5074,7 @@ var AppRailItem = React34.forwardRef(function AppRailItem2({ icon, label, shortc
|
|
|
5074
5074
|
] }) })
|
|
5075
5075
|
] });
|
|
5076
5076
|
});
|
|
5077
|
-
var AppRailAvatar = React34.forwardRef(function AppRailAvatar2({ initials, label, className, ...props }, ref) {
|
|
5077
|
+
var AppRailAvatar = React34.forwardRef(function AppRailAvatar2({ initials = "", label, className, children, ...props }, ref) {
|
|
5078
5078
|
return /* @__PURE__ */ jsxs26(Tooltip, { children: [
|
|
5079
5079
|
/* @__PURE__ */ jsx44(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx44(
|
|
5080
5080
|
"button",
|
|
@@ -5084,12 +5084,12 @@ var AppRailAvatar = React34.forwardRef(function AppRailAvatar2({ initials, label
|
|
|
5084
5084
|
"data-slot": "app-rail-avatar",
|
|
5085
5085
|
"aria-label": label,
|
|
5086
5086
|
className: cn(
|
|
5087
|
-
"flex size-
|
|
5087
|
+
"flex size-6 items-center justify-center rounded-full bg-foreground/[0.12] text-[10px] font-semibold leading-none text-foreground/80 outline-none [&_svg]:size-3.5",
|
|
5088
5088
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
5089
5089
|
className
|
|
5090
5090
|
),
|
|
5091
5091
|
...props,
|
|
5092
|
-
children: initials.slice(0, 2).toUpperCase()
|
|
5092
|
+
children: children ?? initials.slice(0, 2).toUpperCase()
|
|
5093
5093
|
}
|
|
5094
5094
|
) }),
|
|
5095
5095
|
/* @__PURE__ */ jsx44(TooltipContent, { side: "right", align: "center", children: label })
|
|
@@ -5099,8 +5099,8 @@ var AppRailAvatar = React34.forwardRef(function AppRailAvatar2({ initials, label
|
|
|
5099
5099
|
// src/app-shell/browser.tsx
|
|
5100
5100
|
import * as React35 from "react";
|
|
5101
5101
|
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5102
|
-
function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, className }) {
|
|
5103
|
-
return /* @__PURE__ */ jsxs27("div", { "data-slot": "browser-tabs", role: "tablist", "aria-label":
|
|
5102
|
+
function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, newLabel = "New tab", label = "Tabs", className }) {
|
|
5103
|
+
return /* @__PURE__ */ jsxs27("div", { "data-slot": "browser-tabs", role: "tablist", "aria-label": label, className: cn("flex min-w-0 flex-1 items-center gap-0.5", className), children: [
|
|
5104
5104
|
tabs.map((tab) => {
|
|
5105
5105
|
const active = tab.id === activeId;
|
|
5106
5106
|
return /* @__PURE__ */ jsxs27(
|
|
@@ -5124,8 +5124,9 @@ function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, className }) {
|
|
|
5124
5124
|
"aria-selected:bg-background aria-selected:text-foreground aria-selected:shadow-[0_0_0_0.5px_hsl(var(--border)),0_1px_2px_hsl(var(--foreground)/0.06)]"
|
|
5125
5125
|
),
|
|
5126
5126
|
children: [
|
|
5127
|
-
tab.icon ? /* @__PURE__ */ jsx45("img", { src: tab.icon, alt: "", className: "size-3.5 shrink-0 rounded-sm" }) : /* @__PURE__ */ jsx45(GlobeIcon, { className: "size-3.5 shrink-0 opacity-70" }),
|
|
5127
|
+
tab.glyph ? /* @__PURE__ */ jsx45("span", { className: "flex size-3.5 shrink-0 items-center justify-center opacity-70 [&_svg]:size-3.5", children: tab.glyph }) : tab.icon ? /* @__PURE__ */ jsx45("img", { src: tab.icon, alt: "", className: "size-3.5 shrink-0 rounded-sm" }) : /* @__PURE__ */ jsx45(GlobeIcon, { className: "size-3.5 shrink-0 opacity-70" }),
|
|
5128
5128
|
/* @__PURE__ */ jsx45("span", { className: "min-w-0 flex-1 truncate", children: tab.title || "New tab" }),
|
|
5129
|
+
tab.note ? /* @__PURE__ */ jsx45("span", { "data-slot": "browser-tab-note", className: "shrink-0 text-[11px] text-foreground/40", children: tab.note }) : null,
|
|
5129
5130
|
/* @__PURE__ */ jsx45(
|
|
5130
5131
|
"button",
|
|
5131
5132
|
{
|
|
@@ -5153,7 +5154,7 @@ function BrowserTabs({ tabs, activeId, onSelect, onClose, onNew, className }) {
|
|
|
5153
5154
|
"button",
|
|
5154
5155
|
{
|
|
5155
5156
|
type: "button",
|
|
5156
|
-
"aria-label":
|
|
5157
|
+
"aria-label": newLabel,
|
|
5157
5158
|
"data-slot": "browser-tab-new",
|
|
5158
5159
|
onClick: onNew,
|
|
5159
5160
|
className: "flex size-6 shrink-0 items-center justify-center rounded-md text-foreground/55 outline-none hover:bg-foreground/[0.07] hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-3.5",
|
|
@@ -5179,7 +5180,7 @@ function BarButton({ label, onClick, available = true, children }) {
|
|
|
5179
5180
|
}
|
|
5180
5181
|
);
|
|
5181
5182
|
}
|
|
5182
|
-
function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, className }) {
|
|
5183
|
+
function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload, onNavigate, trailing, className }) {
|
|
5183
5184
|
const [draft, setDraft] = React35.useState(url);
|
|
5184
5185
|
const [editing, setEditing] = React35.useState(false);
|
|
5185
5186
|
React35.useEffect(() => {
|
|
@@ -5221,7 +5222,8 @@ function BrowserBar({ url, canGoBack, canGoForward, onBack, onForward, onReload,
|
|
|
5221
5222
|
}
|
|
5222
5223
|
)
|
|
5223
5224
|
}
|
|
5224
|
-
)
|
|
5225
|
+
),
|
|
5226
|
+
trailing ? /* @__PURE__ */ jsx45("div", { "data-slot": "browser-bar-trailing", className: "ml-1 flex shrink-0 items-center gap-0.5", children: trailing }) : null
|
|
5225
5227
|
] });
|
|
5226
5228
|
}
|
|
5227
5229
|
|