@ggui-ai/ui-visual-tester 0.3.0-rc.0 → 0.5.0-rc.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/fixture/fixture-runtime.js +244 -673
- package/package.json +5 -5
|
@@ -19445,6 +19445,58 @@
|
|
|
19445
19445
|
|
|
19446
19446
|
// ../design/dist/primitives/Text.js
|
|
19447
19447
|
var import_react3 = __toESM(require_react(), 1);
|
|
19448
|
+
var sizeMap = {
|
|
19449
|
+
xs: "var(--ggui-font-size-xs, 12px)",
|
|
19450
|
+
sm: "var(--ggui-font-size-sm, 14px)",
|
|
19451
|
+
base: "var(--ggui-font-size-base, 16px)",
|
|
19452
|
+
lg: "var(--ggui-font-size-lg, 18px)",
|
|
19453
|
+
xl: "var(--ggui-font-size-xl, 20px)",
|
|
19454
|
+
"2xl": "var(--ggui-font-size-2xl, 24px)",
|
|
19455
|
+
"3xl": "var(--ggui-font-size-3xl, 30px)",
|
|
19456
|
+
"4xl": "var(--ggui-font-size-4xl, 36px)"
|
|
19457
|
+
};
|
|
19458
|
+
var weightMap = {
|
|
19459
|
+
normal: "var(--ggui-font-weight-normal, 400)",
|
|
19460
|
+
medium: "var(--ggui-font-weight-medium, 500)",
|
|
19461
|
+
semibold: "var(--ggui-font-weight-semibold, 600)",
|
|
19462
|
+
bold: "var(--ggui-font-weight-bold, 700)"
|
|
19463
|
+
};
|
|
19464
|
+
var lineHeightMap = {
|
|
19465
|
+
xs: 1.5,
|
|
19466
|
+
sm: 1.5,
|
|
19467
|
+
base: 1.5,
|
|
19468
|
+
lg: 1.625,
|
|
19469
|
+
xl: 1.375,
|
|
19470
|
+
"2xl": 1.25,
|
|
19471
|
+
"3xl": 1.25,
|
|
19472
|
+
"4xl": 1.25
|
|
19473
|
+
};
|
|
19474
|
+
function Text({ children, size = "base", weight = "normal", caps = false, tone, align, truncate, is = "p", id, htmlFor, style, className }) {
|
|
19475
|
+
const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
|
|
19476
|
+
const textStyle = {
|
|
19477
|
+
fontSize: sizeMap[size],
|
|
19478
|
+
fontWeight: weightMap[weight],
|
|
19479
|
+
lineHeight: lineHeightMap[size],
|
|
19480
|
+
color: resolvedColor,
|
|
19481
|
+
textAlign: align,
|
|
19482
|
+
margin: 0,
|
|
19483
|
+
...caps && {
|
|
19484
|
+
textTransform: "uppercase",
|
|
19485
|
+
letterSpacing: "0.05em"
|
|
19486
|
+
},
|
|
19487
|
+
...truncate && {
|
|
19488
|
+
overflow: "hidden",
|
|
19489
|
+
textOverflow: "ellipsis",
|
|
19490
|
+
whiteSpace: "nowrap"
|
|
19491
|
+
},
|
|
19492
|
+
...style
|
|
19493
|
+
};
|
|
19494
|
+
const elementProps = { id, htmlFor, className, style: textStyle };
|
|
19495
|
+
return (0, import_react3.createElement)(is, elementProps, children);
|
|
19496
|
+
}
|
|
19497
|
+
|
|
19498
|
+
// ../design/dist/primitives/Heading.js
|
|
19499
|
+
var import_react4 = __toESM(require_react(), 1);
|
|
19448
19500
|
|
|
19449
19501
|
// ../design/dist/tokens/typography.js
|
|
19450
19502
|
var fontSize = {
|
|
@@ -19524,81 +19576,8 @@
|
|
|
19524
19576
|
letterSpacing: letterSpacing.normal
|
|
19525
19577
|
}
|
|
19526
19578
|
};
|
|
19527
|
-
var textStyles = {
|
|
19528
|
-
body: {
|
|
19529
|
-
fontSize: fontSize.base,
|
|
19530
|
-
fontWeight: fontWeight.normal,
|
|
19531
|
-
lineHeight: lineHeight.normal
|
|
19532
|
-
},
|
|
19533
|
-
bodySmall: {
|
|
19534
|
-
fontSize: fontSize.sm,
|
|
19535
|
-
fontWeight: fontWeight.normal,
|
|
19536
|
-
lineHeight: lineHeight.normal
|
|
19537
|
-
},
|
|
19538
|
-
bodyLarge: {
|
|
19539
|
-
fontSize: fontSize.lg,
|
|
19540
|
-
fontWeight: fontWeight.normal,
|
|
19541
|
-
lineHeight: lineHeight.relaxed
|
|
19542
|
-
},
|
|
19543
|
-
caption: {
|
|
19544
|
-
fontSize: fontSize.xs,
|
|
19545
|
-
fontWeight: fontWeight.normal,
|
|
19546
|
-
lineHeight: lineHeight.normal
|
|
19547
|
-
},
|
|
19548
|
-
label: {
|
|
19549
|
-
fontSize: fontSize.sm,
|
|
19550
|
-
fontWeight: fontWeight.medium,
|
|
19551
|
-
lineHeight: lineHeight.normal
|
|
19552
|
-
},
|
|
19553
|
-
overline: {
|
|
19554
|
-
fontSize: fontSize.xs,
|
|
19555
|
-
fontWeight: fontWeight.semibold,
|
|
19556
|
-
lineHeight: lineHeight.normal,
|
|
19557
|
-
letterSpacing: letterSpacing.wider,
|
|
19558
|
-
textTransform: "uppercase"
|
|
19559
|
-
}
|
|
19560
|
-
};
|
|
19561
|
-
|
|
19562
|
-
// ../design/dist/primitives/Text.js
|
|
19563
|
-
var sizeMap = {
|
|
19564
|
-
xs: "var(--ggui-font-size-xs, 12px)",
|
|
19565
|
-
sm: "var(--ggui-font-size-sm, 14px)",
|
|
19566
|
-
base: "var(--ggui-font-size-base, 16px)",
|
|
19567
|
-
lg: "var(--ggui-font-size-lg, 18px)",
|
|
19568
|
-
xl: "var(--ggui-font-size-xl, 20px)",
|
|
19569
|
-
"2xl": "var(--ggui-font-size-2xl, 24px)",
|
|
19570
|
-
"3xl": "var(--ggui-font-size-3xl, 30px)",
|
|
19571
|
-
"4xl": "var(--ggui-font-size-4xl, 36px)"
|
|
19572
|
-
};
|
|
19573
|
-
var weightMap = {
|
|
19574
|
-
normal: "var(--ggui-font-weight-normal, 400)",
|
|
19575
|
-
medium: "var(--ggui-font-weight-medium, 500)",
|
|
19576
|
-
semibold: "var(--ggui-font-weight-semibold, 600)",
|
|
19577
|
-
bold: "var(--ggui-font-weight-bold, 700)"
|
|
19578
|
-
};
|
|
19579
|
-
function Text({ children, variant = "body", size, weight, tone, align, truncate, is = "p", id, htmlFor, style, className }) {
|
|
19580
|
-
const variantStyle = textStyles[variant] || textStyles.body;
|
|
19581
|
-
const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
|
|
19582
|
-
const textStyle = {
|
|
19583
|
-
...variantStyle,
|
|
19584
|
-
fontSize: size ? sizeMap[size] || size : void 0,
|
|
19585
|
-
fontWeight: weight ? weightMap[weight] : void 0,
|
|
19586
|
-
color: resolvedColor,
|
|
19587
|
-
textAlign: align,
|
|
19588
|
-
margin: 0,
|
|
19589
|
-
...truncate && {
|
|
19590
|
-
overflow: "hidden",
|
|
19591
|
-
textOverflow: "ellipsis",
|
|
19592
|
-
whiteSpace: "nowrap"
|
|
19593
|
-
},
|
|
19594
|
-
...style
|
|
19595
|
-
};
|
|
19596
|
-
const elementProps = { id, htmlFor, className, style: textStyle };
|
|
19597
|
-
return (0, import_react3.createElement)(is, elementProps, children);
|
|
19598
|
-
}
|
|
19599
19579
|
|
|
19600
19580
|
// ../design/dist/primitives/Heading.js
|
|
19601
|
-
var import_react4 = __toESM(require_react(), 1);
|
|
19602
19581
|
function Heading({ children, level = 2, tone, align, style, className }) {
|
|
19603
19582
|
const tag = `h${level}`;
|
|
19604
19583
|
const headingStyle = headingStyles[tag] || headingStyles.h2;
|
|
@@ -25039,6 +25018,7 @@
|
|
|
25039
25018
|
Pagination: () => Pagination,
|
|
25040
25019
|
SearchField: () => SearchField,
|
|
25041
25020
|
Stat: () => Stat,
|
|
25021
|
+
Stepper: () => Stepper,
|
|
25042
25022
|
Tag: () => Tag
|
|
25043
25023
|
});
|
|
25044
25024
|
|
|
@@ -25598,7 +25578,79 @@
|
|
|
25598
25578
|
var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
|
|
25599
25579
|
function Stat({ label, value, delta, trend = "neutral", icon, style, className }) {
|
|
25600
25580
|
const deltaTone = trend === "up" ? "success" : trend === "down" ? "error" : "muted";
|
|
25601
|
-
return (0, import_jsx_runtime36.jsxs)(Stack, { gap: "xs", className, style, children: [(0, import_jsx_runtime36.jsxs)(Row, { gap: "xs", align: "center", children: [icon !== void 0 && (typeof icon === "string" ? (0, import_jsx_runtime36.jsx)(Icon, { name: icon, size: 16, tone: "muted" }) : icon), (0, import_jsx_runtime36.jsx)(Text, {
|
|
25581
|
+
return (0, import_jsx_runtime36.jsxs)(Stack, { gap: "xs", className, style, children: [(0, import_jsx_runtime36.jsxs)(Row, { gap: "xs", align: "center", children: [icon !== void 0 && (typeof icon === "string" ? (0, import_jsx_runtime36.jsx)(Icon, { name: icon, size: 16, tone: "muted" }) : icon), (0, import_jsx_runtime36.jsx)(Text, { size: "xs", weight: "semibold", caps: true, tone: "muted", children: label })] }), (0, import_jsx_runtime36.jsxs)(Row, { gap: "sm", align: "end", children: [(0, import_jsx_runtime36.jsx)(Text, { size: "3xl", weight: "bold", children: value }), delta !== void 0 && (0, import_jsx_runtime36.jsx)(Text, { size: "sm", weight: "semibold", tone: deltaTone, children: delta })] })] });
|
|
25582
|
+
}
|
|
25583
|
+
|
|
25584
|
+
// ../design/dist/components/Stepper.js
|
|
25585
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
|
|
25586
|
+
var MARKER_SIZE = 28;
|
|
25587
|
+
function stepState(index, current) {
|
|
25588
|
+
if (index < current)
|
|
25589
|
+
return "completed";
|
|
25590
|
+
if (index === current)
|
|
25591
|
+
return "current";
|
|
25592
|
+
return "upcoming";
|
|
25593
|
+
}
|
|
25594
|
+
var markerStyles = {
|
|
25595
|
+
completed: {
|
|
25596
|
+
backgroundColor: "var(--ggui-color-primary-100, #e0f2fe)",
|
|
25597
|
+
border: "1px solid var(--ggui-color-primary-300, #7dd3fc)",
|
|
25598
|
+
color: "var(--ggui-color-primary-700, #0369a1)"
|
|
25599
|
+
},
|
|
25600
|
+
current: {
|
|
25601
|
+
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
25602
|
+
border: "1px solid var(--ggui-color-primary-600, #0284c7)",
|
|
25603
|
+
color: "var(--ggui-color-onPrimary, #ffffff)"
|
|
25604
|
+
},
|
|
25605
|
+
upcoming: {
|
|
25606
|
+
backgroundColor: "var(--ggui-color-surface, #fafafa)",
|
|
25607
|
+
border: "1px solid var(--ggui-color-outline, #d4d4d8)",
|
|
25608
|
+
color: "var(--ggui-color-onSurfaceVariant, #52525b)"
|
|
25609
|
+
}
|
|
25610
|
+
};
|
|
25611
|
+
function Marker({ index, state }) {
|
|
25612
|
+
return (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": "true", style: {
|
|
25613
|
+
width: MARKER_SIZE,
|
|
25614
|
+
height: MARKER_SIZE,
|
|
25615
|
+
borderRadius: "50%",
|
|
25616
|
+
display: "inline-flex",
|
|
25617
|
+
alignItems: "center",
|
|
25618
|
+
justifyContent: "center",
|
|
25619
|
+
flexShrink: 0,
|
|
25620
|
+
boxSizing: "border-box",
|
|
25621
|
+
transition: "background-color 0.2s, border-color 0.2s, color 0.2s",
|
|
25622
|
+
...markerStyles[state]
|
|
25623
|
+
}, children: state === "completed" ? (0, import_jsx_runtime37.jsx)(Icon, { name: "check", size: 16, tone: "inherit" }) : (0, import_jsx_runtime37.jsx)(Text, { is: "span", size: "sm", weight: "semibold", tone: "inherit", children: index + 1 }) });
|
|
25624
|
+
}
|
|
25625
|
+
function StepLabel({ label, state }) {
|
|
25626
|
+
return (0, import_jsx_runtime37.jsx)(Text, { is: "span", size: "sm", weight: state === "current" ? "semibold" : "normal", tone: state === "upcoming" ? "muted" : "default", children: label });
|
|
25627
|
+
}
|
|
25628
|
+
function Stepper({ steps, current, orientation = "horizontal", onStepClick, style, className }) {
|
|
25629
|
+
const renderStep = (label, index) => {
|
|
25630
|
+
const state = stepState(index, current);
|
|
25631
|
+
const content = (0, import_jsx_runtime37.jsxs)(Row, { gap: "sm", align: "center", children: [(0, import_jsx_runtime37.jsx)(Marker, { index, state }), (0, import_jsx_runtime37.jsx)(StepLabel, { label, state })] });
|
|
25632
|
+
if (onStepClick === void 0) {
|
|
25633
|
+
return (0, import_jsx_runtime37.jsx)("span", { "aria-current": state === "current" ? "step" : void 0, children: content });
|
|
25634
|
+
}
|
|
25635
|
+
return (0, import_jsx_runtime37.jsx)("button", { type: "button", onClick: () => onStepClick(index), "aria-current": state === "current" ? "step" : void 0, style: {
|
|
25636
|
+
background: "none",
|
|
25637
|
+
border: "none",
|
|
25638
|
+
padding: 0,
|
|
25639
|
+
margin: 0,
|
|
25640
|
+
font: "inherit",
|
|
25641
|
+
textAlign: "inherit",
|
|
25642
|
+
cursor: "pointer"
|
|
25643
|
+
}, children: content });
|
|
25644
|
+
};
|
|
25645
|
+
if (orientation === "vertical") {
|
|
25646
|
+
return (0, import_jsx_runtime37.jsx)("nav", { "aria-label": "Progress", className, style, children: (0, import_jsx_runtime37.jsx)(Stack, { gap: "none", align: "start", children: steps.map((label, index) => (0, import_jsx_runtime37.jsxs)(Stack, { gap: "none", align: "start", children: [index > 0 && (0, import_jsx_runtime37.jsx)("span", { style: {
|
|
25647
|
+
width: MARKER_SIZE,
|
|
25648
|
+
height: 16,
|
|
25649
|
+
display: "inline-flex",
|
|
25650
|
+
justifyContent: "center"
|
|
25651
|
+
}, children: (0, import_jsx_runtime37.jsx)(Divider, { orientation: "vertical", margin: 0 }) }), renderStep(label, index)] }, index)) }) });
|
|
25652
|
+
}
|
|
25653
|
+
return (0, import_jsx_runtime37.jsx)("nav", { "aria-label": "Progress", className, style, children: (0, import_jsx_runtime37.jsx)(Row, { gap: "sm", align: "center", children: steps.map((label, index) => (0, import_jsx_runtime37.jsxs)(Row, { gap: "sm", align: "center", style: index > 0 ? { flex: 1 } : void 0, children: [index > 0 && (0, import_jsx_runtime37.jsx)(Divider, { style: { flex: 1, minWidth: 16, margin: 0 } }), renderStep(label, index)] }, index)) }) });
|
|
25602
25654
|
}
|
|
25603
25655
|
|
|
25604
25656
|
// ../design/dist/compositions/index.js
|
|
@@ -25613,22 +25665,16 @@
|
|
|
25613
25665
|
Footer: () => Footer,
|
|
25614
25666
|
Header: () => Header,
|
|
25615
25667
|
Hero: () => Hero,
|
|
25616
|
-
IncidentTimeline: () => IncidentTimeline,
|
|
25617
|
-
MakeTabLayout: () => MakeTabLayout,
|
|
25618
|
-
MarketingCTA: () => MarketingCTA,
|
|
25619
|
-
MarketingFeatures: () => MarketingFeatures,
|
|
25620
|
-
MarketingHero: () => MarketingHero,
|
|
25621
25668
|
Modal: () => Modal,
|
|
25622
25669
|
NavigationBar: () => NavigationBar,
|
|
25623
25670
|
NotificationCenter: () => NotificationCenter,
|
|
25624
|
-
Sidebar: () => Sidebar
|
|
25625
|
-
UserProfileCard: () => UserProfileCard
|
|
25671
|
+
Sidebar: () => Sidebar
|
|
25626
25672
|
});
|
|
25627
25673
|
|
|
25628
25674
|
// ../design/dist/compositions/Header.js
|
|
25629
|
-
var
|
|
25675
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
|
|
25630
25676
|
function Header({ logo, navigation, actions, sticky = false, background, bordered = true, style, className }) {
|
|
25631
|
-
return (0,
|
|
25677
|
+
return (0, import_jsx_runtime38.jsxs)("header", { className, style: {
|
|
25632
25678
|
display: "flex",
|
|
25633
25679
|
alignItems: "center",
|
|
25634
25680
|
justifyContent: "space-between",
|
|
@@ -25642,11 +25688,11 @@
|
|
|
25642
25688
|
boxShadow: shadow.sm
|
|
25643
25689
|
},
|
|
25644
25690
|
...style
|
|
25645
|
-
}, children: [logo && (0,
|
|
25691
|
+
}, children: [logo && (0, import_jsx_runtime38.jsx)("div", { style: { flexShrink: 0 }, children: logo }), navigation && (0, import_jsx_runtime38.jsx)("nav", { style: { display: "flex", alignItems: "center", flex: 1, marginLeft: "32px" }, children: navigation }), actions && (0, import_jsx_runtime38.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "12px", flexShrink: 0 }, children: actions })] });
|
|
25646
25692
|
}
|
|
25647
25693
|
|
|
25648
25694
|
// ../design/dist/compositions/Sidebar.js
|
|
25649
|
-
var
|
|
25695
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
25650
25696
|
var import_react24 = __toESM(require_react(), 1);
|
|
25651
25697
|
function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
25652
25698
|
const [expanded, setExpanded] = (0, import_react24.useState)(false);
|
|
@@ -25658,7 +25704,7 @@
|
|
|
25658
25704
|
}
|
|
25659
25705
|
onItemClick?.(item);
|
|
25660
25706
|
};
|
|
25661
|
-
return (0,
|
|
25707
|
+
return (0, import_jsx_runtime39.jsxs)("div", { children: [(0, import_jsx_runtime39.jsxs)("button", { onClick: handleClick, disabled: item.disabled, style: {
|
|
25662
25708
|
display: "flex",
|
|
25663
25709
|
alignItems: "center",
|
|
25664
25710
|
gap: "12px",
|
|
@@ -25675,11 +25721,11 @@
|
|
|
25675
25721
|
cursor: item.disabled ? "not-allowed" : "pointer",
|
|
25676
25722
|
transition: "all 0.15s",
|
|
25677
25723
|
justifyContent: collapsed ? "center" : "flex-start"
|
|
25678
|
-
}, children: [item.icon && (0,
|
|
25724
|
+
}, children: [item.icon && (0, import_jsx_runtime39.jsx)("span", { style: { display: "flex", flexShrink: 0 }, children: item.icon }), !collapsed && (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [(0, import_jsx_runtime39.jsx)("span", { style: { flex: 1 }, children: item.label }), item.badge && (0, import_jsx_runtime39.jsx)("span", { children: item.badge }), hasChildren && (0, import_jsx_runtime39.jsx)(Icon, { name: expanded ? "chevron-down" : "chevron-right", size: 14, tone: "subtle" })] })] }), hasChildren && expanded && !collapsed && (0, import_jsx_runtime39.jsx)("div", { style: { marginTop: "4px" }, children: item.children.map((child) => (0, import_jsx_runtime39.jsx)(SidebarItem, { item: child, activeId, onItemClick, collapsed, depth: depth + 1 }, child.id)) })] });
|
|
25679
25725
|
}
|
|
25680
25726
|
function Sidebar({ items, activeId, onItemClick, collapsed = false, header, footer, width = 256, collapsedWidth = 64, style, className }) {
|
|
25681
25727
|
const currentWidth = collapsed ? collapsedWidth : width;
|
|
25682
|
-
return (0,
|
|
25728
|
+
return (0, import_jsx_runtime39.jsxs)("aside", { className, style: {
|
|
25683
25729
|
width: currentWidth,
|
|
25684
25730
|
minWidth: currentWidth,
|
|
25685
25731
|
height: "100%",
|
|
@@ -25690,22 +25736,22 @@
|
|
|
25690
25736
|
transition: "width 0.2s",
|
|
25691
25737
|
overflow: "hidden",
|
|
25692
25738
|
...style
|
|
25693
|
-
}, children: [header && (0,
|
|
25739
|
+
}, children: [header && (0, import_jsx_runtime39.jsx)("div", { style: {
|
|
25694
25740
|
padding: collapsed ? "16px 8px" : "16px",
|
|
25695
25741
|
borderBottom: `1px solid ${colors.gray[200]}`
|
|
25696
|
-
}, children: header }), (0,
|
|
25742
|
+
}, children: header }), (0, import_jsx_runtime39.jsx)("nav", { style: {
|
|
25697
25743
|
flex: 1,
|
|
25698
25744
|
padding: "8px",
|
|
25699
25745
|
overflowY: "auto",
|
|
25700
25746
|
overflowX: "hidden"
|
|
25701
|
-
}, children: (0,
|
|
25747
|
+
}, children: (0, import_jsx_runtime39.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: items.map((item) => (0, import_jsx_runtime39.jsx)(SidebarItem, { item, activeId, onItemClick, collapsed }, item.id)) }) }), footer && (0, import_jsx_runtime39.jsx)("div", { style: {
|
|
25702
25748
|
padding: collapsed ? "16px 8px" : "16px",
|
|
25703
25749
|
borderTop: `1px solid ${colors.gray[200]}`
|
|
25704
25750
|
}, children: footer })] });
|
|
25705
25751
|
}
|
|
25706
25752
|
|
|
25707
25753
|
// ../design/dist/compositions/CardGrid.js
|
|
25708
|
-
var
|
|
25754
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
25709
25755
|
function CardGrid({ children, columns = 3, gap = 16, style, className }) {
|
|
25710
25756
|
const getGridColumns = () => {
|
|
25711
25757
|
if (typeof columns === "number") {
|
|
@@ -25713,7 +25759,7 @@
|
|
|
25713
25759
|
}
|
|
25714
25760
|
return `repeat(auto-fit, minmax(280px, 1fr))`;
|
|
25715
25761
|
};
|
|
25716
|
-
return (0,
|
|
25762
|
+
return (0, import_jsx_runtime40.jsx)("div", { className, style: {
|
|
25717
25763
|
display: "grid",
|
|
25718
25764
|
gridTemplateColumns: getGridColumns(),
|
|
25719
25765
|
gap: `${gap}px`,
|
|
@@ -25722,7 +25768,7 @@
|
|
|
25722
25768
|
}
|
|
25723
25769
|
|
|
25724
25770
|
// ../design/dist/compositions/CommentThread.js
|
|
25725
|
-
var
|
|
25771
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
25726
25772
|
var import_react25 = __toESM(require_react(), 1);
|
|
25727
25773
|
function CommentItem({ comment, onReply, onReaction, depth = 0 }) {
|
|
25728
25774
|
const [showReplyInput, setShowReplyInput] = (0, import_react25.useState)(false);
|
|
@@ -25735,20 +25781,20 @@
|
|
|
25735
25781
|
}
|
|
25736
25782
|
};
|
|
25737
25783
|
const timestamp = comment.timestamp instanceof Date ? comment.timestamp.toLocaleString() : comment.timestamp;
|
|
25738
|
-
return (0,
|
|
25784
|
+
return (0, import_jsx_runtime41.jsxs)("div", { style: { marginLeft: depth > 0 ? "40px" : 0 }, children: [(0, import_jsx_runtime41.jsxs)("div", { style: { display: "flex", gap: "12px" }, children: [(0, import_jsx_runtime41.jsx)(Avatar, { name: comment.author.name, src: comment.author.avatar, size: "sm" }), (0, import_jsx_runtime41.jsxs)("div", { style: { flex: 1 }, children: [(0, import_jsx_runtime41.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [(0, import_jsx_runtime41.jsx)("span", { style: { fontWeight: 500, fontSize: fontSize.sm }, children: comment.author.name }), (0, import_jsx_runtime41.jsx)("span", { style: { color: colors.gray[500], fontSize: fontSize.xs }, children: timestamp })] }), (0, import_jsx_runtime41.jsx)("p", { style: { margin: "4px 0 8px", fontSize: fontSize.sm, color: colors.gray[700] }, children: comment.content }), (0, import_jsx_runtime41.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [comment.reactions?.map((reaction) => (0, import_jsx_runtime41.jsxs)("button", { onClick: () => onReaction?.(comment.id, reaction.emoji), style: {
|
|
25739
25785
|
padding: "2px 8px",
|
|
25740
25786
|
border: `1px solid ${colors.gray[200]}`,
|
|
25741
25787
|
borderRadius: "12px",
|
|
25742
25788
|
backgroundColor: colors.gray[50],
|
|
25743
25789
|
fontSize: fontSize.xs,
|
|
25744
25790
|
cursor: "pointer"
|
|
25745
|
-
}, children: [reaction.emoji, " ", reaction.count] }, reaction.emoji)), (0,
|
|
25791
|
+
}, children: [reaction.emoji, " ", reaction.count] }, reaction.emoji)), (0, import_jsx_runtime41.jsx)("button", { onClick: () => setShowReplyInput(!showReplyInput), style: {
|
|
25746
25792
|
background: "none",
|
|
25747
25793
|
border: "none",
|
|
25748
25794
|
color: colors.gray[500],
|
|
25749
25795
|
fontSize: fontSize.xs,
|
|
25750
25796
|
cursor: "pointer"
|
|
25751
|
-
}, children: "Reply" })] }), showReplyInput && (0,
|
|
25797
|
+
}, children: "Reply" })] }), showReplyInput && (0, import_jsx_runtime41.jsxs)("div", { style: { marginTop: "12px" }, children: [(0, import_jsx_runtime41.jsx)(TextArea, { value: replyContent, onChange: setReplyContent, placeholder: "Write a reply...", rows: 2 }), (0, import_jsx_runtime41.jsxs)("div", { style: { display: "flex", gap: "8px", marginTop: "8px" }, children: [(0, import_jsx_runtime41.jsx)(Button, { size: "sm", onClick: handleSubmitReply, children: "Reply" }), (0, import_jsx_runtime41.jsx)(Button, { size: "sm", variant: "ghost", onClick: () => setShowReplyInput(false), children: "Cancel" })] })] })] })] }), comment.replies?.map((reply) => (0, import_jsx_runtime41.jsx)("div", { style: { marginTop: "16px" }, children: (0, import_jsx_runtime41.jsx)(CommentItem, { comment: reply, onReply, onReaction, depth: depth + 1 }) }, reply.id))] });
|
|
25752
25798
|
}
|
|
25753
25799
|
function CommentThread({ comments, currentUser, onAddComment, onReply, onReaction, loading, style, className }) {
|
|
25754
25800
|
const [newComment, setNewComment] = (0, import_react25.useState)("");
|
|
@@ -25758,11 +25804,11 @@
|
|
|
25758
25804
|
setNewComment("");
|
|
25759
25805
|
}
|
|
25760
25806
|
};
|
|
25761
|
-
return (0,
|
|
25807
|
+
return (0, import_jsx_runtime41.jsxs)("div", { className, style: { ...style }, children: [currentUser && (0, import_jsx_runtime41.jsxs)("div", { style: { display: "flex", gap: "12px", marginBottom: "24px" }, children: [(0, import_jsx_runtime41.jsx)(Avatar, { name: currentUser.name, src: currentUser.avatar, size: "sm" }), (0, import_jsx_runtime41.jsxs)("div", { style: { flex: 1 }, children: [(0, import_jsx_runtime41.jsx)(TextArea, { value: newComment, onChange: setNewComment, placeholder: "Write a comment...", rows: 3 }), (0, import_jsx_runtime41.jsx)("div", { style: { marginTop: "8px", display: "flex", justifyContent: "flex-end" }, children: (0, import_jsx_runtime41.jsx)(Button, { onClick: handleSubmit, disabled: !newComment.trim(), children: "Comment" }) })] })] }), loading ? (0, import_jsx_runtime41.jsx)("div", { style: { display: "flex", justifyContent: "center", padding: "24px" }, children: (0, import_jsx_runtime41.jsx)(Spinner, { size: 24 }) }) : (0, import_jsx_runtime41.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: comments.map((comment) => (0, import_jsx_runtime41.jsx)(CommentItem, { comment, onReply, onReaction }, comment.id)) })] });
|
|
25762
25808
|
}
|
|
25763
25809
|
|
|
25764
25810
|
// ../design/dist/compositions/DataTable.js
|
|
25765
|
-
var
|
|
25811
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
25766
25812
|
function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data", onSort, sortKey, sortDirection, onRowClick, selectable, selectedKeys = [], onSelectionChange, style, className }) {
|
|
25767
25813
|
const getRowKey = (row, index) => {
|
|
25768
25814
|
if (typeof rowKey === "function") {
|
|
@@ -25786,16 +25832,16 @@
|
|
|
25786
25832
|
};
|
|
25787
25833
|
const allSelected = data.length > 0 && selectedKeys.length === data.length;
|
|
25788
25834
|
const someSelected = selectedKeys.length > 0 && selectedKeys.length < data.length;
|
|
25789
|
-
return (0,
|
|
25835
|
+
return (0, import_jsx_runtime42.jsx)("div", { className, style: {
|
|
25790
25836
|
border: `1px solid ${colors.gray[200]}`,
|
|
25791
25837
|
borderRadius: "8px",
|
|
25792
25838
|
overflow: "hidden",
|
|
25793
25839
|
...style
|
|
25794
|
-
}, children: (0,
|
|
25840
|
+
}, children: (0, import_jsx_runtime42.jsxs)("table", { style: {
|
|
25795
25841
|
width: "100%",
|
|
25796
25842
|
borderCollapse: "collapse",
|
|
25797
25843
|
fontSize: fontSize.sm
|
|
25798
|
-
}, children: [(0,
|
|
25844
|
+
}, children: [(0, import_jsx_runtime42.jsx)("thead", { children: (0, import_jsx_runtime42.jsxs)("tr", { style: { backgroundColor: colors.gray[50] }, children: [selectable && (0, import_jsx_runtime42.jsx)("th", { style: { width: "40px", padding: "12px" }, children: (0, import_jsx_runtime42.jsx)(Checkbox, { checked: allSelected, indeterminate: someSelected, onChange: handleSelectAll }) }), columns.map((col) => (0, import_jsx_runtime42.jsx)("th", { style: {
|
|
25799
25845
|
padding: "12px 16px",
|
|
25800
25846
|
textAlign: col.align || "left",
|
|
25801
25847
|
fontWeight: fontWeight.semibold,
|
|
@@ -25803,14 +25849,14 @@
|
|
|
25803
25849
|
borderBottom: `1px solid ${colors.gray[200]}`,
|
|
25804
25850
|
cursor: col.sortable ? "pointer" : void 0,
|
|
25805
25851
|
width: col.width
|
|
25806
|
-
}, onClick: () => col.sortable && onSort?.(col.key, sortKey === col.key && sortDirection === "asc" ? "desc" : "asc"), children: (0,
|
|
25852
|
+
}, onClick: () => col.sortable && onSort?.(col.key, sortKey === col.key && sortDirection === "asc" ? "desc" : "asc"), children: (0, import_jsx_runtime42.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [col.header, col.sortable && sortKey === col.key && (0, import_jsx_runtime42.jsx)(Icon, { name: sortDirection === "asc" ? "chevron-up" : "chevron-down", size: 14 })] }) }, col.key))] }) }), (0, import_jsx_runtime42.jsx)("tbody", { children: loading ? (0, import_jsx_runtime42.jsx)("tr", { children: (0, import_jsx_runtime42.jsx)("td", { colSpan: columns.length + (selectable ? 1 : 0), style: { padding: "48px", textAlign: "center" }, children: (0, import_jsx_runtime42.jsx)(Spinner, { size: 24 }) }) }) : data.length === 0 ? (0, import_jsx_runtime42.jsx)("tr", { children: (0, import_jsx_runtime42.jsx)("td", { colSpan: columns.length + (selectable ? 1 : 0), style: { padding: "48px", textAlign: "center", color: colors.gray[500] }, children: emptyText }) }) : data.map((row, index) => {
|
|
25807
25853
|
const key = getRowKey(row, index);
|
|
25808
25854
|
const isSelected = selectedKeys.includes(key);
|
|
25809
|
-
return (0,
|
|
25855
|
+
return (0, import_jsx_runtime42.jsxs)("tr", { onClick: () => onRowClick?.(row, index), style: {
|
|
25810
25856
|
backgroundColor: isSelected ? colors.primary[50] : void 0,
|
|
25811
25857
|
cursor: onRowClick ? "pointer" : void 0,
|
|
25812
25858
|
transition: "background-color 0.15s"
|
|
25813
|
-
}, children: [selectable && (0,
|
|
25859
|
+
}, children: [selectable && (0, import_jsx_runtime42.jsx)("td", { style: { padding: "12px" }, children: (0, import_jsx_runtime42.jsx)(Checkbox, { checked: isSelected, onChange: (checked) => handleSelectRow(key, checked) }) }), columns.map((col) => (0, import_jsx_runtime42.jsx)("td", { style: {
|
|
25814
25860
|
padding: "12px 16px",
|
|
25815
25861
|
textAlign: col.align || "left",
|
|
25816
25862
|
color: colors.gray[900],
|
|
@@ -25820,7 +25866,7 @@
|
|
|
25820
25866
|
}
|
|
25821
25867
|
|
|
25822
25868
|
// ../design/dist/compositions/ChatWindow.js
|
|
25823
|
-
var
|
|
25869
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
25824
25870
|
var import_react26 = __toESM(require_react(), 1);
|
|
25825
25871
|
function ChatWindow({ messages, currentUserId, onSendMessage, loading, typing, placeholder = "Type a message...", header, style, className }) {
|
|
25826
25872
|
const [inputValue, setInputValue] = (0, import_react26.useState)("");
|
|
@@ -25840,7 +25886,7 @@
|
|
|
25840
25886
|
handleSend();
|
|
25841
25887
|
}
|
|
25842
25888
|
};
|
|
25843
|
-
return (0,
|
|
25889
|
+
return (0, import_jsx_runtime43.jsxs)("div", { className, style: {
|
|
25844
25890
|
display: "flex",
|
|
25845
25891
|
flexDirection: "column",
|
|
25846
25892
|
height: "100%",
|
|
@@ -25849,55 +25895,55 @@
|
|
|
25849
25895
|
backgroundColor: colors.white,
|
|
25850
25896
|
overflow: "hidden",
|
|
25851
25897
|
...style
|
|
25852
|
-
}, children: [header && (0,
|
|
25898
|
+
}, children: [header && (0, import_jsx_runtime43.jsx)("div", { style: {
|
|
25853
25899
|
padding: "12px 16px",
|
|
25854
25900
|
borderBottom: `1px solid ${colors.gray[200]}`
|
|
25855
|
-
}, children: header }), (0,
|
|
25901
|
+
}, children: header }), (0, import_jsx_runtime43.jsxs)("div", { style: {
|
|
25856
25902
|
flex: 1,
|
|
25857
25903
|
padding: "16px",
|
|
25858
25904
|
overflowY: "auto",
|
|
25859
25905
|
display: "flex",
|
|
25860
25906
|
flexDirection: "column",
|
|
25861
25907
|
gap: "12px"
|
|
25862
|
-
}, children: [loading ? (0,
|
|
25908
|
+
}, children: [loading ? (0, import_jsx_runtime43.jsx)("div", { style: { display: "flex", justifyContent: "center", padding: "24px" }, children: (0, import_jsx_runtime43.jsx)(Spinner, { size: 24 }) }) : messages.map((message) => {
|
|
25863
25909
|
const isOwn = message.sender.id === currentUserId;
|
|
25864
25910
|
const timestamp = message.timestamp instanceof Date ? message.timestamp.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : message.timestamp;
|
|
25865
|
-
return (0,
|
|
25911
|
+
return (0, import_jsx_runtime43.jsxs)("div", { style: {
|
|
25866
25912
|
display: "flex",
|
|
25867
25913
|
flexDirection: isOwn ? "row-reverse" : "row",
|
|
25868
25914
|
alignItems: "flex-end",
|
|
25869
25915
|
gap: "8px"
|
|
25870
|
-
}, children: [!isOwn && (0,
|
|
25916
|
+
}, children: [!isOwn && (0, import_jsx_runtime43.jsx)(Avatar, { name: message.sender.name, src: message.sender.avatar, size: "xs" }), (0, import_jsx_runtime43.jsxs)("div", { style: {
|
|
25871
25917
|
maxWidth: "70%",
|
|
25872
25918
|
padding: "10px 14px",
|
|
25873
25919
|
borderRadius: radius.lg,
|
|
25874
25920
|
backgroundColor: isOwn ? colors.primary[600] : colors.gray[100],
|
|
25875
25921
|
color: isOwn ? colors.white : colors.gray[900]
|
|
25876
|
-
}, children: [(0,
|
|
25922
|
+
}, children: [(0, import_jsx_runtime43.jsx)("p", { style: { margin: 0, fontSize: fontSize.sm }, children: message.content }), (0, import_jsx_runtime43.jsxs)("div", { style: {
|
|
25877
25923
|
display: "flex",
|
|
25878
25924
|
alignItems: "center",
|
|
25879
25925
|
gap: "4px",
|
|
25880
25926
|
marginTop: "4px",
|
|
25881
25927
|
fontSize: fontSize.xs,
|
|
25882
25928
|
opacity: 0.7
|
|
25883
|
-
}, children: [(0,
|
|
25884
|
-
}), typing && (0,
|
|
25929
|
+
}, children: [(0, import_jsx_runtime43.jsx)("span", { children: timestamp }), isOwn && message.status && (0, import_jsx_runtime43.jsxs)("span", { children: [message.status === "sending" && "\u2022", message.status === "sent" && "\u2713", message.status === "delivered" && "\u2713\u2713", message.status === "read" && "\u2713\u2713", message.status === "error" && "!"] })] })] })] }, message.id);
|
|
25930
|
+
}), typing && (0, import_jsx_runtime43.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: (0, import_jsx_runtime43.jsxs)("span", { style: { fontSize: fontSize.xs, color: colors.gray[500] }, children: [typing.name, " is typing..."] }) }), (0, import_jsx_runtime43.jsx)("div", { ref: messagesEndRef })] }), (0, import_jsx_runtime43.jsxs)("div", { style: {
|
|
25885
25931
|
padding: "12px 16px",
|
|
25886
25932
|
borderTop: `1px solid ${colors.gray[200]}`,
|
|
25887
25933
|
display: "flex",
|
|
25888
25934
|
gap: "8px"
|
|
25889
|
-
}, children: [(0,
|
|
25935
|
+
}, children: [(0, import_jsx_runtime43.jsx)("input", { type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder, style: {
|
|
25890
25936
|
flex: 1,
|
|
25891
25937
|
padding: "10px 14px",
|
|
25892
25938
|
border: `1px solid ${colors.gray[300]}`,
|
|
25893
25939
|
borderRadius: radius.full,
|
|
25894
25940
|
fontSize: fontSize.sm,
|
|
25895
25941
|
outline: "none"
|
|
25896
|
-
} }), (0,
|
|
25942
|
+
} }), (0, import_jsx_runtime43.jsx)(Button, { onClick: handleSend, disabled: !inputValue.trim(), children: (0, import_jsx_runtime43.jsx)(Icon, { name: "chevron-right", size: 18 }) })] })] });
|
|
25897
25943
|
}
|
|
25898
25944
|
|
|
25899
25945
|
// ../design/dist/compositions/NavigationBar.js
|
|
25900
|
-
var
|
|
25946
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
25901
25947
|
function NavigationBar({ items, activeId, onItemClick, orientation = "horizontal", variant = "default", style, className }) {
|
|
25902
25948
|
const renderItem = (item) => {
|
|
25903
25949
|
const isActive = activeId === item.id;
|
|
@@ -25938,16 +25984,16 @@
|
|
|
25938
25984
|
onItemClick?.(item);
|
|
25939
25985
|
}
|
|
25940
25986
|
};
|
|
25941
|
-
const content = (0,
|
|
25987
|
+
const content = (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [item.icon && (0, import_jsx_runtime44.jsx)("span", { style: { display: "flex" }, children: item.icon }), (0, import_jsx_runtime44.jsx)("span", { children: item.label })] });
|
|
25942
25988
|
if (item.href) {
|
|
25943
|
-
return (0,
|
|
25989
|
+
return (0, import_jsx_runtime44.jsx)("a", { href: item.href, onClick: (e) => {
|
|
25944
25990
|
e.preventDefault();
|
|
25945
25991
|
handleClick();
|
|
25946
25992
|
}, style: { ...baseStyle, ...variantStyles6[variant] }, children: content }, item.id);
|
|
25947
25993
|
}
|
|
25948
|
-
return (0,
|
|
25994
|
+
return (0, import_jsx_runtime44.jsx)("button", { onClick: handleClick, disabled: item.disabled, style: { ...baseStyle, ...variantStyles6[variant] }, children: content }, item.id);
|
|
25949
25995
|
};
|
|
25950
|
-
return (0,
|
|
25996
|
+
return (0, import_jsx_runtime44.jsx)("nav", { className, style: {
|
|
25951
25997
|
display: "flex",
|
|
25952
25998
|
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
25953
25999
|
gap: orientation === "horizontal" ? "4px" : "2px",
|
|
@@ -25959,7 +26005,7 @@
|
|
|
25959
26005
|
}
|
|
25960
26006
|
|
|
25961
26007
|
// ../design/dist/compositions/FileUploader.js
|
|
25962
|
-
var
|
|
26008
|
+
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
25963
26009
|
var import_react27 = __toESM(require_react(), 1);
|
|
25964
26010
|
function formatFileSize(bytes) {
|
|
25965
26011
|
if (bytes === 0)
|
|
@@ -26000,7 +26046,7 @@
|
|
|
26000
26046
|
const handleDragLeave = () => {
|
|
26001
26047
|
setIsDragOver(false);
|
|
26002
26048
|
};
|
|
26003
|
-
return (0,
|
|
26049
|
+
return (0, import_jsx_runtime45.jsxs)("div", { className, style: { ...style }, children: [(0, import_jsx_runtime45.jsxs)("div", { onClick: () => !disabled && inputRef.current?.click(), onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, style: {
|
|
26004
26050
|
border: `2px dashed ${isDragOver ? colors.primary[400] : colors.gray[300]}`,
|
|
26005
26051
|
borderRadius: radius.lg,
|
|
26006
26052
|
padding: "32px",
|
|
@@ -26009,7 +26055,7 @@
|
|
|
26009
26055
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
26010
26056
|
transition: "all 0.2s",
|
|
26011
26057
|
opacity: disabled ? 0.5 : 1
|
|
26012
|
-
}, children: [(0,
|
|
26058
|
+
}, children: [(0, import_jsx_runtime45.jsx)("input", { ref: inputRef, type: "file", accept, multiple, onChange: (e) => handleFiles(e.target.files), disabled, style: { display: "none" } }), (0, import_jsx_runtime45.jsx)(Icon, { name: "plus", size: 32, tone: "subtle" }), (0, import_jsx_runtime45.jsx)("p", { style: { margin: "12px 0 4px", color: colors.gray[700], fontSize: fontSize.sm }, children: dragDrop ? "Drag and drop files here, or click to browse" : "Click to browse files" }), (0, import_jsx_runtime45.jsxs)("p", { style: { margin: 0, color: colors.gray[500], fontSize: fontSize.xs }, children: [accept && `Accepted: ${accept}`, maxSize && ` \u2022 Max size: ${formatFileSize(maxSize)}`, maxFiles && ` \u2022 Max files: ${maxFiles}`] })] }), files.length > 0 && (0, import_jsx_runtime45.jsx)("div", { style: { marginTop: "16px", display: "flex", flexDirection: "column", gap: "8px" }, children: files.map((file2) => (0, import_jsx_runtime45.jsxs)("div", { style: {
|
|
26013
26059
|
display: "flex",
|
|
26014
26060
|
alignItems: "center",
|
|
26015
26061
|
gap: "12px",
|
|
@@ -26017,77 +26063,14 @@
|
|
|
26017
26063
|
border: `1px solid ${colors.gray[200]}`,
|
|
26018
26064
|
borderRadius: radius.md,
|
|
26019
26065
|
backgroundColor: colors.white
|
|
26020
|
-
}, children: [(0,
|
|
26066
|
+
}, children: [(0, import_jsx_runtime45.jsx)(Icon, { name: "menu", size: 20, tone: "subtle" }), (0, import_jsx_runtime45.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [(0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26021
26067
|
margin: 0,
|
|
26022
26068
|
fontSize: fontSize.sm,
|
|
26023
26069
|
color: colors.gray[900],
|
|
26024
26070
|
whiteSpace: "nowrap",
|
|
26025
26071
|
overflow: "hidden",
|
|
26026
26072
|
textOverflow: "ellipsis"
|
|
26027
|
-
}, children: file2.name }), (0,
|
|
26028
|
-
}
|
|
26029
|
-
|
|
26030
|
-
// ../design/dist/compositions/UserProfileCard.js
|
|
26031
|
-
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
26032
|
-
function UserProfileCard({ name, subtitle, avatar, coverImage, bio, stats, actions, compact, style, className }) {
|
|
26033
|
-
if (compact) {
|
|
26034
|
-
return (0, import_jsx_runtime45.jsx)(Card, { className, style: { padding: "16px", ...style }, children: (0, import_jsx_runtime45.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [(0, import_jsx_runtime45.jsx)(Avatar, { name, src: avatar, size: "md" }), (0, import_jsx_runtime45.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [(0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26035
|
-
margin: 0,
|
|
26036
|
-
fontWeight: fontWeight.semibold,
|
|
26037
|
-
color: colors.gray[900],
|
|
26038
|
-
fontSize: fontSize.sm
|
|
26039
|
-
}, children: name }), subtitle && (0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26040
|
-
margin: "2px 0 0",
|
|
26041
|
-
color: colors.gray[500],
|
|
26042
|
-
fontSize: fontSize.xs
|
|
26043
|
-
}, children: subtitle })] }), actions] }) });
|
|
26044
|
-
}
|
|
26045
|
-
return (0, import_jsx_runtime45.jsxs)(Card, { className, style: { padding: 0, overflow: "hidden", ...style }, children: [coverImage && (0, import_jsx_runtime45.jsx)("div", { style: {
|
|
26046
|
-
height: "120px",
|
|
26047
|
-
backgroundImage: `url(${coverImage})`,
|
|
26048
|
-
backgroundSize: "cover",
|
|
26049
|
-
backgroundPosition: "center"
|
|
26050
|
-
} }), (0, import_jsx_runtime45.jsxs)("div", { style: {
|
|
26051
|
-
padding: "16px",
|
|
26052
|
-
paddingTop: coverImage ? "0" : "16px",
|
|
26053
|
-
textAlign: "center"
|
|
26054
|
-
}, children: [(0, import_jsx_runtime45.jsx)("div", { style: {
|
|
26055
|
-
marginTop: coverImage ? "-40px" : "0",
|
|
26056
|
-
marginBottom: "12px"
|
|
26057
|
-
}, children: (0, import_jsx_runtime45.jsx)(Avatar, { name, src: avatar, size: "xl", style: {
|
|
26058
|
-
border: `4px solid ${colors.white}`,
|
|
26059
|
-
margin: "0 auto"
|
|
26060
|
-
} }) }), (0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26061
|
-
margin: 0,
|
|
26062
|
-
fontWeight: fontWeight.semibold,
|
|
26063
|
-
color: colors.gray[900],
|
|
26064
|
-
fontSize: fontSize.lg
|
|
26065
|
-
}, children: name }), subtitle && (0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26066
|
-
margin: "4px 0 0",
|
|
26067
|
-
color: colors.gray[500],
|
|
26068
|
-
fontSize: fontSize.sm
|
|
26069
|
-
}, children: subtitle }), bio && (0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26070
|
-
margin: "12px 0 0",
|
|
26071
|
-
color: colors.gray[600],
|
|
26072
|
-
fontSize: fontSize.sm,
|
|
26073
|
-
lineHeight: 1.5
|
|
26074
|
-
}, children: bio }), stats && stats.length > 0 && (0, import_jsx_runtime45.jsx)("div", { style: {
|
|
26075
|
-
display: "flex",
|
|
26076
|
-
justifyContent: "center",
|
|
26077
|
-
gap: "24px",
|
|
26078
|
-
marginTop: "16px",
|
|
26079
|
-
paddingTop: "16px",
|
|
26080
|
-
borderTop: `1px solid ${colors.gray[200]}`
|
|
26081
|
-
}, children: stats.map((stat, index) => (0, import_jsx_runtime45.jsxs)("div", { style: { textAlign: "center" }, children: [(0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26082
|
-
margin: 0,
|
|
26083
|
-
fontWeight: fontWeight.semibold,
|
|
26084
|
-
color: colors.gray[900],
|
|
26085
|
-
fontSize: fontSize.lg
|
|
26086
|
-
}, children: stat.value }), (0, import_jsx_runtime45.jsx)("p", { style: {
|
|
26087
|
-
margin: "2px 0 0",
|
|
26088
|
-
color: colors.gray[500],
|
|
26089
|
-
fontSize: fontSize.xs
|
|
26090
|
-
}, children: stat.label })] }, index)) }), actions && (0, import_jsx_runtime45.jsx)("div", { style: { marginTop: "16px", display: "flex", justifyContent: "center", gap: "8px" }, children: actions })] })] });
|
|
26073
|
+
}, children: file2.name }), (0, import_jsx_runtime45.jsxs)("p", { style: { margin: "2px 0 0", fontSize: fontSize.xs, color: colors.gray[500] }, children: [formatFileSize(file2.size), file2.error && (0, import_jsx_runtime45.jsx)("span", { style: { color: colors.error[500], marginLeft: "8px" }, children: file2.error })] }), file2.status === "uploading" && file2.progress !== void 0 && (0, import_jsx_runtime45.jsx)(Progress, { value: file2.progress, size: "sm", style: { marginTop: "8px" } })] }), (0, import_jsx_runtime45.jsx)(Button, { variant: "ghost", size: "sm", onClick: () => onFileRemove?.(file2.id), children: (0, import_jsx_runtime45.jsx)(Icon, { name: "x", size: 16 }) })] }, file2.id)) })] });
|
|
26091
26074
|
}
|
|
26092
26075
|
|
|
26093
26076
|
// ../design/dist/compositions/NotificationCenter.js
|
|
@@ -26559,441 +26542,6 @@
|
|
|
26559
26542
|
}, children: media })] })] });
|
|
26560
26543
|
}
|
|
26561
26544
|
|
|
26562
|
-
// ../design/dist/compositions/IncidentTimeline.js
|
|
26563
|
-
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
26564
|
-
var import_react30 = __toESM(require_react(), 1);
|
|
26565
|
-
var severityColors = {
|
|
26566
|
-
minor: {
|
|
26567
|
-
bg: "var(--ggui-color-warning-50, #fffbeb)",
|
|
26568
|
-
text: "var(--ggui-color-warning-700, #b45309)",
|
|
26569
|
-
dot: "var(--ggui-color-warning-500, #f59e0b)"
|
|
26570
|
-
},
|
|
26571
|
-
major: {
|
|
26572
|
-
bg: "var(--ggui-color-error-50, #fef2f2)",
|
|
26573
|
-
text: "var(--ggui-color-error-700, #b91c1c)",
|
|
26574
|
-
dot: "var(--ggui-color-error-500, #ef4444)"
|
|
26575
|
-
},
|
|
26576
|
-
critical: {
|
|
26577
|
-
bg: "var(--ggui-color-error-100, #fee2e2)",
|
|
26578
|
-
text: "var(--ggui-color-error-800, #991b1b)",
|
|
26579
|
-
dot: "var(--ggui-color-error-700, #b91c1c)"
|
|
26580
|
-
}
|
|
26581
|
-
};
|
|
26582
|
-
var statusLabels = {
|
|
26583
|
-
investigating: "Investigating",
|
|
26584
|
-
identified: "Identified",
|
|
26585
|
-
monitoring: "Monitoring",
|
|
26586
|
-
resolved: "Resolved"
|
|
26587
|
-
};
|
|
26588
|
-
function getDayKey(date5) {
|
|
26589
|
-
return `${date5.getFullYear()}-${String(date5.getMonth() + 1).padStart(2, "0")}-${String(date5.getDate()).padStart(2, "0")}`;
|
|
26590
|
-
}
|
|
26591
|
-
function formatDate(date5) {
|
|
26592
|
-
return date5.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
26593
|
-
}
|
|
26594
|
-
function formatTime(date5) {
|
|
26595
|
-
return new Date(date5).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" });
|
|
26596
|
-
}
|
|
26597
|
-
function getWorstSeverity(incidents) {
|
|
26598
|
-
if (incidents.some((i) => i.severity === "critical"))
|
|
26599
|
-
return "critical";
|
|
26600
|
-
if (incidents.some((i) => i.severity === "major"))
|
|
26601
|
-
return "major";
|
|
26602
|
-
if (incidents.some((i) => i.severity === "minor"))
|
|
26603
|
-
return "minor";
|
|
26604
|
-
return null;
|
|
26605
|
-
}
|
|
26606
|
-
function DaySquare({ severity }) {
|
|
26607
|
-
const color = severity ? severityColors[severity].dot : "var(--ggui-color-success-500, #22c55e)";
|
|
26608
|
-
const style = {
|
|
26609
|
-
width: "12px",
|
|
26610
|
-
height: "12px",
|
|
26611
|
-
borderRadius: "var(--ggui-shape-radius-sm, 4px)",
|
|
26612
|
-
backgroundColor: color,
|
|
26613
|
-
flexShrink: 0
|
|
26614
|
-
};
|
|
26615
|
-
return (0, import_jsx_runtime51.jsx)("div", { style });
|
|
26616
|
-
}
|
|
26617
|
-
function SeverityBadge({ severity }) {
|
|
26618
|
-
const colors2 = severityColors[severity];
|
|
26619
|
-
const style = {
|
|
26620
|
-
display: "inline-flex",
|
|
26621
|
-
alignItems: "center",
|
|
26622
|
-
gap: "4px",
|
|
26623
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
26624
|
-
fontWeight: 500,
|
|
26625
|
-
padding: "2px 8px",
|
|
26626
|
-
borderRadius: "var(--ggui-shape-radius-full, 9999px)",
|
|
26627
|
-
backgroundColor: colors2.bg,
|
|
26628
|
-
color: colors2.text,
|
|
26629
|
-
textTransform: "capitalize"
|
|
26630
|
-
};
|
|
26631
|
-
return (0, import_jsx_runtime51.jsx)("span", { style, children: severity });
|
|
26632
|
-
}
|
|
26633
|
-
function StatusLabel({ status }) {
|
|
26634
|
-
const isResolved = status === "resolved";
|
|
26635
|
-
const style = {
|
|
26636
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
26637
|
-
color: isResolved ? "var(--ggui-color-success-600, #16a34a)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26638
|
-
fontWeight: isResolved ? 500 : 400
|
|
26639
|
-
};
|
|
26640
|
-
return (0, import_jsx_runtime51.jsx)("span", { style, children: statusLabels[status] });
|
|
26641
|
-
}
|
|
26642
|
-
function IncidentCard({ incident, compact }) {
|
|
26643
|
-
const [expanded, setExpanded] = (0, import_react30.useState)(false);
|
|
26644
|
-
const cardStyle = {
|
|
26645
|
-
border: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
26646
|
-
borderRadius: "var(--ggui-shape-radius-md, 8px)",
|
|
26647
|
-
overflow: "hidden",
|
|
26648
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)"
|
|
26649
|
-
};
|
|
26650
|
-
const headerStyle = {
|
|
26651
|
-
display: "flex",
|
|
26652
|
-
alignItems: "center",
|
|
26653
|
-
justifyContent: "space-between",
|
|
26654
|
-
padding: "12px 16px",
|
|
26655
|
-
cursor: compact ? "default" : "pointer",
|
|
26656
|
-
gap: "8px"
|
|
26657
|
-
};
|
|
26658
|
-
const titleStyle = {
|
|
26659
|
-
fontSize: "var(--ggui-font-size-sm, 14px)",
|
|
26660
|
-
fontWeight: 500,
|
|
26661
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
26662
|
-
margin: 0,
|
|
26663
|
-
flex: 1,
|
|
26664
|
-
minWidth: 0
|
|
26665
|
-
};
|
|
26666
|
-
return (0, import_jsx_runtime51.jsxs)("div", { style: cardStyle, children: [(0, import_jsx_runtime51.jsxs)("div", { style: headerStyle, onClick: compact ? void 0 : () => setExpanded(!expanded), role: compact ? void 0 : "button", tabIndex: compact ? void 0 : 0, onKeyDown: compact ? void 0 : (e) => {
|
|
26667
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
26668
|
-
e.preventDefault();
|
|
26669
|
-
setExpanded(!expanded);
|
|
26670
|
-
}
|
|
26671
|
-
}, children: [(0, import_jsx_runtime51.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", flex: 1, minWidth: 0 }, children: [(0, import_jsx_runtime51.jsx)(SeverityBadge, { severity: incident.severity }), (0, import_jsx_runtime51.jsx)("p", { style: titleStyle, children: incident.title })] }), (0, import_jsx_runtime51.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [(0, import_jsx_runtime51.jsx)(StatusLabel, { status: incident.status }), !compact && (0, import_jsx_runtime51.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "var(--ggui-color-outline, #d4d4d8)", strokeWidth: "2", style: {
|
|
26672
|
-
transform: expanded ? "rotate(180deg)" : "none",
|
|
26673
|
-
transition: "transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
26674
|
-
}, children: (0, import_jsx_runtime51.jsx)("path", { d: "M6 9l6 6 6-6" }) })] })] }), incident.affectedServices && incident.affectedServices.length > 0 && (0, import_jsx_runtime51.jsx)("div", { style: { padding: "0 16px 8px", display: "flex", gap: "4px", flexWrap: "wrap" }, children: incident.affectedServices.map((service) => (0, import_jsx_runtime51.jsx)("span", { style: {
|
|
26675
|
-
fontSize: "11px",
|
|
26676
|
-
padding: "1px 6px",
|
|
26677
|
-
borderRadius: "var(--ggui-shape-radius-sm, 4px)",
|
|
26678
|
-
backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
|
|
26679
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)"
|
|
26680
|
-
}, children: service }, service)) }), !compact && expanded && incident.updates.length > 0 && (0, import_jsx_runtime51.jsx)("div", { style: {
|
|
26681
|
-
borderTop: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
26682
|
-
padding: "12px 16px"
|
|
26683
|
-
}, children: (0, import_jsx_runtime51.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: incident.updates.map((update) => (0, import_jsx_runtime51.jsxs)("div", { style: { display: "flex", gap: "8px", fontSize: "12px" }, children: [(0, import_jsx_runtime51.jsx)("span", { style: {
|
|
26684
|
-
color: "var(--ggui-color-outline, #d4d4d8)",
|
|
26685
|
-
flexShrink: 0,
|
|
26686
|
-
fontVariantNumeric: "tabular-nums"
|
|
26687
|
-
}, children: formatTime(update.timestamp) }), (0, import_jsx_runtime51.jsx)("span", { style: {
|
|
26688
|
-
fontWeight: 500,
|
|
26689
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26690
|
-
flexShrink: 0,
|
|
26691
|
-
textTransform: "capitalize"
|
|
26692
|
-
}, children: statusLabels[update.status] }), (0, import_jsx_runtime51.jsx)("span", { style: { color: "var(--ggui-color-onSurface, #18181b)" }, children: update.message })] }, update.id)) }) })] });
|
|
26693
|
-
}
|
|
26694
|
-
function IncidentTimeline({ incidents, days = 14, emptyText = "All systems operational", compact = false, style, className }) {
|
|
26695
|
-
const now = /* @__PURE__ */ new Date();
|
|
26696
|
-
const dayEntries = [];
|
|
26697
|
-
for (let i = 0; i < days; i++) {
|
|
26698
|
-
const date5 = new Date(now);
|
|
26699
|
-
date5.setDate(date5.getDate() - i);
|
|
26700
|
-
const key = getDayKey(date5);
|
|
26701
|
-
const dayIncidents = incidents.filter((inc) => {
|
|
26702
|
-
const created = new Date(inc.createdAt);
|
|
26703
|
-
return getDayKey(created) === key;
|
|
26704
|
-
});
|
|
26705
|
-
dayEntries.push({ date: date5, key, incidents: dayIncidents });
|
|
26706
|
-
}
|
|
26707
|
-
const hasAnyIncidents = incidents.length > 0;
|
|
26708
|
-
const containerStyle = {
|
|
26709
|
-
fontFamily: "var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",
|
|
26710
|
-
...style
|
|
26711
|
-
};
|
|
26712
|
-
return (0, import_jsx_runtime51.jsxs)("div", { style: containerStyle, className, children: [(0, import_jsx_runtime51.jsxs)("div", { style: { marginBottom: "24px" }, children: [(0, import_jsx_runtime51.jsxs)("div", { style: {
|
|
26713
|
-
display: "flex",
|
|
26714
|
-
alignItems: "center",
|
|
26715
|
-
justifyContent: "space-between",
|
|
26716
|
-
marginBottom: "8px"
|
|
26717
|
-
}, children: [(0, import_jsx_runtime51.jsxs)("span", { style: {
|
|
26718
|
-
fontSize: "var(--ggui-font-size-sm, 14px)",
|
|
26719
|
-
fontWeight: 500,
|
|
26720
|
-
color: "var(--ggui-color-onSurface, #18181b)"
|
|
26721
|
-
}, children: [days, "-Day History"] }), !hasAnyIncidents && (0, import_jsx_runtime51.jsxs)("span", { style: {
|
|
26722
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
26723
|
-
color: "var(--ggui-color-success-600, #16a34a)",
|
|
26724
|
-
display: "flex",
|
|
26725
|
-
alignItems: "center",
|
|
26726
|
-
gap: "4px"
|
|
26727
|
-
}, children: [(0, import_jsx_runtime51.jsx)(DaySquare, { severity: null }), emptyText] })] }), (0, import_jsx_runtime51.jsx)("div", { style: {
|
|
26728
|
-
display: "flex",
|
|
26729
|
-
gap: "3px",
|
|
26730
|
-
flexDirection: "row-reverse",
|
|
26731
|
-
justifyContent: "flex-end"
|
|
26732
|
-
}, children: dayEntries.map((entry) => {
|
|
26733
|
-
const severity = getWorstSeverity(entry.incidents);
|
|
26734
|
-
return (0, import_jsx_runtime51.jsx)("div", { title: `${formatDate(entry.date)}: ${entry.incidents.length === 0 ? "No incidents" : `${entry.incidents.length} incident(s)`}`, children: (0, import_jsx_runtime51.jsx)(DaySquare, { severity }) }, entry.key);
|
|
26735
|
-
}) }), (0, import_jsx_runtime51.jsxs)("div", { style: {
|
|
26736
|
-
display: "flex",
|
|
26737
|
-
justifyContent: "space-between",
|
|
26738
|
-
marginTop: "4px",
|
|
26739
|
-
fontSize: "10px",
|
|
26740
|
-
color: "var(--ggui-color-outline, #d4d4d8)"
|
|
26741
|
-
}, children: [(0, import_jsx_runtime51.jsx)("span", { children: formatDate(dayEntries[dayEntries.length - 1]?.date ?? now) }), (0, import_jsx_runtime51.jsx)("span", { children: "Today" })] })] }), hasAnyIncidents && (0, import_jsx_runtime51.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: dayEntries.filter((e) => e.incidents.length > 0).map((entry) => (0, import_jsx_runtime51.jsxs)("div", { children: [(0, import_jsx_runtime51.jsx)("div", { style: {
|
|
26742
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
26743
|
-
fontWeight: 500,
|
|
26744
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26745
|
-
marginBottom: "8px",
|
|
26746
|
-
textTransform: "uppercase",
|
|
26747
|
-
letterSpacing: "0.05em"
|
|
26748
|
-
}, children: formatDate(entry.date) }), (0, import_jsx_runtime51.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: entry.incidents.map((incident) => (0, import_jsx_runtime51.jsx)(IncidentCard, { incident, compact }, incident.id)) })] }, entry.key)) })] });
|
|
26749
|
-
}
|
|
26750
|
-
|
|
26751
|
-
// ../design/dist/compositions/MakeTabLayout.js
|
|
26752
|
-
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
26753
|
-
function MakeTabLayout({ chat, canvas, chatWidth = "400px", style, className }) {
|
|
26754
|
-
return (0, import_jsx_runtime52.jsxs)("div", { className, style: {
|
|
26755
|
-
display: "flex",
|
|
26756
|
-
height: "100%",
|
|
26757
|
-
minHeight: 0,
|
|
26758
|
-
...style
|
|
26759
|
-
}, children: [(0, import_jsx_runtime52.jsx)("div", { style: {
|
|
26760
|
-
width: chatWidth,
|
|
26761
|
-
minWidth: "320px",
|
|
26762
|
-
maxWidth: "50%",
|
|
26763
|
-
flexShrink: 0,
|
|
26764
|
-
borderRight: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
26765
|
-
display: "flex",
|
|
26766
|
-
flexDirection: "column",
|
|
26767
|
-
overflow: "hidden"
|
|
26768
|
-
}, children: chat }), (0, import_jsx_runtime52.jsx)("div", { style: {
|
|
26769
|
-
flex: 1,
|
|
26770
|
-
minWidth: 0,
|
|
26771
|
-
display: "flex",
|
|
26772
|
-
flexDirection: "column",
|
|
26773
|
-
overflow: "hidden"
|
|
26774
|
-
}, children: canvas })] });
|
|
26775
|
-
}
|
|
26776
|
-
|
|
26777
|
-
// ../design/dist/compositions/marketing/Hero.js
|
|
26778
|
-
var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
|
|
26779
|
-
function MarketingHero({ headline, subheadline, primaryAction, secondaryAction, variant = "default", media, style, className }) {
|
|
26780
|
-
const backgroundStyles = {
|
|
26781
|
-
default: {
|
|
26782
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)"
|
|
26783
|
-
},
|
|
26784
|
-
gradient: {
|
|
26785
|
-
background: "linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"
|
|
26786
|
-
},
|
|
26787
|
-
pattern: {
|
|
26788
|
-
backgroundColor: "var(--ggui-color-primary-900, #0c4a6e)",
|
|
26789
|
-
backgroundImage: "radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%)"
|
|
26790
|
-
}
|
|
26791
|
-
};
|
|
26792
|
-
const isPatternVariant = variant === "pattern";
|
|
26793
|
-
return (0, import_jsx_runtime53.jsx)("section", { className, style: {
|
|
26794
|
-
position: "relative",
|
|
26795
|
-
overflow: "hidden",
|
|
26796
|
-
...backgroundStyles[variant],
|
|
26797
|
-
...style
|
|
26798
|
-
}, children: (0, import_jsx_runtime53.jsxs)("div", { style: {
|
|
26799
|
-
maxWidth: "1280px",
|
|
26800
|
-
margin: "0 auto",
|
|
26801
|
-
padding: "96px 24px",
|
|
26802
|
-
display: "flex",
|
|
26803
|
-
alignItems: "center",
|
|
26804
|
-
gap: "64px",
|
|
26805
|
-
flexWrap: "wrap"
|
|
26806
|
-
}, children: [(0, import_jsx_runtime53.jsxs)("div", { style: { flex: "1 1 480px", minWidth: 0 }, children: [(0, import_jsx_runtime53.jsx)("h1", { style: {
|
|
26807
|
-
fontSize: "var(--ggui-font-size-5xl, 48px)",
|
|
26808
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
26809
|
-
lineHeight: 1.1,
|
|
26810
|
-
letterSpacing: "-0.025em",
|
|
26811
|
-
color: isPatternVariant ? "#ffffff" : "var(--ggui-color-onSurface, #18181b)",
|
|
26812
|
-
margin: "0 0 24px 0"
|
|
26813
|
-
}, children: headline }), subheadline && (0, import_jsx_runtime53.jsx)("p", { style: {
|
|
26814
|
-
fontSize: "var(--ggui-font-size-xl, 20px)",
|
|
26815
|
-
lineHeight: 1.6,
|
|
26816
|
-
color: isPatternVariant ? "rgba(255, 255, 255, 0.85)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26817
|
-
margin: "0 0 40px 0",
|
|
26818
|
-
maxWidth: "560px"
|
|
26819
|
-
}, children: subheadline }), (primaryAction || secondaryAction) && (0, import_jsx_runtime53.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "16px" }, children: [primaryAction && (0, import_jsx_runtime53.jsx)(ActionButton, { action: primaryAction, variant: "primary", dark: isPatternVariant }), secondaryAction && (0, import_jsx_runtime53.jsx)(ActionButton, { action: secondaryAction, variant: "secondary", dark: isPatternVariant })] })] }), media && (0, import_jsx_runtime53.jsx)("div", { style: {
|
|
26820
|
-
flex: "1 1 400px",
|
|
26821
|
-
display: "flex",
|
|
26822
|
-
justifyContent: "center",
|
|
26823
|
-
alignItems: "center",
|
|
26824
|
-
minWidth: 0
|
|
26825
|
-
}, children: media })] }) });
|
|
26826
|
-
}
|
|
26827
|
-
function ActionButton({ action, variant, dark }) {
|
|
26828
|
-
const isPrimary = variant === "primary";
|
|
26829
|
-
const baseStyles = {
|
|
26830
|
-
display: "inline-flex",
|
|
26831
|
-
alignItems: "center",
|
|
26832
|
-
justifyContent: "center",
|
|
26833
|
-
padding: "14px 32px",
|
|
26834
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
26835
|
-
fontWeight: 600,
|
|
26836
|
-
borderRadius: "var(--ggui-shape-radius-lg, 12px)",
|
|
26837
|
-
cursor: "pointer",
|
|
26838
|
-
transition: "all 0.2s ease",
|
|
26839
|
-
textDecoration: "none",
|
|
26840
|
-
border: "none",
|
|
26841
|
-
lineHeight: "1.5"
|
|
26842
|
-
};
|
|
26843
|
-
const primaryStyles = dark ? {
|
|
26844
|
-
backgroundColor: "#ffffff",
|
|
26845
|
-
color: "var(--ggui-color-primary-900, #0c4a6e)"
|
|
26846
|
-
} : {
|
|
26847
|
-
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
26848
|
-
color: "#ffffff"
|
|
26849
|
-
};
|
|
26850
|
-
const secondaryStyles = dark ? {
|
|
26851
|
-
backgroundColor: "transparent",
|
|
26852
|
-
color: "#ffffff",
|
|
26853
|
-
border: "2px solid rgba(255, 255, 255, 0.3)"
|
|
26854
|
-
} : {
|
|
26855
|
-
backgroundColor: "transparent",
|
|
26856
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
26857
|
-
border: "2px solid var(--ggui-color-outline, #d4d4d8)"
|
|
26858
|
-
};
|
|
26859
|
-
const combined = {
|
|
26860
|
-
...baseStyles,
|
|
26861
|
-
...isPrimary ? primaryStyles : secondaryStyles
|
|
26862
|
-
};
|
|
26863
|
-
if (action.href) {
|
|
26864
|
-
return (0, import_jsx_runtime53.jsx)("a", { href: action.href, onClick: action.onClick, style: combined, role: "button", children: action.label });
|
|
26865
|
-
}
|
|
26866
|
-
return (0, import_jsx_runtime53.jsx)("button", { type: "button", onClick: action.onClick, style: combined, children: action.label });
|
|
26867
|
-
}
|
|
26868
|
-
|
|
26869
|
-
// ../design/dist/compositions/marketing/Features.js
|
|
26870
|
-
var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
|
|
26871
|
-
function MarketingFeatures({ heading, subheading, features, columns = 3, style, className }) {
|
|
26872
|
-
return (0, import_jsx_runtime54.jsxs)("section", { className, style: {
|
|
26873
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)",
|
|
26874
|
-
...style
|
|
26875
|
-
}, children: [(0, import_jsx_runtime54.jsxs)("div", { style: {
|
|
26876
|
-
maxWidth: "1280px",
|
|
26877
|
-
margin: "0 auto",
|
|
26878
|
-
padding: "80px 24px"
|
|
26879
|
-
}, children: [(heading || subheading) && (0, import_jsx_runtime54.jsxs)("div", { style: { textAlign: "center", marginBottom: "64px" }, children: [heading && (0, import_jsx_runtime54.jsx)("h2", { style: {
|
|
26880
|
-
fontSize: "var(--ggui-font-size-3xl, 30px)",
|
|
26881
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
26882
|
-
lineHeight: 1.2,
|
|
26883
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
26884
|
-
margin: "0 0 16px 0"
|
|
26885
|
-
}, children: heading }), subheading && (0, import_jsx_runtime54.jsx)("p", { style: {
|
|
26886
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
26887
|
-
lineHeight: 1.6,
|
|
26888
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26889
|
-
margin: 0,
|
|
26890
|
-
maxWidth: "640px",
|
|
26891
|
-
marginLeft: "auto",
|
|
26892
|
-
marginRight: "auto"
|
|
26893
|
-
}, children: subheading })] }), (0, import_jsx_runtime54.jsx)("div", { className: "ggui-features-grid", style: {
|
|
26894
|
-
display: "grid",
|
|
26895
|
-
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
26896
|
-
gap: "32px"
|
|
26897
|
-
}, children: features.map((feature, index) => (0, import_jsx_runtime54.jsx)(FeatureCard, { feature }, index)) })] }), (0, import_jsx_runtime54.jsx)("style", { children: `
|
|
26898
|
-
@media (max-width: 768px) {
|
|
26899
|
-
.ggui-features-grid {
|
|
26900
|
-
grid-template-columns: 1fr !important;
|
|
26901
|
-
}
|
|
26902
|
-
}
|
|
26903
|
-
` })] });
|
|
26904
|
-
}
|
|
26905
|
-
function FeatureCard({ feature }) {
|
|
26906
|
-
return (0, import_jsx_runtime54.jsxs)("div", { style: {
|
|
26907
|
-
padding: "var(--ggui-spacing-6, 24px)",
|
|
26908
|
-
borderRadius: "var(--ggui-shape-radius-xl, 16px)",
|
|
26909
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)",
|
|
26910
|
-
border: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
26911
|
-
transition: "box-shadow 0.2s ease, transform 0.2s ease",
|
|
26912
|
-
cursor: "default"
|
|
26913
|
-
}, onMouseEnter: (e) => {
|
|
26914
|
-
e.currentTarget.style.boxShadow = "var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))";
|
|
26915
|
-
e.currentTarget.style.transform = "translateY(-2px)";
|
|
26916
|
-
}, onMouseLeave: (e) => {
|
|
26917
|
-
e.currentTarget.style.boxShadow = "none";
|
|
26918
|
-
e.currentTarget.style.transform = "translateY(0)";
|
|
26919
|
-
}, children: [feature.icon && (0, import_jsx_runtime54.jsx)("div", { style: {
|
|
26920
|
-
fontSize: "32px",
|
|
26921
|
-
marginBottom: "var(--ggui-spacing-4, 16px)",
|
|
26922
|
-
lineHeight: 1
|
|
26923
|
-
}, children: feature.icon }), (0, import_jsx_runtime54.jsx)("h3", { style: {
|
|
26924
|
-
fontSize: "var(--ggui-font-size-xl, 20px)",
|
|
26925
|
-
fontWeight: "var(--ggui-font-weight-semibold, 600)",
|
|
26926
|
-
lineHeight: 1.3,
|
|
26927
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
26928
|
-
margin: "0 0 8px 0"
|
|
26929
|
-
}, children: feature.title }), (0, import_jsx_runtime54.jsx)("p", { style: {
|
|
26930
|
-
fontSize: "var(--ggui-font-size-base, 16px)",
|
|
26931
|
-
lineHeight: 1.6,
|
|
26932
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26933
|
-
margin: 0
|
|
26934
|
-
}, children: feature.description })] });
|
|
26935
|
-
}
|
|
26936
|
-
|
|
26937
|
-
// ../design/dist/compositions/marketing/CallToAction.js
|
|
26938
|
-
var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
|
|
26939
|
-
function MarketingCTA({ headline, description, action, variant = "filled", style, className }) {
|
|
26940
|
-
const isFilled = variant === "filled";
|
|
26941
|
-
return (0, import_jsx_runtime55.jsx)("section", { className, style: {
|
|
26942
|
-
backgroundColor: isFilled ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-surface, #ffffff)",
|
|
26943
|
-
...isFilled ? {} : {
|
|
26944
|
-
borderTop: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
26945
|
-
borderBottom: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)"
|
|
26946
|
-
},
|
|
26947
|
-
...style
|
|
26948
|
-
}, children: (0, import_jsx_runtime55.jsxs)("div", { style: {
|
|
26949
|
-
maxWidth: "800px",
|
|
26950
|
-
margin: "0 auto",
|
|
26951
|
-
padding: "80px 24px",
|
|
26952
|
-
textAlign: "center"
|
|
26953
|
-
}, children: [(0, import_jsx_runtime55.jsx)("h2", { style: {
|
|
26954
|
-
fontSize: "var(--ggui-font-size-3xl, 30px)",
|
|
26955
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
26956
|
-
lineHeight: 1.2,
|
|
26957
|
-
color: isFilled ? "#ffffff" : "var(--ggui-color-onSurface, #18181b)",
|
|
26958
|
-
margin: "0 0 16px 0"
|
|
26959
|
-
}, children: headline }), description && (0, import_jsx_runtime55.jsx)("p", { style: {
|
|
26960
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
26961
|
-
lineHeight: 1.6,
|
|
26962
|
-
color: isFilled ? "rgba(255, 255, 255, 0.85)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
26963
|
-
margin: "0 0 32px 0",
|
|
26964
|
-
maxWidth: "560px",
|
|
26965
|
-
marginLeft: "auto",
|
|
26966
|
-
marginRight: "auto"
|
|
26967
|
-
}, children: description }), (0, import_jsx_runtime55.jsx)(CTAButton, { action, filled: isFilled })] }) });
|
|
26968
|
-
}
|
|
26969
|
-
function CTAButton({ action, filled }) {
|
|
26970
|
-
const styles = {
|
|
26971
|
-
display: "inline-flex",
|
|
26972
|
-
alignItems: "center",
|
|
26973
|
-
justifyContent: "center",
|
|
26974
|
-
padding: "14px 36px",
|
|
26975
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
26976
|
-
fontWeight: 600,
|
|
26977
|
-
borderRadius: "var(--ggui-shape-radius-lg, 12px)",
|
|
26978
|
-
cursor: "pointer",
|
|
26979
|
-
transition: "all 0.2s ease",
|
|
26980
|
-
textDecoration: "none",
|
|
26981
|
-
border: "none",
|
|
26982
|
-
lineHeight: "1.5",
|
|
26983
|
-
...filled ? {
|
|
26984
|
-
backgroundColor: "#ffffff",
|
|
26985
|
-
color: "var(--ggui-color-primary-700, #0369a1)"
|
|
26986
|
-
} : {
|
|
26987
|
-
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
26988
|
-
color: "#ffffff"
|
|
26989
|
-
}
|
|
26990
|
-
};
|
|
26991
|
-
if (action.href) {
|
|
26992
|
-
return (0, import_jsx_runtime55.jsx)("a", { href: action.href, onClick: action.onClick, style: styles, role: "button", children: action.label });
|
|
26993
|
-
}
|
|
26994
|
-
return (0, import_jsx_runtime55.jsx)("button", { type: "button", onClick: action.onClick, style: styles, children: action.label });
|
|
26995
|
-
}
|
|
26996
|
-
|
|
26997
26545
|
// ../design/dist/interact/index.js
|
|
26998
26546
|
var interact_exports = {};
|
|
26999
26547
|
__export(interact_exports, {
|
|
@@ -27003,11 +26551,11 @@
|
|
|
27003
26551
|
});
|
|
27004
26552
|
|
|
27005
26553
|
// ../design/dist/interact/Clickable.js
|
|
27006
|
-
var
|
|
27007
|
-
var
|
|
27008
|
-
var Clickable = (0,
|
|
27009
|
-
const [hovered, setHovered] = (0,
|
|
27010
|
-
const [active, setActive] = (0,
|
|
26554
|
+
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
26555
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
26556
|
+
var Clickable = (0, import_react30.forwardRef)(function Clickable2({ children, onClick, onDoubleClick, hoverStyle, activeStyle, cursor, transition: transition2 = "all 200ms ease", disabled = false, role, "aria-label": ariaLabel, tabIndex, style, className, ...rest }, ref) {
|
|
26557
|
+
const [hovered, setHovered] = (0, import_react30.useState)(false);
|
|
26558
|
+
const [active, setActive] = (0, import_react30.useState)(false);
|
|
27011
26559
|
const hasClick = !!onClick;
|
|
27012
26560
|
const resolvedCursor = disabled ? "not-allowed" : cursor ?? (hasClick ? "pointer" : void 0);
|
|
27013
26561
|
const resolvedRole = role ?? (hasClick ? "button" : void 0);
|
|
@@ -27028,23 +26576,23 @@
|
|
|
27028
26576
|
...hovered && !disabled ? hoverStyle : {},
|
|
27029
26577
|
...active && !disabled ? activeStyle : {}
|
|
27030
26578
|
};
|
|
27031
|
-
return (0,
|
|
26579
|
+
return (0, import_jsx_runtime51.jsx)("div", { ref, className, style: mergedStyle, onClick: disabled ? void 0 : onClick, onDoubleClick: disabled ? void 0 : onDoubleClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => {
|
|
27032
26580
|
setHovered(false);
|
|
27033
26581
|
setActive(false);
|
|
27034
26582
|
}, onMouseDown: () => setActive(true), onMouseUp: () => setActive(false), onKeyDown: handleKeyDown, role: resolvedRole, "aria-label": ariaLabel, "aria-disabled": disabled || void 0, tabIndex: resolvedTabIndex, ...rest, children });
|
|
27035
26583
|
});
|
|
27036
26584
|
|
|
27037
26585
|
// ../design/dist/interact/Hoverable.js
|
|
27038
|
-
var
|
|
27039
|
-
var
|
|
27040
|
-
var Hoverable = (0,
|
|
27041
|
-
const [hovered, setHovered] = (0,
|
|
26586
|
+
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
26587
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
26588
|
+
var Hoverable = (0, import_react31.forwardRef)(function Hoverable2({ children, hoverStyle, onHoverChange, transition: transition2 = "all 200ms ease", style, className, ...rest }, ref) {
|
|
26589
|
+
const [hovered, setHovered] = (0, import_react31.useState)(false);
|
|
27042
26590
|
const mergedStyle = {
|
|
27043
26591
|
...style,
|
|
27044
26592
|
transition: transition2,
|
|
27045
26593
|
...hovered ? hoverStyle : {}
|
|
27046
26594
|
};
|
|
27047
|
-
return (0,
|
|
26595
|
+
return (0, import_jsx_runtime52.jsx)("div", { ref, className, style: mergedStyle, onMouseEnter: () => {
|
|
27048
26596
|
setHovered(true);
|
|
27049
26597
|
onHoverChange?.(true);
|
|
27050
26598
|
}, onMouseLeave: () => {
|
|
@@ -27054,12 +26602,12 @@
|
|
|
27054
26602
|
});
|
|
27055
26603
|
|
|
27056
26604
|
// ../design/dist/interact/Pressable.js
|
|
27057
|
-
var
|
|
27058
|
-
var
|
|
27059
|
-
var Pressable = (0,
|
|
27060
|
-
const [hovered, setHovered] = (0,
|
|
27061
|
-
const [pressed, setPressed] = (0,
|
|
27062
|
-
const [longPressTimer, setLongPressTimer] = (0,
|
|
26605
|
+
var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
|
|
26606
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
26607
|
+
var Pressable = (0, import_react32.forwardRef)(function Pressable2({ children, onPress, onLongPress, longPressDelay = 500, hoverStyle, pressStyle, disabled = false, transition: transition2 = "all 150ms ease", role, "aria-label": ariaLabel, tabIndex, style, className, ...rest }, ref) {
|
|
26608
|
+
const [hovered, setHovered] = (0, import_react32.useState)(false);
|
|
26609
|
+
const [pressed, setPressed] = (0, import_react32.useState)(false);
|
|
26610
|
+
const [longPressTimer, setLongPressTimer] = (0, import_react32.useState)(null);
|
|
27063
26611
|
const hasPress = !!onPress || !!onLongPress;
|
|
27064
26612
|
const handleMouseDown = (e) => {
|
|
27065
26613
|
if (disabled)
|
|
@@ -27102,7 +26650,7 @@
|
|
|
27102
26650
|
...pressed && !disabled ? pressStyle : {}
|
|
27103
26651
|
};
|
|
27104
26652
|
const content = typeof children === "function" ? children({ pressed, hovered }) : children;
|
|
27105
|
-
return (0,
|
|
26653
|
+
return (0, import_jsx_runtime53.jsx)("div", { ref, className, style: mergedStyle, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseEnter: () => setHovered(true), onMouseLeave: () => {
|
|
27106
26654
|
setHovered(false);
|
|
27107
26655
|
setPressed(false);
|
|
27108
26656
|
if (longPressTimer)
|
|
@@ -27134,13 +26682,13 @@
|
|
|
27134
26682
|
});
|
|
27135
26683
|
|
|
27136
26684
|
// ../wire/dist/WireProvider.js
|
|
27137
|
-
var
|
|
26685
|
+
var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
|
|
27138
26686
|
|
|
27139
26687
|
// ../wire/dist/context.js
|
|
27140
|
-
var
|
|
27141
|
-
var WireContext = (0,
|
|
26688
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
26689
|
+
var WireContext = (0, import_react33.createContext)(null);
|
|
27142
26690
|
function useWireContext() {
|
|
27143
|
-
const ctx = (0,
|
|
26691
|
+
const ctx = (0, import_react33.useContext)(WireContext);
|
|
27144
26692
|
if (!ctx) {
|
|
27145
26693
|
throw new Error("useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.");
|
|
27146
26694
|
}
|
|
@@ -27149,11 +26697,11 @@
|
|
|
27149
26697
|
|
|
27150
26698
|
// ../wire/dist/WireProvider.js
|
|
27151
26699
|
function GguiWireProvider({ config: config2, children }) {
|
|
27152
|
-
return (0,
|
|
26700
|
+
return (0, import_jsx_runtime54.jsx)(WireContext.Provider, { value: config2, children });
|
|
27153
26701
|
}
|
|
27154
26702
|
|
|
27155
26703
|
// ../wire/dist/useAction.js
|
|
27156
|
-
var
|
|
26704
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
27157
26705
|
|
|
27158
26706
|
// ../wire/dist/dispatch-dedup.js
|
|
27159
26707
|
var pendingDispatches = /* @__PURE__ */ new Set();
|
|
@@ -27187,7 +26735,7 @@
|
|
|
27187
26735
|
// ../wire/dist/useAction.js
|
|
27188
26736
|
function useAction(actionName) {
|
|
27189
26737
|
const { dispatch, onDispatchSuppressed } = useWireContext();
|
|
27190
|
-
return (0,
|
|
26738
|
+
return (0, import_react34.useCallback)((data) => {
|
|
27191
26739
|
const decision = tryAcceptDispatch(actionName, data);
|
|
27192
26740
|
if (decision.suppressed) {
|
|
27193
26741
|
console.warn(`[ggui] useAction('${actionName}') suppressed a duplicate dispatch (same name + payload, same event-loop task). This usually means two interactive elements nest and both wire to the same action (e.g. a Checkbox onChange inside a Card as={Clickable} onClick); the inner gesture bubbles to the outer handler so one user click would fire the action twice. Wire each useAction callback to exactly ONE interactive surface. Tier-0 'double-wired-action' warns on this at gen time; this runtime defense ensures the user-visible behavior stays correct regardless of code shape.`);
|
|
@@ -27210,7 +26758,7 @@
|
|
|
27210
26758
|
}
|
|
27211
26759
|
|
|
27212
26760
|
// ../wire/dist/useGguiContext.js
|
|
27213
|
-
var
|
|
26761
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
27214
26762
|
function useGguiContext(slotName) {
|
|
27215
26763
|
const contextName = slotName.length === 0 ? "Context" : slotName.charAt(0).toUpperCase() + slotName.slice(1) + "Context";
|
|
27216
26764
|
const registry2 = globalThis.__ggui__?.contexts;
|
|
@@ -27218,19 +26766,19 @@
|
|
|
27218
26766
|
if (!ctx) {
|
|
27219
26767
|
throw new Error(`[ggui] useGguiContext('${slotName}'): no Context registered. The contract must declare 'contextSpec.${slotName}' AND the runtime must have synthesized the per-slot React Context at boot. If you see this in production code generated by the LLM, the boilerplate's destructure line drifted from the contract.`);
|
|
27220
26768
|
}
|
|
27221
|
-
return (0,
|
|
26769
|
+
return (0, import_react35.useContext)(ctx);
|
|
27222
26770
|
}
|
|
27223
26771
|
|
|
27224
26772
|
// ../wire/dist/useStream.js
|
|
27225
|
-
var
|
|
26773
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
27226
26774
|
function useStream(channelName) {
|
|
27227
26775
|
const { subscribe } = useWireContext();
|
|
27228
|
-
const [latest, setLatest] = (0,
|
|
27229
|
-
const [all, setAll] = (0,
|
|
27230
|
-
const [isComplete, setIsComplete] = (0,
|
|
27231
|
-
const allRef = (0,
|
|
26776
|
+
const [latest, setLatest] = (0, import_react36.useState)(null);
|
|
26777
|
+
const [all, setAll] = (0, import_react36.useState)([]);
|
|
26778
|
+
const [isComplete, setIsComplete] = (0, import_react36.useState)(false);
|
|
26779
|
+
const allRef = (0, import_react36.useRef)(all);
|
|
27232
26780
|
allRef.current = all;
|
|
27233
|
-
(0,
|
|
26781
|
+
(0, import_react36.useEffect)(() => {
|
|
27234
26782
|
return subscribe(channelName, (delivery) => {
|
|
27235
26783
|
const typed = delivery.payload;
|
|
27236
26784
|
setLatest(typed);
|
|
@@ -41055,7 +40603,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41055
40603
|
|
|
41056
40604
|
// ../protocol/dist/gadgets/stdlib-gadgets.js
|
|
41057
40605
|
var STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
|
|
41058
|
-
var STDLIB_GADGETS_VERSION = "0.
|
|
40606
|
+
var STDLIB_GADGETS_VERSION = "0.5.0-rc.0";
|
|
41059
40607
|
var STDLIB_GADGETS = [
|
|
41060
40608
|
{
|
|
41061
40609
|
package: STDLIB_GADGETS_PACKAGE,
|
|
@@ -41668,6 +41216,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41668
41216
|
kind: external_exports.enum(["full-template", "cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),
|
|
41669
41217
|
reason: external_exports.string().optional().describe("Compact human-readable explanation of the cache outcome \u2014 why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.")
|
|
41670
41218
|
});
|
|
41219
|
+
var renderErrorCodeSchema = external_exports.enum([
|
|
41220
|
+
"PRODUCTION_FAILED",
|
|
41221
|
+
"VALIDATION_ERROR",
|
|
41222
|
+
"NO_PLATFORM_KEY",
|
|
41223
|
+
"NO_CREDENTIALS"
|
|
41224
|
+
]);
|
|
41225
|
+
var renderErrorSchema = external_exports.object({
|
|
41226
|
+
code: renderErrorCodeSchema.describe("Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server."),
|
|
41227
|
+
message: external_exports.string().describe("Human-readable failure detail \u2014 fold into the next attempt or surface to the operator.")
|
|
41228
|
+
});
|
|
41671
41229
|
var renderOutputSchema = external_exports.object({
|
|
41672
41230
|
sessionId: external_exports.string(),
|
|
41673
41231
|
/**
|
|
@@ -41677,13 +41235,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41677
41235
|
* tool_results (OpenAI Agents SDK, Google ADK) reach the mount URI;
|
|
41678
41236
|
* SDKs that preserve `_meta` see the same value on both fields.
|
|
41679
41237
|
* Mirrors the `resourceUri` field on `ggui_update`'s output.
|
|
41238
|
+
*
|
|
41239
|
+
* OPTIONAL — present iff the render is mountable. Absent on the
|
|
41240
|
+
* failure envelope (`error` present): a failed render commits an
|
|
41241
|
+
* error GguiSession but exposes no mount affordance.
|
|
41680
41242
|
*/
|
|
41681
|
-
resourceUri: external_exports.string(),
|
|
41243
|
+
resourceUri: external_exports.string().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),
|
|
41682
41244
|
action: external_exports.enum(["create", "reuse", "update", "replace", "declined"]),
|
|
41683
41245
|
contractHash: external_exports.string().describe("Canonical hash of the rendered data contract (shape only \u2014 fields, types, specs). Same hash \u27FA same data flow."),
|
|
41684
41246
|
blueprintId: external_exports.string().describe("Opaque id of the materialised component for this render. On the handshake-decided reuse paths (accept a cache-origin proposal, or a variance re-aim that resolves to an existing variant) it is the stored id \u2014 equal ids across renders mean the same stored component. override.contract always generates cold and mints a fresh id, even for an identical contract."),
|
|
41685
41247
|
variantKey: external_exports.string().describe("Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own."),
|
|
41686
41248
|
cache: renderCacheMarkerSchema.describe("Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided."),
|
|
41249
|
+
/**
|
|
41250
|
+
* In-result failure marker — present iff the tool result is
|
|
41251
|
+
* `isError: true`. The structuredContent stays schema-conformant on
|
|
41252
|
+
* failures; this field carries the canonical `{code, message}`
|
|
41253
|
+
* classification. Absent on every successful render.
|
|
41254
|
+
*/
|
|
41255
|
+
error: renderErrorSchema.optional().describe("Present iff the tool result is isError \u2014 canonical {code, message} for a failed/rejected generation. Absent on success."),
|
|
41687
41256
|
/**
|
|
41688
41257
|
* Wire-shape recovery hint for the next call. Emitted ONLY when the
|
|
41689
41258
|
* rendered contract has a non-empty `actionSpec` — i.e. the agent will
|
|
@@ -41719,7 +41288,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
41719
41288
|
]);
|
|
41720
41289
|
var updateOutputSchema = external_exports.object({
|
|
41721
41290
|
sessionId: external_exports.string(),
|
|
41722
|
-
updated: external_exports.boolean()
|
|
41291
|
+
updated: external_exports.boolean(),
|
|
41292
|
+
/**
|
|
41293
|
+
* Unchanged from the initial render — the same `ui://ggui/render/{id}`
|
|
41294
|
+
* URI the mount stamped. Mirrored on the LLM-visible structuredContent
|
|
41295
|
+
* so SDKs that strip `_meta` from tool_results can still reach the
|
|
41296
|
+
* mount URI. Kept in sync with the update handler's wire shape —
|
|
41297
|
+
* this export and the handler's inline schema must not drift.
|
|
41298
|
+
*/
|
|
41299
|
+
resourceUri: external_exports.string()
|
|
41723
41300
|
});
|
|
41724
41301
|
var declareToolCatalogInputSchema = external_exports.object({
|
|
41725
41302
|
toolCatalog: external_exports.record(external_exports.string(), external_exports.object({ name: external_exports.string(), version: external_exports.string().optional() }).strict()).describe("Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.")
|
|
@@ -45237,9 +44814,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
45237
44814
|
};
|
|
45238
44815
|
|
|
45239
44816
|
// ../design/dist/themes/ThemeProvider.js
|
|
45240
|
-
var
|
|
45241
|
-
var
|
|
45242
|
-
var ThemeContext = (0,
|
|
44817
|
+
var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
|
|
44818
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
44819
|
+
var ThemeContext = (0, import_react37.createContext)(null);
|
|
45243
44820
|
|
|
45244
44821
|
// ../design/dist/rendering/rewrite-imports.js
|
|
45245
44822
|
var WIRE_EXPORTS = [
|
|
@@ -45304,7 +44881,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
45304
44881
|
"Breadcrumb",
|
|
45305
44882
|
"Pagination",
|
|
45306
44883
|
"EmptyState",
|
|
45307
|
-
"Stat"
|
|
44884
|
+
"Stat",
|
|
44885
|
+
"Stepper"
|
|
45308
44886
|
];
|
|
45309
44887
|
var COMPOSITIONS_EXPORTS = [
|
|
45310
44888
|
"Header",
|
|
@@ -45315,17 +44893,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
45315
44893
|
"ChatWindow",
|
|
45316
44894
|
"NavigationBar",
|
|
45317
44895
|
"FileUploader",
|
|
45318
|
-
"UserProfileCard",
|
|
45319
44896
|
"NotificationCenter",
|
|
45320
44897
|
"Modal",
|
|
45321
44898
|
"CommandPalette",
|
|
45322
44899
|
"Footer",
|
|
45323
|
-
"Hero"
|
|
45324
|
-
"IncidentTimeline",
|
|
45325
|
-
"MakeTabLayout",
|
|
45326
|
-
"MarketingHero",
|
|
45327
|
-
"MarketingCTA",
|
|
45328
|
-
"MarketingFeatures"
|
|
44900
|
+
"Hero"
|
|
45329
44901
|
];
|
|
45330
44902
|
var INTERACT_EXPORTS = [
|
|
45331
44903
|
"Clickable",
|
|
@@ -45404,7 +44976,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
45404
44976
|
"lineHeight",
|
|
45405
44977
|
"letterSpacing",
|
|
45406
44978
|
"headingStyles",
|
|
45407
|
-
"textStyles",
|
|
45408
44979
|
// Layout / shape
|
|
45409
44980
|
"spacing",
|
|
45410
44981
|
"spacingValues",
|