@designa8/vibedesign-v6 1.8.5 → 1.9.6
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 +445 -137
- package/dist/index.js +444 -136
- package/dist/styles.css +101 -3
- 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 +62 -57
- package/src/atoms/PreviewToolbar/preview.tsx +27 -17
- package/src/index.ts +1 -0
- package/src/tokens.css +12 -0
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(src_exports, {
|
|
|
35
35
|
Button: () => Button,
|
|
36
36
|
ChatScreen: () => ChatScreen,
|
|
37
37
|
Chip: () => Chip,
|
|
38
|
+
ComponentCard: () => ComponentCard,
|
|
38
39
|
FilterTabBar: () => FilterTabBar,
|
|
39
40
|
Input: () => Input,
|
|
40
41
|
Modal: () => Modal,
|
|
@@ -1687,12 +1688,28 @@ WorkspaceMenu.displayName = "WorkspaceMenu";
|
|
|
1687
1688
|
// virtual-pkg:src/atoms/AppLayout/AppLayout.tsx
|
|
1688
1689
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1689
1690
|
var TOPBAR_HEIGHT = 48;
|
|
1691
|
+
var MOBILE_TOPBAR_HEIGHT = 52;
|
|
1692
|
+
var BOTTOM_TAB_HEIGHT = 56;
|
|
1690
1693
|
var CURVE_R = 16;
|
|
1691
1694
|
var MIN_CHAT_WIDTH = 260;
|
|
1692
1695
|
var MAX_CHAT_WIDTH = 600;
|
|
1693
1696
|
var COLLAPSE_DURATION = 250;
|
|
1694
1697
|
var COLLAPSED_RAIL_WIDTH = 12;
|
|
1695
1698
|
var PANEL_GAP_RIGHT = CURVE_R;
|
|
1699
|
+
var MOBILE_BREAKPOINT = 768;
|
|
1700
|
+
function useIsMobile() {
|
|
1701
|
+
const [mobile, setMobile] = import_react7.default.useState(
|
|
1702
|
+
() => typeof window !== "undefined" && window.innerWidth < MOBILE_BREAKPOINT
|
|
1703
|
+
);
|
|
1704
|
+
import_react7.default.useEffect(() => {
|
|
1705
|
+
const mq = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1706
|
+
const handler = (e) => setMobile(e.matches);
|
|
1707
|
+
mq.addEventListener("change", handler);
|
|
1708
|
+
setMobile(mq.matches);
|
|
1709
|
+
return () => mq.removeEventListener("change", handler);
|
|
1710
|
+
}, []);
|
|
1711
|
+
return mobile;
|
|
1712
|
+
}
|
|
1696
1713
|
var LayoutPanelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1697
1714
|
"svg",
|
|
1698
1715
|
{
|
|
@@ -1762,6 +1779,39 @@ var ChevronDownIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
|
1762
1779
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
1763
1780
|
}
|
|
1764
1781
|
);
|
|
1782
|
+
var ChatIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1783
|
+
"svg",
|
|
1784
|
+
{
|
|
1785
|
+
width: "20",
|
|
1786
|
+
height: "20",
|
|
1787
|
+
viewBox: "0 0 24 24",
|
|
1788
|
+
fill: "none",
|
|
1789
|
+
stroke: "currentColor",
|
|
1790
|
+
strokeWidth: "2",
|
|
1791
|
+
strokeLinecap: "round",
|
|
1792
|
+
strokeLinejoin: "round",
|
|
1793
|
+
"aria-hidden": "true",
|
|
1794
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
1795
|
+
}
|
|
1796
|
+
);
|
|
1797
|
+
var ViewIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1798
|
+
"svg",
|
|
1799
|
+
{
|
|
1800
|
+
width: "20",
|
|
1801
|
+
height: "20",
|
|
1802
|
+
viewBox: "0 0 24 24",
|
|
1803
|
+
fill: "none",
|
|
1804
|
+
stroke: "currentColor",
|
|
1805
|
+
strokeWidth: "2",
|
|
1806
|
+
strokeLinecap: "round",
|
|
1807
|
+
strokeLinejoin: "round",
|
|
1808
|
+
"aria-hidden": "true",
|
|
1809
|
+
children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7z" })
|
|
1812
|
+
]
|
|
1813
|
+
}
|
|
1814
|
+
);
|
|
1765
1815
|
function applyWidth(els, px) {
|
|
1766
1816
|
for (const el of els) {
|
|
1767
1817
|
if (el) el.style.width = `${px}px`;
|
|
@@ -1875,13 +1925,11 @@ var ConcaveCorner = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
|
1875
1925
|
style: {
|
|
1876
1926
|
position: "absolute",
|
|
1877
1927
|
top: -1,
|
|
1878
|
-
// cover the 1px border exactly
|
|
1879
1928
|
left: -1,
|
|
1880
1929
|
width: CURVE_R + 1,
|
|
1881
1930
|
height: CURVE_R + 1,
|
|
1882
1931
|
pointerEvents: "none",
|
|
1883
1932
|
zIndex: 2,
|
|
1884
|
-
// above the border
|
|
1885
1933
|
overflow: "hidden"
|
|
1886
1934
|
},
|
|
1887
1935
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
@@ -1929,6 +1977,87 @@ var PromptFooter = ({ chatProps }) => {
|
|
|
1929
1977
|
}
|
|
1930
1978
|
) });
|
|
1931
1979
|
};
|
|
1980
|
+
var MobileTabBar = ({ activePanel, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1981
|
+
"div",
|
|
1982
|
+
{
|
|
1983
|
+
className: "flex-shrink-0 flex items-stretch border-t border-hairline-soft bg-canvas",
|
|
1984
|
+
style: { height: BOTTOM_TAB_HEIGHT },
|
|
1985
|
+
role: "tablist",
|
|
1986
|
+
"aria-label": "Switch panel",
|
|
1987
|
+
children: ["chat", "view"].map((panel) => {
|
|
1988
|
+
const active = activePanel === panel;
|
|
1989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1990
|
+
Button,
|
|
1991
|
+
{
|
|
1992
|
+
role: "tab",
|
|
1993
|
+
type: "button",
|
|
1994
|
+
variant: "ghost",
|
|
1995
|
+
size: "sm",
|
|
1996
|
+
"aria-selected": active,
|
|
1997
|
+
onClick: () => onChange(panel),
|
|
1998
|
+
className: [
|
|
1999
|
+
"flex-1 flex-col !gap-xxs !rounded-none !border-0 !h-full",
|
|
2000
|
+
active ? "!text-primary" : "!text-muted"
|
|
2001
|
+
].join(" "),
|
|
2002
|
+
children: [
|
|
2003
|
+
panel === "chat" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChatIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ViewIcon, {}),
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2005
|
+
"span",
|
|
2006
|
+
{
|
|
2007
|
+
className: ["text-caption", active ? "font-weight-heading-sm text-primary" : "text-muted"].join(" "),
|
|
2008
|
+
style: { textTransform: "capitalize" },
|
|
2009
|
+
children: panel === "chat" ? "Chat" : "View"
|
|
2010
|
+
}
|
|
2011
|
+
)
|
|
2012
|
+
]
|
|
2013
|
+
},
|
|
2014
|
+
panel
|
|
2015
|
+
);
|
|
2016
|
+
})
|
|
2017
|
+
}
|
|
2018
|
+
);
|
|
2019
|
+
var MobileTopBar = ({
|
|
2020
|
+
projectName,
|
|
2021
|
+
avatarInitials,
|
|
2022
|
+
activePanel,
|
|
2023
|
+
navbarProps,
|
|
2024
|
+
onRenameProject,
|
|
2025
|
+
onBackToProjects,
|
|
2026
|
+
onHome
|
|
2027
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2028
|
+
"div",
|
|
2029
|
+
{
|
|
2030
|
+
className: "w-full flex flex-shrink-0 items-center px-sm gap-sm border-b border-hairline-soft bg-canvas",
|
|
2031
|
+
style: { height: MOBILE_TOPBAR_HEIGHT },
|
|
2032
|
+
children: activePanel === "chat" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2034
|
+
AvatarNav,
|
|
2035
|
+
{
|
|
2036
|
+
initials: avatarInitials,
|
|
2037
|
+
onBackToProjects,
|
|
2038
|
+
onHome
|
|
2039
|
+
}
|
|
2040
|
+
),
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2042
|
+
WorkspaceMenu,
|
|
2043
|
+
{
|
|
2044
|
+
workspaceName: projectName,
|
|
2045
|
+
onRename: onRenameProject,
|
|
2046
|
+
className: "w-full"
|
|
2047
|
+
}
|
|
2048
|
+
) })
|
|
2049
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-body-md font-weight-heading-sm text-ink truncate block", children: projectName }) }),
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-shrink-0", style: { minWidth: "fit-content" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2052
|
+
TopNavbar,
|
|
2053
|
+
{
|
|
2054
|
+
...navbarProps,
|
|
2055
|
+
className: "!border-0 !py-0 !px-0 !bg-transparent w-auto"
|
|
2056
|
+
}
|
|
2057
|
+
) })
|
|
2058
|
+
] })
|
|
2059
|
+
}
|
|
2060
|
+
);
|
|
1932
2061
|
var AppLayout = import_react7.default.forwardRef(
|
|
1933
2062
|
({
|
|
1934
2063
|
navbarProps,
|
|
@@ -1943,8 +2072,10 @@ var AppLayout = import_react7.default.forwardRef(
|
|
|
1943
2072
|
onBackToProjects,
|
|
1944
2073
|
onHome,
|
|
1945
2074
|
avatarInitials = "A",
|
|
2075
|
+
defaultMobilePanel = "chat",
|
|
1946
2076
|
className
|
|
1947
2077
|
}, ref) => {
|
|
2078
|
+
const isMobile = useIsMobile();
|
|
1948
2079
|
const [activeTab, setActiveTab] = import_react7.default.useState(rightPanelActiveTab);
|
|
1949
2080
|
const [chatWidth, setChatWidth] = import_react7.default.useState(defaultChatWidth);
|
|
1950
2081
|
const [chatCollapsed, setChatCollapsed] = import_react7.default.useState(false);
|
|
@@ -1956,6 +2087,7 @@ var AppLayout = import_react7.default.forwardRef(
|
|
|
1956
2087
|
const startX = import_react7.default.useRef(0);
|
|
1957
2088
|
const startWidth = import_react7.default.useRef(defaultChatWidth);
|
|
1958
2089
|
const currentWidth = import_react7.default.useRef(defaultChatWidth);
|
|
2090
|
+
const [mobilePanel, setMobilePanel] = import_react7.default.useState(defaultMobilePanel);
|
|
1959
2091
|
const collapseTransition = `width ${COLLAPSE_DURATION}ms cubic-bezier(0.4,0,0.2,1)`;
|
|
1960
2092
|
const opacityTransition = `opacity ${COLLAPSE_DURATION}ms ease`;
|
|
1961
2093
|
import_react7.default.useEffect(() => {
|
|
@@ -2003,6 +2135,68 @@ var AppLayout = import_react7.default.forwardRef(
|
|
|
2003
2135
|
};
|
|
2004
2136
|
const renderedWidth = chatCollapsed ? COLLAPSED_RAIL_WIDTH : chatWidth;
|
|
2005
2137
|
const hasTabs = Array.isArray(rightPanelTabs) && rightPanelTabs.length > 0;
|
|
2138
|
+
if (isMobile) {
|
|
2139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
2140
|
+
"div",
|
|
2141
|
+
{
|
|
2142
|
+
ref,
|
|
2143
|
+
className: ["w-full flex flex-col overflow-hidden bg-canvas", className].filter(Boolean).join(" "),
|
|
2144
|
+
style: { height: "100vh" },
|
|
2145
|
+
children: [
|
|
2146
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2147
|
+
MobileTopBar,
|
|
2148
|
+
{
|
|
2149
|
+
projectName,
|
|
2150
|
+
avatarInitials,
|
|
2151
|
+
activePanel: mobilePanel,
|
|
2152
|
+
navbarProps,
|
|
2153
|
+
onRenameProject,
|
|
2154
|
+
onBackToProjects,
|
|
2155
|
+
onHome
|
|
2156
|
+
}
|
|
2157
|
+
),
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 min-h-0 overflow-hidden relative", children: [
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2160
|
+
"div",
|
|
2161
|
+
{
|
|
2162
|
+
className: "absolute inset-0 flex flex-col",
|
|
2163
|
+
style: {
|
|
2164
|
+
background: "var(--color-surface-soft)",
|
|
2165
|
+
opacity: mobilePanel === "chat" ? 1 : 0,
|
|
2166
|
+
pointerEvents: mobilePanel === "chat" ? "auto" : "none",
|
|
2167
|
+
transition: "opacity 200ms ease",
|
|
2168
|
+
zIndex: mobilePanel === "chat" ? 1 : 0
|
|
2169
|
+
},
|
|
2170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2171
|
+
ChatScreen,
|
|
2172
|
+
{
|
|
2173
|
+
...chatProps,
|
|
2174
|
+
className: "flex-1 min-h-0",
|
|
2175
|
+
renderFooter: chatProps?.renderFooter ?? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PromptFooter, { chatProps })
|
|
2176
|
+
}
|
|
2177
|
+
)
|
|
2178
|
+
}
|
|
2179
|
+
),
|
|
2180
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2181
|
+
"div",
|
|
2182
|
+
{
|
|
2183
|
+
className: "absolute inset-0 flex flex-col overflow-auto",
|
|
2184
|
+
style: {
|
|
2185
|
+
background: "var(--color-canvas)",
|
|
2186
|
+
opacity: mobilePanel === "view" ? 1 : 0,
|
|
2187
|
+
pointerEvents: mobilePanel === "view" ? "auto" : "none",
|
|
2188
|
+
transition: "opacity 200ms ease",
|
|
2189
|
+
zIndex: mobilePanel === "view" ? 1 : 0
|
|
2190
|
+
},
|
|
2191
|
+
children: rightPanel !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-full flex-1", children: rightPanel }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RightPanelPlaceholder, {})
|
|
2192
|
+
}
|
|
2193
|
+
)
|
|
2194
|
+
] }),
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MobileTabBar, { activePanel: mobilePanel, onChange: setMobilePanel })
|
|
2196
|
+
]
|
|
2197
|
+
}
|
|
2198
|
+
);
|
|
2199
|
+
}
|
|
2006
2200
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
2007
2201
|
"div",
|
|
2008
2202
|
{
|
|
@@ -3062,12 +3256,122 @@ var Chip = import_react12.default.forwardRef(
|
|
|
3062
3256
|
);
|
|
3063
3257
|
Chip.displayName = "Chip";
|
|
3064
3258
|
|
|
3065
|
-
// virtual-pkg:src/atoms/
|
|
3259
|
+
// virtual-pkg:src/atoms/ComponentCard/ComponentCard.tsx
|
|
3066
3260
|
var import_react13 = __toESM(require("react"));
|
|
3067
3261
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3068
|
-
var
|
|
3262
|
+
var kindColors = {
|
|
3263
|
+
Atom: "bg-[var(--color-kind-atom-bg)] text-[var(--color-kind-atom-text)] border-[var(--color-kind-atom-border)]",
|
|
3264
|
+
Molecule: "bg-[var(--color-kind-molecule-bg)] text-[var(--color-kind-molecule-text)] border-[var(--color-kind-molecule-border)]",
|
|
3265
|
+
Organism: "bg-[var(--color-kind-organism-bg)] text-[var(--color-kind-organism-text)] border-[var(--color-kind-organism-border)]",
|
|
3266
|
+
Template: "bg-[var(--color-kind-template-bg)] text-[var(--color-kind-template-text)] border-[var(--color-kind-template-border)]"
|
|
3267
|
+
};
|
|
3268
|
+
var iconBg = {
|
|
3269
|
+
Atom: "bg-[var(--color-kind-atom-bg)] text-[var(--color-kind-atom-text)]",
|
|
3270
|
+
Molecule: "bg-primary text-on-primary",
|
|
3271
|
+
Organism: "bg-primary text-on-primary",
|
|
3272
|
+
Template: "bg-[var(--color-kind-template-bg)] text-[var(--color-kind-template-text)]"
|
|
3273
|
+
};
|
|
3274
|
+
var ComponentCard = import_react13.default.forwardRef(
|
|
3275
|
+
({
|
|
3276
|
+
name,
|
|
3277
|
+
kind = "Organism",
|
|
3278
|
+
description,
|
|
3279
|
+
thumbnailContent,
|
|
3280
|
+
thumbnailBg,
|
|
3281
|
+
selected = false,
|
|
3282
|
+
className,
|
|
3283
|
+
...rest
|
|
3284
|
+
}, ref) => {
|
|
3285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3286
|
+
"div",
|
|
3287
|
+
{
|
|
3288
|
+
ref,
|
|
3289
|
+
className: [
|
|
3290
|
+
"group relative flex flex-col rounded-xl bg-surface overflow-hidden",
|
|
3291
|
+
"border border-hairline-soft",
|
|
3292
|
+
"shadow-card",
|
|
3293
|
+
"transition-all duration-200",
|
|
3294
|
+
"hover:shadow-md hover:-translate-y-0.5 cursor-pointer",
|
|
3295
|
+
selected ? "ring-2 ring-primary" : "",
|
|
3296
|
+
className
|
|
3297
|
+
].filter(Boolean).join(" "),
|
|
3298
|
+
...rest,
|
|
3299
|
+
children: [
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3301
|
+
"div",
|
|
3302
|
+
{
|
|
3303
|
+
className: [
|
|
3304
|
+
"relative flex items-center justify-center",
|
|
3305
|
+
"w-full aspect-[4/3] overflow-hidden",
|
|
3306
|
+
thumbnailBg ?? "bg-surface-soft"
|
|
3307
|
+
].join(" "),
|
|
3308
|
+
children: thumbnailContent ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DefaultThumbnail, { kind })
|
|
3309
|
+
}
|
|
3310
|
+
),
|
|
3311
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between px-md py-sm border-t border-hairline-soft bg-canvas", children: [
|
|
3312
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-xxs min-w-0", children: [
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-body-sm font-weight-heading-sm text-ink truncate", children: name }),
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-caption text-muted truncate", children: description ?? `${kind} \u2022 Generated` })
|
|
3315
|
+
] }),
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3317
|
+
"span",
|
|
3318
|
+
{
|
|
3319
|
+
className: [
|
|
3320
|
+
"ml-sm shrink-0 inline-flex items-center px-sm py-xs",
|
|
3321
|
+
"rounded-md text-caption font-weight-heading-sm tracking-wide uppercase",
|
|
3322
|
+
"border",
|
|
3323
|
+
kindColors[kind]
|
|
3324
|
+
].join(" "),
|
|
3325
|
+
children: kind
|
|
3326
|
+
}
|
|
3327
|
+
)
|
|
3328
|
+
] })
|
|
3329
|
+
]
|
|
3330
|
+
}
|
|
3331
|
+
);
|
|
3332
|
+
}
|
|
3333
|
+
);
|
|
3334
|
+
ComponentCard.displayName = "ComponentCard";
|
|
3335
|
+
function DefaultThumbnail({ kind }) {
|
|
3336
|
+
const icons = {
|
|
3337
|
+
Atom: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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" }),
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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" })
|
|
3341
|
+
] }),
|
|
3342
|
+
Molecule: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "14", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "2", y: "14", width: "8", height: "8", rx: "2" })
|
|
3346
|
+
] }),
|
|
3347
|
+
Organism: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
|
|
3349
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M2 17l10 5 10-5" }),
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M2 12l10 5 10-5" })
|
|
3351
|
+
] }),
|
|
3352
|
+
Template: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M3 9h18M9 21V9" })
|
|
3355
|
+
] })
|
|
3356
|
+
};
|
|
3357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3358
|
+
"div",
|
|
3359
|
+
{
|
|
3360
|
+
className: [
|
|
3361
|
+
"flex items-center justify-center w-16 h-16 rounded-xl",
|
|
3362
|
+
iconBg[kind]
|
|
3363
|
+
].join(" "),
|
|
3364
|
+
children: icons[kind]
|
|
3365
|
+
}
|
|
3366
|
+
);
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
// virtual-pkg:src/atoms/FilterTabBar/FilterTabBar.tsx
|
|
3370
|
+
var import_react14 = __toESM(require("react"));
|
|
3371
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3372
|
+
var FilterTabBar = import_react14.default.forwardRef(
|
|
3069
3373
|
({ tabs, value, onChange, className = "", ...rest }, ref) => {
|
|
3070
|
-
return /* @__PURE__ */ (0,
|
|
3374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3071
3375
|
"div",
|
|
3072
3376
|
{
|
|
3073
3377
|
ref,
|
|
@@ -3081,7 +3385,7 @@ var FilterTabBar = import_react13.default.forwardRef(
|
|
|
3081
3385
|
...rest,
|
|
3082
3386
|
children: tabs.map((tab) => {
|
|
3083
3387
|
const isActive = tab.value === value;
|
|
3084
|
-
return /* @__PURE__ */ (0,
|
|
3388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
3085
3389
|
Button,
|
|
3086
3390
|
{
|
|
3087
3391
|
role: "tab",
|
|
@@ -3092,9 +3396,9 @@ var FilterTabBar = import_react13.default.forwardRef(
|
|
|
3092
3396
|
onClick: () => onChange(tab.value),
|
|
3093
3397
|
className: "gap-xs",
|
|
3094
3398
|
children: [
|
|
3095
|
-
tab.icon && /* @__PURE__ */ (0,
|
|
3096
|
-
tab.label && /* @__PURE__ */ (0,
|
|
3097
|
-
tab.count !== void 0 && /* @__PURE__ */ (0,
|
|
3399
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
|
|
3400
|
+
tab.label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: tab.label }),
|
|
3401
|
+
tab.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3098
3402
|
"span",
|
|
3099
3403
|
{
|
|
3100
3404
|
className: [
|
|
@@ -3120,19 +3424,19 @@ var FilterTabBar = import_react13.default.forwardRef(
|
|
|
3120
3424
|
FilterTabBar.displayName = "FilterTabBar";
|
|
3121
3425
|
|
|
3122
3426
|
// virtual-pkg:src/atoms/Modal/Modal.tsx
|
|
3123
|
-
var
|
|
3124
|
-
var
|
|
3427
|
+
var import_react15 = __toESM(require("react"));
|
|
3428
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3125
3429
|
var sizeMap = {
|
|
3126
3430
|
sm: "max-w-sm",
|
|
3127
3431
|
md: "max-w-lg",
|
|
3128
3432
|
lg: "max-w-2xl"
|
|
3129
3433
|
};
|
|
3130
|
-
var Modal =
|
|
3434
|
+
var Modal = import_react15.default.forwardRef(
|
|
3131
3435
|
({ isOpen, onClose, title, children, footer, size = "md" }, ref) => {
|
|
3132
|
-
const [mounted, setMounted] = (0,
|
|
3133
|
-
const [visible, setVisible] = (0,
|
|
3134
|
-
const overlayRef = (0,
|
|
3135
|
-
(0,
|
|
3436
|
+
const [mounted, setMounted] = (0, import_react15.useState)(false);
|
|
3437
|
+
const [visible, setVisible] = (0, import_react15.useState)(false);
|
|
3438
|
+
const overlayRef = (0, import_react15.useRef)(null);
|
|
3439
|
+
(0, import_react15.useEffect)(() => {
|
|
3136
3440
|
if (isOpen) {
|
|
3137
3441
|
setMounted(true);
|
|
3138
3442
|
const raf = requestAnimationFrame(() => {
|
|
@@ -3145,7 +3449,7 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3145
3449
|
return () => clearTimeout(timer);
|
|
3146
3450
|
}
|
|
3147
3451
|
}, [isOpen]);
|
|
3148
|
-
(0,
|
|
3452
|
+
(0, import_react15.useEffect)(() => {
|
|
3149
3453
|
if (!mounted) return;
|
|
3150
3454
|
const handleKey = (e) => {
|
|
3151
3455
|
if (e.key === "Escape") onClose();
|
|
@@ -3157,7 +3461,7 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3157
3461
|
const handleBackdropClick = (e) => {
|
|
3158
3462
|
if (e.target === overlayRef.current) onClose();
|
|
3159
3463
|
};
|
|
3160
|
-
return /* @__PURE__ */ (0,
|
|
3464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3161
3465
|
"div",
|
|
3162
3466
|
{
|
|
3163
3467
|
ref: overlayRef,
|
|
@@ -3172,7 +3476,7 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3172
3476
|
visible ? "opacity-100" : "opacity-0"
|
|
3173
3477
|
].join(" "),
|
|
3174
3478
|
style: { zIndex: "var(--z-modal, 1000)" },
|
|
3175
|
-
children: /* @__PURE__ */ (0,
|
|
3479
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3176
3480
|
"div",
|
|
3177
3481
|
{
|
|
3178
3482
|
ref,
|
|
@@ -3185,9 +3489,9 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3185
3489
|
visible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
|
|
3186
3490
|
].join(" "),
|
|
3187
3491
|
children: [
|
|
3188
|
-
title && /* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
3190
|
-
/* @__PURE__ */ (0,
|
|
3492
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between px-lg py-base border-b border-hairline", children: [
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { id: "modal-title", className: "text-heading-sm text-ink", children: title }),
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3191
3495
|
Button,
|
|
3192
3496
|
{
|
|
3193
3497
|
variant: "ghost",
|
|
@@ -3195,7 +3499,7 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3195
3499
|
"aria-label": "Close modal",
|
|
3196
3500
|
onClick: onClose,
|
|
3197
3501
|
className: "!px-xs !py-xs",
|
|
3198
|
-
children: /* @__PURE__ */ (0,
|
|
3502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3199
3503
|
"svg",
|
|
3200
3504
|
{
|
|
3201
3505
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3209,16 +3513,16 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3209
3513
|
strokeLinejoin: "round",
|
|
3210
3514
|
"aria-hidden": "true",
|
|
3211
3515
|
children: [
|
|
3212
|
-
/* @__PURE__ */ (0,
|
|
3213
|
-
/* @__PURE__ */ (0,
|
|
3516
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3517
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3214
3518
|
]
|
|
3215
3519
|
}
|
|
3216
3520
|
)
|
|
3217
3521
|
}
|
|
3218
3522
|
)
|
|
3219
3523
|
] }),
|
|
3220
|
-
/* @__PURE__ */ (0,
|
|
3221
|
-
footer && /* @__PURE__ */ (0,
|
|
3524
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-1 px-lg py-base text-body-md text-body overflow-y-auto", children }),
|
|
3525
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-end gap-sm px-lg py-base border-t border-hairline", children: footer })
|
|
3222
3526
|
]
|
|
3223
3527
|
}
|
|
3224
3528
|
)
|
|
@@ -3229,44 +3533,44 @@ var Modal = import_react14.default.forwardRef(
|
|
|
3229
3533
|
Modal.displayName = "Modal";
|
|
3230
3534
|
|
|
3231
3535
|
// virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
|
|
3232
|
-
var
|
|
3233
|
-
var
|
|
3234
|
-
var DesktopIcon = () => /* @__PURE__ */ (0,
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3236
|
-
/* @__PURE__ */ (0,
|
|
3536
|
+
var import_react16 = __toESM(require("react"));
|
|
3537
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3538
|
+
var DesktopIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
|
|
3539
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M8 21h8M12 17v4" })
|
|
3237
3541
|
] });
|
|
3238
|
-
var SidebarIcon2 = () => /* @__PURE__ */ (0,
|
|
3239
|
-
/* @__PURE__ */ (0,
|
|
3240
|
-
/* @__PURE__ */ (0,
|
|
3542
|
+
var SidebarIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
|
|
3544
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M9 3v18" })
|
|
3241
3545
|
] });
|
|
3242
|
-
var MobileIcon = () => /* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3546
|
+
var MobileIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
|
|
3547
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
|
|
3548
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
|
|
3245
3549
|
] });
|
|
3246
|
-
var ExpandIcon = () => /* @__PURE__ */ (0,
|
|
3247
|
-
var InspectIcon = () => /* @__PURE__ */ (0,
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3550
|
+
var ExpandIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
3551
|
+
var InspectIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M12 8v4l3 3" }),
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
|
|
3251
3555
|
] });
|
|
3252
|
-
var MoonIcon2 = () => /* @__PURE__ */ (0,
|
|
3253
|
-
var FullscreenIcon = () => /* @__PURE__ */ (0,
|
|
3254
|
-
/* @__PURE__ */ (0,
|
|
3255
|
-
/* @__PURE__ */ (0,
|
|
3256
|
-
/* @__PURE__ */ (0,
|
|
3257
|
-
/* @__PURE__ */ (0,
|
|
3556
|
+
var MoonIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
3557
|
+
var FullscreenIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
3559
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("polyline", { points: "9 21 3 21 3 15" }),
|
|
3560
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
3561
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
3258
3562
|
] });
|
|
3259
|
-
var DotsIcon = () => /* @__PURE__ */ (0,
|
|
3260
|
-
/* @__PURE__ */ (0,
|
|
3261
|
-
/* @__PURE__ */ (0,
|
|
3262
|
-
/* @__PURE__ */ (0,
|
|
3563
|
+
var DotsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
3564
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
3565
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
3566
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
3263
3567
|
] });
|
|
3264
3568
|
var VIEWPORT_OPTIONS = [
|
|
3265
3569
|
{ id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
|
|
3266
3570
|
{ id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
|
|
3267
3571
|
{ id: "mobile", Icon: MobileIcon, label: "Mobile view" }
|
|
3268
3572
|
];
|
|
3269
|
-
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0,
|
|
3573
|
+
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3270
3574
|
Button,
|
|
3271
3575
|
{
|
|
3272
3576
|
variant: active ? "primary" : "ghost",
|
|
@@ -3278,7 +3582,7 @@ var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0,
|
|
|
3278
3582
|
children
|
|
3279
3583
|
}
|
|
3280
3584
|
);
|
|
3281
|
-
var PreviewToolbar =
|
|
3585
|
+
var PreviewToolbar = import_react16.default.forwardRef(
|
|
3282
3586
|
({
|
|
3283
3587
|
viewport = "desktop",
|
|
3284
3588
|
onViewportChange,
|
|
@@ -3293,36 +3597,38 @@ var PreviewToolbar = import_react15.default.forwardRef(
|
|
|
3293
3597
|
kindLabel = "ATOM",
|
|
3294
3598
|
onOverflow,
|
|
3295
3599
|
className = ""
|
|
3296
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
3600
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3297
3601
|
"div",
|
|
3298
3602
|
{
|
|
3299
3603
|
ref,
|
|
3300
3604
|
role: "toolbar",
|
|
3301
3605
|
"aria-label": "Preview toolbar",
|
|
3302
3606
|
className: [
|
|
3303
|
-
|
|
3607
|
+
// On mobile: flex column direction with wrapping rows; on md+: single inline-flex row
|
|
3608
|
+
"flex flex-wrap items-center gap-sm px-sm py-xs",
|
|
3609
|
+
"md:inline-flex md:flex-nowrap",
|
|
3304
3610
|
"bg-canvas border border-hairline rounded-xl shadow-md",
|
|
3305
3611
|
className
|
|
3306
3612
|
].filter(Boolean).join(" "),
|
|
3307
3613
|
children: [
|
|
3308
|
-
/* @__PURE__ */ (0,
|
|
3614
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3309
3615
|
"div",
|
|
3310
3616
|
{
|
|
3311
3617
|
role: "group",
|
|
3312
3618
|
"aria-label": "Viewport size",
|
|
3313
|
-
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs",
|
|
3619
|
+
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs w-full md:w-auto",
|
|
3314
3620
|
children: [
|
|
3315
|
-
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ (0,
|
|
3621
|
+
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3316
3622
|
ViewportBtn,
|
|
3317
3623
|
{
|
|
3318
3624
|
label,
|
|
3319
3625
|
active: !expanded && viewport === id,
|
|
3320
3626
|
onClick: () => onViewportChange?.(id),
|
|
3321
|
-
children: /* @__PURE__ */ (0,
|
|
3627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, {})
|
|
3322
3628
|
},
|
|
3323
3629
|
id
|
|
3324
3630
|
)),
|
|
3325
|
-
/* @__PURE__ */ (0,
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3326
3632
|
Button,
|
|
3327
3633
|
{
|
|
3328
3634
|
variant: expanded ? "primary" : "ghost",
|
|
@@ -3334,82 +3640,84 @@ var PreviewToolbar = import_react15.default.forwardRef(
|
|
|
3334
3640
|
"!w-8 !h-8 !p-0 rounded-sm shrink-0",
|
|
3335
3641
|
expanded ? "" : "text-muted"
|
|
3336
3642
|
].join(" "),
|
|
3337
|
-
children: /* @__PURE__ */ (0,
|
|
3643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ExpandIcon, {})
|
|
3338
3644
|
}
|
|
3339
3645
|
)
|
|
3340
3646
|
]
|
|
3341
3647
|
}
|
|
3342
3648
|
),
|
|
3343
|
-
/* @__PURE__ */ (0,
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-wrap items-center gap-sm", children: [
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3651
|
+
Button,
|
|
3652
|
+
{
|
|
3653
|
+
variant: inspecting ? "primary" : "secondary",
|
|
3654
|
+
size: "sm",
|
|
3655
|
+
"aria-pressed": inspecting,
|
|
3656
|
+
onClick: onInspectTokens,
|
|
3657
|
+
className: "gap-xs rounded-xl",
|
|
3658
|
+
children: [
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InspectIcon, {}),
|
|
3660
|
+
inspecting ? "Exit inspect" : "Inspect tokens"
|
|
3661
|
+
]
|
|
3662
|
+
}
|
|
3663
|
+
),
|
|
3664
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3665
|
+
Button,
|
|
3666
|
+
{
|
|
3667
|
+
variant: darkMode ? "primary" : "secondary",
|
|
3668
|
+
size: "sm",
|
|
3669
|
+
"aria-pressed": darkMode,
|
|
3670
|
+
onClick: onDarkToggle,
|
|
3671
|
+
className: "gap-xs rounded-xl",
|
|
3672
|
+
children: [
|
|
3673
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MoonIcon2, {}),
|
|
3674
|
+
"Dark"
|
|
3675
|
+
]
|
|
3676
|
+
}
|
|
3677
|
+
),
|
|
3678
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3679
|
+
Button,
|
|
3680
|
+
{
|
|
3681
|
+
variant: "secondary",
|
|
3682
|
+
size: "sm",
|
|
3683
|
+
onClick: onFullscreen,
|
|
3684
|
+
className: "gap-xs rounded-xl",
|
|
3685
|
+
children: [
|
|
3686
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FullscreenIcon, {}),
|
|
3687
|
+
"Fullscreen"
|
|
3688
|
+
]
|
|
3689
|
+
}
|
|
3690
|
+
),
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3692
|
+
Chip,
|
|
3693
|
+
{
|
|
3694
|
+
label: modelLabel ?? "",
|
|
3695
|
+
variant: "default",
|
|
3696
|
+
size: "md",
|
|
3697
|
+
className: "border-primary text-primary bg-canvas cursor-default select-none"
|
|
3698
|
+
}
|
|
3699
|
+
),
|
|
3700
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3701
|
+
Chip,
|
|
3702
|
+
{
|
|
3703
|
+
label: kindLabel ?? "",
|
|
3704
|
+
variant: "default",
|
|
3705
|
+
size: "md",
|
|
3706
|
+
className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
|
|
3707
|
+
}
|
|
3708
|
+
),
|
|
3709
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3710
|
+
Button,
|
|
3711
|
+
{
|
|
3712
|
+
variant: "ghost",
|
|
3713
|
+
size: "sm",
|
|
3714
|
+
"aria-label": "More options",
|
|
3715
|
+
onClick: onOverflow,
|
|
3716
|
+
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
3717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DotsIcon, {})
|
|
3718
|
+
}
|
|
3719
|
+
)
|
|
3720
|
+
] })
|
|
3413
3721
|
]
|
|
3414
3722
|
}
|
|
3415
3723
|
)
|
|
@@ -3417,8 +3725,8 @@ var PreviewToolbar = import_react15.default.forwardRef(
|
|
|
3417
3725
|
PreviewToolbar.displayName = "PreviewToolbar";
|
|
3418
3726
|
|
|
3419
3727
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
3420
|
-
var
|
|
3421
|
-
var
|
|
3728
|
+
var import_react17 = __toESM(require("react"));
|
|
3729
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3422
3730
|
var roleTagMap = {
|
|
3423
3731
|
"display-lg": "h1",
|
|
3424
3732
|
"heading-lg": "h2",
|
|
@@ -3450,7 +3758,7 @@ var colorClassMap = {
|
|
|
3450
3758
|
"semantic-warning": "text-semantic-warning",
|
|
3451
3759
|
"on-primary": "text-on-primary"
|
|
3452
3760
|
};
|
|
3453
|
-
var Typography =
|
|
3761
|
+
var Typography = import_react17.default.forwardRef(
|
|
3454
3762
|
({
|
|
3455
3763
|
role = "body-md",
|
|
3456
3764
|
color = "ink",
|
|
@@ -3469,7 +3777,7 @@ var Typography = import_react16.default.forwardRef(
|
|
|
3469
3777
|
uppercase ? "uppercase tracking-wide" : "",
|
|
3470
3778
|
className
|
|
3471
3779
|
].filter(Boolean).join(" ");
|
|
3472
|
-
return /* @__PURE__ */ (0,
|
|
3780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tag, { ref, className: classes, ...rest, children });
|
|
3473
3781
|
}
|
|
3474
3782
|
);
|
|
3475
3783
|
Typography.displayName = "Typography";
|