@designa8/vibedesign-v6 1.12.16 → 1.14.0
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 +570 -293
- package/dist/index.js +561 -284
- package/dist/styles.css +118 -0
- package/package.json +16 -1
- package/src/atoms/AppLayout/AppLayout.tsx +15 -3
- package/src/atoms/AppLayout/preview.tsx +4 -3
- package/src/atoms/CodeEditor/CodeEditor.tsx +186 -0
- package/src/atoms/CodeEditor/index.ts +2 -0
- package/src/atoms/CodeEditor/preview.tsx +104 -0
- package/src/atoms/Icon/Icon.tsx +35 -0
- package/src/atoms/Icon/icons.data.ts +8 -0
- package/src/atoms/Icon/index.ts +4 -0
- package/src/atoms/Icon/preview.tsx +19 -0
- package/src/atoms/PreviewToolbar/PreviewToolbar.tsx +2 -10
- package/src/atoms/StatusBar/StatusBar.tsx +127 -0
- package/src/atoms/StatusBar/index.ts +2 -0
- package/src/atoms/StatusBar/preview.tsx +52 -0
- package/src/index.ts +3 -0
- package/src/tokens.css +5 -0
package/dist/index.js
CHANGED
|
@@ -1595,6 +1595,7 @@ var COLLAPSE_DURATION = 250;
|
|
|
1595
1595
|
var COLLAPSED_RAIL_WIDTH = 12;
|
|
1596
1596
|
var PANEL_GAP_RIGHT = CURVE_R;
|
|
1597
1597
|
var MOBILE_BREAKPOINT = 768;
|
|
1598
|
+
var FALLBACK_HEIGHT = 640;
|
|
1598
1599
|
function useIsMobile() {
|
|
1599
1600
|
const [mobile, setMobile] = React7.useState(
|
|
1600
1601
|
() => typeof window !== "undefined" && window.innerWidth < MOBILE_BREAKPOINT
|
|
@@ -1772,7 +1773,7 @@ var AvatarNav = ({ initials, onBackToProjects, onHome }) => {
|
|
|
1772
1773
|
{
|
|
1773
1774
|
role: "menu",
|
|
1774
1775
|
"aria-label": "Navigation",
|
|
1775
|
-
className: "absolute left-0 mt-xs rounded-xl bg-canvas border border-hairline-soft shadow-card py-xs",
|
|
1776
|
+
className: "absolute left-0 mt-xs rounded-xl bg-canvas border border-hairline-soft shadow-card py-xs overflow-hidden",
|
|
1776
1777
|
style: { minWidth: 200, zIndex: 1e3, top: "100%" },
|
|
1777
1778
|
children: [
|
|
1778
1779
|
/* @__PURE__ */ jsxs7(
|
|
@@ -1974,9 +1975,11 @@ var AppLayout = React7.forwardRef(
|
|
|
1974
1975
|
avatarInitials = "A",
|
|
1975
1976
|
defaultMobilePanel = "chat",
|
|
1976
1977
|
hideProjectName = false,
|
|
1978
|
+
fillViewport = true,
|
|
1977
1979
|
className
|
|
1978
1980
|
}, ref) => {
|
|
1979
1981
|
const isMobile = useIsMobile();
|
|
1982
|
+
const rootHeight = fillViewport ? "100vh" : `${FALLBACK_HEIGHT}px`;
|
|
1980
1983
|
const [activeTab, setActiveTab] = React7.useState(rightPanelActiveTab);
|
|
1981
1984
|
const [chatWidth, setChatWidth] = React7.useState(defaultChatWidth);
|
|
1982
1985
|
const [chatCollapsed, setChatCollapsed] = React7.useState(false);
|
|
@@ -2042,7 +2045,7 @@ var AppLayout = React7.forwardRef(
|
|
|
2042
2045
|
{
|
|
2043
2046
|
ref,
|
|
2044
2047
|
className: ["w-full flex flex-col overflow-hidden bg-canvas", className].filter(Boolean).join(" "),
|
|
2045
|
-
style: { height:
|
|
2048
|
+
style: { height: rootHeight },
|
|
2046
2049
|
children: [
|
|
2047
2050
|
/* @__PURE__ */ jsx7(
|
|
2048
2051
|
MobileTopBar,
|
|
@@ -2104,7 +2107,7 @@ var AppLayout = React7.forwardRef(
|
|
|
2104
2107
|
{
|
|
2105
2108
|
ref,
|
|
2106
2109
|
className: ["w-full flex flex-col overflow-hidden", className].filter(Boolean).join(" "),
|
|
2107
|
-
style: { height:
|
|
2110
|
+
style: { height: rootHeight, background: "var(--color-surface-soft)" },
|
|
2108
2111
|
children: [
|
|
2109
2112
|
/* @__PURE__ */ jsxs7(
|
|
2110
2113
|
"div",
|
|
@@ -3526,9 +3529,192 @@ var Chip = React13.forwardRef(
|
|
|
3526
3529
|
);
|
|
3527
3530
|
Chip.displayName = "Chip";
|
|
3528
3531
|
|
|
3532
|
+
// virtual-pkg:src/atoms/CodeEditor/CodeEditor.tsx
|
|
3533
|
+
import React15 from "react";
|
|
3534
|
+
|
|
3535
|
+
// virtual-pkg:src/atoms/Icon/Icon.tsx
|
|
3536
|
+
import * as React14 from "react";
|
|
3537
|
+
|
|
3538
|
+
// virtual-pkg:src/atoms/Icon/icons.data.ts
|
|
3539
|
+
var ICON_REGISTRY = {
|
|
3540
|
+
"close": { viewBox: "0 0 24 24", paths: ["M18 6 6 18", "M6 6l12 12"] },
|
|
3541
|
+
"chevron-down": { viewBox: "0 0 24 24", paths: ["M6 9l6 6 6-6"] },
|
|
3542
|
+
"copy-clipboard": { viewBox: "0 0 24 24", paths: ["M9 9h10v10H9z", "M5 15V5h10"] },
|
|
3543
|
+
"check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] }
|
|
3544
|
+
};
|
|
3545
|
+
|
|
3546
|
+
// virtual-pkg:src/atoms/Icon/Icon.tsx
|
|
3547
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
3548
|
+
var Icon = React14.forwardRef(
|
|
3549
|
+
({ name, size = 20, strokeWidth = 2, className, ...props }, ref) => {
|
|
3550
|
+
const glyph = ICON_REGISTRY[name];
|
|
3551
|
+
return /* @__PURE__ */ jsx14(
|
|
3552
|
+
"svg",
|
|
3553
|
+
{
|
|
3554
|
+
ref,
|
|
3555
|
+
viewBox: glyph.viewBox,
|
|
3556
|
+
width: size,
|
|
3557
|
+
height: size,
|
|
3558
|
+
fill: "none",
|
|
3559
|
+
stroke: "currentColor",
|
|
3560
|
+
strokeWidth,
|
|
3561
|
+
strokeLinecap: "round",
|
|
3562
|
+
strokeLinejoin: "round",
|
|
3563
|
+
className,
|
|
3564
|
+
"aria-hidden": "true",
|
|
3565
|
+
...props,
|
|
3566
|
+
children: glyph.paths.map((d, i) => /* @__PURE__ */ jsx14("path", { d }, i))
|
|
3567
|
+
}
|
|
3568
|
+
);
|
|
3569
|
+
}
|
|
3570
|
+
);
|
|
3571
|
+
Icon.displayName = "Icon";
|
|
3572
|
+
|
|
3573
|
+
// virtual-pkg:src/atoms/CodeEditor/CodeEditor.tsx
|
|
3574
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3575
|
+
var LANG_LABEL = {
|
|
3576
|
+
tsx: "TSX",
|
|
3577
|
+
ts: "TS",
|
|
3578
|
+
css: "CSS",
|
|
3579
|
+
json: "JSON",
|
|
3580
|
+
md: "MD",
|
|
3581
|
+
txt: "TXT"
|
|
3582
|
+
};
|
|
3583
|
+
function LangBadge({ language }) {
|
|
3584
|
+
return /* @__PURE__ */ jsx15("span", { className: "inline-flex h-lg min-w-[1.6rem] items-center justify-center rounded-xs bg-surface-strong px-xxs text-caption text-muted", children: LANG_LABEL[language] });
|
|
3585
|
+
}
|
|
3586
|
+
var CodeEditor = React15.forwardRef(
|
|
3587
|
+
({
|
|
3588
|
+
files,
|
|
3589
|
+
activeFile,
|
|
3590
|
+
onActiveFileChange,
|
|
3591
|
+
folderLabel = "atoms",
|
|
3592
|
+
pathPrefix,
|
|
3593
|
+
dark = false,
|
|
3594
|
+
readOnly = true,
|
|
3595
|
+
streamingFileNames = [],
|
|
3596
|
+
onChange,
|
|
3597
|
+
onCopy,
|
|
3598
|
+
className = ""
|
|
3599
|
+
}, ref) => {
|
|
3600
|
+
const [copied, setCopied] = React15.useState(false);
|
|
3601
|
+
const [openRoot, setOpenRoot] = React15.useState(true);
|
|
3602
|
+
const current = files.find((f) => f.name === activeFile) ?? files[0] ?? null;
|
|
3603
|
+
const streaming = current ? streamingFileNames.includes(current.name) : false;
|
|
3604
|
+
const path = [pathPrefix, current?.name].filter(Boolean).join(" / ");
|
|
3605
|
+
async function copy() {
|
|
3606
|
+
if (!current) return;
|
|
3607
|
+
try {
|
|
3608
|
+
await navigator.clipboard.writeText(current.source);
|
|
3609
|
+
} catch {
|
|
3610
|
+
}
|
|
3611
|
+
setCopied(true);
|
|
3612
|
+
window.setTimeout(() => setCopied(false), 1200);
|
|
3613
|
+
onCopy?.();
|
|
3614
|
+
}
|
|
3615
|
+
const lines = (current?.source ?? "").split("\n");
|
|
3616
|
+
const statusLabel = streaming ? "Writing" : readOnly ? "Read-only" : "Editing";
|
|
3617
|
+
return /* @__PURE__ */ jsxs14(
|
|
3618
|
+
"div",
|
|
3619
|
+
{
|
|
3620
|
+
ref,
|
|
3621
|
+
"data-theme": dark ? "dark" : void 0,
|
|
3622
|
+
className: ["flex w-full overflow-hidden rounded-lg border border-hairline bg-canvas text-ink", className].join(" "),
|
|
3623
|
+
children: [
|
|
3624
|
+
/* @__PURE__ */ jsxs14("aside", { className: "flex w-56 shrink-0 flex-col overflow-y-auto border-r border-hairline bg-canvas", children: [
|
|
3625
|
+
/* @__PURE__ */ jsx15("div", { className: "flex items-center justify-between px-lg py-md", children: /* @__PURE__ */ jsx15("span", { className: "text-caption font-weight-heading-sm uppercase tracking-widest text-muted-soft", children: "Files" }) }),
|
|
3626
|
+
/* @__PURE__ */ jsxs14("nav", { className: "flex flex-col gap-xxs px-sm pb-lg", children: [
|
|
3627
|
+
/* @__PURE__ */ jsxs14(
|
|
3628
|
+
Button,
|
|
3629
|
+
{
|
|
3630
|
+
type: "button",
|
|
3631
|
+
variant: "ghost",
|
|
3632
|
+
size: "sm",
|
|
3633
|
+
className: "w-full justify-start gap-xs px-sm py-xs text-body-sm text-muted",
|
|
3634
|
+
onClick: () => setOpenRoot((o) => !o),
|
|
3635
|
+
children: [
|
|
3636
|
+
/* @__PURE__ */ jsx15(
|
|
3637
|
+
Icon,
|
|
3638
|
+
{
|
|
3639
|
+
name: "chevron-down",
|
|
3640
|
+
className: ["h-3 w-3 shrink-0 transition-transform", openRoot ? "rotate-0" : "-rotate-90"].join(" ")
|
|
3641
|
+
}
|
|
3642
|
+
),
|
|
3643
|
+
folderLabel
|
|
3644
|
+
]
|
|
3645
|
+
}
|
|
3646
|
+
),
|
|
3647
|
+
openRoot && files.map((f) => /* @__PURE__ */ jsxs14(
|
|
3648
|
+
Button,
|
|
3649
|
+
{
|
|
3650
|
+
type: "button",
|
|
3651
|
+
variant: "ghost",
|
|
3652
|
+
size: "sm",
|
|
3653
|
+
onClick: () => onActiveFileChange?.(f.name),
|
|
3654
|
+
"aria-current": f.name === current?.name ? "true" : void 0,
|
|
3655
|
+
className: [
|
|
3656
|
+
"w-full justify-start gap-sm py-xs pr-sm pl-lg text-body-sm",
|
|
3657
|
+
f.name === current?.name ? "bg-primary-disabled text-primary" : "text-body"
|
|
3658
|
+
].join(" "),
|
|
3659
|
+
children: [
|
|
3660
|
+
/* @__PURE__ */ jsx15(LangBadge, { language: f.language }),
|
|
3661
|
+
/* @__PURE__ */ jsx15("span", { className: "truncate", children: f.name })
|
|
3662
|
+
]
|
|
3663
|
+
},
|
|
3664
|
+
f.name
|
|
3665
|
+
))
|
|
3666
|
+
] })
|
|
3667
|
+
] }),
|
|
3668
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 flex-1 flex-col overflow-hidden bg-canvas", children: [
|
|
3669
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between border-b border-hairline bg-surface-soft px-lg py-sm", children: [
|
|
3670
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 items-center gap-sm font-mono text-caption text-muted", children: [
|
|
3671
|
+
current ? /* @__PURE__ */ jsx15(LangBadge, { language: current.language }) : null,
|
|
3672
|
+
/* @__PURE__ */ jsx15("span", { className: "truncate", children: path }),
|
|
3673
|
+
/* @__PURE__ */ jsx15("span", { className: "rounded-xs bg-surface-strong px-sm py-xxs text-caption font-weight-heading-sm uppercase tracking-wide text-muted", children: statusLabel })
|
|
3674
|
+
] }),
|
|
3675
|
+
/* @__PURE__ */ jsxs14(
|
|
3676
|
+
Button,
|
|
3677
|
+
{
|
|
3678
|
+
type: "button",
|
|
3679
|
+
variant: "secondary",
|
|
3680
|
+
size: "sm",
|
|
3681
|
+
onClick: () => void copy(),
|
|
3682
|
+
disabled: !current || streaming,
|
|
3683
|
+
children: [
|
|
3684
|
+
/* @__PURE__ */ jsx15(Icon, { name: copied ? "check-checkmark" : "copy-clipboard", className: "h-3 w-3" }),
|
|
3685
|
+
copied ? "Copied" : "Copy"
|
|
3686
|
+
]
|
|
3687
|
+
}
|
|
3688
|
+
)
|
|
3689
|
+
] }),
|
|
3690
|
+
/* @__PURE__ */ jsx15("div", { className: "flex-1 overflow-auto bg-canvas", children: readOnly || streaming ? /* @__PURE__ */ jsx15("pre", { className: "m-0 p-0 text-body-sm leading-[1.55] text-ink", children: lines.map((line, i) => /* @__PURE__ */ jsxs14("div", { className: "flex", children: [
|
|
3691
|
+
/* @__PURE__ */ jsx15("span", { className: "select-none px-md text-right text-caption text-muted-soft", children: /* @__PURE__ */ jsx15("span", { className: "inline-block min-w-[2ch]", children: i + 1 }) }),
|
|
3692
|
+
/* @__PURE__ */ jsx15("span", { className: "flex-1 whitespace-pre pr-xl font-mono", children: line || " " })
|
|
3693
|
+
] }, i)) }) : /* @__PURE__ */ jsxs14("div", { className: "flex min-h-full", children: [
|
|
3694
|
+
/* @__PURE__ */ jsx15("div", { className: "select-none px-md py-sm text-right text-caption text-muted-soft", children: lines.map((_, i) => /* @__PURE__ */ jsx15("div", { children: i + 1 }, i)) }),
|
|
3695
|
+
/* @__PURE__ */ jsx15(
|
|
3696
|
+
"textarea",
|
|
3697
|
+
{
|
|
3698
|
+
className: "min-h-full flex-1 resize-none bg-transparent p-sm font-mono text-body-sm leading-[1.55] text-ink outline-none",
|
|
3699
|
+
value: current?.source ?? "",
|
|
3700
|
+
spellCheck: false,
|
|
3701
|
+
onChange: (e) => {
|
|
3702
|
+
if (current) onChange?.(current.name, e.target.value);
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
)
|
|
3706
|
+
] }) })
|
|
3707
|
+
] })
|
|
3708
|
+
]
|
|
3709
|
+
}
|
|
3710
|
+
);
|
|
3711
|
+
}
|
|
3712
|
+
);
|
|
3713
|
+
CodeEditor.displayName = "CodeEditor";
|
|
3714
|
+
|
|
3529
3715
|
// virtual-pkg:src/atoms/ComponentCard/ComponentCard.tsx
|
|
3530
|
-
import
|
|
3531
|
-
import { jsx as
|
|
3716
|
+
import React16 from "react";
|
|
3717
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3532
3718
|
var kindColors = {
|
|
3533
3719
|
Atom: "bg-[var(--color-kind-atom-bg)] text-[var(--color-kind-atom-text)] border-[var(--color-kind-atom-border)]",
|
|
3534
3720
|
Molecule: "bg-[var(--color-kind-molecule-bg)] text-[var(--color-kind-molecule-text)] border-[var(--color-kind-molecule-border)]",
|
|
@@ -3541,7 +3727,7 @@ var iconBg = {
|
|
|
3541
3727
|
Organism: "bg-primary text-on-primary",
|
|
3542
3728
|
Template: "bg-[var(--color-kind-template-bg)] text-[var(--color-kind-template-text)]"
|
|
3543
3729
|
};
|
|
3544
|
-
var ComponentCard =
|
|
3730
|
+
var ComponentCard = React16.forwardRef(
|
|
3545
3731
|
({
|
|
3546
3732
|
name,
|
|
3547
3733
|
kind = "Organism",
|
|
@@ -3552,7 +3738,7 @@ var ComponentCard = React14.forwardRef(
|
|
|
3552
3738
|
className,
|
|
3553
3739
|
...rest
|
|
3554
3740
|
}, ref) => {
|
|
3555
|
-
return /* @__PURE__ */
|
|
3741
|
+
return /* @__PURE__ */ jsxs15(
|
|
3556
3742
|
"div",
|
|
3557
3743
|
{
|
|
3558
3744
|
ref,
|
|
@@ -3567,7 +3753,7 @@ var ComponentCard = React14.forwardRef(
|
|
|
3567
3753
|
].filter(Boolean).join(" "),
|
|
3568
3754
|
...rest,
|
|
3569
3755
|
children: [
|
|
3570
|
-
/* @__PURE__ */
|
|
3756
|
+
/* @__PURE__ */ jsx16(
|
|
3571
3757
|
"div",
|
|
3572
3758
|
{
|
|
3573
3759
|
className: [
|
|
@@ -3575,15 +3761,15 @@ var ComponentCard = React14.forwardRef(
|
|
|
3575
3761
|
"w-full aspect-[4/3] overflow-hidden",
|
|
3576
3762
|
thumbnailBg ?? "bg-surface-soft"
|
|
3577
3763
|
].join(" "),
|
|
3578
|
-
children: thumbnailContent ?? /* @__PURE__ */
|
|
3764
|
+
children: thumbnailContent ?? /* @__PURE__ */ jsx16(DefaultThumbnail, { kind })
|
|
3579
3765
|
}
|
|
3580
3766
|
),
|
|
3581
|
-
/* @__PURE__ */
|
|
3582
|
-
/* @__PURE__ */
|
|
3583
|
-
/* @__PURE__ */
|
|
3584
|
-
/* @__PURE__ */
|
|
3767
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between px-md py-sm border-t border-hairline-soft bg-canvas", children: [
|
|
3768
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-xxs min-w-0", children: [
|
|
3769
|
+
/* @__PURE__ */ jsx16("span", { className: "text-body-sm font-weight-heading-sm text-ink truncate", children: name }),
|
|
3770
|
+
/* @__PURE__ */ jsx16("span", { className: "text-caption text-muted truncate", children: description ?? `${kind} \u2022 Generated` })
|
|
3585
3771
|
] }),
|
|
3586
|
-
/* @__PURE__ */
|
|
3772
|
+
/* @__PURE__ */ jsx16(
|
|
3587
3773
|
"span",
|
|
3588
3774
|
{
|
|
3589
3775
|
className: [
|
|
@@ -3604,27 +3790,27 @@ var ComponentCard = React14.forwardRef(
|
|
|
3604
3790
|
ComponentCard.displayName = "ComponentCard";
|
|
3605
3791
|
function DefaultThumbnail({ kind }) {
|
|
3606
3792
|
const icons = {
|
|
3607
|
-
Atom: /* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3793
|
+
Atom: /* @__PURE__ */ jsxs15("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3794
|
+
/* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "1" }),
|
|
3795
|
+
/* @__PURE__ */ jsx16("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" }),
|
|
3796
|
+
/* @__PURE__ */ jsx16("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" })
|
|
3611
3797
|
] }),
|
|
3612
|
-
Molecule: /* @__PURE__ */
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3798
|
+
Molecule: /* @__PURE__ */ jsxs15("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3799
|
+
/* @__PURE__ */ jsx16("rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3800
|
+
/* @__PURE__ */ jsx16("rect", { x: "14", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3801
|
+
/* @__PURE__ */ jsx16("rect", { x: "2", y: "14", width: "8", height: "8", rx: "2" })
|
|
3616
3802
|
] }),
|
|
3617
|
-
Organism: /* @__PURE__ */
|
|
3618
|
-
/* @__PURE__ */
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3803
|
+
Organism: /* @__PURE__ */ jsxs15("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3804
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
|
|
3805
|
+
/* @__PURE__ */ jsx16("path", { d: "M2 17l10 5 10-5" }),
|
|
3806
|
+
/* @__PURE__ */ jsx16("path", { d: "M2 12l10 5 10-5" })
|
|
3621
3807
|
] }),
|
|
3622
|
-
Template: /* @__PURE__ */
|
|
3623
|
-
/* @__PURE__ */
|
|
3624
|
-
/* @__PURE__ */
|
|
3808
|
+
Template: /* @__PURE__ */ jsxs15("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3809
|
+
/* @__PURE__ */ jsx16("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3810
|
+
/* @__PURE__ */ jsx16("path", { d: "M3 9h18M9 21V9" })
|
|
3625
3811
|
] })
|
|
3626
3812
|
};
|
|
3627
|
-
return /* @__PURE__ */
|
|
3813
|
+
return /* @__PURE__ */ jsx16(
|
|
3628
3814
|
"div",
|
|
3629
3815
|
{
|
|
3630
3816
|
className: [
|
|
@@ -3637,18 +3823,18 @@ function DefaultThumbnail({ kind }) {
|
|
|
3637
3823
|
}
|
|
3638
3824
|
|
|
3639
3825
|
// virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
|
|
3640
|
-
import
|
|
3826
|
+
import React19, { useState as useState3 } from "react";
|
|
3641
3827
|
|
|
3642
3828
|
// virtual-pkg:src/atoms/Modal/Modal.tsx
|
|
3643
|
-
import
|
|
3644
|
-
import { jsx as
|
|
3829
|
+
import React17, { useEffect, useRef, useState as useState2 } from "react";
|
|
3830
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3645
3831
|
var sizeMap = {
|
|
3646
3832
|
sm: "max-w-sm",
|
|
3647
3833
|
md: "max-w-lg",
|
|
3648
3834
|
lg: "max-w-2xl",
|
|
3649
3835
|
xl: "max-w-4xl"
|
|
3650
3836
|
};
|
|
3651
|
-
var Modal =
|
|
3837
|
+
var Modal = React17.forwardRef(
|
|
3652
3838
|
({ isOpen, onClose, title, children, footer, size = "md" }, ref) => {
|
|
3653
3839
|
const [mounted, setMounted] = useState2(false);
|
|
3654
3840
|
const [visible, setVisible] = useState2(false);
|
|
@@ -3678,7 +3864,7 @@ var Modal = React15.forwardRef(
|
|
|
3678
3864
|
const handleBackdropClick = (e) => {
|
|
3679
3865
|
if (e.target === overlayRef.current) onClose();
|
|
3680
3866
|
};
|
|
3681
|
-
return /* @__PURE__ */
|
|
3867
|
+
return /* @__PURE__ */ jsx17(
|
|
3682
3868
|
"div",
|
|
3683
3869
|
{
|
|
3684
3870
|
ref: overlayRef,
|
|
@@ -3693,7 +3879,7 @@ var Modal = React15.forwardRef(
|
|
|
3693
3879
|
visible ? "opacity-100" : "opacity-0"
|
|
3694
3880
|
].join(" "),
|
|
3695
3881
|
style: { zIndex: "var(--z-modal, 1000)" },
|
|
3696
|
-
children: /* @__PURE__ */
|
|
3882
|
+
children: /* @__PURE__ */ jsxs16(
|
|
3697
3883
|
"div",
|
|
3698
3884
|
{
|
|
3699
3885
|
ref,
|
|
@@ -3706,9 +3892,9 @@ var Modal = React15.forwardRef(
|
|
|
3706
3892
|
visible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
|
|
3707
3893
|
].join(" "),
|
|
3708
3894
|
children: [
|
|
3709
|
-
title && /* @__PURE__ */
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3895
|
+
title && /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between px-lg py-base border-b border-hairline", children: [
|
|
3896
|
+
/* @__PURE__ */ jsx17("h2", { id: "modal-title", className: "text-heading-sm text-ink", children: title }),
|
|
3897
|
+
/* @__PURE__ */ jsx17(
|
|
3712
3898
|
Button,
|
|
3713
3899
|
{
|
|
3714
3900
|
variant: "ghost",
|
|
@@ -3716,7 +3902,7 @@ var Modal = React15.forwardRef(
|
|
|
3716
3902
|
"aria-label": "Close modal",
|
|
3717
3903
|
onClick: onClose,
|
|
3718
3904
|
className: "!px-xs !py-xs",
|
|
3719
|
-
children: /* @__PURE__ */
|
|
3905
|
+
children: /* @__PURE__ */ jsxs16(
|
|
3720
3906
|
"svg",
|
|
3721
3907
|
{
|
|
3722
3908
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3730,16 +3916,16 @@ var Modal = React15.forwardRef(
|
|
|
3730
3916
|
strokeLinejoin: "round",
|
|
3731
3917
|
"aria-hidden": "true",
|
|
3732
3918
|
children: [
|
|
3733
|
-
/* @__PURE__ */
|
|
3734
|
-
/* @__PURE__ */
|
|
3919
|
+
/* @__PURE__ */ jsx17("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3920
|
+
/* @__PURE__ */ jsx17("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3735
3921
|
]
|
|
3736
3922
|
}
|
|
3737
3923
|
)
|
|
3738
3924
|
}
|
|
3739
3925
|
)
|
|
3740
3926
|
] }),
|
|
3741
|
-
/* @__PURE__ */
|
|
3742
|
-
footer && /* @__PURE__ */
|
|
3927
|
+
/* @__PURE__ */ jsx17("div", { className: "flex-1 px-lg py-base text-body-md text-body overflow-y-auto", children }),
|
|
3928
|
+
footer && /* @__PURE__ */ jsx17("div", { className: "flex items-center justify-end gap-sm px-lg py-base border-t border-hairline", children: footer })
|
|
3743
3929
|
]
|
|
3744
3930
|
}
|
|
3745
3931
|
)
|
|
@@ -3750,8 +3936,8 @@ var Modal = React15.forwardRef(
|
|
|
3750
3936
|
Modal.displayName = "Modal";
|
|
3751
3937
|
|
|
3752
3938
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
3753
|
-
import
|
|
3754
|
-
import { jsx as
|
|
3939
|
+
import React18 from "react";
|
|
3940
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3755
3941
|
var roleTagMap = {
|
|
3756
3942
|
"display-lg": "h1",
|
|
3757
3943
|
"heading-lg": "h2",
|
|
@@ -3783,7 +3969,7 @@ var colorClassMap = {
|
|
|
3783
3969
|
"semantic-warning": "text-semantic-warning",
|
|
3784
3970
|
"on-primary": "text-on-primary"
|
|
3785
3971
|
};
|
|
3786
|
-
var Typography =
|
|
3972
|
+
var Typography = React18.forwardRef(
|
|
3787
3973
|
({
|
|
3788
3974
|
role = "body-md",
|
|
3789
3975
|
color = "ink",
|
|
@@ -3802,13 +3988,13 @@ var Typography = React16.forwardRef(
|
|
|
3802
3988
|
uppercase ? "uppercase tracking-wide" : "",
|
|
3803
3989
|
className
|
|
3804
3990
|
].filter(Boolean).join(" ");
|
|
3805
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsx18(Tag, { ref, className: classes, ...rest, children });
|
|
3806
3992
|
}
|
|
3807
3993
|
);
|
|
3808
3994
|
Typography.displayName = "Typography";
|
|
3809
3995
|
|
|
3810
3996
|
// virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
|
|
3811
|
-
import { jsx as
|
|
3997
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3812
3998
|
var defaultLines = [
|
|
3813
3999
|
{ text: "# Design System", tone: "heading" },
|
|
3814
4000
|
{ text: "" },
|
|
@@ -3837,7 +4023,7 @@ var defaultLines = [
|
|
|
3837
4023
|
{ text: "muted: {colors.muted}" },
|
|
3838
4024
|
{ text: "hairline: {colors.hairline}" }
|
|
3839
4025
|
];
|
|
3840
|
-
var CloudIcon = () => /* @__PURE__ */
|
|
4026
|
+
var CloudIcon = () => /* @__PURE__ */ jsxs17(
|
|
3841
4027
|
"svg",
|
|
3842
4028
|
{
|
|
3843
4029
|
viewBox: "0 0 24 24",
|
|
@@ -3850,12 +4036,12 @@ var CloudIcon = () => /* @__PURE__ */ jsxs16(
|
|
|
3850
4036
|
strokeLinejoin: "round",
|
|
3851
4037
|
"aria-hidden": "true",
|
|
3852
4038
|
children: [
|
|
3853
|
-
/* @__PURE__ */
|
|
3854
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ jsx19("path", { d: "M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16" }),
|
|
4040
|
+
/* @__PURE__ */ jsx19("path", { d: "M8 19h9.5" })
|
|
3855
4041
|
]
|
|
3856
4042
|
}
|
|
3857
4043
|
);
|
|
3858
|
-
var LinkIcon = () => /* @__PURE__ */
|
|
4044
|
+
var LinkIcon = () => /* @__PURE__ */ jsxs17(
|
|
3859
4045
|
"svg",
|
|
3860
4046
|
{
|
|
3861
4047
|
viewBox: "0 0 24 24",
|
|
@@ -3868,13 +4054,13 @@ var LinkIcon = () => /* @__PURE__ */ jsxs16(
|
|
|
3868
4054
|
strokeLinejoin: "round",
|
|
3869
4055
|
"aria-hidden": "true",
|
|
3870
4056
|
children: [
|
|
3871
|
-
/* @__PURE__ */
|
|
3872
|
-
/* @__PURE__ */
|
|
3873
|
-
/* @__PURE__ */
|
|
4057
|
+
/* @__PURE__ */ jsx19("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
|
|
4058
|
+
/* @__PURE__ */ jsx19("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
|
|
4059
|
+
/* @__PURE__ */ jsx19("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
|
|
3874
4060
|
]
|
|
3875
4061
|
}
|
|
3876
4062
|
);
|
|
3877
|
-
var CopyIcon = () => /* @__PURE__ */
|
|
4063
|
+
var CopyIcon = () => /* @__PURE__ */ jsxs17(
|
|
3878
4064
|
"svg",
|
|
3879
4065
|
{
|
|
3880
4066
|
viewBox: "0 0 24 24",
|
|
@@ -3887,12 +4073,12 @@ var CopyIcon = () => /* @__PURE__ */ jsxs16(
|
|
|
3887
4073
|
strokeLinejoin: "round",
|
|
3888
4074
|
"aria-hidden": "true",
|
|
3889
4075
|
children: [
|
|
3890
|
-
/* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
4076
|
+
/* @__PURE__ */ jsx19("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
4077
|
+
/* @__PURE__ */ jsx19("path", { d: "M5 15V5a2 2 0 0 1 2-2h10" })
|
|
3892
4078
|
]
|
|
3893
4079
|
}
|
|
3894
4080
|
);
|
|
3895
|
-
var DownloadIcon = () => /* @__PURE__ */
|
|
4081
|
+
var DownloadIcon = () => /* @__PURE__ */ jsxs17(
|
|
3896
4082
|
"svg",
|
|
3897
4083
|
{
|
|
3898
4084
|
viewBox: "0 0 24 24",
|
|
@@ -3905,13 +4091,13 @@ var DownloadIcon = () => /* @__PURE__ */ jsxs16(
|
|
|
3905
4091
|
strokeLinejoin: "round",
|
|
3906
4092
|
"aria-hidden": "true",
|
|
3907
4093
|
children: [
|
|
3908
|
-
/* @__PURE__ */
|
|
3909
|
-
/* @__PURE__ */
|
|
3910
|
-
/* @__PURE__ */
|
|
4094
|
+
/* @__PURE__ */ jsx19("path", { d: "M12 3v12" }),
|
|
4095
|
+
/* @__PURE__ */ jsx19("path", { d: "M7 10l5 5 5-5" }),
|
|
4096
|
+
/* @__PURE__ */ jsx19("path", { d: "M5 21h14" })
|
|
3911
4097
|
]
|
|
3912
4098
|
}
|
|
3913
4099
|
);
|
|
3914
|
-
var SpinnerIcon2 = () => /* @__PURE__ */
|
|
4100
|
+
var SpinnerIcon2 = () => /* @__PURE__ */ jsxs17(
|
|
3915
4101
|
"svg",
|
|
3916
4102
|
{
|
|
3917
4103
|
viewBox: "0 0 24 24",
|
|
@@ -3921,7 +4107,7 @@ var SpinnerIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
|
3921
4107
|
className: "animate-spin text-primary",
|
|
3922
4108
|
"aria-hidden": "true",
|
|
3923
4109
|
children: [
|
|
3924
|
-
/* @__PURE__ */
|
|
4110
|
+
/* @__PURE__ */ jsx19(
|
|
3925
4111
|
"circle",
|
|
3926
4112
|
{
|
|
3927
4113
|
cx: "12",
|
|
@@ -3932,7 +4118,7 @@ var SpinnerIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
|
3932
4118
|
strokeOpacity: "0.25"
|
|
3933
4119
|
}
|
|
3934
4120
|
),
|
|
3935
|
-
/* @__PURE__ */
|
|
4121
|
+
/* @__PURE__ */ jsx19(
|
|
3936
4122
|
"path",
|
|
3937
4123
|
{
|
|
3938
4124
|
d: "M21 12a9 9 0 0 0-9-9",
|
|
@@ -3944,7 +4130,7 @@ var SpinnerIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
|
3944
4130
|
]
|
|
3945
4131
|
}
|
|
3946
4132
|
);
|
|
3947
|
-
var ExportDesignMdModal =
|
|
4133
|
+
var ExportDesignMdModal = React19.forwardRef(
|
|
3948
4134
|
({
|
|
3949
4135
|
isOpen,
|
|
3950
4136
|
onClose,
|
|
@@ -3970,7 +4156,7 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
3970
4156
|
}
|
|
3971
4157
|
onCopy?.();
|
|
3972
4158
|
};
|
|
3973
|
-
return /* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ jsx19(
|
|
3974
4160
|
Modal,
|
|
3975
4161
|
{
|
|
3976
4162
|
ref,
|
|
@@ -3978,49 +4164,49 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
3978
4164
|
onClose,
|
|
3979
4165
|
title: "Export DESIGN.md",
|
|
3980
4166
|
size: "xl",
|
|
3981
|
-
footer: /* @__PURE__ */
|
|
3982
|
-
/* @__PURE__ */
|
|
3983
|
-
/* @__PURE__ */
|
|
4167
|
+
footer: /* @__PURE__ */ jsxs17("div", { className: "flex w-full items-center justify-between", children: [
|
|
4168
|
+
/* @__PURE__ */ jsxs17(Button, { variant: "secondary", size: "sm", onClick: onDownload, children: [
|
|
4169
|
+
/* @__PURE__ */ jsx19(DownloadIcon, {}),
|
|
3984
4170
|
"Download .md"
|
|
3985
4171
|
] }),
|
|
3986
|
-
/* @__PURE__ */
|
|
3987
|
-
/* @__PURE__ */
|
|
3988
|
-
/* @__PURE__ */
|
|
4172
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-sm", children: [
|
|
4173
|
+
/* @__PURE__ */ jsx19(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }),
|
|
4174
|
+
/* @__PURE__ */ jsx19(Button, { variant: "primary", onClick: onExport, children: "Export" })
|
|
3989
4175
|
] })
|
|
3990
4176
|
] }),
|
|
3991
|
-
children: /* @__PURE__ */
|
|
3992
|
-
/* @__PURE__ */
|
|
3993
|
-
/* @__PURE__ */
|
|
3994
|
-
/* @__PURE__ */
|
|
3995
|
-
/* @__PURE__ */
|
|
4177
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "w-full space-y-lg", children: [
|
|
4178
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-md", color: "muted", children: "Generate and export the DESIGN.md file for handoff to AI coding agents or your team." }),
|
|
4179
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center justify-between gap-md", children: [
|
|
4180
|
+
/* @__PURE__ */ jsxs17("div", { className: "inline-flex items-center gap-xs p-xxs bg-surface-soft border border-hairline rounded-md", children: [
|
|
4181
|
+
/* @__PURE__ */ jsxs17(
|
|
3996
4182
|
Button,
|
|
3997
4183
|
{
|
|
3998
4184
|
variant: source === "production" ? "primary" : "ghost",
|
|
3999
4185
|
size: "sm",
|
|
4000
4186
|
onClick: () => changeSource("production"),
|
|
4001
4187
|
children: [
|
|
4002
|
-
/* @__PURE__ */
|
|
4188
|
+
/* @__PURE__ */ jsx19(CloudIcon, {}),
|
|
4003
4189
|
"Production"
|
|
4004
4190
|
]
|
|
4005
4191
|
}
|
|
4006
4192
|
),
|
|
4007
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsxs17(
|
|
4008
4194
|
Button,
|
|
4009
4195
|
{
|
|
4010
4196
|
variant: source === "local" ? "primary" : "ghost",
|
|
4011
4197
|
size: "sm",
|
|
4012
4198
|
onClick: () => changeSource("local"),
|
|
4013
4199
|
children: [
|
|
4014
|
-
/* @__PURE__ */
|
|
4200
|
+
/* @__PURE__ */ jsx19(LinkIcon, {}),
|
|
4015
4201
|
"Local (npm link)"
|
|
4016
4202
|
]
|
|
4017
4203
|
}
|
|
4018
4204
|
)
|
|
4019
4205
|
] }),
|
|
4020
|
-
/* @__PURE__ */
|
|
4206
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-sm", color: "muted", className: "flex-1 min-w-[16rem]", children: source === "production" ? "Consumer apps install from the public npm registry ('npm install')." : "Consumer apps resolve the package via a local 'npm link' during development." })
|
|
4021
4207
|
] }),
|
|
4022
|
-
/* @__PURE__ */
|
|
4023
|
-
/* @__PURE__ */
|
|
4208
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
4209
|
+
/* @__PURE__ */ jsx19(
|
|
4024
4210
|
Typography,
|
|
4025
4211
|
{
|
|
4026
4212
|
role: "caption",
|
|
@@ -4030,8 +4216,8 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
4030
4216
|
children: "Preview"
|
|
4031
4217
|
}
|
|
4032
4218
|
),
|
|
4033
|
-
/* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4219
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative w-full bg-canvas border border-hairline rounded-md overflow-hidden", children: [
|
|
4220
|
+
/* @__PURE__ */ jsxs17(
|
|
4035
4221
|
Button,
|
|
4036
4222
|
{
|
|
4037
4223
|
variant: "secondary",
|
|
@@ -4039,14 +4225,14 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
4039
4225
|
onClick: handleCopy,
|
|
4040
4226
|
className: "absolute top-sm right-sm",
|
|
4041
4227
|
children: [
|
|
4042
|
-
/* @__PURE__ */
|
|
4228
|
+
/* @__PURE__ */ jsx19(CopyIcon, {}),
|
|
4043
4229
|
"Copy"
|
|
4044
4230
|
]
|
|
4045
4231
|
}
|
|
4046
4232
|
),
|
|
4047
|
-
/* @__PURE__ */
|
|
4048
|
-
/* @__PURE__ */
|
|
4049
|
-
/* @__PURE__ */
|
|
4233
|
+
/* @__PURE__ */ jsx19("div", { className: "max-h-64 overflow-y-auto px-md py-sm font-mono text-body-sm", children: lines.map((line, i) => /* @__PURE__ */ jsxs17("div", { className: "flex gap-md", children: [
|
|
4234
|
+
/* @__PURE__ */ jsx19("span", { className: "w-6 flex-shrink-0 text-right text-muted-soft select-none", children: i + 1 }),
|
|
4235
|
+
/* @__PURE__ */ jsx19(
|
|
4050
4236
|
"span",
|
|
4051
4237
|
{
|
|
4052
4238
|
className: line.tone === "heading" ? "text-primary font-weight-heading-sm" : "text-body",
|
|
@@ -4054,7 +4240,7 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
4054
4240
|
}
|
|
4055
4241
|
)
|
|
4056
4242
|
] }, i)) }),
|
|
4057
|
-
loading ? /* @__PURE__ */
|
|
4243
|
+
loading ? /* @__PURE__ */ jsxs17(
|
|
4058
4244
|
"div",
|
|
4059
4245
|
{
|
|
4060
4246
|
role: "status",
|
|
@@ -4062,21 +4248,21 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
4062
4248
|
"aria-label": "Loading preview",
|
|
4063
4249
|
className: "absolute inset-0 flex items-center justify-center gap-sm bg-canvas opacity-90",
|
|
4064
4250
|
children: [
|
|
4065
|
-
/* @__PURE__ */
|
|
4066
|
-
/* @__PURE__ */
|
|
4251
|
+
/* @__PURE__ */ jsx19(SpinnerIcon2, {}),
|
|
4252
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-sm", color: "muted", children: "Loading preview\u2026" })
|
|
4067
4253
|
]
|
|
4068
4254
|
}
|
|
4069
4255
|
) : null
|
|
4070
4256
|
] })
|
|
4071
4257
|
] }),
|
|
4072
|
-
/* @__PURE__ */
|
|
4073
|
-
/* @__PURE__ */
|
|
4074
|
-
/* @__PURE__ */
|
|
4075
|
-
/* @__PURE__ */
|
|
4076
|
-
/* @__PURE__ */
|
|
4077
|
-
/* @__PURE__ */
|
|
4258
|
+
/* @__PURE__ */ jsxs17("div", { className: "w-full space-y-sm", children: [
|
|
4259
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
|
|
4260
|
+
/* @__PURE__ */ jsx19("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary", children: /* @__PURE__ */ jsx19(CloudIcon, {}) }),
|
|
4261
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
4262
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Production (npm install)" }),
|
|
4263
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-sm", color: "muted", children: "Generated for public npm registry consumption." })
|
|
4078
4264
|
] }),
|
|
4079
|
-
source === "production" ? /* @__PURE__ */
|
|
4265
|
+
source === "production" ? /* @__PURE__ */ jsx19(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ jsx19(
|
|
4080
4266
|
Button,
|
|
4081
4267
|
{
|
|
4082
4268
|
variant: "secondary",
|
|
@@ -4086,13 +4272,13 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
4086
4272
|
}
|
|
4087
4273
|
)
|
|
4088
4274
|
] }),
|
|
4089
|
-
/* @__PURE__ */
|
|
4090
|
-
/* @__PURE__ */
|
|
4091
|
-
/* @__PURE__ */
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
|
|
4276
|
+
/* @__PURE__ */ jsx19("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-muted", children: /* @__PURE__ */ jsx19(LinkIcon, {}) }),
|
|
4277
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
4278
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Local (npm link)" }),
|
|
4279
|
+
/* @__PURE__ */ jsx19(Typography, { role: "body-sm", color: "muted", children: "Generated for local development with npm link." })
|
|
4094
4280
|
] }),
|
|
4095
|
-
source === "local" ? /* @__PURE__ */
|
|
4281
|
+
source === "local" ? /* @__PURE__ */ jsx19(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ jsx19(
|
|
4096
4282
|
Button,
|
|
4097
4283
|
{
|
|
4098
4284
|
variant: "secondary",
|
|
@@ -4111,11 +4297,11 @@ var ExportDesignMdModal = React17.forwardRef(
|
|
|
4111
4297
|
ExportDesignMdModal.displayName = "ExportDesignMdModal";
|
|
4112
4298
|
|
|
4113
4299
|
// virtual-pkg:src/atoms/FilterTabBar/FilterTabBar.tsx
|
|
4114
|
-
import
|
|
4115
|
-
import { jsx as
|
|
4116
|
-
var FilterTabBar =
|
|
4300
|
+
import React20 from "react";
|
|
4301
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4302
|
+
var FilterTabBar = React20.forwardRef(
|
|
4117
4303
|
({ tabs, value, onChange, className = "", ...rest }, ref) => {
|
|
4118
|
-
return /* @__PURE__ */
|
|
4304
|
+
return /* @__PURE__ */ jsx20(
|
|
4119
4305
|
"div",
|
|
4120
4306
|
{
|
|
4121
4307
|
ref,
|
|
@@ -4129,7 +4315,7 @@ var FilterTabBar = React18.forwardRef(
|
|
|
4129
4315
|
...rest,
|
|
4130
4316
|
children: tabs.map((tab) => {
|
|
4131
4317
|
const isActive = tab.value === value;
|
|
4132
|
-
return /* @__PURE__ */
|
|
4318
|
+
return /* @__PURE__ */ jsxs18(
|
|
4133
4319
|
Button,
|
|
4134
4320
|
{
|
|
4135
4321
|
role: "tab",
|
|
@@ -4140,9 +4326,9 @@ var FilterTabBar = React18.forwardRef(
|
|
|
4140
4326
|
onClick: () => onChange(tab.value),
|
|
4141
4327
|
className: "gap-xs",
|
|
4142
4328
|
children: [
|
|
4143
|
-
tab.icon && /* @__PURE__ */
|
|
4144
|
-
tab.label && /* @__PURE__ */
|
|
4145
|
-
tab.count !== void 0 && /* @__PURE__ */
|
|
4329
|
+
tab.icon && /* @__PURE__ */ jsx20("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
|
|
4330
|
+
tab.label && /* @__PURE__ */ jsx20("span", { children: tab.label }),
|
|
4331
|
+
tab.count !== void 0 && /* @__PURE__ */ jsx20(
|
|
4146
4332
|
"span",
|
|
4147
4333
|
{
|
|
4148
4334
|
className: [
|
|
@@ -4168,20 +4354,20 @@ var FilterTabBar = React18.forwardRef(
|
|
|
4168
4354
|
FilterTabBar.displayName = "FilterTabBar";
|
|
4169
4355
|
|
|
4170
4356
|
// virtual-pkg:src/atoms/HomePageTemplate/HomePageTemplate.tsx
|
|
4171
|
-
import
|
|
4172
|
-
import { jsx as
|
|
4173
|
-
var HomeIcon2 = () => /* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4175
|
-
/* @__PURE__ */
|
|
4357
|
+
import React21 from "react";
|
|
4358
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4359
|
+
var HomeIcon2 = () => /* @__PURE__ */ jsxs19("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
|
|
4360
|
+
/* @__PURE__ */ jsx21("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
4361
|
+
/* @__PURE__ */ jsx21("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
4176
4362
|
] });
|
|
4177
|
-
var FolderIcon = () => /* @__PURE__ */
|
|
4178
|
-
var LogoIcon3 = () => /* @__PURE__ */
|
|
4179
|
-
/* @__PURE__ */
|
|
4180
|
-
/* @__PURE__ */
|
|
4181
|
-
/* @__PURE__ */
|
|
4363
|
+
var FolderIcon = () => /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx21("path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }) });
|
|
4364
|
+
var LogoIcon3 = () => /* @__PURE__ */ jsxs19("svg", { width: "26", height: "26", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
4365
|
+
/* @__PURE__ */ jsx21("path", { d: "M12 36C12 36 8 28 16 22C20 19 26 20 26 20C26 20 22 26 18 30C16 32 12 36 12 36Z", style: { fill: "var(--color-logo-orange)" } }),
|
|
4366
|
+
/* @__PURE__ */ jsx21("path", { d: "M24 8C24 8 36 12 36 24C36 30 32 36 26 38C26 38 28 30 26 24C25 20 24 8 24 8Z", style: { fill: "var(--color-logo-violet)" } }),
|
|
4367
|
+
/* @__PURE__ */ jsx21("path", { d: "M12 36C12 36 16 24 24 20C28 18 36 20 36 20C36 20 30 28 26 32C22 36 12 36 12 36Z", style: { fill: "var(--color-logo-pink)", opacity: 0.7 } })
|
|
4182
4368
|
] });
|
|
4183
|
-
var SparkleIcon = () => /* @__PURE__ */
|
|
4184
|
-
var SuggestionChip = ({ label, onClick }) => /* @__PURE__ */
|
|
4369
|
+
var SparkleIcon = () => /* @__PURE__ */ jsx21("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "14px", height: "14px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx21("path", { d: "M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 17 5.8 21.3l2.4-7.4L2 9.4h7.6z" }) });
|
|
4370
|
+
var SuggestionChip = ({ label, onClick }) => /* @__PURE__ */ jsx21(
|
|
4185
4371
|
Button,
|
|
4186
4372
|
{
|
|
4187
4373
|
type: "button",
|
|
@@ -4199,11 +4385,11 @@ var DEFAULT_MODELS = [
|
|
|
4199
4385
|
];
|
|
4200
4386
|
var DEFAULT_SELECTED_MODEL_ID = "claude-sonnet";
|
|
4201
4387
|
var NAV_ENTRIES = [
|
|
4202
|
-
{ id: "home", label: "Home", icon: /* @__PURE__ */
|
|
4388
|
+
{ id: "home", label: "Home", icon: /* @__PURE__ */ jsx21(HomeIcon2, {}) },
|
|
4203
4389
|
{
|
|
4204
4390
|
id: "projects",
|
|
4205
4391
|
label: "All projects",
|
|
4206
|
-
icon: /* @__PURE__ */
|
|
4392
|
+
icon: /* @__PURE__ */ jsx21(FolderIcon, {}),
|
|
4207
4393
|
subItems: [
|
|
4208
4394
|
{ id: "proj-1", label: "Design system" },
|
|
4209
4395
|
{ id: "proj-2", label: "Landing page" },
|
|
@@ -4223,7 +4409,7 @@ var GRADIENT_BG = `
|
|
|
4223
4409
|
radial-gradient(ellipse 70% 60% at 50% 50%, var(--color-surface-soft) 0%, transparent 70%),
|
|
4224
4410
|
var(--color-canvas)
|
|
4225
4411
|
`;
|
|
4226
|
-
var HomePageTemplate =
|
|
4412
|
+
var HomePageTemplate = React21.forwardRef(
|
|
4227
4413
|
({
|
|
4228
4414
|
userName = "Hello Designer",
|
|
4229
4415
|
userInitials = "N",
|
|
@@ -4248,8 +4434,8 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4248
4434
|
className,
|
|
4249
4435
|
style
|
|
4250
4436
|
}, ref) => {
|
|
4251
|
-
const [internalPrompt, setInternalPrompt] =
|
|
4252
|
-
const [internalActiveId, setInternalActiveId] =
|
|
4437
|
+
const [internalPrompt, setInternalPrompt] = React21.useState("");
|
|
4438
|
+
const [internalActiveId, setInternalActiveId] = React21.useState("home");
|
|
4253
4439
|
const resolvedActiveId = activeIdProp !== void 0 ? activeIdProp : internalActiveId;
|
|
4254
4440
|
const resolvedEntries = navEntries !== void 0 ? navEntries : NAV_ENTRIES;
|
|
4255
4441
|
const textValue = promptValue !== void 0 ? promptValue : internalPrompt;
|
|
@@ -4272,14 +4458,14 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4272
4458
|
if (activeIdProp === void 0) setInternalActiveId(id);
|
|
4273
4459
|
onSelect?.(id);
|
|
4274
4460
|
};
|
|
4275
|
-
return /* @__PURE__ */
|
|
4461
|
+
return /* @__PURE__ */ jsxs19(
|
|
4276
4462
|
"div",
|
|
4277
4463
|
{
|
|
4278
4464
|
ref,
|
|
4279
4465
|
className: ["flex w-full", className].filter(Boolean).join(" "),
|
|
4280
4466
|
style: { width: "100%", height: "100%", background: "var(--color-canvas)", ...style },
|
|
4281
4467
|
children: [
|
|
4282
|
-
/* @__PURE__ */
|
|
4468
|
+
/* @__PURE__ */ jsx21("div", { className: "hidden md:flex flex-shrink-0", style: { height: "100%" }, children: /* @__PURE__ */ jsx21(
|
|
4283
4469
|
AppSidebar,
|
|
4284
4470
|
{
|
|
4285
4471
|
workspaceName: userName,
|
|
@@ -4299,14 +4485,14 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4299
4485
|
style: { height: "100%" }
|
|
4300
4486
|
}
|
|
4301
4487
|
) }),
|
|
4302
|
-
/* @__PURE__ */
|
|
4488
|
+
/* @__PURE__ */ jsxs19(
|
|
4303
4489
|
"main",
|
|
4304
4490
|
{
|
|
4305
4491
|
className: "flex-1 relative flex flex-col overflow-hidden",
|
|
4306
4492
|
style: { height: "100%" },
|
|
4307
4493
|
"aria-label": "Home canvas",
|
|
4308
4494
|
children: [
|
|
4309
|
-
/* @__PURE__ */
|
|
4495
|
+
/* @__PURE__ */ jsx21(
|
|
4310
4496
|
"div",
|
|
4311
4497
|
{
|
|
4312
4498
|
"aria-hidden": "true",
|
|
@@ -4314,9 +4500,9 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4314
4500
|
style: { background: GRADIENT_BG }
|
|
4315
4501
|
}
|
|
4316
4502
|
),
|
|
4317
|
-
/* @__PURE__ */
|
|
4318
|
-
/* @__PURE__ */
|
|
4319
|
-
/* @__PURE__ */
|
|
4503
|
+
/* @__PURE__ */ jsxs19("div", { className: "md:hidden relative z-10 flex items-center justify-between px-md py-sm border-b border-hairline bg-canvas", children: [
|
|
4504
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-sm", children: [
|
|
4505
|
+
/* @__PURE__ */ jsx21(
|
|
4320
4506
|
AppSidebarMobile,
|
|
4321
4507
|
{
|
|
4322
4508
|
brandName: "Atoms",
|
|
@@ -4333,12 +4519,12 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4333
4519
|
onDarkModeToggle
|
|
4334
4520
|
}
|
|
4335
4521
|
),
|
|
4336
|
-
/* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4338
|
-
/* @__PURE__ */
|
|
4522
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-xs", children: [
|
|
4523
|
+
/* @__PURE__ */ jsx21(LogoIcon3, {}),
|
|
4524
|
+
/* @__PURE__ */ jsx21("span", { className: "text-body-sm font-weight-heading-sm text-ink", children: "Atoms" })
|
|
4339
4525
|
] })
|
|
4340
4526
|
] }),
|
|
4341
|
-
/* @__PURE__ */
|
|
4527
|
+
/* @__PURE__ */ jsx21(
|
|
4342
4528
|
"span",
|
|
4343
4529
|
{
|
|
4344
4530
|
className: "flex items-center justify-center rounded-full bg-primary text-on-primary text-caption font-weight-heading-sm",
|
|
@@ -4348,8 +4534,8 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4348
4534
|
}
|
|
4349
4535
|
)
|
|
4350
4536
|
] }),
|
|
4351
|
-
/* @__PURE__ */
|
|
4352
|
-
/* @__PURE__ */
|
|
4537
|
+
/* @__PURE__ */ jsx21("div", { className: "relative z-10 flex-1 flex flex-col items-center justify-center overflow-auto", children: /* @__PURE__ */ jsxs19("div", { className: "w-full max-w-2xl mx-auto flex flex-col items-center gap-lg px-md py-xl md:gap-xl md:px-lg md:py-xxl", children: [
|
|
4538
|
+
/* @__PURE__ */ jsxs19(
|
|
4353
4539
|
Button,
|
|
4354
4540
|
{
|
|
4355
4541
|
variant: "secondary",
|
|
@@ -4357,13 +4543,13 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4357
4543
|
"aria-label": "New design system",
|
|
4358
4544
|
className: "!rounded-full flex items-center gap-xs",
|
|
4359
4545
|
children: [
|
|
4360
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ jsx21(SparkleIcon, {}),
|
|
4361
4547
|
"New design system"
|
|
4362
4548
|
]
|
|
4363
4549
|
}
|
|
4364
4550
|
),
|
|
4365
|
-
/* @__PURE__ */
|
|
4366
|
-
/* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsxs19("div", { className: "text-center flex flex-col gap-sm", children: [
|
|
4552
|
+
/* @__PURE__ */ jsxs19(
|
|
4367
4553
|
"h1",
|
|
4368
4554
|
{
|
|
4369
4555
|
className: "text-ink",
|
|
@@ -4376,12 +4562,12 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4376
4562
|
},
|
|
4377
4563
|
children: [
|
|
4378
4564
|
"What atom should we",
|
|
4379
|
-
/* @__PURE__ */
|
|
4565
|
+
/* @__PURE__ */ jsx21("br", {}),
|
|
4380
4566
|
"build?"
|
|
4381
4567
|
]
|
|
4382
4568
|
}
|
|
4383
4569
|
),
|
|
4384
|
-
/* @__PURE__ */
|
|
4570
|
+
/* @__PURE__ */ jsx21(
|
|
4385
4571
|
"p",
|
|
4386
4572
|
{
|
|
4387
4573
|
className: "text-muted text-body-sm md:text-body-md",
|
|
@@ -4390,7 +4576,7 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4390
4576
|
}
|
|
4391
4577
|
)
|
|
4392
4578
|
] }),
|
|
4393
|
-
/* @__PURE__ */
|
|
4579
|
+
/* @__PURE__ */ jsx21("div", { className: "w-full", children: /* @__PURE__ */ jsx21(
|
|
4394
4580
|
PromptInputBar,
|
|
4395
4581
|
{
|
|
4396
4582
|
placeholder: "Describe an atom or design token to create...",
|
|
@@ -4406,13 +4592,13 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4406
4592
|
onModelChange
|
|
4407
4593
|
}
|
|
4408
4594
|
) }),
|
|
4409
|
-
/* @__PURE__ */
|
|
4595
|
+
/* @__PURE__ */ jsx21(
|
|
4410
4596
|
"div",
|
|
4411
4597
|
{
|
|
4412
4598
|
className: "flex flex-wrap justify-center gap-sm",
|
|
4413
4599
|
role: "list",
|
|
4414
4600
|
"aria-label": "Suggested prompts",
|
|
4415
|
-
children: suggestions.map((s) => /* @__PURE__ */
|
|
4601
|
+
children: suggestions.map((s) => /* @__PURE__ */ jsx21("div", { role: "listitem", children: /* @__PURE__ */ jsx21(SuggestionChip, { label: s, onClick: () => handleSuggestion(s) }) }, s))
|
|
4416
4602
|
}
|
|
4417
4603
|
)
|
|
4418
4604
|
] }) })
|
|
@@ -4427,44 +4613,39 @@ var HomePageTemplate = React19.forwardRef(
|
|
|
4427
4613
|
HomePageTemplate.displayName = "HomePageTemplate";
|
|
4428
4614
|
|
|
4429
4615
|
// virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
|
|
4430
|
-
import
|
|
4431
|
-
import { jsx as
|
|
4432
|
-
var DesktopIcon = () => /* @__PURE__ */
|
|
4433
|
-
/* @__PURE__ */
|
|
4434
|
-
/* @__PURE__ */
|
|
4616
|
+
import React22 from "react";
|
|
4617
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4618
|
+
var DesktopIcon = () => /* @__PURE__ */ jsxs20("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: [
|
|
4619
|
+
/* @__PURE__ */ jsx22("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
4620
|
+
/* @__PURE__ */ jsx22("path", { d: "M8 21h8M12 17v4" })
|
|
4435
4621
|
] });
|
|
4436
|
-
var
|
|
4437
|
-
/* @__PURE__ */
|
|
4438
|
-
/* @__PURE__ */
|
|
4622
|
+
var MobileIcon = () => /* @__PURE__ */ jsxs20("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: [
|
|
4623
|
+
/* @__PURE__ */ jsx22("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
|
|
4624
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
|
|
4439
4625
|
] });
|
|
4440
|
-
var
|
|
4441
|
-
|
|
4442
|
-
/* @__PURE__ */
|
|
4626
|
+
var ExpandIcon = () => /* @__PURE__ */ jsx22("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__ */ jsx22("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
4627
|
+
var InspectIcon = () => /* @__PURE__ */ jsxs20("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: [
|
|
4628
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "9" }),
|
|
4629
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 8v4l3 3" }),
|
|
4630
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
|
|
4443
4631
|
] });
|
|
4444
|
-
var
|
|
4445
|
-
var
|
|
4446
|
-
/* @__PURE__ */
|
|
4447
|
-
/* @__PURE__ */
|
|
4448
|
-
/* @__PURE__ */
|
|
4632
|
+
var MoonIcon4 = () => /* @__PURE__ */ jsx22("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__ */ jsx22("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
4633
|
+
var FullscreenIcon = () => /* @__PURE__ */ jsxs20("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: [
|
|
4634
|
+
/* @__PURE__ */ jsx22("polyline", { points: "15 3 21 3 21 9" }),
|
|
4635
|
+
/* @__PURE__ */ jsx22("polyline", { points: "9 21 3 21 3 15" }),
|
|
4636
|
+
/* @__PURE__ */ jsx22("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
4637
|
+
/* @__PURE__ */ jsx22("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
4449
4638
|
] });
|
|
4450
|
-
var
|
|
4451
|
-
|
|
4452
|
-
/* @__PURE__ */
|
|
4453
|
-
/* @__PURE__ */
|
|
4454
|
-
/* @__PURE__ */ jsx20("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
4455
|
-
/* @__PURE__ */ jsx20("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
4456
|
-
] });
|
|
4457
|
-
var DotsIcon = () => /* @__PURE__ */ jsxs19("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
4458
|
-
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
4459
|
-
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
4460
|
-
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
4639
|
+
var DotsIcon = () => /* @__PURE__ */ jsxs20("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
4640
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
4641
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
4642
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
4461
4643
|
] });
|
|
4462
4644
|
var VIEWPORT_OPTIONS = [
|
|
4463
4645
|
{ id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
|
|
4464
|
-
{ id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
|
|
4465
4646
|
{ id: "mobile", Icon: MobileIcon, label: "Mobile view" }
|
|
4466
4647
|
];
|
|
4467
|
-
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */
|
|
4648
|
+
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx22(
|
|
4468
4649
|
Button,
|
|
4469
4650
|
{
|
|
4470
4651
|
variant: active ? "primary" : "ghost",
|
|
@@ -4476,7 +4657,7 @@ var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx2
|
|
|
4476
4657
|
children
|
|
4477
4658
|
}
|
|
4478
4659
|
);
|
|
4479
|
-
var PreviewToolbar =
|
|
4660
|
+
var PreviewToolbar = React22.forwardRef(
|
|
4480
4661
|
({
|
|
4481
4662
|
viewport = "desktop",
|
|
4482
4663
|
onViewportChange,
|
|
@@ -4491,7 +4672,7 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4491
4672
|
kindLabel = "ATOM",
|
|
4492
4673
|
onOverflow,
|
|
4493
4674
|
className = ""
|
|
4494
|
-
}, ref) => /* @__PURE__ */
|
|
4675
|
+
}, ref) => /* @__PURE__ */ jsxs20(
|
|
4495
4676
|
"div",
|
|
4496
4677
|
{
|
|
4497
4678
|
ref,
|
|
@@ -4505,24 +4686,24 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4505
4686
|
className
|
|
4506
4687
|
].filter(Boolean).join(" "),
|
|
4507
4688
|
children: [
|
|
4508
|
-
/* @__PURE__ */
|
|
4689
|
+
/* @__PURE__ */ jsxs20(
|
|
4509
4690
|
"div",
|
|
4510
4691
|
{
|
|
4511
4692
|
role: "group",
|
|
4512
4693
|
"aria-label": "Viewport size",
|
|
4513
4694
|
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs w-full md:w-auto",
|
|
4514
4695
|
children: [
|
|
4515
|
-
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */
|
|
4696
|
+
VIEWPORT_OPTIONS.map(({ id, Icon: Icon2, label }) => /* @__PURE__ */ jsx22(
|
|
4516
4697
|
ViewportBtn,
|
|
4517
4698
|
{
|
|
4518
4699
|
label,
|
|
4519
4700
|
active: !expanded && viewport === id,
|
|
4520
4701
|
onClick: () => onViewportChange?.(id),
|
|
4521
|
-
children: /* @__PURE__ */
|
|
4702
|
+
children: /* @__PURE__ */ jsx22(Icon2, {})
|
|
4522
4703
|
},
|
|
4523
4704
|
id
|
|
4524
4705
|
)),
|
|
4525
|
-
/* @__PURE__ */
|
|
4706
|
+
/* @__PURE__ */ jsx22(
|
|
4526
4707
|
Button,
|
|
4527
4708
|
{
|
|
4528
4709
|
variant: expanded ? "primary" : "ghost",
|
|
@@ -4534,14 +4715,14 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4534
4715
|
"!w-8 !h-8 !p-0 rounded-sm shrink-0",
|
|
4535
4716
|
expanded ? "" : "text-muted"
|
|
4536
4717
|
].join(" "),
|
|
4537
|
-
children: /* @__PURE__ */
|
|
4718
|
+
children: /* @__PURE__ */ jsx22(ExpandIcon, {})
|
|
4538
4719
|
}
|
|
4539
4720
|
)
|
|
4540
4721
|
]
|
|
4541
4722
|
}
|
|
4542
4723
|
),
|
|
4543
|
-
/* @__PURE__ */
|
|
4544
|
-
/* @__PURE__ */
|
|
4724
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center gap-sm", children: [
|
|
4725
|
+
/* @__PURE__ */ jsxs20(
|
|
4545
4726
|
Button,
|
|
4546
4727
|
{
|
|
4547
4728
|
variant: inspecting ? "primary" : "secondary",
|
|
@@ -4550,12 +4731,12 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4550
4731
|
onClick: onInspectTokens,
|
|
4551
4732
|
className: "gap-xs rounded-xl",
|
|
4552
4733
|
children: [
|
|
4553
|
-
/* @__PURE__ */
|
|
4734
|
+
/* @__PURE__ */ jsx22(InspectIcon, {}),
|
|
4554
4735
|
inspecting ? "Exit inspect" : "Inspect tokens"
|
|
4555
4736
|
]
|
|
4556
4737
|
}
|
|
4557
4738
|
),
|
|
4558
|
-
/* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ jsxs20(
|
|
4559
4740
|
Button,
|
|
4560
4741
|
{
|
|
4561
4742
|
variant: darkMode ? "primary" : "secondary",
|
|
@@ -4564,12 +4745,12 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4564
4745
|
onClick: onDarkToggle,
|
|
4565
4746
|
className: "gap-xs rounded-xl",
|
|
4566
4747
|
children: [
|
|
4567
|
-
/* @__PURE__ */
|
|
4748
|
+
/* @__PURE__ */ jsx22(MoonIcon4, {}),
|
|
4568
4749
|
"Dark"
|
|
4569
4750
|
]
|
|
4570
4751
|
}
|
|
4571
4752
|
),
|
|
4572
|
-
/* @__PURE__ */
|
|
4753
|
+
/* @__PURE__ */ jsxs20(
|
|
4573
4754
|
Button,
|
|
4574
4755
|
{
|
|
4575
4756
|
variant: "secondary",
|
|
@@ -4577,12 +4758,12 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4577
4758
|
onClick: onFullscreen,
|
|
4578
4759
|
className: "gap-xs rounded-xl",
|
|
4579
4760
|
children: [
|
|
4580
|
-
/* @__PURE__ */
|
|
4761
|
+
/* @__PURE__ */ jsx22(FullscreenIcon, {}),
|
|
4581
4762
|
"Fullscreen"
|
|
4582
4763
|
]
|
|
4583
4764
|
}
|
|
4584
4765
|
),
|
|
4585
|
-
/* @__PURE__ */
|
|
4766
|
+
/* @__PURE__ */ jsx22(
|
|
4586
4767
|
Chip,
|
|
4587
4768
|
{
|
|
4588
4769
|
label: modelLabel ?? "",
|
|
@@ -4591,7 +4772,7 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4591
4772
|
className: "border-primary text-primary bg-canvas cursor-default select-none"
|
|
4592
4773
|
}
|
|
4593
4774
|
),
|
|
4594
|
-
/* @__PURE__ */
|
|
4775
|
+
/* @__PURE__ */ jsx22(
|
|
4595
4776
|
Chip,
|
|
4596
4777
|
{
|
|
4597
4778
|
label: kindLabel ?? "",
|
|
@@ -4600,7 +4781,7 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4600
4781
|
className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
|
|
4601
4782
|
}
|
|
4602
4783
|
),
|
|
4603
|
-
/* @__PURE__ */
|
|
4784
|
+
/* @__PURE__ */ jsx22(
|
|
4604
4785
|
Button,
|
|
4605
4786
|
{
|
|
4606
4787
|
variant: "ghost",
|
|
@@ -4608,7 +4789,7 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4608
4789
|
"aria-label": "More options",
|
|
4609
4790
|
onClick: onOverflow,
|
|
4610
4791
|
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
4611
|
-
children: /* @__PURE__ */
|
|
4792
|
+
children: /* @__PURE__ */ jsx22(DotsIcon, {})
|
|
4612
4793
|
}
|
|
4613
4794
|
)
|
|
4614
4795
|
] })
|
|
@@ -4619,39 +4800,39 @@ var PreviewToolbar = React20.forwardRef(
|
|
|
4619
4800
|
PreviewToolbar.displayName = "PreviewToolbar";
|
|
4620
4801
|
|
|
4621
4802
|
// virtual-pkg:src/atoms/PublishModal/PublishModal.tsx
|
|
4622
|
-
import
|
|
4623
|
-
import { Fragment as Fragment4, jsx as
|
|
4624
|
-
var GlobeIcon = () => /* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4626
|
-
/* @__PURE__ */
|
|
4627
|
-
/* @__PURE__ */
|
|
4628
|
-
/* @__PURE__ */
|
|
4803
|
+
import React23, { useState as useState4 } from "react";
|
|
4804
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4805
|
+
var GlobeIcon = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4806
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "9" }),
|
|
4807
|
+
/* @__PURE__ */ jsx23("path", { d: "M3 12h18" }),
|
|
4808
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 3a13.5 13.5 0 0 1 0 18" }),
|
|
4809
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 3a13.5 13.5 0 0 0 0 18" })
|
|
4629
4810
|
] });
|
|
4630
|
-
var LinkIcon2 = () => /* @__PURE__ */
|
|
4631
|
-
/* @__PURE__ */
|
|
4632
|
-
/* @__PURE__ */
|
|
4633
|
-
/* @__PURE__ */
|
|
4811
|
+
var LinkIcon2 = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4812
|
+
/* @__PURE__ */ jsx23("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
|
|
4813
|
+
/* @__PURE__ */ jsx23("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
|
|
4814
|
+
/* @__PURE__ */ jsx23("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
|
|
4634
4815
|
] });
|
|
4635
|
-
var InfoIcon = () => /* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4637
|
-
/* @__PURE__ */
|
|
4638
|
-
/* @__PURE__ */
|
|
4816
|
+
var InfoIcon = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
4817
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10", opacity: "0.15" }),
|
|
4818
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "7.5", r: "1.15" }),
|
|
4819
|
+
/* @__PURE__ */ jsx23("rect", { x: "11", y: "10.5", width: "2", height: "7", rx: "1" })
|
|
4639
4820
|
] });
|
|
4640
|
-
var CheckCircleIcon = () => /* @__PURE__ */
|
|
4641
|
-
/* @__PURE__ */
|
|
4642
|
-
/* @__PURE__ */
|
|
4821
|
+
var CheckCircleIcon = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4822
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "9" }),
|
|
4823
|
+
/* @__PURE__ */ jsx23("path", { d: "M8.5 12.5l2.2 2.2 4.8-5" })
|
|
4643
4824
|
] });
|
|
4644
|
-
var LockIcon = () => /* @__PURE__ */
|
|
4645
|
-
/* @__PURE__ */
|
|
4646
|
-
/* @__PURE__ */
|
|
4825
|
+
var LockIcon = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4826
|
+
/* @__PURE__ */ jsx23("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
|
|
4827
|
+
/* @__PURE__ */ jsx23("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
|
|
4647
4828
|
] });
|
|
4648
|
-
var RefreshIcon = () => /* @__PURE__ */
|
|
4649
|
-
/* @__PURE__ */
|
|
4650
|
-
/* @__PURE__ */
|
|
4651
|
-
/* @__PURE__ */
|
|
4652
|
-
/* @__PURE__ */
|
|
4829
|
+
var RefreshIcon = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4830
|
+
/* @__PURE__ */ jsx23("path", { d: "M4 4v5h5" }),
|
|
4831
|
+
/* @__PURE__ */ jsx23("path", { d: "M20 20v-5h-5" }),
|
|
4832
|
+
/* @__PURE__ */ jsx23("path", { d: "M5.5 9A7 7 0 0 1 19 12" }),
|
|
4833
|
+
/* @__PURE__ */ jsx23("path", { d: "M18.5 15A7 7 0 0 1 5 12" })
|
|
4653
4834
|
] });
|
|
4654
|
-
var ChevronIcon3 = ({ open }) => /* @__PURE__ */
|
|
4835
|
+
var ChevronIcon3 = ({ open }) => /* @__PURE__ */ jsx23(
|
|
4655
4836
|
"svg",
|
|
4656
4837
|
{
|
|
4657
4838
|
viewBox: "0 0 24 24",
|
|
@@ -4664,19 +4845,19 @@ var ChevronIcon3 = ({ open }) => /* @__PURE__ */ jsx21(
|
|
|
4664
4845
|
strokeLinejoin: "round",
|
|
4665
4846
|
"aria-hidden": "true",
|
|
4666
4847
|
className: ["transition-transform duration-150", open ? "rotate-90" : ""].join(" "),
|
|
4667
|
-
children: /* @__PURE__ */
|
|
4848
|
+
children: /* @__PURE__ */ jsx23("path", { d: "M9 6l6 6-6 6" })
|
|
4668
4849
|
}
|
|
4669
4850
|
);
|
|
4670
|
-
var SpinnerIcon3 = () => /* @__PURE__ */
|
|
4671
|
-
/* @__PURE__ */
|
|
4672
|
-
/* @__PURE__ */
|
|
4851
|
+
var SpinnerIcon3 = () => /* @__PURE__ */ jsxs21("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
|
|
4852
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }),
|
|
4853
|
+
/* @__PURE__ */ jsx23("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
4673
4854
|
] });
|
|
4674
4855
|
function bumpMinor(version) {
|
|
4675
4856
|
const parts = version.split(".").map((n) => parseInt(n, 10) || 0);
|
|
4676
4857
|
const [major = 0, minor = 0] = parts;
|
|
4677
4858
|
return `${major}.${minor + 1}.0`;
|
|
4678
4859
|
}
|
|
4679
|
-
var PublishModal =
|
|
4860
|
+
var PublishModal = React23.forwardRef(
|
|
4680
4861
|
({
|
|
4681
4862
|
isOpen,
|
|
4682
4863
|
onClose,
|
|
@@ -4705,7 +4886,7 @@ var PublishModal = React21.forwardRef(
|
|
|
4705
4886
|
];
|
|
4706
4887
|
const noticeText = isProduction ? "Publishing to npm registry makes your package publicly available to the world. Make sure you're ready to release this version." : "Local publish creates an npm link only visible on this machine, for testing and internal use before a real release.";
|
|
4707
4888
|
const handlePublish = () => onPublish?.(target, nextVersion);
|
|
4708
|
-
return /* @__PURE__ */
|
|
4889
|
+
return /* @__PURE__ */ jsx23(
|
|
4709
4890
|
Modal,
|
|
4710
4891
|
{
|
|
4711
4892
|
ref,
|
|
@@ -4713,32 +4894,32 @@ var PublishModal = React21.forwardRef(
|
|
|
4713
4894
|
onClose,
|
|
4714
4895
|
title: "Publish package",
|
|
4715
4896
|
size: "lg",
|
|
4716
|
-
footer: /* @__PURE__ */
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
/* @__PURE__ */
|
|
4897
|
+
footer: /* @__PURE__ */ jsxs21("div", { className: "flex w-full items-center justify-end gap-sm", children: [
|
|
4898
|
+
/* @__PURE__ */ jsx23(Button, { variant: "secondary", onClick: onClose, disabled: loading, children: "Cancel" }),
|
|
4899
|
+
/* @__PURE__ */ jsx23(
|
|
4719
4900
|
Button,
|
|
4720
4901
|
{
|
|
4721
4902
|
variant: "primary",
|
|
4722
4903
|
onClick: handlePublish,
|
|
4723
4904
|
disabled: loading,
|
|
4724
4905
|
"aria-busy": loading,
|
|
4725
|
-
children: loading ? /* @__PURE__ */
|
|
4726
|
-
/* @__PURE__ */
|
|
4906
|
+
children: loading ? /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4907
|
+
/* @__PURE__ */ jsx23(SpinnerIcon3, {}),
|
|
4727
4908
|
isProduction ? "Publishing\u2026" : "Linking\u2026"
|
|
4728
4909
|
] }) : isProduction ? "Publish to npm registry" : "Publish locally (npm link)"
|
|
4729
4910
|
}
|
|
4730
4911
|
)
|
|
4731
4912
|
] }),
|
|
4732
|
-
children: /* @__PURE__ */
|
|
4733
|
-
/* @__PURE__ */
|
|
4734
|
-
/* @__PURE__ */
|
|
4913
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "w-full space-y-lg", children: [
|
|
4914
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-md text-muted", children: "Publish your package to npm so others can install and use it. Choose between a production release to the npm registry or a local publish for testing and internal use." }),
|
|
4915
|
+
/* @__PURE__ */ jsxs21(
|
|
4735
4916
|
"div",
|
|
4736
4917
|
{
|
|
4737
4918
|
role: "tablist",
|
|
4738
4919
|
"aria-label": "Publish target",
|
|
4739
4920
|
className: "flex items-center gap-lg border-b border-hairline",
|
|
4740
4921
|
children: [
|
|
4741
|
-
/* @__PURE__ */
|
|
4922
|
+
/* @__PURE__ */ jsxs21(
|
|
4742
4923
|
Button,
|
|
4743
4924
|
{
|
|
4744
4925
|
type: "button",
|
|
@@ -4753,12 +4934,12 @@ var PublishModal = React21.forwardRef(
|
|
|
4753
4934
|
isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
|
|
4754
4935
|
].join(" "),
|
|
4755
4936
|
children: [
|
|
4756
|
-
/* @__PURE__ */
|
|
4937
|
+
/* @__PURE__ */ jsx23(GlobeIcon, {}),
|
|
4757
4938
|
"Production (npm registry)"
|
|
4758
4939
|
]
|
|
4759
4940
|
}
|
|
4760
4941
|
),
|
|
4761
|
-
/* @__PURE__ */
|
|
4942
|
+
/* @__PURE__ */ jsxs21(
|
|
4762
4943
|
Button,
|
|
4763
4944
|
{
|
|
4764
4945
|
type: "button",
|
|
@@ -4773,7 +4954,7 @@ var PublishModal = React21.forwardRef(
|
|
|
4773
4954
|
!isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
|
|
4774
4955
|
].join(" "),
|
|
4775
4956
|
children: [
|
|
4776
|
-
/* @__PURE__ */
|
|
4957
|
+
/* @__PURE__ */ jsx23(LinkIcon2, {}),
|
|
4777
4958
|
"Local (npm link)"
|
|
4778
4959
|
]
|
|
4779
4960
|
}
|
|
@@ -4781,24 +4962,24 @@ var PublishModal = React21.forwardRef(
|
|
|
4781
4962
|
]
|
|
4782
4963
|
}
|
|
4783
4964
|
),
|
|
4784
|
-
/* @__PURE__ */
|
|
4785
|
-
/* @__PURE__ */
|
|
4786
|
-
/* @__PURE__ */
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4965
|
+
/* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-md", children: [
|
|
4966
|
+
/* @__PURE__ */ jsxs21("div", { className: "rounded-md border border-hairline p-base space-y-base", children: [
|
|
4967
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-md font-weight-heading-sm text-ink", children: "Package details" }),
|
|
4968
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-xxs", children: [
|
|
4969
|
+
/* @__PURE__ */ jsx23("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Package" }),
|
|
4970
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-md text-ink font-mono", children: packageName })
|
|
4790
4971
|
] }),
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
4794
|
-
/* @__PURE__ */
|
|
4795
|
-
/* @__PURE__ */
|
|
4972
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-xxs", children: [
|
|
4973
|
+
/* @__PURE__ */ jsx23("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Current version" }),
|
|
4974
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-xs", children: [
|
|
4975
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-md text-ink font-mono", children: currentVersion }),
|
|
4976
|
+
/* @__PURE__ */ jsx23(Chip, { label: "Latest", variant: "primary", size: "sm" })
|
|
4796
4977
|
] })
|
|
4797
4978
|
] }),
|
|
4798
|
-
isProduction ? /* @__PURE__ */
|
|
4799
|
-
/* @__PURE__ */
|
|
4800
|
-
/* @__PURE__ */
|
|
4801
|
-
/* @__PURE__ */
|
|
4979
|
+
isProduction ? /* @__PURE__ */ jsxs21("div", { className: "space-y-xxs", children: [
|
|
4980
|
+
/* @__PURE__ */ jsx23("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Next version" }),
|
|
4981
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-xs", children: [
|
|
4982
|
+
/* @__PURE__ */ jsx23(
|
|
4802
4983
|
Input,
|
|
4803
4984
|
{
|
|
4804
4985
|
"aria-label": "Next version",
|
|
@@ -4808,7 +4989,7 @@ var PublishModal = React21.forwardRef(
|
|
|
4808
4989
|
disabled: loading
|
|
4809
4990
|
}
|
|
4810
4991
|
),
|
|
4811
|
-
/* @__PURE__ */
|
|
4992
|
+
/* @__PURE__ */ jsx23(
|
|
4812
4993
|
Button,
|
|
4813
4994
|
{
|
|
4814
4995
|
variant: "secondary",
|
|
@@ -4817,19 +4998,19 @@ var PublishModal = React21.forwardRef(
|
|
|
4817
4998
|
onClick: () => setNextVersion(bumpMinor(currentVersion)),
|
|
4818
4999
|
disabled: loading,
|
|
4819
5000
|
className: "!px-sm",
|
|
4820
|
-
children: /* @__PURE__ */
|
|
5001
|
+
children: /* @__PURE__ */ jsx23(RefreshIcon, {})
|
|
4821
5002
|
}
|
|
4822
5003
|
)
|
|
4823
5004
|
] })
|
|
4824
|
-
] }) : /* @__PURE__ */
|
|
4825
|
-
/* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
5005
|
+
] }) : /* @__PURE__ */ jsxs21("div", { className: "space-y-xxs", children: [
|
|
5006
|
+
/* @__PURE__ */ jsx23("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Link command" }),
|
|
5007
|
+
/* @__PURE__ */ jsxs21("p", { className: "rounded-sm bg-surface-soft border border-hairline px-sm py-xs text-body-sm font-mono text-body", children: [
|
|
4827
5008
|
"npm link ",
|
|
4828
5009
|
packageName
|
|
4829
5010
|
] })
|
|
4830
5011
|
] }),
|
|
4831
|
-
/* @__PURE__ */
|
|
4832
|
-
/* @__PURE__ */
|
|
5012
|
+
/* @__PURE__ */ jsxs21("div", { className: "border border-hairline rounded-sm", children: [
|
|
5013
|
+
/* @__PURE__ */ jsxs21(
|
|
4833
5014
|
Button,
|
|
4834
5015
|
{
|
|
4835
5016
|
type: "button",
|
|
@@ -4840,12 +5021,12 @@ var PublishModal = React21.forwardRef(
|
|
|
4840
5021
|
disabled: loading,
|
|
4841
5022
|
className: "w-full !justify-start !rounded-none gap-xs text-body",
|
|
4842
5023
|
children: [
|
|
4843
|
-
/* @__PURE__ */
|
|
5024
|
+
/* @__PURE__ */ jsx23(ChevronIcon3, { open: notesOpen }),
|
|
4844
5025
|
"Release notes (optional)"
|
|
4845
5026
|
]
|
|
4846
5027
|
}
|
|
4847
5028
|
),
|
|
4848
|
-
notesOpen && /* @__PURE__ */
|
|
5029
|
+
notesOpen && /* @__PURE__ */ jsx23("div", { className: "px-sm pb-sm", children: /* @__PURE__ */ jsx23(
|
|
4849
5030
|
"textarea",
|
|
4850
5031
|
{
|
|
4851
5032
|
value: notes,
|
|
@@ -4858,27 +5039,27 @@ var PublishModal = React21.forwardRef(
|
|
|
4858
5039
|
) })
|
|
4859
5040
|
] })
|
|
4860
5041
|
] }),
|
|
4861
|
-
/* @__PURE__ */
|
|
4862
|
-
/* @__PURE__ */
|
|
4863
|
-
/* @__PURE__ */
|
|
4864
|
-
/* @__PURE__ */
|
|
4865
|
-
/* @__PURE__ */
|
|
4866
|
-
/* @__PURE__ */
|
|
4867
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ jsxs21("div", { className: "rounded-md border border-hairline p-base space-y-base", children: [
|
|
5043
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-md font-weight-heading-sm text-ink", children: "Publish summary" }),
|
|
5044
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-sm rounded-sm bg-primary/10 border border-primary/30 p-sm", children: [
|
|
5045
|
+
/* @__PURE__ */ jsx23("span", { className: "text-primary flex-shrink-0 mt-xxs", children: /* @__PURE__ */ jsx23(InfoIcon, {}) }),
|
|
5046
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
5047
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-sm font-weight-heading-sm text-primary", children: isProduction ? "Ready to publish" : "Ready to link" }),
|
|
5048
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-sm text-body", children: isProduction ? `This will publish version ${nextVersion} to the npm registry.` : `This will link ${packageName} for local development.` })
|
|
4868
5049
|
] })
|
|
4869
5050
|
] }),
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
/* @__PURE__ */
|
|
4872
|
-
/* @__PURE__ */
|
|
4873
|
-
/* @__PURE__ */
|
|
4874
|
-
/* @__PURE__ */
|
|
5051
|
+
/* @__PURE__ */ jsx23("div", { className: "space-y-sm", children: summaryItems.map((item) => /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-sm", children: [
|
|
5052
|
+
/* @__PURE__ */ jsx23("span", { className: "text-semantic-success flex-shrink-0 mt-xxs", children: /* @__PURE__ */ jsx23(CheckCircleIcon, {}) }),
|
|
5053
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
5054
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-sm font-weight-heading-sm text-ink", children: item.title }),
|
|
5055
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-sm text-muted", children: item.desc })
|
|
4875
5056
|
] })
|
|
4876
5057
|
] }, item.title)) })
|
|
4877
5058
|
] })
|
|
4878
5059
|
] }),
|
|
4879
|
-
/* @__PURE__ */
|
|
4880
|
-
/* @__PURE__ */
|
|
4881
|
-
/* @__PURE__ */
|
|
5060
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-sm rounded-md bg-surface-soft border border-hairline p-base", children: [
|
|
5061
|
+
/* @__PURE__ */ jsx23("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-sm bg-primary text-on-primary", children: /* @__PURE__ */ jsx23(LockIcon, {}) }),
|
|
5062
|
+
/* @__PURE__ */ jsx23("p", { className: "text-body-sm text-body", children: noticeText })
|
|
4882
5063
|
] })
|
|
4883
5064
|
] })
|
|
4884
5065
|
}
|
|
@@ -4886,6 +5067,98 @@ var PublishModal = React21.forwardRef(
|
|
|
4886
5067
|
}
|
|
4887
5068
|
);
|
|
4888
5069
|
PublishModal.displayName = "PublishModal";
|
|
5070
|
+
|
|
5071
|
+
// virtual-pkg:src/atoms/StatusBar/StatusBar.tsx
|
|
5072
|
+
import React24 from "react";
|
|
5073
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5074
|
+
var toneBgClass = {
|
|
5075
|
+
info: "bg-semantic-info-soft",
|
|
5076
|
+
success: "bg-semantic-success-soft",
|
|
5077
|
+
warning: "bg-semantic-warning-soft",
|
|
5078
|
+
error: "bg-semantic-error-soft"
|
|
5079
|
+
};
|
|
5080
|
+
var toneBorderClass = {
|
|
5081
|
+
info: "border-primary",
|
|
5082
|
+
success: "border-semantic-success",
|
|
5083
|
+
warning: "border-semantic-warning",
|
|
5084
|
+
error: "border-semantic-error"
|
|
5085
|
+
};
|
|
5086
|
+
var toneDotClass = {
|
|
5087
|
+
info: "bg-primary",
|
|
5088
|
+
success: "bg-semantic-success",
|
|
5089
|
+
warning: "bg-semantic-warning",
|
|
5090
|
+
error: "bg-semantic-error"
|
|
5091
|
+
};
|
|
5092
|
+
var toneTextClass = {
|
|
5093
|
+
info: "text-primary",
|
|
5094
|
+
success: "text-semantic-success",
|
|
5095
|
+
warning: "text-semantic-warning",
|
|
5096
|
+
error: "text-semantic-error"
|
|
5097
|
+
};
|
|
5098
|
+
var StatusBar = React24.forwardRef(
|
|
5099
|
+
({
|
|
5100
|
+
tone = "info",
|
|
5101
|
+
message,
|
|
5102
|
+
detail,
|
|
5103
|
+
onDetailClick,
|
|
5104
|
+
pulsing = true,
|
|
5105
|
+
onDismiss,
|
|
5106
|
+
className = "",
|
|
5107
|
+
...rest
|
|
5108
|
+
}, ref) => {
|
|
5109
|
+
return /* @__PURE__ */ jsxs22(
|
|
5110
|
+
"div",
|
|
5111
|
+
{
|
|
5112
|
+
ref,
|
|
5113
|
+
role: "status",
|
|
5114
|
+
className: [
|
|
5115
|
+
"w-full flex items-center gap-sm px-lg py-sm",
|
|
5116
|
+
"border-b-2",
|
|
5117
|
+
toneBgClass[tone],
|
|
5118
|
+
toneBorderClass[tone],
|
|
5119
|
+
className
|
|
5120
|
+
].filter(Boolean).join(" "),
|
|
5121
|
+
...rest,
|
|
5122
|
+
children: [
|
|
5123
|
+
/* @__PURE__ */ jsxs22("span", { className: "relative inline-flex items-center justify-center w-4 h-4 shrink-0", "aria-hidden": "true", children: [
|
|
5124
|
+
pulsing && /* @__PURE__ */ jsx24(
|
|
5125
|
+
"span",
|
|
5126
|
+
{
|
|
5127
|
+
className: ["absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping", toneDotClass[tone]].join(" ")
|
|
5128
|
+
}
|
|
5129
|
+
),
|
|
5130
|
+
/* @__PURE__ */ jsx24("span", { className: ["relative inline-flex w-2.5 h-2.5 rounded-full", toneDotClass[tone]].join(" ") })
|
|
5131
|
+
] }),
|
|
5132
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-1 min-w-0 flex-wrap items-baseline gap-x-sm gap-y-xxs", children: [
|
|
5133
|
+
/* @__PURE__ */ jsx24(Typography, { role: "body-sm", className: ["font-weight-heading-sm truncate", toneTextClass[tone]].join(" "), children: message }),
|
|
5134
|
+
detail && (onDetailClick ? /* @__PURE__ */ jsx24(
|
|
5135
|
+
Button,
|
|
5136
|
+
{
|
|
5137
|
+
variant: "ghost",
|
|
5138
|
+
size: "sm",
|
|
5139
|
+
onClick: onDetailClick,
|
|
5140
|
+
className: ["!h-auto !p-0 rounded-xs text-body-sm font-weight-body-sm underline hover:no-underline hover:bg-transparent active:bg-transparent truncate", toneTextClass[tone]].join(" "),
|
|
5141
|
+
children: detail
|
|
5142
|
+
}
|
|
5143
|
+
) : /* @__PURE__ */ jsx24(Typography, { role: "body-sm", color: "body", className: "truncate", children: detail }))
|
|
5144
|
+
] }),
|
|
5145
|
+
onDismiss && /* @__PURE__ */ jsx24(
|
|
5146
|
+
Button,
|
|
5147
|
+
{
|
|
5148
|
+
variant: "ghost",
|
|
5149
|
+
size: "sm",
|
|
5150
|
+
"aria-label": "Dismiss status",
|
|
5151
|
+
onClick: onDismiss,
|
|
5152
|
+
className: ["!w-6 !h-6 !p-0 rounded-sm shrink-0 hover:bg-transparent active:bg-transparent", toneTextClass[tone]].join(" "),
|
|
5153
|
+
children: /* @__PURE__ */ jsx24(Icon, { name: "close", size: 14 })
|
|
5154
|
+
}
|
|
5155
|
+
)
|
|
5156
|
+
]
|
|
5157
|
+
}
|
|
5158
|
+
);
|
|
5159
|
+
}
|
|
5160
|
+
);
|
|
5161
|
+
StatusBar.displayName = "StatusBar";
|
|
4889
5162
|
export {
|
|
4890
5163
|
AppLayout,
|
|
4891
5164
|
AppSidebar,
|
|
@@ -4894,16 +5167,20 @@ export {
|
|
|
4894
5167
|
Button,
|
|
4895
5168
|
ChatScreen,
|
|
4896
5169
|
Chip,
|
|
5170
|
+
CodeEditor,
|
|
4897
5171
|
ComponentCard,
|
|
4898
5172
|
ExportDesignMdModal,
|
|
4899
5173
|
FilterTabBar,
|
|
4900
5174
|
HomePageTemplate,
|
|
5175
|
+
ICON_REGISTRY,
|
|
5176
|
+
Icon,
|
|
4901
5177
|
Input,
|
|
4902
5178
|
Modal,
|
|
4903
5179
|
NavItem,
|
|
4904
5180
|
PreviewToolbar,
|
|
4905
5181
|
PromptInputBar,
|
|
4906
5182
|
PublishModal,
|
|
5183
|
+
StatusBar,
|
|
4907
5184
|
TopNavbar,
|
|
4908
5185
|
Typography,
|
|
4909
5186
|
UpgradeCard,
|