@designa8/vibedesign-v6 1.8.4 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +453 -141
- package/dist/index.js +452 -140
- package/dist/styles.css +101 -9
- package/package.json +6 -1
- package/src/atoms/AppLayout/AppLayout.tsx +219 -31
- package/src/atoms/ComponentCard/ComponentCard.tsx +150 -0
- package/src/atoms/ComponentCard/index.ts +2 -0
- package/src/atoms/ComponentCard/preview.tsx +111 -0
- package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +81 -67
- package/src/atoms/PreviewToolbar/preview.tsx +42 -16
- package/src/index.ts +1 -0
- package/src/tokens.css +12 -0
package/dist/index.js
CHANGED
|
@@ -1637,14 +1637,30 @@ var WorkspaceMenu = React6.forwardRef(
|
|
|
1637
1637
|
WorkspaceMenu.displayName = "WorkspaceMenu";
|
|
1638
1638
|
|
|
1639
1639
|
// virtual-pkg:src/atoms/AppLayout/AppLayout.tsx
|
|
1640
|
-
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1640
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1641
1641
|
var TOPBAR_HEIGHT = 48;
|
|
1642
|
+
var MOBILE_TOPBAR_HEIGHT = 52;
|
|
1643
|
+
var BOTTOM_TAB_HEIGHT = 56;
|
|
1642
1644
|
var CURVE_R = 16;
|
|
1643
1645
|
var MIN_CHAT_WIDTH = 260;
|
|
1644
1646
|
var MAX_CHAT_WIDTH = 600;
|
|
1645
1647
|
var COLLAPSE_DURATION = 250;
|
|
1646
1648
|
var COLLAPSED_RAIL_WIDTH = 12;
|
|
1647
1649
|
var PANEL_GAP_RIGHT = CURVE_R;
|
|
1650
|
+
var MOBILE_BREAKPOINT = 768;
|
|
1651
|
+
function useIsMobile() {
|
|
1652
|
+
const [mobile, setMobile] = React7.useState(
|
|
1653
|
+
() => typeof window !== "undefined" && window.innerWidth < MOBILE_BREAKPOINT
|
|
1654
|
+
);
|
|
1655
|
+
React7.useEffect(() => {
|
|
1656
|
+
const mq = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1657
|
+
const handler = (e) => setMobile(e.matches);
|
|
1658
|
+
mq.addEventListener("change", handler);
|
|
1659
|
+
setMobile(mq.matches);
|
|
1660
|
+
return () => mq.removeEventListener("change", handler);
|
|
1661
|
+
}, []);
|
|
1662
|
+
return mobile;
|
|
1663
|
+
}
|
|
1648
1664
|
var LayoutPanelIcon = () => /* @__PURE__ */ jsxs7(
|
|
1649
1665
|
"svg",
|
|
1650
1666
|
{
|
|
@@ -1714,6 +1730,39 @@ var ChevronDownIcon = () => /* @__PURE__ */ jsx7(
|
|
|
1714
1730
|
children: /* @__PURE__ */ jsx7("polyline", { points: "6 9 12 15 18 9" })
|
|
1715
1731
|
}
|
|
1716
1732
|
);
|
|
1733
|
+
var ChatIcon = () => /* @__PURE__ */ jsx7(
|
|
1734
|
+
"svg",
|
|
1735
|
+
{
|
|
1736
|
+
width: "20",
|
|
1737
|
+
height: "20",
|
|
1738
|
+
viewBox: "0 0 24 24",
|
|
1739
|
+
fill: "none",
|
|
1740
|
+
stroke: "currentColor",
|
|
1741
|
+
strokeWidth: "2",
|
|
1742
|
+
strokeLinecap: "round",
|
|
1743
|
+
strokeLinejoin: "round",
|
|
1744
|
+
"aria-hidden": "true",
|
|
1745
|
+
children: /* @__PURE__ */ jsx7("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
1746
|
+
}
|
|
1747
|
+
);
|
|
1748
|
+
var ViewIcon = () => /* @__PURE__ */ jsxs7(
|
|
1749
|
+
"svg",
|
|
1750
|
+
{
|
|
1751
|
+
width: "20",
|
|
1752
|
+
height: "20",
|
|
1753
|
+
viewBox: "0 0 24 24",
|
|
1754
|
+
fill: "none",
|
|
1755
|
+
stroke: "currentColor",
|
|
1756
|
+
strokeWidth: "2",
|
|
1757
|
+
strokeLinecap: "round",
|
|
1758
|
+
strokeLinejoin: "round",
|
|
1759
|
+
"aria-hidden": "true",
|
|
1760
|
+
children: [
|
|
1761
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "3" }),
|
|
1762
|
+
/* @__PURE__ */ jsx7("path", { d: "M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7z" })
|
|
1763
|
+
]
|
|
1764
|
+
}
|
|
1765
|
+
);
|
|
1717
1766
|
function applyWidth(els, px) {
|
|
1718
1767
|
for (const el of els) {
|
|
1719
1768
|
if (el) el.style.width = `${px}px`;
|
|
@@ -1827,13 +1876,11 @@ var ConcaveCorner = () => /* @__PURE__ */ jsx7(
|
|
|
1827
1876
|
style: {
|
|
1828
1877
|
position: "absolute",
|
|
1829
1878
|
top: -1,
|
|
1830
|
-
// cover the 1px border exactly
|
|
1831
1879
|
left: -1,
|
|
1832
1880
|
width: CURVE_R + 1,
|
|
1833
1881
|
height: CURVE_R + 1,
|
|
1834
1882
|
pointerEvents: "none",
|
|
1835
1883
|
zIndex: 2,
|
|
1836
|
-
// above the border
|
|
1837
1884
|
overflow: "hidden"
|
|
1838
1885
|
},
|
|
1839
1886
|
children: /* @__PURE__ */ jsxs7(
|
|
@@ -1881,6 +1928,87 @@ var PromptFooter = ({ chatProps }) => {
|
|
|
1881
1928
|
}
|
|
1882
1929
|
) });
|
|
1883
1930
|
};
|
|
1931
|
+
var MobileTabBar = ({ activePanel, onChange }) => /* @__PURE__ */ jsx7(
|
|
1932
|
+
"div",
|
|
1933
|
+
{
|
|
1934
|
+
className: "flex-shrink-0 flex items-stretch border-t border-hairline-soft bg-canvas",
|
|
1935
|
+
style: { height: BOTTOM_TAB_HEIGHT },
|
|
1936
|
+
role: "tablist",
|
|
1937
|
+
"aria-label": "Switch panel",
|
|
1938
|
+
children: ["chat", "view"].map((panel) => {
|
|
1939
|
+
const active = activePanel === panel;
|
|
1940
|
+
return /* @__PURE__ */ jsxs7(
|
|
1941
|
+
Button,
|
|
1942
|
+
{
|
|
1943
|
+
role: "tab",
|
|
1944
|
+
type: "button",
|
|
1945
|
+
variant: "ghost",
|
|
1946
|
+
size: "sm",
|
|
1947
|
+
"aria-selected": active,
|
|
1948
|
+
onClick: () => onChange(panel),
|
|
1949
|
+
className: [
|
|
1950
|
+
"flex-1 flex-col !gap-xxs !rounded-none !border-0 !h-full",
|
|
1951
|
+
active ? "!text-primary" : "!text-muted"
|
|
1952
|
+
].join(" "),
|
|
1953
|
+
children: [
|
|
1954
|
+
panel === "chat" ? /* @__PURE__ */ jsx7(ChatIcon, {}) : /* @__PURE__ */ jsx7(ViewIcon, {}),
|
|
1955
|
+
/* @__PURE__ */ jsx7(
|
|
1956
|
+
"span",
|
|
1957
|
+
{
|
|
1958
|
+
className: ["text-caption", active ? "font-weight-heading-sm text-primary" : "text-muted"].join(" "),
|
|
1959
|
+
style: { textTransform: "capitalize" },
|
|
1960
|
+
children: panel === "chat" ? "Chat" : "View"
|
|
1961
|
+
}
|
|
1962
|
+
)
|
|
1963
|
+
]
|
|
1964
|
+
},
|
|
1965
|
+
panel
|
|
1966
|
+
);
|
|
1967
|
+
})
|
|
1968
|
+
}
|
|
1969
|
+
);
|
|
1970
|
+
var MobileTopBar = ({
|
|
1971
|
+
projectName,
|
|
1972
|
+
avatarInitials,
|
|
1973
|
+
activePanel,
|
|
1974
|
+
navbarProps,
|
|
1975
|
+
onRenameProject,
|
|
1976
|
+
onBackToProjects,
|
|
1977
|
+
onHome
|
|
1978
|
+
}) => /* @__PURE__ */ jsx7(
|
|
1979
|
+
"div",
|
|
1980
|
+
{
|
|
1981
|
+
className: "w-full flex flex-shrink-0 items-center px-sm gap-sm border-b border-hairline-soft bg-canvas",
|
|
1982
|
+
style: { height: MOBILE_TOPBAR_HEIGHT },
|
|
1983
|
+
children: activePanel === "chat" ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1984
|
+
/* @__PURE__ */ jsx7(
|
|
1985
|
+
AvatarNav,
|
|
1986
|
+
{
|
|
1987
|
+
initials: avatarInitials,
|
|
1988
|
+
onBackToProjects,
|
|
1989
|
+
onHome
|
|
1990
|
+
}
|
|
1991
|
+
),
|
|
1992
|
+
/* @__PURE__ */ jsx7("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx7(
|
|
1993
|
+
WorkspaceMenu,
|
|
1994
|
+
{
|
|
1995
|
+
workspaceName: projectName,
|
|
1996
|
+
onRename: onRenameProject,
|
|
1997
|
+
className: "w-full"
|
|
1998
|
+
}
|
|
1999
|
+
) })
|
|
2000
|
+
] }) : /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
2001
|
+
/* @__PURE__ */ jsx7("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx7("span", { className: "text-body-md font-weight-heading-sm text-ink truncate block", children: projectName }) }),
|
|
2002
|
+
/* @__PURE__ */ jsx7("div", { className: "flex-shrink-0", style: { minWidth: "fit-content" }, children: /* @__PURE__ */ jsx7(
|
|
2003
|
+
TopNavbar,
|
|
2004
|
+
{
|
|
2005
|
+
...navbarProps,
|
|
2006
|
+
className: "!border-0 !py-0 !px-0 !bg-transparent w-auto"
|
|
2007
|
+
}
|
|
2008
|
+
) })
|
|
2009
|
+
] })
|
|
2010
|
+
}
|
|
2011
|
+
);
|
|
1884
2012
|
var AppLayout = React7.forwardRef(
|
|
1885
2013
|
({
|
|
1886
2014
|
navbarProps,
|
|
@@ -1895,8 +2023,10 @@ var AppLayout = React7.forwardRef(
|
|
|
1895
2023
|
onBackToProjects,
|
|
1896
2024
|
onHome,
|
|
1897
2025
|
avatarInitials = "A",
|
|
2026
|
+
defaultMobilePanel = "chat",
|
|
1898
2027
|
className
|
|
1899
2028
|
}, ref) => {
|
|
2029
|
+
const isMobile = useIsMobile();
|
|
1900
2030
|
const [activeTab, setActiveTab] = React7.useState(rightPanelActiveTab);
|
|
1901
2031
|
const [chatWidth, setChatWidth] = React7.useState(defaultChatWidth);
|
|
1902
2032
|
const [chatCollapsed, setChatCollapsed] = React7.useState(false);
|
|
@@ -1908,6 +2038,7 @@ var AppLayout = React7.forwardRef(
|
|
|
1908
2038
|
const startX = React7.useRef(0);
|
|
1909
2039
|
const startWidth = React7.useRef(defaultChatWidth);
|
|
1910
2040
|
const currentWidth = React7.useRef(defaultChatWidth);
|
|
2041
|
+
const [mobilePanel, setMobilePanel] = React7.useState(defaultMobilePanel);
|
|
1911
2042
|
const collapseTransition = `width ${COLLAPSE_DURATION}ms cubic-bezier(0.4,0,0.2,1)`;
|
|
1912
2043
|
const opacityTransition = `opacity ${COLLAPSE_DURATION}ms ease`;
|
|
1913
2044
|
React7.useEffect(() => {
|
|
@@ -1955,6 +2086,68 @@ var AppLayout = React7.forwardRef(
|
|
|
1955
2086
|
};
|
|
1956
2087
|
const renderedWidth = chatCollapsed ? COLLAPSED_RAIL_WIDTH : chatWidth;
|
|
1957
2088
|
const hasTabs = Array.isArray(rightPanelTabs) && rightPanelTabs.length > 0;
|
|
2089
|
+
if (isMobile) {
|
|
2090
|
+
return /* @__PURE__ */ jsxs7(
|
|
2091
|
+
"div",
|
|
2092
|
+
{
|
|
2093
|
+
ref,
|
|
2094
|
+
className: ["w-full flex flex-col overflow-hidden bg-canvas", className].filter(Boolean).join(" "),
|
|
2095
|
+
style: { height: "100vh" },
|
|
2096
|
+
children: [
|
|
2097
|
+
/* @__PURE__ */ jsx7(
|
|
2098
|
+
MobileTopBar,
|
|
2099
|
+
{
|
|
2100
|
+
projectName,
|
|
2101
|
+
avatarInitials,
|
|
2102
|
+
activePanel: mobilePanel,
|
|
2103
|
+
navbarProps,
|
|
2104
|
+
onRenameProject,
|
|
2105
|
+
onBackToProjects,
|
|
2106
|
+
onHome
|
|
2107
|
+
}
|
|
2108
|
+
),
|
|
2109
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex-1 min-h-0 overflow-hidden relative", children: [
|
|
2110
|
+
/* @__PURE__ */ jsx7(
|
|
2111
|
+
"div",
|
|
2112
|
+
{
|
|
2113
|
+
className: "absolute inset-0 flex flex-col",
|
|
2114
|
+
style: {
|
|
2115
|
+
background: "var(--color-surface-soft)",
|
|
2116
|
+
opacity: mobilePanel === "chat" ? 1 : 0,
|
|
2117
|
+
pointerEvents: mobilePanel === "chat" ? "auto" : "none",
|
|
2118
|
+
transition: "opacity 200ms ease",
|
|
2119
|
+
zIndex: mobilePanel === "chat" ? 1 : 0
|
|
2120
|
+
},
|
|
2121
|
+
children: /* @__PURE__ */ jsx7(
|
|
2122
|
+
ChatScreen,
|
|
2123
|
+
{
|
|
2124
|
+
...chatProps,
|
|
2125
|
+
className: "flex-1 min-h-0",
|
|
2126
|
+
renderFooter: chatProps?.renderFooter ?? /* @__PURE__ */ jsx7(PromptFooter, { chatProps })
|
|
2127
|
+
}
|
|
2128
|
+
)
|
|
2129
|
+
}
|
|
2130
|
+
),
|
|
2131
|
+
/* @__PURE__ */ jsx7(
|
|
2132
|
+
"div",
|
|
2133
|
+
{
|
|
2134
|
+
className: "absolute inset-0 flex flex-col overflow-auto",
|
|
2135
|
+
style: {
|
|
2136
|
+
background: "var(--color-canvas)",
|
|
2137
|
+
opacity: mobilePanel === "view" ? 1 : 0,
|
|
2138
|
+
pointerEvents: mobilePanel === "view" ? "auto" : "none",
|
|
2139
|
+
transition: "opacity 200ms ease",
|
|
2140
|
+
zIndex: mobilePanel === "view" ? 1 : 0
|
|
2141
|
+
},
|
|
2142
|
+
children: rightPanel !== void 0 ? /* @__PURE__ */ jsx7("div", { className: "w-full flex-1", children: rightPanel }) : /* @__PURE__ */ jsx7(RightPanelPlaceholder, {})
|
|
2143
|
+
}
|
|
2144
|
+
)
|
|
2145
|
+
] }),
|
|
2146
|
+
/* @__PURE__ */ jsx7(MobileTabBar, { activePanel: mobilePanel, onChange: setMobilePanel })
|
|
2147
|
+
]
|
|
2148
|
+
}
|
|
2149
|
+
);
|
|
2150
|
+
}
|
|
1958
2151
|
return /* @__PURE__ */ jsxs7(
|
|
1959
2152
|
"div",
|
|
1960
2153
|
{
|
|
@@ -2718,7 +2911,7 @@ AppSidebar.displayName = "AppSidebar";
|
|
|
2718
2911
|
|
|
2719
2912
|
// virtual-pkg:src/atoms/AuthScreen/AuthScreen.tsx
|
|
2720
2913
|
import React11, { useState, useId } from "react";
|
|
2721
|
-
import { Fragment, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2914
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2722
2915
|
var AuthScreen = React11.forwardRef(
|
|
2723
2916
|
({ defaultTab = "login", onLogin, onSignup, loading = false }, ref) => {
|
|
2724
2917
|
const [tab, setTab] = useState(defaultTab);
|
|
@@ -2887,7 +3080,7 @@ var AuthScreen = React11.forwardRef(
|
|
|
2887
3080
|
] }),
|
|
2888
3081
|
"Continue with Google"
|
|
2889
3082
|
] }),
|
|
2890
|
-
/* @__PURE__ */ jsx11("p", { className: "mt-xl text-center text-body-sm text-muted", children: tab === "login" ? /* @__PURE__ */ jsxs11(
|
|
3083
|
+
/* @__PURE__ */ jsx11("p", { className: "mt-xl text-center text-body-sm text-muted", children: tab === "login" ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
2891
3084
|
"Don\u2019t have an account?",
|
|
2892
3085
|
" ",
|
|
2893
3086
|
/* @__PURE__ */ jsx11(
|
|
@@ -2902,7 +3095,7 @@ var AuthScreen = React11.forwardRef(
|
|
|
2902
3095
|
children: "Sign up"
|
|
2903
3096
|
}
|
|
2904
3097
|
)
|
|
2905
|
-
] }) : /* @__PURE__ */ jsxs11(
|
|
3098
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
2906
3099
|
"Already have an account?",
|
|
2907
3100
|
" ",
|
|
2908
3101
|
/* @__PURE__ */ jsx11(
|
|
@@ -3014,12 +3207,122 @@ var Chip = React12.forwardRef(
|
|
|
3014
3207
|
);
|
|
3015
3208
|
Chip.displayName = "Chip";
|
|
3016
3209
|
|
|
3017
|
-
// virtual-pkg:src/atoms/
|
|
3210
|
+
// virtual-pkg:src/atoms/ComponentCard/ComponentCard.tsx
|
|
3018
3211
|
import React13 from "react";
|
|
3019
3212
|
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3020
|
-
var
|
|
3213
|
+
var kindColors = {
|
|
3214
|
+
Atom: "bg-[var(--color-kind-atom-bg)] text-[var(--color-kind-atom-text)] border-[var(--color-kind-atom-border)]",
|
|
3215
|
+
Molecule: "bg-[var(--color-kind-molecule-bg)] text-[var(--color-kind-molecule-text)] border-[var(--color-kind-molecule-border)]",
|
|
3216
|
+
Organism: "bg-[var(--color-kind-organism-bg)] text-[var(--color-kind-organism-text)] border-[var(--color-kind-organism-border)]",
|
|
3217
|
+
Template: "bg-[var(--color-kind-template-bg)] text-[var(--color-kind-template-text)] border-[var(--color-kind-template-border)]"
|
|
3218
|
+
};
|
|
3219
|
+
var iconBg = {
|
|
3220
|
+
Atom: "bg-[var(--color-kind-atom-bg)] text-[var(--color-kind-atom-text)]",
|
|
3221
|
+
Molecule: "bg-primary text-on-primary",
|
|
3222
|
+
Organism: "bg-primary text-on-primary",
|
|
3223
|
+
Template: "bg-[var(--color-kind-template-bg)] text-[var(--color-kind-template-text)]"
|
|
3224
|
+
};
|
|
3225
|
+
var ComponentCard = React13.forwardRef(
|
|
3226
|
+
({
|
|
3227
|
+
name,
|
|
3228
|
+
kind = "Organism",
|
|
3229
|
+
description,
|
|
3230
|
+
thumbnailContent,
|
|
3231
|
+
thumbnailBg,
|
|
3232
|
+
selected = false,
|
|
3233
|
+
className,
|
|
3234
|
+
...rest
|
|
3235
|
+
}, ref) => {
|
|
3236
|
+
return /* @__PURE__ */ jsxs13(
|
|
3237
|
+
"div",
|
|
3238
|
+
{
|
|
3239
|
+
ref,
|
|
3240
|
+
className: [
|
|
3241
|
+
"group relative flex flex-col rounded-xl bg-surface overflow-hidden",
|
|
3242
|
+
"border border-hairline-soft",
|
|
3243
|
+
"shadow-card",
|
|
3244
|
+
"transition-all duration-200",
|
|
3245
|
+
"hover:shadow-md hover:-translate-y-0.5 cursor-pointer",
|
|
3246
|
+
selected ? "ring-2 ring-primary" : "",
|
|
3247
|
+
className
|
|
3248
|
+
].filter(Boolean).join(" "),
|
|
3249
|
+
...rest,
|
|
3250
|
+
children: [
|
|
3251
|
+
/* @__PURE__ */ jsx13(
|
|
3252
|
+
"div",
|
|
3253
|
+
{
|
|
3254
|
+
className: [
|
|
3255
|
+
"relative flex items-center justify-center",
|
|
3256
|
+
"w-full aspect-[4/3] overflow-hidden",
|
|
3257
|
+
thumbnailBg ?? "bg-surface-soft"
|
|
3258
|
+
].join(" "),
|
|
3259
|
+
children: thumbnailContent ?? /* @__PURE__ */ jsx13(DefaultThumbnail, { kind })
|
|
3260
|
+
}
|
|
3261
|
+
),
|
|
3262
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between px-md py-sm border-t border-hairline-soft bg-canvas", children: [
|
|
3263
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-xxs min-w-0", children: [
|
|
3264
|
+
/* @__PURE__ */ jsx13("span", { className: "text-body-sm font-weight-heading-sm text-ink truncate", children: name }),
|
|
3265
|
+
/* @__PURE__ */ jsx13("span", { className: "text-caption text-muted truncate", children: description ?? `${kind} \u2022 Generated` })
|
|
3266
|
+
] }),
|
|
3267
|
+
/* @__PURE__ */ jsx13(
|
|
3268
|
+
"span",
|
|
3269
|
+
{
|
|
3270
|
+
className: [
|
|
3271
|
+
"ml-sm shrink-0 inline-flex items-center px-sm py-xs",
|
|
3272
|
+
"rounded-md text-caption font-weight-heading-sm tracking-wide uppercase",
|
|
3273
|
+
"border",
|
|
3274
|
+
kindColors[kind]
|
|
3275
|
+
].join(" "),
|
|
3276
|
+
children: kind
|
|
3277
|
+
}
|
|
3278
|
+
)
|
|
3279
|
+
] })
|
|
3280
|
+
]
|
|
3281
|
+
}
|
|
3282
|
+
);
|
|
3283
|
+
}
|
|
3284
|
+
);
|
|
3285
|
+
ComponentCard.displayName = "ComponentCard";
|
|
3286
|
+
function DefaultThumbnail({ kind }) {
|
|
3287
|
+
const icons = {
|
|
3288
|
+
Atom: /* @__PURE__ */ jsxs13("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3289
|
+
/* @__PURE__ */ jsx13("circle", { cx: "12", cy: "12", r: "1" }),
|
|
3290
|
+
/* @__PURE__ */ jsx13("path", { d: "M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z" }),
|
|
3291
|
+
/* @__PURE__ */ jsx13("path", { d: "M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z" })
|
|
3292
|
+
] }),
|
|
3293
|
+
Molecule: /* @__PURE__ */ jsxs13("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3294
|
+
/* @__PURE__ */ jsx13("rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3295
|
+
/* @__PURE__ */ jsx13("rect", { x: "14", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3296
|
+
/* @__PURE__ */ jsx13("rect", { x: "2", y: "14", width: "8", height: "8", rx: "2" })
|
|
3297
|
+
] }),
|
|
3298
|
+
Organism: /* @__PURE__ */ jsxs13("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3299
|
+
/* @__PURE__ */ jsx13("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
|
|
3300
|
+
/* @__PURE__ */ jsx13("path", { d: "M2 17l10 5 10-5" }),
|
|
3301
|
+
/* @__PURE__ */ jsx13("path", { d: "M2 12l10 5 10-5" })
|
|
3302
|
+
] }),
|
|
3303
|
+
Template: /* @__PURE__ */ jsxs13("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3304
|
+
/* @__PURE__ */ jsx13("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3305
|
+
/* @__PURE__ */ jsx13("path", { d: "M3 9h18M9 21V9" })
|
|
3306
|
+
] })
|
|
3307
|
+
};
|
|
3308
|
+
return /* @__PURE__ */ jsx13(
|
|
3309
|
+
"div",
|
|
3310
|
+
{
|
|
3311
|
+
className: [
|
|
3312
|
+
"flex items-center justify-center w-16 h-16 rounded-xl",
|
|
3313
|
+
iconBg[kind]
|
|
3314
|
+
].join(" "),
|
|
3315
|
+
children: icons[kind]
|
|
3316
|
+
}
|
|
3317
|
+
);
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
// virtual-pkg:src/atoms/FilterTabBar/FilterTabBar.tsx
|
|
3321
|
+
import React14 from "react";
|
|
3322
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3323
|
+
var FilterTabBar = React14.forwardRef(
|
|
3021
3324
|
({ tabs, value, onChange, className = "", ...rest }, ref) => {
|
|
3022
|
-
return /* @__PURE__ */
|
|
3325
|
+
return /* @__PURE__ */ jsx14(
|
|
3023
3326
|
"div",
|
|
3024
3327
|
{
|
|
3025
3328
|
ref,
|
|
@@ -3033,7 +3336,7 @@ var FilterTabBar = React13.forwardRef(
|
|
|
3033
3336
|
...rest,
|
|
3034
3337
|
children: tabs.map((tab) => {
|
|
3035
3338
|
const isActive = tab.value === value;
|
|
3036
|
-
return /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ jsxs14(
|
|
3037
3340
|
Button,
|
|
3038
3341
|
{
|
|
3039
3342
|
role: "tab",
|
|
@@ -3044,9 +3347,9 @@ var FilterTabBar = React13.forwardRef(
|
|
|
3044
3347
|
onClick: () => onChange(tab.value),
|
|
3045
3348
|
className: "gap-xs",
|
|
3046
3349
|
children: [
|
|
3047
|
-
tab.icon && /* @__PURE__ */
|
|
3048
|
-
tab.label && /* @__PURE__ */
|
|
3049
|
-
tab.count !== void 0 && /* @__PURE__ */
|
|
3350
|
+
tab.icon && /* @__PURE__ */ jsx14("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
|
|
3351
|
+
tab.label && /* @__PURE__ */ jsx14("span", { children: tab.label }),
|
|
3352
|
+
tab.count !== void 0 && /* @__PURE__ */ jsx14(
|
|
3050
3353
|
"span",
|
|
3051
3354
|
{
|
|
3052
3355
|
className: [
|
|
@@ -3072,14 +3375,14 @@ var FilterTabBar = React13.forwardRef(
|
|
|
3072
3375
|
FilterTabBar.displayName = "FilterTabBar";
|
|
3073
3376
|
|
|
3074
3377
|
// virtual-pkg:src/atoms/Modal/Modal.tsx
|
|
3075
|
-
import
|
|
3076
|
-
import { jsx as
|
|
3378
|
+
import React15, { useEffect, useRef, useState as useState2 } from "react";
|
|
3379
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3077
3380
|
var sizeMap = {
|
|
3078
3381
|
sm: "max-w-sm",
|
|
3079
3382
|
md: "max-w-lg",
|
|
3080
3383
|
lg: "max-w-2xl"
|
|
3081
3384
|
};
|
|
3082
|
-
var Modal =
|
|
3385
|
+
var Modal = React15.forwardRef(
|
|
3083
3386
|
({ isOpen, onClose, title, children, footer, size = "md" }, ref) => {
|
|
3084
3387
|
const [mounted, setMounted] = useState2(false);
|
|
3085
3388
|
const [visible, setVisible] = useState2(false);
|
|
@@ -3109,7 +3412,7 @@ var Modal = React14.forwardRef(
|
|
|
3109
3412
|
const handleBackdropClick = (e) => {
|
|
3110
3413
|
if (e.target === overlayRef.current) onClose();
|
|
3111
3414
|
};
|
|
3112
|
-
return /* @__PURE__ */
|
|
3415
|
+
return /* @__PURE__ */ jsx15(
|
|
3113
3416
|
"div",
|
|
3114
3417
|
{
|
|
3115
3418
|
ref: overlayRef,
|
|
@@ -3124,7 +3427,7 @@ var Modal = React14.forwardRef(
|
|
|
3124
3427
|
visible ? "opacity-100" : "opacity-0"
|
|
3125
3428
|
].join(" "),
|
|
3126
3429
|
style: { zIndex: "var(--z-modal, 1000)" },
|
|
3127
|
-
children: /* @__PURE__ */
|
|
3430
|
+
children: /* @__PURE__ */ jsxs15(
|
|
3128
3431
|
"div",
|
|
3129
3432
|
{
|
|
3130
3433
|
ref,
|
|
@@ -3137,9 +3440,9 @@ var Modal = React14.forwardRef(
|
|
|
3137
3440
|
visible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
|
|
3138
3441
|
].join(" "),
|
|
3139
3442
|
children: [
|
|
3140
|
-
title && /* @__PURE__ */
|
|
3141
|
-
/* @__PURE__ */
|
|
3142
|
-
/* @__PURE__ */
|
|
3443
|
+
title && /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between px-lg py-base border-b border-hairline", children: [
|
|
3444
|
+
/* @__PURE__ */ jsx15("h2", { id: "modal-title", className: "text-heading-sm text-ink", children: title }),
|
|
3445
|
+
/* @__PURE__ */ jsx15(
|
|
3143
3446
|
Button,
|
|
3144
3447
|
{
|
|
3145
3448
|
variant: "ghost",
|
|
@@ -3147,7 +3450,7 @@ var Modal = React14.forwardRef(
|
|
|
3147
3450
|
"aria-label": "Close modal",
|
|
3148
3451
|
onClick: onClose,
|
|
3149
3452
|
className: "!px-xs !py-xs",
|
|
3150
|
-
children: /* @__PURE__ */
|
|
3453
|
+
children: /* @__PURE__ */ jsxs15(
|
|
3151
3454
|
"svg",
|
|
3152
3455
|
{
|
|
3153
3456
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3161,16 +3464,16 @@ var Modal = React14.forwardRef(
|
|
|
3161
3464
|
strokeLinejoin: "round",
|
|
3162
3465
|
"aria-hidden": "true",
|
|
3163
3466
|
children: [
|
|
3164
|
-
/* @__PURE__ */
|
|
3165
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ jsx15("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3468
|
+
/* @__PURE__ */ jsx15("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3166
3469
|
]
|
|
3167
3470
|
}
|
|
3168
3471
|
)
|
|
3169
3472
|
}
|
|
3170
3473
|
)
|
|
3171
3474
|
] }),
|
|
3172
|
-
/* @__PURE__ */
|
|
3173
|
-
footer && /* @__PURE__ */
|
|
3475
|
+
/* @__PURE__ */ jsx15("div", { className: "flex-1 px-lg py-base text-body-md text-body overflow-y-auto", children }),
|
|
3476
|
+
footer && /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end gap-sm px-lg py-base border-t border-hairline", children: footer })
|
|
3174
3477
|
]
|
|
3175
3478
|
}
|
|
3176
3479
|
)
|
|
@@ -3181,44 +3484,44 @@ var Modal = React14.forwardRef(
|
|
|
3181
3484
|
Modal.displayName = "Modal";
|
|
3182
3485
|
|
|
3183
3486
|
// virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
|
|
3184
|
-
import
|
|
3185
|
-
import { jsx as
|
|
3186
|
-
var DesktopIcon = () => /* @__PURE__ */
|
|
3187
|
-
/* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
3487
|
+
import React16 from "react";
|
|
3488
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3489
|
+
var DesktopIcon = () => /* @__PURE__ */ jsxs16("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3490
|
+
/* @__PURE__ */ jsx16("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
3491
|
+
/* @__PURE__ */ jsx16("path", { d: "M8 21h8M12 17v4" })
|
|
3189
3492
|
] });
|
|
3190
|
-
var SidebarIcon2 = () => /* @__PURE__ */
|
|
3191
|
-
/* @__PURE__ */
|
|
3192
|
-
/* @__PURE__ */
|
|
3493
|
+
var SidebarIcon2 = () => /* @__PURE__ */ jsxs16("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3494
|
+
/* @__PURE__ */ jsx16("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
|
|
3495
|
+
/* @__PURE__ */ jsx16("path", { d: "M9 3v18" })
|
|
3193
3496
|
] });
|
|
3194
|
-
var MobileIcon = () => /* @__PURE__ */
|
|
3195
|
-
/* @__PURE__ */
|
|
3196
|
-
/* @__PURE__ */
|
|
3497
|
+
var MobileIcon = () => /* @__PURE__ */ jsxs16("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3498
|
+
/* @__PURE__ */ jsx16("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
|
|
3499
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
|
|
3197
3500
|
] });
|
|
3198
|
-
var ExpandIcon = () => /* @__PURE__ */
|
|
3199
|
-
var InspectIcon = () => /* @__PURE__ */
|
|
3200
|
-
/* @__PURE__ */
|
|
3201
|
-
/* @__PURE__ */
|
|
3202
|
-
/* @__PURE__ */
|
|
3501
|
+
var ExpandIcon = () => /* @__PURE__ */ jsx16("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx16("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
3502
|
+
var InspectIcon = () => /* @__PURE__ */ jsxs16("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3503
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "9" }),
|
|
3504
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 8v4l3 3" }),
|
|
3505
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
|
|
3203
3506
|
] });
|
|
3204
|
-
var MoonIcon2 = () => /* @__PURE__ */
|
|
3205
|
-
var FullscreenIcon = () => /* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
/* @__PURE__ */
|
|
3507
|
+
var MoonIcon2 = () => /* @__PURE__ */ jsx16("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx16("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
3508
|
+
var FullscreenIcon = () => /* @__PURE__ */ jsxs16("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
3509
|
+
/* @__PURE__ */ jsx16("polyline", { points: "15 3 21 3 21 9" }),
|
|
3510
|
+
/* @__PURE__ */ jsx16("polyline", { points: "9 21 3 21 3 15" }),
|
|
3511
|
+
/* @__PURE__ */ jsx16("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
3512
|
+
/* @__PURE__ */ jsx16("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3210
3513
|
] });
|
|
3211
|
-
var DotsIcon = () => /* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3514
|
+
var DotsIcon = () => /* @__PURE__ */ jsxs16("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
3515
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
3516
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
3517
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
3215
3518
|
] });
|
|
3216
3519
|
var VIEWPORT_OPTIONS = [
|
|
3217
3520
|
{ id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
|
|
3218
3521
|
{ id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
|
|
3219
3522
|
{ id: "mobile", Icon: MobileIcon, label: "Mobile view" }
|
|
3220
3523
|
];
|
|
3221
|
-
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */
|
|
3524
|
+
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx16(
|
|
3222
3525
|
Button,
|
|
3223
3526
|
{
|
|
3224
3527
|
variant: active ? "primary" : "ghost",
|
|
@@ -3230,7 +3533,7 @@ var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx1
|
|
|
3230
3533
|
children
|
|
3231
3534
|
}
|
|
3232
3535
|
);
|
|
3233
|
-
var PreviewToolbar =
|
|
3536
|
+
var PreviewToolbar = React16.forwardRef(
|
|
3234
3537
|
({
|
|
3235
3538
|
viewport = "desktop",
|
|
3236
3539
|
onViewportChange,
|
|
@@ -3240,124 +3543,132 @@ var PreviewToolbar = React15.forwardRef(
|
|
|
3240
3543
|
onInspectTokens,
|
|
3241
3544
|
onFullscreen,
|
|
3242
3545
|
onExpand,
|
|
3546
|
+
expanded = false,
|
|
3243
3547
|
modelLabel = "Sonnet 4.6",
|
|
3244
3548
|
kindLabel = "ATOM",
|
|
3245
3549
|
onOverflow,
|
|
3246
3550
|
className = ""
|
|
3247
|
-
}, ref) => /* @__PURE__ */
|
|
3551
|
+
}, ref) => /* @__PURE__ */ jsxs16(
|
|
3248
3552
|
"div",
|
|
3249
3553
|
{
|
|
3250
3554
|
ref,
|
|
3251
3555
|
role: "toolbar",
|
|
3252
3556
|
"aria-label": "Preview toolbar",
|
|
3253
3557
|
className: [
|
|
3254
|
-
|
|
3558
|
+
// On mobile: flex column direction with wrapping rows; on md+: single inline-flex row
|
|
3559
|
+
"flex flex-wrap items-center gap-sm px-sm py-xs",
|
|
3560
|
+
"md:inline-flex md:flex-nowrap",
|
|
3255
3561
|
"bg-canvas border border-hairline rounded-xl shadow-md",
|
|
3256
3562
|
className
|
|
3257
3563
|
].filter(Boolean).join(" "),
|
|
3258
3564
|
children: [
|
|
3259
|
-
/* @__PURE__ */
|
|
3565
|
+
/* @__PURE__ */ jsxs16(
|
|
3260
3566
|
"div",
|
|
3261
3567
|
{
|
|
3262
3568
|
role: "group",
|
|
3263
3569
|
"aria-label": "Viewport size",
|
|
3264
|
-
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs",
|
|
3570
|
+
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs w-full md:w-auto",
|
|
3265
3571
|
children: [
|
|
3266
|
-
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */
|
|
3572
|
+
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ jsx16(
|
|
3267
3573
|
ViewportBtn,
|
|
3268
3574
|
{
|
|
3269
3575
|
label,
|
|
3270
|
-
active: viewport === id,
|
|
3576
|
+
active: !expanded && viewport === id,
|
|
3271
3577
|
onClick: () => onViewportChange?.(id),
|
|
3272
|
-
children: /* @__PURE__ */
|
|
3578
|
+
children: /* @__PURE__ */ jsx16(Icon, {})
|
|
3273
3579
|
},
|
|
3274
3580
|
id
|
|
3275
3581
|
)),
|
|
3276
|
-
/* @__PURE__ */
|
|
3277
|
-
/* @__PURE__ */ jsx15(
|
|
3582
|
+
/* @__PURE__ */ jsx16(
|
|
3278
3583
|
Button,
|
|
3279
3584
|
{
|
|
3280
|
-
variant: "ghost",
|
|
3585
|
+
variant: expanded ? "primary" : "ghost",
|
|
3281
3586
|
size: "sm",
|
|
3282
3587
|
"aria-label": "Expand preview",
|
|
3588
|
+
"aria-pressed": expanded,
|
|
3283
3589
|
onClick: onExpand,
|
|
3284
|
-
className:
|
|
3285
|
-
|
|
3590
|
+
className: [
|
|
3591
|
+
"!w-8 !h-8 !p-0 rounded-sm shrink-0",
|
|
3592
|
+
expanded ? "" : "text-muted"
|
|
3593
|
+
].join(" "),
|
|
3594
|
+
children: /* @__PURE__ */ jsx16(ExpandIcon, {})
|
|
3286
3595
|
}
|
|
3287
3596
|
)
|
|
3288
3597
|
]
|
|
3289
3598
|
}
|
|
3290
3599
|
),
|
|
3291
|
-
/* @__PURE__ */
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3600
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap items-center gap-sm", children: [
|
|
3601
|
+
/* @__PURE__ */ jsxs16(
|
|
3602
|
+
Button,
|
|
3603
|
+
{
|
|
3604
|
+
variant: inspecting ? "primary" : "secondary",
|
|
3605
|
+
size: "sm",
|
|
3606
|
+
"aria-pressed": inspecting,
|
|
3607
|
+
onClick: onInspectTokens,
|
|
3608
|
+
className: "gap-xs rounded-xl",
|
|
3609
|
+
children: [
|
|
3610
|
+
/* @__PURE__ */ jsx16(InspectIcon, {}),
|
|
3611
|
+
inspecting ? "Exit inspect" : "Inspect tokens"
|
|
3612
|
+
]
|
|
3613
|
+
}
|
|
3614
|
+
),
|
|
3615
|
+
/* @__PURE__ */ jsxs16(
|
|
3616
|
+
Button,
|
|
3617
|
+
{
|
|
3618
|
+
variant: darkMode ? "primary" : "secondary",
|
|
3619
|
+
size: "sm",
|
|
3620
|
+
"aria-pressed": darkMode,
|
|
3621
|
+
onClick: onDarkToggle,
|
|
3622
|
+
className: "gap-xs rounded-xl",
|
|
3623
|
+
children: [
|
|
3624
|
+
/* @__PURE__ */ jsx16(MoonIcon2, {}),
|
|
3625
|
+
"Dark"
|
|
3626
|
+
]
|
|
3627
|
+
}
|
|
3628
|
+
),
|
|
3629
|
+
/* @__PURE__ */ jsxs16(
|
|
3630
|
+
Button,
|
|
3631
|
+
{
|
|
3632
|
+
variant: "secondary",
|
|
3633
|
+
size: "sm",
|
|
3634
|
+
onClick: onFullscreen,
|
|
3635
|
+
className: "gap-xs rounded-xl",
|
|
3636
|
+
children: [
|
|
3637
|
+
/* @__PURE__ */ jsx16(FullscreenIcon, {}),
|
|
3638
|
+
"Fullscreen"
|
|
3639
|
+
]
|
|
3640
|
+
}
|
|
3641
|
+
),
|
|
3642
|
+
/* @__PURE__ */ jsx16(
|
|
3643
|
+
Chip,
|
|
3644
|
+
{
|
|
3645
|
+
label: modelLabel ?? "",
|
|
3646
|
+
variant: "default",
|
|
3647
|
+
size: "md",
|
|
3648
|
+
className: "border-primary text-primary bg-canvas cursor-default select-none"
|
|
3649
|
+
}
|
|
3650
|
+
),
|
|
3651
|
+
/* @__PURE__ */ jsx16(
|
|
3652
|
+
Chip,
|
|
3653
|
+
{
|
|
3654
|
+
label: kindLabel ?? "",
|
|
3655
|
+
variant: "default",
|
|
3656
|
+
size: "md",
|
|
3657
|
+
className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
|
|
3658
|
+
}
|
|
3659
|
+
),
|
|
3660
|
+
/* @__PURE__ */ jsx16(
|
|
3661
|
+
Button,
|
|
3662
|
+
{
|
|
3663
|
+
variant: "ghost",
|
|
3664
|
+
size: "sm",
|
|
3665
|
+
"aria-label": "More options",
|
|
3666
|
+
onClick: onOverflow,
|
|
3667
|
+
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
3668
|
+
children: /* @__PURE__ */ jsx16(DotsIcon, {})
|
|
3669
|
+
}
|
|
3670
|
+
)
|
|
3671
|
+
] })
|
|
3361
3672
|
]
|
|
3362
3673
|
}
|
|
3363
3674
|
)
|
|
@@ -3365,8 +3676,8 @@ var PreviewToolbar = React15.forwardRef(
|
|
|
3365
3676
|
PreviewToolbar.displayName = "PreviewToolbar";
|
|
3366
3677
|
|
|
3367
3678
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
3368
|
-
import
|
|
3369
|
-
import { jsx as
|
|
3679
|
+
import React17 from "react";
|
|
3680
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3370
3681
|
var roleTagMap = {
|
|
3371
3682
|
"display-lg": "h1",
|
|
3372
3683
|
"heading-lg": "h2",
|
|
@@ -3398,7 +3709,7 @@ var colorClassMap = {
|
|
|
3398
3709
|
"semantic-warning": "text-semantic-warning",
|
|
3399
3710
|
"on-primary": "text-on-primary"
|
|
3400
3711
|
};
|
|
3401
|
-
var Typography =
|
|
3712
|
+
var Typography = React17.forwardRef(
|
|
3402
3713
|
({
|
|
3403
3714
|
role = "body-md",
|
|
3404
3715
|
color = "ink",
|
|
@@ -3417,7 +3728,7 @@ var Typography = React16.forwardRef(
|
|
|
3417
3728
|
uppercase ? "uppercase tracking-wide" : "",
|
|
3418
3729
|
className
|
|
3419
3730
|
].filter(Boolean).join(" ");
|
|
3420
|
-
return /* @__PURE__ */
|
|
3731
|
+
return /* @__PURE__ */ jsx17(Tag, { ref, className: classes, ...rest, children });
|
|
3421
3732
|
}
|
|
3422
3733
|
);
|
|
3423
3734
|
Typography.displayName = "Typography";
|
|
@@ -3428,6 +3739,7 @@ export {
|
|
|
3428
3739
|
Button,
|
|
3429
3740
|
ChatScreen,
|
|
3430
3741
|
Chip,
|
|
3742
|
+
ComponentCard,
|
|
3431
3743
|
FilterTabBar,
|
|
3432
3744
|
Input,
|
|
3433
3745
|
Modal,
|