@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.cjs
CHANGED
|
@@ -36,16 +36,20 @@ __export(src_exports, {
|
|
|
36
36
|
Button: () => Button,
|
|
37
37
|
ChatScreen: () => ChatScreen,
|
|
38
38
|
Chip: () => Chip,
|
|
39
|
+
CodeEditor: () => CodeEditor,
|
|
39
40
|
ComponentCard: () => ComponentCard,
|
|
40
41
|
ExportDesignMdModal: () => ExportDesignMdModal,
|
|
41
42
|
FilterTabBar: () => FilterTabBar,
|
|
42
43
|
HomePageTemplate: () => HomePageTemplate,
|
|
44
|
+
ICON_REGISTRY: () => ICON_REGISTRY,
|
|
45
|
+
Icon: () => Icon,
|
|
43
46
|
Input: () => Input,
|
|
44
47
|
Modal: () => Modal,
|
|
45
48
|
NavItem: () => NavItem,
|
|
46
49
|
PreviewToolbar: () => PreviewToolbar,
|
|
47
50
|
PromptInputBar: () => PromptInputBar,
|
|
48
51
|
PublishModal: () => PublishModal,
|
|
52
|
+
StatusBar: () => StatusBar,
|
|
49
53
|
TopNavbar: () => TopNavbar,
|
|
50
54
|
Typography: () => Typography,
|
|
51
55
|
UpgradeCard: () => UpgradeCard,
|
|
@@ -1648,6 +1652,7 @@ var COLLAPSE_DURATION = 250;
|
|
|
1648
1652
|
var COLLAPSED_RAIL_WIDTH = 12;
|
|
1649
1653
|
var PANEL_GAP_RIGHT = CURVE_R;
|
|
1650
1654
|
var MOBILE_BREAKPOINT = 768;
|
|
1655
|
+
var FALLBACK_HEIGHT = 640;
|
|
1651
1656
|
function useIsMobile() {
|
|
1652
1657
|
const [mobile, setMobile] = import_react7.default.useState(
|
|
1653
1658
|
() => typeof window !== "undefined" && window.innerWidth < MOBILE_BREAKPOINT
|
|
@@ -1825,7 +1830,7 @@ var AvatarNav = ({ initials, onBackToProjects, onHome }) => {
|
|
|
1825
1830
|
{
|
|
1826
1831
|
role: "menu",
|
|
1827
1832
|
"aria-label": "Navigation",
|
|
1828
|
-
className: "absolute left-0 mt-xs rounded-xl bg-canvas border border-hairline-soft shadow-card py-xs",
|
|
1833
|
+
className: "absolute left-0 mt-xs rounded-xl bg-canvas border border-hairline-soft shadow-card py-xs overflow-hidden",
|
|
1829
1834
|
style: { minWidth: 200, zIndex: 1e3, top: "100%" },
|
|
1830
1835
|
children: [
|
|
1831
1836
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
@@ -2027,9 +2032,11 @@ var AppLayout = import_react7.default.forwardRef(
|
|
|
2027
2032
|
avatarInitials = "A",
|
|
2028
2033
|
defaultMobilePanel = "chat",
|
|
2029
2034
|
hideProjectName = false,
|
|
2035
|
+
fillViewport = true,
|
|
2030
2036
|
className
|
|
2031
2037
|
}, ref) => {
|
|
2032
2038
|
const isMobile = useIsMobile();
|
|
2039
|
+
const rootHeight = fillViewport ? "100vh" : `${FALLBACK_HEIGHT}px`;
|
|
2033
2040
|
const [activeTab, setActiveTab] = import_react7.default.useState(rightPanelActiveTab);
|
|
2034
2041
|
const [chatWidth, setChatWidth] = import_react7.default.useState(defaultChatWidth);
|
|
2035
2042
|
const [chatCollapsed, setChatCollapsed] = import_react7.default.useState(false);
|
|
@@ -2095,7 +2102,7 @@ var AppLayout = import_react7.default.forwardRef(
|
|
|
2095
2102
|
{
|
|
2096
2103
|
ref,
|
|
2097
2104
|
className: ["w-full flex flex-col overflow-hidden bg-canvas", className].filter(Boolean).join(" "),
|
|
2098
|
-
style: { height:
|
|
2105
|
+
style: { height: rootHeight },
|
|
2099
2106
|
children: [
|
|
2100
2107
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2101
2108
|
MobileTopBar,
|
|
@@ -2157,7 +2164,7 @@ var AppLayout = import_react7.default.forwardRef(
|
|
|
2157
2164
|
{
|
|
2158
2165
|
ref,
|
|
2159
2166
|
className: ["w-full flex flex-col overflow-hidden", className].filter(Boolean).join(" "),
|
|
2160
|
-
style: { height:
|
|
2167
|
+
style: { height: rootHeight, background: "var(--color-surface-soft)" },
|
|
2161
2168
|
children: [
|
|
2162
2169
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
2163
2170
|
"div",
|
|
@@ -3579,9 +3586,192 @@ var Chip = import_react13.default.forwardRef(
|
|
|
3579
3586
|
);
|
|
3580
3587
|
Chip.displayName = "Chip";
|
|
3581
3588
|
|
|
3582
|
-
// virtual-pkg:src/atoms/
|
|
3589
|
+
// virtual-pkg:src/atoms/CodeEditor/CodeEditor.tsx
|
|
3583
3590
|
var import_react14 = __toESM(require("react"));
|
|
3591
|
+
|
|
3592
|
+
// virtual-pkg:src/atoms/Icon/Icon.tsx
|
|
3593
|
+
var React14 = __toESM(require("react"));
|
|
3594
|
+
|
|
3595
|
+
// virtual-pkg:src/atoms/Icon/icons.data.ts
|
|
3596
|
+
var ICON_REGISTRY = {
|
|
3597
|
+
"close": { viewBox: "0 0 24 24", paths: ["M18 6 6 18", "M6 6l12 12"] },
|
|
3598
|
+
"chevron-down": { viewBox: "0 0 24 24", paths: ["M6 9l6 6 6-6"] },
|
|
3599
|
+
"copy-clipboard": { viewBox: "0 0 24 24", paths: ["M9 9h10v10H9z", "M5 15V5h10"] },
|
|
3600
|
+
"check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] }
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3603
|
+
// virtual-pkg:src/atoms/Icon/Icon.tsx
|
|
3584
3604
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3605
|
+
var Icon = React14.forwardRef(
|
|
3606
|
+
({ name, size = 20, strokeWidth = 2, className, ...props }, ref) => {
|
|
3607
|
+
const glyph = ICON_REGISTRY[name];
|
|
3608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3609
|
+
"svg",
|
|
3610
|
+
{
|
|
3611
|
+
ref,
|
|
3612
|
+
viewBox: glyph.viewBox,
|
|
3613
|
+
width: size,
|
|
3614
|
+
height: size,
|
|
3615
|
+
fill: "none",
|
|
3616
|
+
stroke: "currentColor",
|
|
3617
|
+
strokeWidth,
|
|
3618
|
+
strokeLinecap: "round",
|
|
3619
|
+
strokeLinejoin: "round",
|
|
3620
|
+
className,
|
|
3621
|
+
"aria-hidden": "true",
|
|
3622
|
+
...props,
|
|
3623
|
+
children: glyph.paths.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d }, i))
|
|
3624
|
+
}
|
|
3625
|
+
);
|
|
3626
|
+
}
|
|
3627
|
+
);
|
|
3628
|
+
Icon.displayName = "Icon";
|
|
3629
|
+
|
|
3630
|
+
// virtual-pkg:src/atoms/CodeEditor/CodeEditor.tsx
|
|
3631
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3632
|
+
var LANG_LABEL = {
|
|
3633
|
+
tsx: "TSX",
|
|
3634
|
+
ts: "TS",
|
|
3635
|
+
css: "CSS",
|
|
3636
|
+
json: "JSON",
|
|
3637
|
+
md: "MD",
|
|
3638
|
+
txt: "TXT"
|
|
3639
|
+
};
|
|
3640
|
+
function LangBadge({ language }) {
|
|
3641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("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] });
|
|
3642
|
+
}
|
|
3643
|
+
var CodeEditor = import_react14.default.forwardRef(
|
|
3644
|
+
({
|
|
3645
|
+
files,
|
|
3646
|
+
activeFile,
|
|
3647
|
+
onActiveFileChange,
|
|
3648
|
+
folderLabel = "atoms",
|
|
3649
|
+
pathPrefix,
|
|
3650
|
+
dark = false,
|
|
3651
|
+
readOnly = true,
|
|
3652
|
+
streamingFileNames = [],
|
|
3653
|
+
onChange,
|
|
3654
|
+
onCopy,
|
|
3655
|
+
className = ""
|
|
3656
|
+
}, ref) => {
|
|
3657
|
+
const [copied, setCopied] = import_react14.default.useState(false);
|
|
3658
|
+
const [openRoot, setOpenRoot] = import_react14.default.useState(true);
|
|
3659
|
+
const current = files.find((f) => f.name === activeFile) ?? files[0] ?? null;
|
|
3660
|
+
const streaming = current ? streamingFileNames.includes(current.name) : false;
|
|
3661
|
+
const path = [pathPrefix, current?.name].filter(Boolean).join(" / ");
|
|
3662
|
+
async function copy() {
|
|
3663
|
+
if (!current) return;
|
|
3664
|
+
try {
|
|
3665
|
+
await navigator.clipboard.writeText(current.source);
|
|
3666
|
+
} catch {
|
|
3667
|
+
}
|
|
3668
|
+
setCopied(true);
|
|
3669
|
+
window.setTimeout(() => setCopied(false), 1200);
|
|
3670
|
+
onCopy?.();
|
|
3671
|
+
}
|
|
3672
|
+
const lines = (current?.source ?? "").split("\n");
|
|
3673
|
+
const statusLabel = streaming ? "Writing" : readOnly ? "Read-only" : "Editing";
|
|
3674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3675
|
+
"div",
|
|
3676
|
+
{
|
|
3677
|
+
ref,
|
|
3678
|
+
"data-theme": dark ? "dark" : void 0,
|
|
3679
|
+
className: ["flex w-full overflow-hidden rounded-lg border border-hairline bg-canvas text-ink", className].join(" "),
|
|
3680
|
+
children: [
|
|
3681
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("aside", { className: "flex w-56 shrink-0 flex-col overflow-y-auto border-r border-hairline bg-canvas", children: [
|
|
3682
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-between px-lg py-md", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-caption font-weight-heading-sm uppercase tracking-widest text-muted-soft", children: "Files" }) }),
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { className: "flex flex-col gap-xxs px-sm pb-lg", children: [
|
|
3684
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3685
|
+
Button,
|
|
3686
|
+
{
|
|
3687
|
+
type: "button",
|
|
3688
|
+
variant: "ghost",
|
|
3689
|
+
size: "sm",
|
|
3690
|
+
className: "w-full justify-start gap-xs px-sm py-xs text-body-sm text-muted",
|
|
3691
|
+
onClick: () => setOpenRoot((o) => !o),
|
|
3692
|
+
children: [
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3694
|
+
Icon,
|
|
3695
|
+
{
|
|
3696
|
+
name: "chevron-down",
|
|
3697
|
+
className: ["h-3 w-3 shrink-0 transition-transform", openRoot ? "rotate-0" : "-rotate-90"].join(" ")
|
|
3698
|
+
}
|
|
3699
|
+
),
|
|
3700
|
+
folderLabel
|
|
3701
|
+
]
|
|
3702
|
+
}
|
|
3703
|
+
),
|
|
3704
|
+
openRoot && files.map((f) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3705
|
+
Button,
|
|
3706
|
+
{
|
|
3707
|
+
type: "button",
|
|
3708
|
+
variant: "ghost",
|
|
3709
|
+
size: "sm",
|
|
3710
|
+
onClick: () => onActiveFileChange?.(f.name),
|
|
3711
|
+
"aria-current": f.name === current?.name ? "true" : void 0,
|
|
3712
|
+
className: [
|
|
3713
|
+
"w-full justify-start gap-sm py-xs pr-sm pl-lg text-body-sm",
|
|
3714
|
+
f.name === current?.name ? "bg-primary-disabled text-primary" : "text-body"
|
|
3715
|
+
].join(" "),
|
|
3716
|
+
children: [
|
|
3717
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(LangBadge, { language: f.language }),
|
|
3718
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate", children: f.name })
|
|
3719
|
+
]
|
|
3720
|
+
},
|
|
3721
|
+
f.name
|
|
3722
|
+
))
|
|
3723
|
+
] })
|
|
3724
|
+
] }),
|
|
3725
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col overflow-hidden bg-canvas", children: [
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between border-b border-hairline bg-surface-soft px-lg py-sm", children: [
|
|
3727
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-w-0 items-center gap-sm font-mono text-caption text-muted", children: [
|
|
3728
|
+
current ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(LangBadge, { language: current.language }) : null,
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate", children: path }),
|
|
3730
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "rounded-xs bg-surface-strong px-sm py-xxs text-caption font-weight-heading-sm uppercase tracking-wide text-muted", children: statusLabel })
|
|
3731
|
+
] }),
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3733
|
+
Button,
|
|
3734
|
+
{
|
|
3735
|
+
type: "button",
|
|
3736
|
+
variant: "secondary",
|
|
3737
|
+
size: "sm",
|
|
3738
|
+
onClick: () => void copy(),
|
|
3739
|
+
disabled: !current || streaming,
|
|
3740
|
+
children: [
|
|
3741
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: copied ? "check-checkmark" : "copy-clipboard", className: "h-3 w-3" }),
|
|
3742
|
+
copied ? "Copied" : "Copy"
|
|
3743
|
+
]
|
|
3744
|
+
}
|
|
3745
|
+
)
|
|
3746
|
+
] }),
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-1 overflow-auto bg-canvas", children: readOnly || streaming ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("pre", { className: "m-0 p-0 text-body-sm leading-[1.55] text-ink", children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex", children: [
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "select-none px-md text-right text-caption text-muted-soft", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-block min-w-[2ch]", children: i + 1 }) }),
|
|
3749
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex-1 whitespace-pre pr-xl font-mono", children: line || " " })
|
|
3750
|
+
] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-h-full", children: [
|
|
3751
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "select-none px-md py-sm text-right text-caption text-muted-soft", children: lines.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: i + 1 }, i)) }),
|
|
3752
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3753
|
+
"textarea",
|
|
3754
|
+
{
|
|
3755
|
+
className: "min-h-full flex-1 resize-none bg-transparent p-sm font-mono text-body-sm leading-[1.55] text-ink outline-none",
|
|
3756
|
+
value: current?.source ?? "",
|
|
3757
|
+
spellCheck: false,
|
|
3758
|
+
onChange: (e) => {
|
|
3759
|
+
if (current) onChange?.(current.name, e.target.value);
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
)
|
|
3763
|
+
] }) })
|
|
3764
|
+
] })
|
|
3765
|
+
]
|
|
3766
|
+
}
|
|
3767
|
+
);
|
|
3768
|
+
}
|
|
3769
|
+
);
|
|
3770
|
+
CodeEditor.displayName = "CodeEditor";
|
|
3771
|
+
|
|
3772
|
+
// virtual-pkg:src/atoms/ComponentCard/ComponentCard.tsx
|
|
3773
|
+
var import_react15 = __toESM(require("react"));
|
|
3774
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3585
3775
|
var kindColors = {
|
|
3586
3776
|
Atom: "bg-[var(--color-kind-atom-bg)] text-[var(--color-kind-atom-text)] border-[var(--color-kind-atom-border)]",
|
|
3587
3777
|
Molecule: "bg-[var(--color-kind-molecule-bg)] text-[var(--color-kind-molecule-text)] border-[var(--color-kind-molecule-border)]",
|
|
@@ -3594,7 +3784,7 @@ var iconBg = {
|
|
|
3594
3784
|
Organism: "bg-primary text-on-primary",
|
|
3595
3785
|
Template: "bg-[var(--color-kind-template-bg)] text-[var(--color-kind-template-text)]"
|
|
3596
3786
|
};
|
|
3597
|
-
var ComponentCard =
|
|
3787
|
+
var ComponentCard = import_react15.default.forwardRef(
|
|
3598
3788
|
({
|
|
3599
3789
|
name,
|
|
3600
3790
|
kind = "Organism",
|
|
@@ -3605,7 +3795,7 @@ var ComponentCard = import_react14.default.forwardRef(
|
|
|
3605
3795
|
className,
|
|
3606
3796
|
...rest
|
|
3607
3797
|
}, ref) => {
|
|
3608
|
-
return /* @__PURE__ */ (0,
|
|
3798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3609
3799
|
"div",
|
|
3610
3800
|
{
|
|
3611
3801
|
ref,
|
|
@@ -3620,7 +3810,7 @@ var ComponentCard = import_react14.default.forwardRef(
|
|
|
3620
3810
|
].filter(Boolean).join(" "),
|
|
3621
3811
|
...rest,
|
|
3622
3812
|
children: [
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3813
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3624
3814
|
"div",
|
|
3625
3815
|
{
|
|
3626
3816
|
className: [
|
|
@@ -3628,15 +3818,15 @@ var ComponentCard = import_react14.default.forwardRef(
|
|
|
3628
3818
|
"w-full aspect-[4/3] overflow-hidden",
|
|
3629
3819
|
thumbnailBg ?? "bg-surface-soft"
|
|
3630
3820
|
].join(" "),
|
|
3631
|
-
children: thumbnailContent ?? /* @__PURE__ */ (0,
|
|
3821
|
+
children: thumbnailContent ?? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DefaultThumbnail, { kind })
|
|
3632
3822
|
}
|
|
3633
3823
|
),
|
|
3634
|
-
/* @__PURE__ */ (0,
|
|
3635
|
-
/* @__PURE__ */ (0,
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3637
|
-
/* @__PURE__ */ (0,
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between px-md py-sm border-t border-hairline-soft bg-canvas", children: [
|
|
3825
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-xxs min-w-0", children: [
|
|
3826
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-body-sm font-weight-heading-sm text-ink truncate", children: name }),
|
|
3827
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-caption text-muted truncate", children: description ?? `${kind} \u2022 Generated` })
|
|
3638
3828
|
] }),
|
|
3639
|
-
/* @__PURE__ */ (0,
|
|
3829
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3640
3830
|
"span",
|
|
3641
3831
|
{
|
|
3642
3832
|
className: [
|
|
@@ -3657,27 +3847,27 @@ var ComponentCard = import_react14.default.forwardRef(
|
|
|
3657
3847
|
ComponentCard.displayName = "ComponentCard";
|
|
3658
3848
|
function DefaultThumbnail({ kind }) {
|
|
3659
3849
|
const icons = {
|
|
3660
|
-
Atom: /* @__PURE__ */ (0,
|
|
3661
|
-
/* @__PURE__ */ (0,
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3850
|
+
Atom: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.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" }),
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.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" })
|
|
3664
3854
|
] }),
|
|
3665
|
-
Molecule: /* @__PURE__ */ (0,
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
3668
|
-
/* @__PURE__ */ (0,
|
|
3855
|
+
Molecule: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "14", y: "2", width: "8", height: "8", rx: "2" }),
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "2", y: "14", width: "8", height: "8", rx: "2" })
|
|
3669
3859
|
] }),
|
|
3670
|
-
Organism: /* @__PURE__ */ (0,
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
3672
|
-
/* @__PURE__ */ (0,
|
|
3673
|
-
/* @__PURE__ */ (0,
|
|
3860
|
+
Organism: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3861
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
|
|
3862
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M2 17l10 5 10-5" }),
|
|
3863
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M2 12l10 5 10-5" })
|
|
3674
3864
|
] }),
|
|
3675
|
-
Template: /* @__PURE__ */ (0,
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3677
|
-
/* @__PURE__ */ (0,
|
|
3865
|
+
Template: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M3 9h18M9 21V9" })
|
|
3678
3868
|
] })
|
|
3679
3869
|
};
|
|
3680
|
-
return /* @__PURE__ */ (0,
|
|
3870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3681
3871
|
"div",
|
|
3682
3872
|
{
|
|
3683
3873
|
className: [
|
|
@@ -3690,23 +3880,23 @@ function DefaultThumbnail({ kind }) {
|
|
|
3690
3880
|
}
|
|
3691
3881
|
|
|
3692
3882
|
// virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
|
|
3693
|
-
var
|
|
3883
|
+
var import_react18 = __toESM(require("react"));
|
|
3694
3884
|
|
|
3695
3885
|
// virtual-pkg:src/atoms/Modal/Modal.tsx
|
|
3696
|
-
var
|
|
3697
|
-
var
|
|
3886
|
+
var import_react16 = __toESM(require("react"));
|
|
3887
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3698
3888
|
var sizeMap = {
|
|
3699
3889
|
sm: "max-w-sm",
|
|
3700
3890
|
md: "max-w-lg",
|
|
3701
3891
|
lg: "max-w-2xl",
|
|
3702
3892
|
xl: "max-w-4xl"
|
|
3703
3893
|
};
|
|
3704
|
-
var Modal =
|
|
3894
|
+
var Modal = import_react16.default.forwardRef(
|
|
3705
3895
|
({ isOpen, onClose, title, children, footer, size = "md" }, ref) => {
|
|
3706
|
-
const [mounted, setMounted] = (0,
|
|
3707
|
-
const [visible, setVisible] = (0,
|
|
3708
|
-
const overlayRef = (0,
|
|
3709
|
-
(0,
|
|
3896
|
+
const [mounted, setMounted] = (0, import_react16.useState)(false);
|
|
3897
|
+
const [visible, setVisible] = (0, import_react16.useState)(false);
|
|
3898
|
+
const overlayRef = (0, import_react16.useRef)(null);
|
|
3899
|
+
(0, import_react16.useEffect)(() => {
|
|
3710
3900
|
if (isOpen) {
|
|
3711
3901
|
setMounted(true);
|
|
3712
3902
|
const raf = requestAnimationFrame(() => {
|
|
@@ -3719,7 +3909,7 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3719
3909
|
return () => clearTimeout(timer);
|
|
3720
3910
|
}
|
|
3721
3911
|
}, [isOpen]);
|
|
3722
|
-
(0,
|
|
3912
|
+
(0, import_react16.useEffect)(() => {
|
|
3723
3913
|
if (!mounted) return;
|
|
3724
3914
|
const handleKey = (e) => {
|
|
3725
3915
|
if (e.key === "Escape") onClose();
|
|
@@ -3731,7 +3921,7 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3731
3921
|
const handleBackdropClick = (e) => {
|
|
3732
3922
|
if (e.target === overlayRef.current) onClose();
|
|
3733
3923
|
};
|
|
3734
|
-
return /* @__PURE__ */ (0,
|
|
3924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3735
3925
|
"div",
|
|
3736
3926
|
{
|
|
3737
3927
|
ref: overlayRef,
|
|
@@ -3746,7 +3936,7 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3746
3936
|
visible ? "opacity-100" : "opacity-0"
|
|
3747
3937
|
].join(" "),
|
|
3748
3938
|
style: { zIndex: "var(--z-modal, 1000)" },
|
|
3749
|
-
children: /* @__PURE__ */ (0,
|
|
3939
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3750
3940
|
"div",
|
|
3751
3941
|
{
|
|
3752
3942
|
ref,
|
|
@@ -3759,9 +3949,9 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3759
3949
|
visible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
|
|
3760
3950
|
].join(" "),
|
|
3761
3951
|
children: [
|
|
3762
|
-
title && /* @__PURE__ */ (0,
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
3764
|
-
/* @__PURE__ */ (0,
|
|
3952
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between px-lg py-base border-b border-hairline", children: [
|
|
3953
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { id: "modal-title", className: "text-heading-sm text-ink", children: title }),
|
|
3954
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3765
3955
|
Button,
|
|
3766
3956
|
{
|
|
3767
3957
|
variant: "ghost",
|
|
@@ -3769,7 +3959,7 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3769
3959
|
"aria-label": "Close modal",
|
|
3770
3960
|
onClick: onClose,
|
|
3771
3961
|
className: "!px-xs !py-xs",
|
|
3772
|
-
children: /* @__PURE__ */ (0,
|
|
3962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3773
3963
|
"svg",
|
|
3774
3964
|
{
|
|
3775
3965
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3783,16 +3973,16 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3783
3973
|
strokeLinejoin: "round",
|
|
3784
3974
|
"aria-hidden": "true",
|
|
3785
3975
|
children: [
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
3976
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3977
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3788
3978
|
]
|
|
3789
3979
|
}
|
|
3790
3980
|
)
|
|
3791
3981
|
}
|
|
3792
3982
|
)
|
|
3793
3983
|
] }),
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3795
|
-
footer && /* @__PURE__ */ (0,
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-1 px-lg py-base text-body-md text-body overflow-y-auto", children }),
|
|
3985
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex items-center justify-end gap-sm px-lg py-base border-t border-hairline", children: footer })
|
|
3796
3986
|
]
|
|
3797
3987
|
}
|
|
3798
3988
|
)
|
|
@@ -3803,8 +3993,8 @@ var Modal = import_react15.default.forwardRef(
|
|
|
3803
3993
|
Modal.displayName = "Modal";
|
|
3804
3994
|
|
|
3805
3995
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
3806
|
-
var
|
|
3807
|
-
var
|
|
3996
|
+
var import_react17 = __toESM(require("react"));
|
|
3997
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3808
3998
|
var roleTagMap = {
|
|
3809
3999
|
"display-lg": "h1",
|
|
3810
4000
|
"heading-lg": "h2",
|
|
@@ -3836,7 +4026,7 @@ var colorClassMap = {
|
|
|
3836
4026
|
"semantic-warning": "text-semantic-warning",
|
|
3837
4027
|
"on-primary": "text-on-primary"
|
|
3838
4028
|
};
|
|
3839
|
-
var Typography =
|
|
4029
|
+
var Typography = import_react17.default.forwardRef(
|
|
3840
4030
|
({
|
|
3841
4031
|
role = "body-md",
|
|
3842
4032
|
color = "ink",
|
|
@@ -3855,13 +4045,13 @@ var Typography = import_react16.default.forwardRef(
|
|
|
3855
4045
|
uppercase ? "uppercase tracking-wide" : "",
|
|
3856
4046
|
className
|
|
3857
4047
|
].filter(Boolean).join(" ");
|
|
3858
|
-
return /* @__PURE__ */ (0,
|
|
4048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tag, { ref, className: classes, ...rest, children });
|
|
3859
4049
|
}
|
|
3860
4050
|
);
|
|
3861
4051
|
Typography.displayName = "Typography";
|
|
3862
4052
|
|
|
3863
4053
|
// virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
|
|
3864
|
-
var
|
|
4054
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3865
4055
|
var defaultLines = [
|
|
3866
4056
|
{ text: "# Design System", tone: "heading" },
|
|
3867
4057
|
{ text: "" },
|
|
@@ -3890,7 +4080,7 @@ var defaultLines = [
|
|
|
3890
4080
|
{ text: "muted: {colors.muted}" },
|
|
3891
4081
|
{ text: "hairline: {colors.hairline}" }
|
|
3892
4082
|
];
|
|
3893
|
-
var CloudIcon = () => /* @__PURE__ */ (0,
|
|
4083
|
+
var CloudIcon = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3894
4084
|
"svg",
|
|
3895
4085
|
{
|
|
3896
4086
|
viewBox: "0 0 24 24",
|
|
@@ -3903,12 +4093,12 @@ var CloudIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3903
4093
|
strokeLinejoin: "round",
|
|
3904
4094
|
"aria-hidden": "true",
|
|
3905
4095
|
children: [
|
|
3906
|
-
/* @__PURE__ */ (0,
|
|
3907
|
-
/* @__PURE__ */ (0,
|
|
4096
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("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" }),
|
|
4097
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M8 19h9.5" })
|
|
3908
4098
|
]
|
|
3909
4099
|
}
|
|
3910
4100
|
);
|
|
3911
|
-
var LinkIcon = () => /* @__PURE__ */ (0,
|
|
4101
|
+
var LinkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3912
4102
|
"svg",
|
|
3913
4103
|
{
|
|
3914
4104
|
viewBox: "0 0 24 24",
|
|
@@ -3921,13 +4111,13 @@ var LinkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3921
4111
|
strokeLinejoin: "round",
|
|
3922
4112
|
"aria-hidden": "true",
|
|
3923
4113
|
children: [
|
|
3924
|
-
/* @__PURE__ */ (0,
|
|
3925
|
-
/* @__PURE__ */ (0,
|
|
3926
|
-
/* @__PURE__ */ (0,
|
|
4114
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
|
|
3927
4117
|
]
|
|
3928
4118
|
}
|
|
3929
4119
|
);
|
|
3930
|
-
var CopyIcon = () => /* @__PURE__ */ (0,
|
|
4120
|
+
var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3931
4121
|
"svg",
|
|
3932
4122
|
{
|
|
3933
4123
|
viewBox: "0 0 24 24",
|
|
@@ -3940,12 +4130,12 @@ var CopyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3940
4130
|
strokeLinejoin: "round",
|
|
3941
4131
|
"aria-hidden": "true",
|
|
3942
4132
|
children: [
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
3944
|
-
/* @__PURE__ */ (0,
|
|
4133
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
4134
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M5 15V5a2 2 0 0 1 2-2h10" })
|
|
3945
4135
|
]
|
|
3946
4136
|
}
|
|
3947
4137
|
);
|
|
3948
|
-
var DownloadIcon = () => /* @__PURE__ */ (0,
|
|
4138
|
+
var DownloadIcon = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3949
4139
|
"svg",
|
|
3950
4140
|
{
|
|
3951
4141
|
viewBox: "0 0 24 24",
|
|
@@ -3958,13 +4148,13 @@ var DownloadIcon = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3958
4148
|
strokeLinejoin: "round",
|
|
3959
4149
|
"aria-hidden": "true",
|
|
3960
4150
|
children: [
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
3962
|
-
/* @__PURE__ */ (0,
|
|
3963
|
-
/* @__PURE__ */ (0,
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M12 3v12" }),
|
|
4152
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M7 10l5 5 5-5" }),
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M5 21h14" })
|
|
3964
4154
|
]
|
|
3965
4155
|
}
|
|
3966
4156
|
);
|
|
3967
|
-
var SpinnerIcon2 = () => /* @__PURE__ */ (0,
|
|
4157
|
+
var SpinnerIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3968
4158
|
"svg",
|
|
3969
4159
|
{
|
|
3970
4160
|
viewBox: "0 0 24 24",
|
|
@@ -3974,7 +4164,7 @@ var SpinnerIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3974
4164
|
className: "animate-spin text-primary",
|
|
3975
4165
|
"aria-hidden": "true",
|
|
3976
4166
|
children: [
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
4167
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3978
4168
|
"circle",
|
|
3979
4169
|
{
|
|
3980
4170
|
cx: "12",
|
|
@@ -3985,7 +4175,7 @@ var SpinnerIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3985
4175
|
strokeOpacity: "0.25"
|
|
3986
4176
|
}
|
|
3987
4177
|
),
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
4178
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3989
4179
|
"path",
|
|
3990
4180
|
{
|
|
3991
4181
|
d: "M21 12a9 9 0 0 0-9-9",
|
|
@@ -3997,7 +4187,7 @@ var SpinnerIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
|
3997
4187
|
]
|
|
3998
4188
|
}
|
|
3999
4189
|
);
|
|
4000
|
-
var ExportDesignMdModal =
|
|
4190
|
+
var ExportDesignMdModal = import_react18.default.forwardRef(
|
|
4001
4191
|
({
|
|
4002
4192
|
isOpen,
|
|
4003
4193
|
onClose,
|
|
@@ -4010,7 +4200,7 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4010
4200
|
lines = defaultLines,
|
|
4011
4201
|
loading = false
|
|
4012
4202
|
}, ref) => {
|
|
4013
|
-
const [source, setSource] = (0,
|
|
4203
|
+
const [source, setSource] = (0, import_react18.useState)(defaultSource);
|
|
4014
4204
|
const changeSource = (next) => {
|
|
4015
4205
|
setSource(next);
|
|
4016
4206
|
onSourceChange?.(next);
|
|
@@ -4023,7 +4213,7 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4023
4213
|
}
|
|
4024
4214
|
onCopy?.();
|
|
4025
4215
|
};
|
|
4026
|
-
return /* @__PURE__ */ (0,
|
|
4216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4027
4217
|
Modal,
|
|
4028
4218
|
{
|
|
4029
4219
|
ref,
|
|
@@ -4031,49 +4221,49 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4031
4221
|
onClose,
|
|
4032
4222
|
title: "Export DESIGN.md",
|
|
4033
4223
|
size: "xl",
|
|
4034
|
-
footer: /* @__PURE__ */ (0,
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4036
|
-
/* @__PURE__ */ (0,
|
|
4224
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
4225
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Button, { variant: "secondary", size: "sm", onClick: onDownload, children: [
|
|
4226
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DownloadIcon, {}),
|
|
4037
4227
|
"Download .md"
|
|
4038
4228
|
] }),
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4040
|
-
/* @__PURE__ */ (0,
|
|
4041
|
-
/* @__PURE__ */ (0,
|
|
4229
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }),
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "primary", onClick: onExport, children: "Export" })
|
|
4042
4232
|
] })
|
|
4043
4233
|
] }),
|
|
4044
|
-
children: /* @__PURE__ */ (0,
|
|
4045
|
-
/* @__PURE__ */ (0,
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
4047
|
-
/* @__PURE__ */ (0,
|
|
4048
|
-
/* @__PURE__ */ (0,
|
|
4234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w-full space-y-lg", children: [
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { role: "body-md", color: "muted", children: "Generate and export the DESIGN.md file for handoff to AI coding agents or your team." }),
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-md", children: [
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "inline-flex items-center gap-xs p-xxs bg-surface-soft border border-hairline rounded-md", children: [
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4049
4239
|
Button,
|
|
4050
4240
|
{
|
|
4051
4241
|
variant: source === "production" ? "primary" : "ghost",
|
|
4052
4242
|
size: "sm",
|
|
4053
4243
|
onClick: () => changeSource("production"),
|
|
4054
4244
|
children: [
|
|
4055
|
-
/* @__PURE__ */ (0,
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CloudIcon, {}),
|
|
4056
4246
|
"Production"
|
|
4057
4247
|
]
|
|
4058
4248
|
}
|
|
4059
4249
|
),
|
|
4060
|
-
/* @__PURE__ */ (0,
|
|
4250
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4061
4251
|
Button,
|
|
4062
4252
|
{
|
|
4063
4253
|
variant: source === "local" ? "primary" : "ghost",
|
|
4064
4254
|
size: "sm",
|
|
4065
4255
|
onClick: () => changeSource("local"),
|
|
4066
4256
|
children: [
|
|
4067
|
-
/* @__PURE__ */ (0,
|
|
4257
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LinkIcon, {}),
|
|
4068
4258
|
"Local (npm link)"
|
|
4069
4259
|
]
|
|
4070
4260
|
}
|
|
4071
4261
|
)
|
|
4072
4262
|
] }),
|
|
4073
|
-
/* @__PURE__ */ (0,
|
|
4263
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(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." })
|
|
4074
4264
|
] }),
|
|
4075
|
-
/* @__PURE__ */ (0,
|
|
4076
|
-
/* @__PURE__ */ (0,
|
|
4265
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
4266
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4077
4267
|
Typography,
|
|
4078
4268
|
{
|
|
4079
4269
|
role: "caption",
|
|
@@ -4083,8 +4273,8 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4083
4273
|
children: "Preview"
|
|
4084
4274
|
}
|
|
4085
4275
|
),
|
|
4086
|
-
/* @__PURE__ */ (0,
|
|
4087
|
-
/* @__PURE__ */ (0,
|
|
4276
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative w-full bg-canvas border border-hairline rounded-md overflow-hidden", children: [
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4088
4278
|
Button,
|
|
4089
4279
|
{
|
|
4090
4280
|
variant: "secondary",
|
|
@@ -4092,14 +4282,14 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4092
4282
|
onClick: handleCopy,
|
|
4093
4283
|
className: "absolute top-sm right-sm",
|
|
4094
4284
|
children: [
|
|
4095
|
-
/* @__PURE__ */ (0,
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CopyIcon, {}),
|
|
4096
4286
|
"Copy"
|
|
4097
4287
|
]
|
|
4098
4288
|
}
|
|
4099
4289
|
),
|
|
4100
|
-
/* @__PURE__ */ (0,
|
|
4101
|
-
/* @__PURE__ */ (0,
|
|
4102
|
-
/* @__PURE__ */ (0,
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "max-h-64 overflow-y-auto px-md py-sm font-mono text-body-sm", children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-md", children: [
|
|
4291
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w-6 flex-shrink-0 text-right text-muted-soft select-none", children: i + 1 }),
|
|
4292
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4103
4293
|
"span",
|
|
4104
4294
|
{
|
|
4105
4295
|
className: line.tone === "heading" ? "text-primary font-weight-heading-sm" : "text-body",
|
|
@@ -4107,7 +4297,7 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4107
4297
|
}
|
|
4108
4298
|
)
|
|
4109
4299
|
] }, i)) }),
|
|
4110
|
-
loading ? /* @__PURE__ */ (0,
|
|
4300
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4111
4301
|
"div",
|
|
4112
4302
|
{
|
|
4113
4303
|
role: "status",
|
|
@@ -4115,21 +4305,21 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4115
4305
|
"aria-label": "Loading preview",
|
|
4116
4306
|
className: "absolute inset-0 flex items-center justify-center gap-sm bg-canvas opacity-90",
|
|
4117
4307
|
children: [
|
|
4118
|
-
/* @__PURE__ */ (0,
|
|
4119
|
-
/* @__PURE__ */ (0,
|
|
4308
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SpinnerIcon2, {}),
|
|
4309
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { role: "body-sm", color: "muted", children: "Loading preview\u2026" })
|
|
4120
4310
|
]
|
|
4121
4311
|
}
|
|
4122
4312
|
) : null
|
|
4123
4313
|
] })
|
|
4124
4314
|
] }),
|
|
4125
|
-
/* @__PURE__ */ (0,
|
|
4126
|
-
/* @__PURE__ */ (0,
|
|
4127
|
-
/* @__PURE__ */ (0,
|
|
4128
|
-
/* @__PURE__ */ (0,
|
|
4129
|
-
/* @__PURE__ */ (0,
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4315
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w-full space-y-sm", children: [
|
|
4316
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
|
|
4317
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("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__ */ (0, import_jsx_runtime19.jsx)(CloudIcon, {}) }),
|
|
4318
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
4319
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Production (npm install)" }),
|
|
4320
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { role: "body-sm", color: "muted", children: "Generated for public npm registry consumption." })
|
|
4131
4321
|
] }),
|
|
4132
|
-
source === "production" ? /* @__PURE__ */ (0,
|
|
4322
|
+
source === "production" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4133
4323
|
Button,
|
|
4134
4324
|
{
|
|
4135
4325
|
variant: "secondary",
|
|
@@ -4139,13 +4329,13 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4139
4329
|
}
|
|
4140
4330
|
)
|
|
4141
4331
|
] }),
|
|
4142
|
-
/* @__PURE__ */ (0,
|
|
4143
|
-
/* @__PURE__ */ (0,
|
|
4144
|
-
/* @__PURE__ */ (0,
|
|
4145
|
-
/* @__PURE__ */ (0,
|
|
4146
|
-
/* @__PURE__ */ (0,
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
|
|
4333
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("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__ */ (0, import_jsx_runtime19.jsx)(LinkIcon, {}) }),
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Local (npm link)" }),
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { role: "body-sm", color: "muted", children: "Generated for local development with npm link." })
|
|
4147
4337
|
] }),
|
|
4148
|
-
source === "local" ? /* @__PURE__ */ (0,
|
|
4338
|
+
source === "local" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4149
4339
|
Button,
|
|
4150
4340
|
{
|
|
4151
4341
|
variant: "secondary",
|
|
@@ -4164,11 +4354,11 @@ var ExportDesignMdModal = import_react17.default.forwardRef(
|
|
|
4164
4354
|
ExportDesignMdModal.displayName = "ExportDesignMdModal";
|
|
4165
4355
|
|
|
4166
4356
|
// virtual-pkg:src/atoms/FilterTabBar/FilterTabBar.tsx
|
|
4167
|
-
var
|
|
4168
|
-
var
|
|
4169
|
-
var FilterTabBar =
|
|
4357
|
+
var import_react19 = __toESM(require("react"));
|
|
4358
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4359
|
+
var FilterTabBar = import_react19.default.forwardRef(
|
|
4170
4360
|
({ tabs, value, onChange, className = "", ...rest }, ref) => {
|
|
4171
|
-
return /* @__PURE__ */ (0,
|
|
4361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4172
4362
|
"div",
|
|
4173
4363
|
{
|
|
4174
4364
|
ref,
|
|
@@ -4182,7 +4372,7 @@ var FilterTabBar = import_react18.default.forwardRef(
|
|
|
4182
4372
|
...rest,
|
|
4183
4373
|
children: tabs.map((tab) => {
|
|
4184
4374
|
const isActive = tab.value === value;
|
|
4185
|
-
return /* @__PURE__ */ (0,
|
|
4375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4186
4376
|
Button,
|
|
4187
4377
|
{
|
|
4188
4378
|
role: "tab",
|
|
@@ -4193,9 +4383,9 @@ var FilterTabBar = import_react18.default.forwardRef(
|
|
|
4193
4383
|
onClick: () => onChange(tab.value),
|
|
4194
4384
|
className: "gap-xs",
|
|
4195
4385
|
children: [
|
|
4196
|
-
tab.icon && /* @__PURE__ */ (0,
|
|
4197
|
-
tab.label && /* @__PURE__ */ (0,
|
|
4198
|
-
tab.count !== void 0 && /* @__PURE__ */ (0,
|
|
4386
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
|
|
4387
|
+
tab.label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: tab.label }),
|
|
4388
|
+
tab.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4199
4389
|
"span",
|
|
4200
4390
|
{
|
|
4201
4391
|
className: [
|
|
@@ -4221,20 +4411,20 @@ var FilterTabBar = import_react18.default.forwardRef(
|
|
|
4221
4411
|
FilterTabBar.displayName = "FilterTabBar";
|
|
4222
4412
|
|
|
4223
4413
|
// virtual-pkg:src/atoms/HomePageTemplate/HomePageTemplate.tsx
|
|
4224
|
-
var
|
|
4225
|
-
var
|
|
4226
|
-
var HomeIcon2 = () => /* @__PURE__ */ (0,
|
|
4227
|
-
/* @__PURE__ */ (0,
|
|
4228
|
-
/* @__PURE__ */ (0,
|
|
4414
|
+
var import_react20 = __toESM(require("react"));
|
|
4415
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4416
|
+
var HomeIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("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: [
|
|
4417
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
4418
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
4229
4419
|
] });
|
|
4230
|
-
var FolderIcon = () => /* @__PURE__ */ (0,
|
|
4231
|
-
var LogoIcon3 = () => /* @__PURE__ */ (0,
|
|
4232
|
-
/* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4234
|
-
/* @__PURE__ */ (0,
|
|
4420
|
+
var FolderIcon = () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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__ */ (0, import_jsx_runtime21.jsx)("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" }) });
|
|
4421
|
+
var LogoIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "26", height: "26", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
4422
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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)" } }),
|
|
4423
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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)" } }),
|
|
4424
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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 } })
|
|
4235
4425
|
] });
|
|
4236
|
-
var SparkleIcon = () => /* @__PURE__ */ (0,
|
|
4237
|
-
var SuggestionChip = ({ label, onClick }) => /* @__PURE__ */ (0,
|
|
4426
|
+
var SparkleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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__ */ (0, import_jsx_runtime21.jsx)("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" }) });
|
|
4427
|
+
var SuggestionChip = ({ label, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4238
4428
|
Button,
|
|
4239
4429
|
{
|
|
4240
4430
|
type: "button",
|
|
@@ -4252,11 +4442,11 @@ var DEFAULT_MODELS = [
|
|
|
4252
4442
|
];
|
|
4253
4443
|
var DEFAULT_SELECTED_MODEL_ID = "claude-sonnet";
|
|
4254
4444
|
var NAV_ENTRIES = [
|
|
4255
|
-
{ id: "home", label: "Home", icon: /* @__PURE__ */ (0,
|
|
4445
|
+
{ id: "home", label: "Home", icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HomeIcon2, {}) },
|
|
4256
4446
|
{
|
|
4257
4447
|
id: "projects",
|
|
4258
4448
|
label: "All projects",
|
|
4259
|
-
icon: /* @__PURE__ */ (0,
|
|
4449
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FolderIcon, {}),
|
|
4260
4450
|
subItems: [
|
|
4261
4451
|
{ id: "proj-1", label: "Design system" },
|
|
4262
4452
|
{ id: "proj-2", label: "Landing page" },
|
|
@@ -4276,7 +4466,7 @@ var GRADIENT_BG = `
|
|
|
4276
4466
|
radial-gradient(ellipse 70% 60% at 50% 50%, var(--color-surface-soft) 0%, transparent 70%),
|
|
4277
4467
|
var(--color-canvas)
|
|
4278
4468
|
`;
|
|
4279
|
-
var HomePageTemplate =
|
|
4469
|
+
var HomePageTemplate = import_react20.default.forwardRef(
|
|
4280
4470
|
({
|
|
4281
4471
|
userName = "Hello Designer",
|
|
4282
4472
|
userInitials = "N",
|
|
@@ -4301,8 +4491,8 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4301
4491
|
className,
|
|
4302
4492
|
style
|
|
4303
4493
|
}, ref) => {
|
|
4304
|
-
const [internalPrompt, setInternalPrompt] =
|
|
4305
|
-
const [internalActiveId, setInternalActiveId] =
|
|
4494
|
+
const [internalPrompt, setInternalPrompt] = import_react20.default.useState("");
|
|
4495
|
+
const [internalActiveId, setInternalActiveId] = import_react20.default.useState("home");
|
|
4306
4496
|
const resolvedActiveId = activeIdProp !== void 0 ? activeIdProp : internalActiveId;
|
|
4307
4497
|
const resolvedEntries = navEntries !== void 0 ? navEntries : NAV_ENTRIES;
|
|
4308
4498
|
const textValue = promptValue !== void 0 ? promptValue : internalPrompt;
|
|
@@ -4325,14 +4515,14 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4325
4515
|
if (activeIdProp === void 0) setInternalActiveId(id);
|
|
4326
4516
|
onSelect?.(id);
|
|
4327
4517
|
};
|
|
4328
|
-
return /* @__PURE__ */ (0,
|
|
4518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4329
4519
|
"div",
|
|
4330
4520
|
{
|
|
4331
4521
|
ref,
|
|
4332
4522
|
className: ["flex w-full", className].filter(Boolean).join(" "),
|
|
4333
4523
|
style: { width: "100%", height: "100%", background: "var(--color-canvas)", ...style },
|
|
4334
4524
|
children: [
|
|
4335
|
-
/* @__PURE__ */ (0,
|
|
4525
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "hidden md:flex flex-shrink-0", style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4336
4526
|
AppSidebar,
|
|
4337
4527
|
{
|
|
4338
4528
|
workspaceName: userName,
|
|
@@ -4352,14 +4542,14 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4352
4542
|
style: { height: "100%" }
|
|
4353
4543
|
}
|
|
4354
4544
|
) }),
|
|
4355
|
-
/* @__PURE__ */ (0,
|
|
4545
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4356
4546
|
"main",
|
|
4357
4547
|
{
|
|
4358
4548
|
className: "flex-1 relative flex flex-col overflow-hidden",
|
|
4359
4549
|
style: { height: "100%" },
|
|
4360
4550
|
"aria-label": "Home canvas",
|
|
4361
4551
|
children: [
|
|
4362
|
-
/* @__PURE__ */ (0,
|
|
4552
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4363
4553
|
"div",
|
|
4364
4554
|
{
|
|
4365
4555
|
"aria-hidden": "true",
|
|
@@ -4367,9 +4557,9 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4367
4557
|
style: { background: GRADIENT_BG }
|
|
4368
4558
|
}
|
|
4369
4559
|
),
|
|
4370
|
-
/* @__PURE__ */ (0,
|
|
4371
|
-
/* @__PURE__ */ (0,
|
|
4372
|
-
/* @__PURE__ */ (0,
|
|
4560
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "md:hidden relative z-10 flex items-center justify-between px-md py-sm border-b border-hairline bg-canvas", children: [
|
|
4561
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4373
4563
|
AppSidebarMobile,
|
|
4374
4564
|
{
|
|
4375
4565
|
brandName: "Atoms",
|
|
@@ -4386,12 +4576,12 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4386
4576
|
onDarkModeToggle
|
|
4387
4577
|
}
|
|
4388
4578
|
),
|
|
4389
|
-
/* @__PURE__ */ (0,
|
|
4390
|
-
/* @__PURE__ */ (0,
|
|
4391
|
-
/* @__PURE__ */ (0,
|
|
4579
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
4580
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LogoIcon3, {}),
|
|
4581
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-body-sm font-weight-heading-sm text-ink", children: "Atoms" })
|
|
4392
4582
|
] })
|
|
4393
4583
|
] }),
|
|
4394
|
-
/* @__PURE__ */ (0,
|
|
4584
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4395
4585
|
"span",
|
|
4396
4586
|
{
|
|
4397
4587
|
className: "flex items-center justify-center rounded-full bg-primary text-on-primary text-caption font-weight-heading-sm",
|
|
@@ -4401,8 +4591,8 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4401
4591
|
}
|
|
4402
4592
|
)
|
|
4403
4593
|
] }),
|
|
4404
|
-
/* @__PURE__ */ (0,
|
|
4405
|
-
/* @__PURE__ */ (0,
|
|
4594
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "relative z-10 flex-1 flex flex-col items-center justify-center overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("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: [
|
|
4595
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4406
4596
|
Button,
|
|
4407
4597
|
{
|
|
4408
4598
|
variant: "secondary",
|
|
@@ -4410,13 +4600,13 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4410
4600
|
"aria-label": "New design system",
|
|
4411
4601
|
className: "!rounded-full flex items-center gap-xs",
|
|
4412
4602
|
children: [
|
|
4413
|
-
/* @__PURE__ */ (0,
|
|
4603
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SparkleIcon, {}),
|
|
4414
4604
|
"New design system"
|
|
4415
4605
|
]
|
|
4416
4606
|
}
|
|
4417
4607
|
),
|
|
4418
|
-
/* @__PURE__ */ (0,
|
|
4419
|
-
/* @__PURE__ */ (0,
|
|
4608
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "text-center flex flex-col gap-sm", children: [
|
|
4609
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4420
4610
|
"h1",
|
|
4421
4611
|
{
|
|
4422
4612
|
className: "text-ink",
|
|
@@ -4429,12 +4619,12 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4429
4619
|
},
|
|
4430
4620
|
children: [
|
|
4431
4621
|
"What atom should we",
|
|
4432
|
-
/* @__PURE__ */ (0,
|
|
4622
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("br", {}),
|
|
4433
4623
|
"build?"
|
|
4434
4624
|
]
|
|
4435
4625
|
}
|
|
4436
4626
|
),
|
|
4437
|
-
/* @__PURE__ */ (0,
|
|
4627
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4438
4628
|
"p",
|
|
4439
4629
|
{
|
|
4440
4630
|
className: "text-muted text-body-sm md:text-body-md",
|
|
@@ -4443,7 +4633,7 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4443
4633
|
}
|
|
4444
4634
|
)
|
|
4445
4635
|
] }),
|
|
4446
|
-
/* @__PURE__ */ (0,
|
|
4636
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4447
4637
|
PromptInputBar,
|
|
4448
4638
|
{
|
|
4449
4639
|
placeholder: "Describe an atom or design token to create...",
|
|
@@ -4459,13 +4649,13 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4459
4649
|
onModelChange
|
|
4460
4650
|
}
|
|
4461
4651
|
) }),
|
|
4462
|
-
/* @__PURE__ */ (0,
|
|
4652
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4463
4653
|
"div",
|
|
4464
4654
|
{
|
|
4465
4655
|
className: "flex flex-wrap justify-center gap-sm",
|
|
4466
4656
|
role: "list",
|
|
4467
4657
|
"aria-label": "Suggested prompts",
|
|
4468
|
-
children: suggestions.map((s) => /* @__PURE__ */ (0,
|
|
4658
|
+
children: suggestions.map((s) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SuggestionChip, { label: s, onClick: () => handleSuggestion(s) }) }, s))
|
|
4469
4659
|
}
|
|
4470
4660
|
)
|
|
4471
4661
|
] }) })
|
|
@@ -4480,44 +4670,39 @@ var HomePageTemplate = import_react19.default.forwardRef(
|
|
|
4480
4670
|
HomePageTemplate.displayName = "HomePageTemplate";
|
|
4481
4671
|
|
|
4482
4672
|
// virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
|
|
4483
|
-
var
|
|
4484
|
-
var
|
|
4485
|
-
var DesktopIcon = () => /* @__PURE__ */ (0,
|
|
4486
|
-
/* @__PURE__ */ (0,
|
|
4487
|
-
/* @__PURE__ */ (0,
|
|
4488
|
-
] });
|
|
4489
|
-
var SidebarIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime20.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: [
|
|
4490
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
|
|
4491
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M9 3v18" })
|
|
4673
|
+
var import_react21 = __toESM(require("react"));
|
|
4674
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4675
|
+
var DesktopIcon = () => /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
4676
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
4677
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M8 21h8M12 17v4" })
|
|
4492
4678
|
] });
|
|
4493
|
-
var MobileIcon = () => /* @__PURE__ */ (0,
|
|
4494
|
-
/* @__PURE__ */ (0,
|
|
4495
|
-
/* @__PURE__ */ (0,
|
|
4679
|
+
var MobileIcon = () => /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
4680
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
|
|
4681
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
|
|
4496
4682
|
] });
|
|
4497
|
-
var ExpandIcon = () => /* @__PURE__ */ (0,
|
|
4498
|
-
var InspectIcon = () => /* @__PURE__ */ (0,
|
|
4499
|
-
/* @__PURE__ */ (0,
|
|
4500
|
-
/* @__PURE__ */ (0,
|
|
4501
|
-
/* @__PURE__ */ (0,
|
|
4683
|
+
var ExpandIcon = () => /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsx)("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
|
|
4684
|
+
var InspectIcon = () => /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
4685
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
4686
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M12 8v4l3 3" }),
|
|
4687
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
|
|
4502
4688
|
] });
|
|
4503
|
-
var MoonIcon4 = () => /* @__PURE__ */ (0,
|
|
4504
|
-
var FullscreenIcon = () => /* @__PURE__ */ (0,
|
|
4505
|
-
/* @__PURE__ */ (0,
|
|
4506
|
-
/* @__PURE__ */ (0,
|
|
4507
|
-
/* @__PURE__ */ (0,
|
|
4508
|
-
/* @__PURE__ */ (0,
|
|
4689
|
+
var MoonIcon4 = () => /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
|
|
4690
|
+
var FullscreenIcon = () => /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
4691
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
4692
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("polyline", { points: "9 21 3 21 3 15" }),
|
|
4693
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
4694
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
4509
4695
|
] });
|
|
4510
|
-
var DotsIcon = () => /* @__PURE__ */ (0,
|
|
4511
|
-
/* @__PURE__ */ (0,
|
|
4512
|
-
/* @__PURE__ */ (0,
|
|
4513
|
-
/* @__PURE__ */ (0,
|
|
4696
|
+
var DotsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
|
|
4697
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
4698
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
4699
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
4514
4700
|
] });
|
|
4515
4701
|
var VIEWPORT_OPTIONS = [
|
|
4516
4702
|
{ id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
|
|
4517
|
-
{ id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
|
|
4518
4703
|
{ id: "mobile", Icon: MobileIcon, label: "Mobile view" }
|
|
4519
4704
|
];
|
|
4520
|
-
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0,
|
|
4705
|
+
var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4521
4706
|
Button,
|
|
4522
4707
|
{
|
|
4523
4708
|
variant: active ? "primary" : "ghost",
|
|
@@ -4529,7 +4714,7 @@ var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ (0,
|
|
|
4529
4714
|
children
|
|
4530
4715
|
}
|
|
4531
4716
|
);
|
|
4532
|
-
var PreviewToolbar =
|
|
4717
|
+
var PreviewToolbar = import_react21.default.forwardRef(
|
|
4533
4718
|
({
|
|
4534
4719
|
viewport = "desktop",
|
|
4535
4720
|
onViewportChange,
|
|
@@ -4544,7 +4729,7 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4544
4729
|
kindLabel = "ATOM",
|
|
4545
4730
|
onOverflow,
|
|
4546
4731
|
className = ""
|
|
4547
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
4732
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4548
4733
|
"div",
|
|
4549
4734
|
{
|
|
4550
4735
|
ref,
|
|
@@ -4558,24 +4743,24 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4558
4743
|
className
|
|
4559
4744
|
].filter(Boolean).join(" "),
|
|
4560
4745
|
children: [
|
|
4561
|
-
/* @__PURE__ */ (0,
|
|
4746
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4562
4747
|
"div",
|
|
4563
4748
|
{
|
|
4564
4749
|
role: "group",
|
|
4565
4750
|
"aria-label": "Viewport size",
|
|
4566
4751
|
className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs w-full md:w-auto",
|
|
4567
4752
|
children: [
|
|
4568
|
-
VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ (0,
|
|
4753
|
+
VIEWPORT_OPTIONS.map(({ id, Icon: Icon2, label }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4569
4754
|
ViewportBtn,
|
|
4570
4755
|
{
|
|
4571
4756
|
label,
|
|
4572
4757
|
active: !expanded && viewport === id,
|
|
4573
4758
|
onClick: () => onViewportChange?.(id),
|
|
4574
|
-
children: /* @__PURE__ */ (0,
|
|
4759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, {})
|
|
4575
4760
|
},
|
|
4576
4761
|
id
|
|
4577
4762
|
)),
|
|
4578
|
-
/* @__PURE__ */ (0,
|
|
4763
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4579
4764
|
Button,
|
|
4580
4765
|
{
|
|
4581
4766
|
variant: expanded ? "primary" : "ghost",
|
|
@@ -4587,14 +4772,14 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4587
4772
|
"!w-8 !h-8 !p-0 rounded-sm shrink-0",
|
|
4588
4773
|
expanded ? "" : "text-muted"
|
|
4589
4774
|
].join(" "),
|
|
4590
|
-
children: /* @__PURE__ */ (0,
|
|
4775
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ExpandIcon, {})
|
|
4591
4776
|
}
|
|
4592
4777
|
)
|
|
4593
4778
|
]
|
|
4594
4779
|
}
|
|
4595
4780
|
),
|
|
4596
|
-
/* @__PURE__ */ (0,
|
|
4597
|
-
/* @__PURE__ */ (0,
|
|
4781
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-wrap items-center gap-sm", children: [
|
|
4782
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4598
4783
|
Button,
|
|
4599
4784
|
{
|
|
4600
4785
|
variant: inspecting ? "primary" : "secondary",
|
|
@@ -4603,12 +4788,12 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4603
4788
|
onClick: onInspectTokens,
|
|
4604
4789
|
className: "gap-xs rounded-xl",
|
|
4605
4790
|
children: [
|
|
4606
|
-
/* @__PURE__ */ (0,
|
|
4791
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InspectIcon, {}),
|
|
4607
4792
|
inspecting ? "Exit inspect" : "Inspect tokens"
|
|
4608
4793
|
]
|
|
4609
4794
|
}
|
|
4610
4795
|
),
|
|
4611
|
-
/* @__PURE__ */ (0,
|
|
4796
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4612
4797
|
Button,
|
|
4613
4798
|
{
|
|
4614
4799
|
variant: darkMode ? "primary" : "secondary",
|
|
@@ -4617,12 +4802,12 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4617
4802
|
onClick: onDarkToggle,
|
|
4618
4803
|
className: "gap-xs rounded-xl",
|
|
4619
4804
|
children: [
|
|
4620
|
-
/* @__PURE__ */ (0,
|
|
4805
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MoonIcon4, {}),
|
|
4621
4806
|
"Dark"
|
|
4622
4807
|
]
|
|
4623
4808
|
}
|
|
4624
4809
|
),
|
|
4625
|
-
/* @__PURE__ */ (0,
|
|
4810
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4626
4811
|
Button,
|
|
4627
4812
|
{
|
|
4628
4813
|
variant: "secondary",
|
|
@@ -4630,12 +4815,12 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4630
4815
|
onClick: onFullscreen,
|
|
4631
4816
|
className: "gap-xs rounded-xl",
|
|
4632
4817
|
children: [
|
|
4633
|
-
/* @__PURE__ */ (0,
|
|
4818
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FullscreenIcon, {}),
|
|
4634
4819
|
"Fullscreen"
|
|
4635
4820
|
]
|
|
4636
4821
|
}
|
|
4637
4822
|
),
|
|
4638
|
-
/* @__PURE__ */ (0,
|
|
4823
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4639
4824
|
Chip,
|
|
4640
4825
|
{
|
|
4641
4826
|
label: modelLabel ?? "",
|
|
@@ -4644,7 +4829,7 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4644
4829
|
className: "border-primary text-primary bg-canvas cursor-default select-none"
|
|
4645
4830
|
}
|
|
4646
4831
|
),
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
4832
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4648
4833
|
Chip,
|
|
4649
4834
|
{
|
|
4650
4835
|
label: kindLabel ?? "",
|
|
@@ -4653,7 +4838,7 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4653
4838
|
className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
|
|
4654
4839
|
}
|
|
4655
4840
|
),
|
|
4656
|
-
/* @__PURE__ */ (0,
|
|
4841
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4657
4842
|
Button,
|
|
4658
4843
|
{
|
|
4659
4844
|
variant: "ghost",
|
|
@@ -4661,7 +4846,7 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4661
4846
|
"aria-label": "More options",
|
|
4662
4847
|
onClick: onOverflow,
|
|
4663
4848
|
className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
|
|
4664
|
-
children: /* @__PURE__ */ (0,
|
|
4849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DotsIcon, {})
|
|
4665
4850
|
}
|
|
4666
4851
|
)
|
|
4667
4852
|
] })
|
|
@@ -4672,39 +4857,39 @@ var PreviewToolbar = import_react20.default.forwardRef(
|
|
|
4672
4857
|
PreviewToolbar.displayName = "PreviewToolbar";
|
|
4673
4858
|
|
|
4674
4859
|
// virtual-pkg:src/atoms/PublishModal/PublishModal.tsx
|
|
4675
|
-
var
|
|
4676
|
-
var
|
|
4677
|
-
var GlobeIcon = () => /* @__PURE__ */ (0,
|
|
4678
|
-
/* @__PURE__ */ (0,
|
|
4679
|
-
/* @__PURE__ */ (0,
|
|
4680
|
-
/* @__PURE__ */ (0,
|
|
4681
|
-
/* @__PURE__ */ (0,
|
|
4860
|
+
var import_react22 = __toESM(require("react"));
|
|
4861
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4862
|
+
var GlobeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4863
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
4864
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M3 12h18" }),
|
|
4865
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M12 3a13.5 13.5 0 0 1 0 18" }),
|
|
4866
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M12 3a13.5 13.5 0 0 0 0 18" })
|
|
4682
4867
|
] });
|
|
4683
|
-
var LinkIcon2 = () => /* @__PURE__ */ (0,
|
|
4684
|
-
/* @__PURE__ */ (0,
|
|
4685
|
-
/* @__PURE__ */ (0,
|
|
4686
|
-
/* @__PURE__ */ (0,
|
|
4868
|
+
var LinkIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4869
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
|
|
4870
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
|
|
4687
4872
|
] });
|
|
4688
|
-
var InfoIcon = () => /* @__PURE__ */ (0,
|
|
4689
|
-
/* @__PURE__ */ (0,
|
|
4690
|
-
/* @__PURE__ */ (0,
|
|
4691
|
-
/* @__PURE__ */ (0,
|
|
4873
|
+
var InfoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
4874
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "10", opacity: "0.15" }),
|
|
4875
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "7.5", r: "1.15" }),
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("rect", { x: "11", y: "10.5", width: "2", height: "7", rx: "1" })
|
|
4692
4877
|
] });
|
|
4693
|
-
var CheckCircleIcon = () => /* @__PURE__ */ (0,
|
|
4694
|
-
/* @__PURE__ */ (0,
|
|
4695
|
-
/* @__PURE__ */ (0,
|
|
4878
|
+
var CheckCircleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
4880
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M8.5 12.5l2.2 2.2 4.8-5" })
|
|
4696
4881
|
] });
|
|
4697
|
-
var LockIcon = () => /* @__PURE__ */ (0,
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4699
|
-
/* @__PURE__ */ (0,
|
|
4882
|
+
var LockIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4883
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
|
|
4884
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
|
|
4700
4885
|
] });
|
|
4701
|
-
var RefreshIcon = () => /* @__PURE__ */ (0,
|
|
4702
|
-
/* @__PURE__ */ (0,
|
|
4703
|
-
/* @__PURE__ */ (0,
|
|
4704
|
-
/* @__PURE__ */ (0,
|
|
4705
|
-
/* @__PURE__ */ (0,
|
|
4886
|
+
var RefreshIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4887
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M4 4v5h5" }),
|
|
4888
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M20 20v-5h-5" }),
|
|
4889
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M5.5 9A7 7 0 0 1 19 12" }),
|
|
4890
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M18.5 15A7 7 0 0 1 5 12" })
|
|
4706
4891
|
] });
|
|
4707
|
-
var ChevronIcon3 = ({ open }) => /* @__PURE__ */ (0,
|
|
4892
|
+
var ChevronIcon3 = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4708
4893
|
"svg",
|
|
4709
4894
|
{
|
|
4710
4895
|
viewBox: "0 0 24 24",
|
|
@@ -4717,19 +4902,19 @@ var ChevronIcon3 = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
|
4717
4902
|
strokeLinejoin: "round",
|
|
4718
4903
|
"aria-hidden": "true",
|
|
4719
4904
|
className: ["transition-transform duration-150", open ? "rotate-90" : ""].join(" "),
|
|
4720
|
-
children: /* @__PURE__ */ (0,
|
|
4905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M9 6l6 6-6 6" })
|
|
4721
4906
|
}
|
|
4722
4907
|
);
|
|
4723
|
-
var SpinnerIcon3 = () => /* @__PURE__ */ (0,
|
|
4724
|
-
/* @__PURE__ */ (0,
|
|
4725
|
-
/* @__PURE__ */ (0,
|
|
4908
|
+
var SpinnerIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
|
|
4909
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }),
|
|
4910
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
4726
4911
|
] });
|
|
4727
4912
|
function bumpMinor(version) {
|
|
4728
4913
|
const parts = version.split(".").map((n) => parseInt(n, 10) || 0);
|
|
4729
4914
|
const [major = 0, minor = 0] = parts;
|
|
4730
4915
|
return `${major}.${minor + 1}.0`;
|
|
4731
4916
|
}
|
|
4732
|
-
var PublishModal =
|
|
4917
|
+
var PublishModal = import_react22.default.forwardRef(
|
|
4733
4918
|
({
|
|
4734
4919
|
isOpen,
|
|
4735
4920
|
onClose,
|
|
@@ -4740,12 +4925,12 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4740
4925
|
defaultTarget = "production",
|
|
4741
4926
|
loading = false
|
|
4742
4927
|
}, ref) => {
|
|
4743
|
-
const [target, setTarget] = (0,
|
|
4744
|
-
const [nextVersion, setNextVersion] = (0,
|
|
4928
|
+
const [target, setTarget] = (0, import_react22.useState)(defaultTarget);
|
|
4929
|
+
const [nextVersion, setNextVersion] = (0, import_react22.useState)(
|
|
4745
4930
|
defaultNextVersion ?? bumpMinor(currentVersion)
|
|
4746
4931
|
);
|
|
4747
|
-
const [notesOpen, setNotesOpen] = (0,
|
|
4748
|
-
const [notes, setNotes] = (0,
|
|
4932
|
+
const [notesOpen, setNotesOpen] = (0, import_react22.useState)(false);
|
|
4933
|
+
const [notes, setNotes] = (0, import_react22.useState)("");
|
|
4749
4934
|
const isProduction = target === "production";
|
|
4750
4935
|
const summaryItems = isProduction ? [
|
|
4751
4936
|
{ title: "Package validated", desc: "All required fields are valid." },
|
|
@@ -4758,7 +4943,7 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4758
4943
|
];
|
|
4759
4944
|
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.";
|
|
4760
4945
|
const handlePublish = () => onPublish?.(target, nextVersion);
|
|
4761
|
-
return /* @__PURE__ */ (0,
|
|
4946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4762
4947
|
Modal,
|
|
4763
4948
|
{
|
|
4764
4949
|
ref,
|
|
@@ -4766,32 +4951,32 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4766
4951
|
onClose,
|
|
4767
4952
|
title: "Publish package",
|
|
4768
4953
|
size: "lg",
|
|
4769
|
-
footer: /* @__PURE__ */ (0,
|
|
4770
|
-
/* @__PURE__ */ (0,
|
|
4771
|
-
/* @__PURE__ */ (0,
|
|
4954
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex w-full items-center justify-end gap-sm", children: [
|
|
4955
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "secondary", onClick: onClose, disabled: loading, children: "Cancel" }),
|
|
4956
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4772
4957
|
Button,
|
|
4773
4958
|
{
|
|
4774
4959
|
variant: "primary",
|
|
4775
4960
|
onClick: handlePublish,
|
|
4776
4961
|
disabled: loading,
|
|
4777
4962
|
"aria-busy": loading,
|
|
4778
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
4779
|
-
/* @__PURE__ */ (0,
|
|
4963
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
4964
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SpinnerIcon3, {}),
|
|
4780
4965
|
isProduction ? "Publishing\u2026" : "Linking\u2026"
|
|
4781
4966
|
] }) : isProduction ? "Publish to npm registry" : "Publish locally (npm link)"
|
|
4782
4967
|
}
|
|
4783
4968
|
)
|
|
4784
4969
|
] }),
|
|
4785
|
-
children: /* @__PURE__ */ (0,
|
|
4786
|
-
/* @__PURE__ */ (0,
|
|
4787
|
-
/* @__PURE__ */ (0,
|
|
4970
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "w-full space-y-lg", children: [
|
|
4971
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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." }),
|
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4788
4973
|
"div",
|
|
4789
4974
|
{
|
|
4790
4975
|
role: "tablist",
|
|
4791
4976
|
"aria-label": "Publish target",
|
|
4792
4977
|
className: "flex items-center gap-lg border-b border-hairline",
|
|
4793
4978
|
children: [
|
|
4794
|
-
/* @__PURE__ */ (0,
|
|
4979
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4795
4980
|
Button,
|
|
4796
4981
|
{
|
|
4797
4982
|
type: "button",
|
|
@@ -4806,12 +4991,12 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4806
4991
|
isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
|
|
4807
4992
|
].join(" "),
|
|
4808
4993
|
children: [
|
|
4809
|
-
/* @__PURE__ */ (0,
|
|
4994
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, {}),
|
|
4810
4995
|
"Production (npm registry)"
|
|
4811
4996
|
]
|
|
4812
4997
|
}
|
|
4813
4998
|
),
|
|
4814
|
-
/* @__PURE__ */ (0,
|
|
4999
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4815
5000
|
Button,
|
|
4816
5001
|
{
|
|
4817
5002
|
type: "button",
|
|
@@ -4826,7 +5011,7 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4826
5011
|
!isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
|
|
4827
5012
|
].join(" "),
|
|
4828
5013
|
children: [
|
|
4829
|
-
/* @__PURE__ */ (0,
|
|
5014
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LinkIcon2, {}),
|
|
4830
5015
|
"Local (npm link)"
|
|
4831
5016
|
]
|
|
4832
5017
|
}
|
|
@@ -4834,24 +5019,24 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4834
5019
|
]
|
|
4835
5020
|
}
|
|
4836
5021
|
),
|
|
4837
|
-
/* @__PURE__ */ (0,
|
|
4838
|
-
/* @__PURE__ */ (0,
|
|
4839
|
-
/* @__PURE__ */ (0,
|
|
4840
|
-
/* @__PURE__ */ (0,
|
|
4841
|
-
/* @__PURE__ */ (0,
|
|
4842
|
-
/* @__PURE__ */ (0,
|
|
5022
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-md", children: [
|
|
5023
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "rounded-md border border-hairline p-base space-y-base", children: [
|
|
5024
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-md font-weight-heading-sm text-ink", children: "Package details" }),
|
|
5025
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-xxs", children: [
|
|
5026
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Package" }),
|
|
5027
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-md text-ink font-mono", children: packageName })
|
|
4843
5028
|
] }),
|
|
4844
|
-
/* @__PURE__ */ (0,
|
|
4845
|
-
/* @__PURE__ */ (0,
|
|
4846
|
-
/* @__PURE__ */ (0,
|
|
4847
|
-
/* @__PURE__ */ (0,
|
|
4848
|
-
/* @__PURE__ */ (0,
|
|
5029
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-xxs", children: [
|
|
5030
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Current version" }),
|
|
5031
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
5032
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-md text-ink font-mono", children: currentVersion }),
|
|
5033
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Chip, { label: "Latest", variant: "primary", size: "sm" })
|
|
4849
5034
|
] })
|
|
4850
5035
|
] }),
|
|
4851
|
-
isProduction ? /* @__PURE__ */ (0,
|
|
4852
|
-
/* @__PURE__ */ (0,
|
|
4853
|
-
/* @__PURE__ */ (0,
|
|
4854
|
-
/* @__PURE__ */ (0,
|
|
5036
|
+
isProduction ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-xxs", children: [
|
|
5037
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Next version" }),
|
|
5038
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
5039
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4855
5040
|
Input,
|
|
4856
5041
|
{
|
|
4857
5042
|
"aria-label": "Next version",
|
|
@@ -4861,7 +5046,7 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4861
5046
|
disabled: loading
|
|
4862
5047
|
}
|
|
4863
5048
|
),
|
|
4864
|
-
/* @__PURE__ */ (0,
|
|
5049
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4865
5050
|
Button,
|
|
4866
5051
|
{
|
|
4867
5052
|
variant: "secondary",
|
|
@@ -4870,19 +5055,19 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4870
5055
|
onClick: () => setNextVersion(bumpMinor(currentVersion)),
|
|
4871
5056
|
disabled: loading,
|
|
4872
5057
|
className: "!px-sm",
|
|
4873
|
-
children: /* @__PURE__ */ (0,
|
|
5058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RefreshIcon, {})
|
|
4874
5059
|
}
|
|
4875
5060
|
)
|
|
4876
5061
|
] })
|
|
4877
|
-
] }) : /* @__PURE__ */ (0,
|
|
4878
|
-
/* @__PURE__ */ (0,
|
|
4879
|
-
/* @__PURE__ */ (0,
|
|
5062
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-xxs", children: [
|
|
5063
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Link command" }),
|
|
5064
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "rounded-sm bg-surface-soft border border-hairline px-sm py-xs text-body-sm font-mono text-body", children: [
|
|
4880
5065
|
"npm link ",
|
|
4881
5066
|
packageName
|
|
4882
5067
|
] })
|
|
4883
5068
|
] }),
|
|
4884
|
-
/* @__PURE__ */ (0,
|
|
4885
|
-
/* @__PURE__ */ (0,
|
|
5069
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "border border-hairline rounded-sm", children: [
|
|
5070
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4886
5071
|
Button,
|
|
4887
5072
|
{
|
|
4888
5073
|
type: "button",
|
|
@@ -4893,12 +5078,12 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4893
5078
|
disabled: loading,
|
|
4894
5079
|
className: "w-full !justify-start !rounded-none gap-xs text-body",
|
|
4895
5080
|
children: [
|
|
4896
|
-
/* @__PURE__ */ (0,
|
|
5081
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronIcon3, { open: notesOpen }),
|
|
4897
5082
|
"Release notes (optional)"
|
|
4898
5083
|
]
|
|
4899
5084
|
}
|
|
4900
5085
|
),
|
|
4901
|
-
notesOpen && /* @__PURE__ */ (0,
|
|
5086
|
+
notesOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "px-sm pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4902
5087
|
"textarea",
|
|
4903
5088
|
{
|
|
4904
5089
|
value: notes,
|
|
@@ -4911,27 +5096,27 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4911
5096
|
) })
|
|
4912
5097
|
] })
|
|
4913
5098
|
] }),
|
|
4914
|
-
/* @__PURE__ */ (0,
|
|
4915
|
-
/* @__PURE__ */ (0,
|
|
4916
|
-
/* @__PURE__ */ (0,
|
|
4917
|
-
/* @__PURE__ */ (0,
|
|
4918
|
-
/* @__PURE__ */ (0,
|
|
4919
|
-
/* @__PURE__ */ (0,
|
|
4920
|
-
/* @__PURE__ */ (0,
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "rounded-md border border-hairline p-base space-y-base", children: [
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-md font-weight-heading-sm text-ink", children: "Publish summary" }),
|
|
5101
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-sm rounded-sm bg-primary/10 border border-primary/30 p-sm", children: [
|
|
5102
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-primary flex-shrink-0 mt-xxs", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InfoIcon, {}) }),
|
|
5103
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
5104
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-sm font-weight-heading-sm text-primary", children: isProduction ? "Ready to publish" : "Ready to link" }),
|
|
5105
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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.` })
|
|
4921
5106
|
] })
|
|
4922
5107
|
] }),
|
|
4923
|
-
/* @__PURE__ */ (0,
|
|
4924
|
-
/* @__PURE__ */ (0,
|
|
4925
|
-
/* @__PURE__ */ (0,
|
|
4926
|
-
/* @__PURE__ */ (0,
|
|
4927
|
-
/* @__PURE__ */ (0,
|
|
5108
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-sm", children: summaryItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-sm", children: [
|
|
5109
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-semantic-success flex-shrink-0 mt-xxs", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CheckCircleIcon, {}) }),
|
|
5110
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
5111
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-sm font-weight-heading-sm text-ink", children: item.title }),
|
|
5112
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-sm text-muted", children: item.desc })
|
|
4928
5113
|
] })
|
|
4929
5114
|
] }, item.title)) })
|
|
4930
5115
|
] })
|
|
4931
5116
|
] }),
|
|
4932
|
-
/* @__PURE__ */ (0,
|
|
4933
|
-
/* @__PURE__ */ (0,
|
|
4934
|
-
/* @__PURE__ */ (0,
|
|
5117
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-sm rounded-md bg-surface-soft border border-hairline p-base", children: [
|
|
5118
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-sm bg-primary text-on-primary", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LockIcon, {}) }),
|
|
5119
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-body-sm text-body", children: noticeText })
|
|
4935
5120
|
] })
|
|
4936
5121
|
] })
|
|
4937
5122
|
}
|
|
@@ -4939,3 +5124,95 @@ var PublishModal = import_react21.default.forwardRef(
|
|
|
4939
5124
|
}
|
|
4940
5125
|
);
|
|
4941
5126
|
PublishModal.displayName = "PublishModal";
|
|
5127
|
+
|
|
5128
|
+
// virtual-pkg:src/atoms/StatusBar/StatusBar.tsx
|
|
5129
|
+
var import_react23 = __toESM(require("react"));
|
|
5130
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
5131
|
+
var toneBgClass = {
|
|
5132
|
+
info: "bg-semantic-info-soft",
|
|
5133
|
+
success: "bg-semantic-success-soft",
|
|
5134
|
+
warning: "bg-semantic-warning-soft",
|
|
5135
|
+
error: "bg-semantic-error-soft"
|
|
5136
|
+
};
|
|
5137
|
+
var toneBorderClass = {
|
|
5138
|
+
info: "border-primary",
|
|
5139
|
+
success: "border-semantic-success",
|
|
5140
|
+
warning: "border-semantic-warning",
|
|
5141
|
+
error: "border-semantic-error"
|
|
5142
|
+
};
|
|
5143
|
+
var toneDotClass = {
|
|
5144
|
+
info: "bg-primary",
|
|
5145
|
+
success: "bg-semantic-success",
|
|
5146
|
+
warning: "bg-semantic-warning",
|
|
5147
|
+
error: "bg-semantic-error"
|
|
5148
|
+
};
|
|
5149
|
+
var toneTextClass = {
|
|
5150
|
+
info: "text-primary",
|
|
5151
|
+
success: "text-semantic-success",
|
|
5152
|
+
warning: "text-semantic-warning",
|
|
5153
|
+
error: "text-semantic-error"
|
|
5154
|
+
};
|
|
5155
|
+
var StatusBar = import_react23.default.forwardRef(
|
|
5156
|
+
({
|
|
5157
|
+
tone = "info",
|
|
5158
|
+
message,
|
|
5159
|
+
detail,
|
|
5160
|
+
onDetailClick,
|
|
5161
|
+
pulsing = true,
|
|
5162
|
+
onDismiss,
|
|
5163
|
+
className = "",
|
|
5164
|
+
...rest
|
|
5165
|
+
}, ref) => {
|
|
5166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
5167
|
+
"div",
|
|
5168
|
+
{
|
|
5169
|
+
ref,
|
|
5170
|
+
role: "status",
|
|
5171
|
+
className: [
|
|
5172
|
+
"w-full flex items-center gap-sm px-lg py-sm",
|
|
5173
|
+
"border-b-2",
|
|
5174
|
+
toneBgClass[tone],
|
|
5175
|
+
toneBorderClass[tone],
|
|
5176
|
+
className
|
|
5177
|
+
].filter(Boolean).join(" "),
|
|
5178
|
+
...rest,
|
|
5179
|
+
children: [
|
|
5180
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "relative inline-flex items-center justify-center w-4 h-4 shrink-0", "aria-hidden": "true", children: [
|
|
5181
|
+
pulsing && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5182
|
+
"span",
|
|
5183
|
+
{
|
|
5184
|
+
className: ["absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping", toneDotClass[tone]].join(" ")
|
|
5185
|
+
}
|
|
5186
|
+
),
|
|
5187
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: ["relative inline-flex w-2.5 h-2.5 rounded-full", toneDotClass[tone]].join(" ") })
|
|
5188
|
+
] }),
|
|
5189
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-1 min-w-0 flex-wrap items-baseline gap-x-sm gap-y-xxs", children: [
|
|
5190
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typography, { role: "body-sm", className: ["font-weight-heading-sm truncate", toneTextClass[tone]].join(" "), children: message }),
|
|
5191
|
+
detail && (onDetailClick ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5192
|
+
Button,
|
|
5193
|
+
{
|
|
5194
|
+
variant: "ghost",
|
|
5195
|
+
size: "sm",
|
|
5196
|
+
onClick: onDetailClick,
|
|
5197
|
+
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(" "),
|
|
5198
|
+
children: detail
|
|
5199
|
+
}
|
|
5200
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typography, { role: "body-sm", color: "body", className: "truncate", children: detail }))
|
|
5201
|
+
] }),
|
|
5202
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5203
|
+
Button,
|
|
5204
|
+
{
|
|
5205
|
+
variant: "ghost",
|
|
5206
|
+
size: "sm",
|
|
5207
|
+
"aria-label": "Dismiss status",
|
|
5208
|
+
onClick: onDismiss,
|
|
5209
|
+
className: ["!w-6 !h-6 !p-0 rounded-sm shrink-0 hover:bg-transparent active:bg-transparent", toneTextClass[tone]].join(" "),
|
|
5210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "close", size: 14 })
|
|
5211
|
+
}
|
|
5212
|
+
)
|
|
5213
|
+
]
|
|
5214
|
+
}
|
|
5215
|
+
);
|
|
5216
|
+
}
|
|
5217
|
+
);
|
|
5218
|
+
StatusBar.displayName = "StatusBar";
|