@ggui-ai/dev-stack 0.4.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/dist/hub-preview/client.js +250 -696
- package/package.json +7 -7
|
@@ -32833,7 +32833,7 @@ config(en_default());
|
|
|
32833
32833
|
|
|
32834
32834
|
// ../protocol/dist/gadgets/stdlib-gadgets.js
|
|
32835
32835
|
var STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
|
|
32836
|
-
var STDLIB_GADGETS_VERSION = "0.
|
|
32836
|
+
var STDLIB_GADGETS_VERSION = "0.5.0-rc.0";
|
|
32837
32837
|
var STDLIB_GADGETS = [
|
|
32838
32838
|
{
|
|
32839
32839
|
package: STDLIB_GADGETS_PACKAGE,
|
|
@@ -34676,17 +34676,17 @@ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
|
34676
34676
|
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
34677
34677
|
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
34678
34678
|
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
34679
|
-
var import_react36 = __toESM(require_react(), 1);
|
|
34680
34679
|
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
34680
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
34681
34681
|
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
34682
|
-
var import_react37 = __toESM(require_react(), 1);
|
|
34683
34682
|
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
34683
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
34684
34684
|
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
34685
|
-
var import_react38 = __toESM(require_react(), 1);
|
|
34686
34685
|
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
34686
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
34687
34687
|
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
34688
|
-
var import_react39 = __toESM(require_react(), 1);
|
|
34689
34688
|
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
34689
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
34690
34690
|
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
34691
34691
|
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
34692
34692
|
var import_react40 = __toESM(require_react(), 1);
|
|
@@ -34697,32 +34697,28 @@ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
|
|
|
34697
34697
|
var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
|
|
34698
34698
|
var import_react42 = __toESM(require_react(), 1);
|
|
34699
34699
|
var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
|
|
34700
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
34700
34701
|
var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
|
|
34702
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
34701
34703
|
var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
|
|
34704
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
34702
34705
|
var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
|
|
34706
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
34703
34707
|
var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
|
|
34704
|
-
var
|
|
34708
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
34705
34709
|
var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
|
|
34706
|
-
var import_react44 = __toESM(require_react(), 1);
|
|
34707
34710
|
var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
|
|
34708
|
-
var import_react45 = __toESM(require_react(), 1);
|
|
34709
34711
|
var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
|
|
34710
|
-
var import_react46 = __toESM(require_react(), 1);
|
|
34711
|
-
var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
34712
|
-
var import_react47 = __toESM(require_react(), 1);
|
|
34713
|
-
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
34714
34712
|
var import_react48 = __toESM(require_react(), 1);
|
|
34715
|
-
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
|
|
34716
|
-
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
34717
|
-
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
34718
34713
|
var import_react49 = __toESM(require_react(), 1);
|
|
34714
|
+
var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
34715
|
+
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
34719
34716
|
var import_react50 = __toESM(require_react(), 1);
|
|
34720
|
-
var
|
|
34721
|
-
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
34717
|
+
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
|
|
34722
34718
|
var import_react51 = __toESM(require_react(), 1);
|
|
34723
|
-
var
|
|
34719
|
+
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
34724
34720
|
var import_react52 = __toESM(require_react(), 1);
|
|
34725
|
-
var
|
|
34721
|
+
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
34726
34722
|
var StreamBusContext = (0, import_react11.createContext)(null);
|
|
34727
34723
|
var primitives_exports = {};
|
|
34728
34724
|
__export2(primitives_exports, {
|
|
@@ -35082,6 +35078,55 @@ function Spacer({ size = 16, style, className }) {
|
|
|
35082
35078
|
...style
|
|
35083
35079
|
} });
|
|
35084
35080
|
}
|
|
35081
|
+
var sizeMap = {
|
|
35082
|
+
xs: "var(--ggui-font-size-xs, 12px)",
|
|
35083
|
+
sm: "var(--ggui-font-size-sm, 14px)",
|
|
35084
|
+
base: "var(--ggui-font-size-base, 16px)",
|
|
35085
|
+
lg: "var(--ggui-font-size-lg, 18px)",
|
|
35086
|
+
xl: "var(--ggui-font-size-xl, 20px)",
|
|
35087
|
+
"2xl": "var(--ggui-font-size-2xl, 24px)",
|
|
35088
|
+
"3xl": "var(--ggui-font-size-3xl, 30px)",
|
|
35089
|
+
"4xl": "var(--ggui-font-size-4xl, 36px)"
|
|
35090
|
+
};
|
|
35091
|
+
var weightMap = {
|
|
35092
|
+
normal: "var(--ggui-font-weight-normal, 400)",
|
|
35093
|
+
medium: "var(--ggui-font-weight-medium, 500)",
|
|
35094
|
+
semibold: "var(--ggui-font-weight-semibold, 600)",
|
|
35095
|
+
bold: "var(--ggui-font-weight-bold, 700)"
|
|
35096
|
+
};
|
|
35097
|
+
var lineHeightMap = {
|
|
35098
|
+
xs: 1.5,
|
|
35099
|
+
sm: 1.5,
|
|
35100
|
+
base: 1.5,
|
|
35101
|
+
lg: 1.625,
|
|
35102
|
+
xl: 1.375,
|
|
35103
|
+
"2xl": 1.25,
|
|
35104
|
+
"3xl": 1.25,
|
|
35105
|
+
"4xl": 1.25
|
|
35106
|
+
};
|
|
35107
|
+
function Text({ children, size = "base", weight = "normal", caps = false, tone, align, truncate, is = "p", id, htmlFor, style, className }) {
|
|
35108
|
+
const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
|
|
35109
|
+
const textStyle = {
|
|
35110
|
+
fontSize: sizeMap[size],
|
|
35111
|
+
fontWeight: weightMap[weight],
|
|
35112
|
+
lineHeight: lineHeightMap[size],
|
|
35113
|
+
color: resolvedColor,
|
|
35114
|
+
textAlign: align,
|
|
35115
|
+
margin: 0,
|
|
35116
|
+
...caps && {
|
|
35117
|
+
textTransform: "uppercase",
|
|
35118
|
+
letterSpacing: "0.05em"
|
|
35119
|
+
},
|
|
35120
|
+
...truncate && {
|
|
35121
|
+
overflow: "hidden",
|
|
35122
|
+
textOverflow: "ellipsis",
|
|
35123
|
+
whiteSpace: "nowrap"
|
|
35124
|
+
},
|
|
35125
|
+
...style
|
|
35126
|
+
};
|
|
35127
|
+
const elementProps = { id, htmlFor, className, style: textStyle };
|
|
35128
|
+
return (0, import_react15.createElement)(is, elementProps, children);
|
|
35129
|
+
}
|
|
35085
35130
|
var fontSize = {
|
|
35086
35131
|
xs: "12px",
|
|
35087
35132
|
sm: "14px",
|
|
@@ -35159,76 +35204,6 @@ var headingStyles = {
|
|
|
35159
35204
|
letterSpacing: letterSpacing.normal
|
|
35160
35205
|
}
|
|
35161
35206
|
};
|
|
35162
|
-
var textStyles = {
|
|
35163
|
-
body: {
|
|
35164
|
-
fontSize: fontSize.base,
|
|
35165
|
-
fontWeight: fontWeight.normal,
|
|
35166
|
-
lineHeight: lineHeight.normal
|
|
35167
|
-
},
|
|
35168
|
-
bodySmall: {
|
|
35169
|
-
fontSize: fontSize.sm,
|
|
35170
|
-
fontWeight: fontWeight.normal,
|
|
35171
|
-
lineHeight: lineHeight.normal
|
|
35172
|
-
},
|
|
35173
|
-
bodyLarge: {
|
|
35174
|
-
fontSize: fontSize.lg,
|
|
35175
|
-
fontWeight: fontWeight.normal,
|
|
35176
|
-
lineHeight: lineHeight.relaxed
|
|
35177
|
-
},
|
|
35178
|
-
caption: {
|
|
35179
|
-
fontSize: fontSize.xs,
|
|
35180
|
-
fontWeight: fontWeight.normal,
|
|
35181
|
-
lineHeight: lineHeight.normal
|
|
35182
|
-
},
|
|
35183
|
-
label: {
|
|
35184
|
-
fontSize: fontSize.sm,
|
|
35185
|
-
fontWeight: fontWeight.medium,
|
|
35186
|
-
lineHeight: lineHeight.normal
|
|
35187
|
-
},
|
|
35188
|
-
overline: {
|
|
35189
|
-
fontSize: fontSize.xs,
|
|
35190
|
-
fontWeight: fontWeight.semibold,
|
|
35191
|
-
lineHeight: lineHeight.normal,
|
|
35192
|
-
letterSpacing: letterSpacing.wider,
|
|
35193
|
-
textTransform: "uppercase"
|
|
35194
|
-
}
|
|
35195
|
-
};
|
|
35196
|
-
var sizeMap = {
|
|
35197
|
-
xs: "var(--ggui-font-size-xs, 12px)",
|
|
35198
|
-
sm: "var(--ggui-font-size-sm, 14px)",
|
|
35199
|
-
base: "var(--ggui-font-size-base, 16px)",
|
|
35200
|
-
lg: "var(--ggui-font-size-lg, 18px)",
|
|
35201
|
-
xl: "var(--ggui-font-size-xl, 20px)",
|
|
35202
|
-
"2xl": "var(--ggui-font-size-2xl, 24px)",
|
|
35203
|
-
"3xl": "var(--ggui-font-size-3xl, 30px)",
|
|
35204
|
-
"4xl": "var(--ggui-font-size-4xl, 36px)"
|
|
35205
|
-
};
|
|
35206
|
-
var weightMap = {
|
|
35207
|
-
normal: "var(--ggui-font-weight-normal, 400)",
|
|
35208
|
-
medium: "var(--ggui-font-weight-medium, 500)",
|
|
35209
|
-
semibold: "var(--ggui-font-weight-semibold, 600)",
|
|
35210
|
-
bold: "var(--ggui-font-weight-bold, 700)"
|
|
35211
|
-
};
|
|
35212
|
-
function Text({ children, variant = "body", size, weight, tone, align, truncate, is = "p", id, htmlFor, style, className }) {
|
|
35213
|
-
const variantStyle = textStyles[variant] || textStyles.body;
|
|
35214
|
-
const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
|
|
35215
|
-
const textStyle = {
|
|
35216
|
-
...variantStyle,
|
|
35217
|
-
fontSize: size ? sizeMap[size] || size : void 0,
|
|
35218
|
-
fontWeight: weight ? weightMap[weight] : void 0,
|
|
35219
|
-
color: resolvedColor,
|
|
35220
|
-
textAlign: align,
|
|
35221
|
-
margin: 0,
|
|
35222
|
-
...truncate && {
|
|
35223
|
-
overflow: "hidden",
|
|
35224
|
-
textOverflow: "ellipsis",
|
|
35225
|
-
whiteSpace: "nowrap"
|
|
35226
|
-
},
|
|
35227
|
-
...style
|
|
35228
|
-
};
|
|
35229
|
-
const elementProps = { id, htmlFor, className, style: textStyle };
|
|
35230
|
-
return (0, import_react15.createElement)(is, elementProps, children);
|
|
35231
|
-
}
|
|
35232
35207
|
function Heading({ children, level = 2, tone, align, style, className }) {
|
|
35233
35208
|
const tag = `h${level}`;
|
|
35234
35209
|
const headingStyle = headingStyles[tag] || headingStyles.h2;
|
|
@@ -40572,6 +40547,7 @@ __export2(components_exports, {
|
|
|
40572
40547
|
Pagination: () => Pagination,
|
|
40573
40548
|
SearchField: () => SearchField,
|
|
40574
40549
|
Stat: () => Stat,
|
|
40550
|
+
Stepper: () => Stepper,
|
|
40575
40551
|
Tag: () => Tag
|
|
40576
40552
|
});
|
|
40577
40553
|
var primary = {
|
|
@@ -41093,7 +41069,76 @@ function EmptyState({ icon, title, description, action, style, className }) {
|
|
|
41093
41069
|
}
|
|
41094
41070
|
function Stat({ label, value, delta, trend = "neutral", icon, style, className }) {
|
|
41095
41071
|
const deltaTone = trend === "up" ? "success" : trend === "down" ? "error" : "muted";
|
|
41096
|
-
return (0, import_jsx_runtime40.jsxs)(Stack, { gap: "xs", className, style, children: [(0, import_jsx_runtime40.jsxs)(Row, { gap: "xs", align: "center", children: [icon !== void 0 && (typeof icon === "string" ? (0, import_jsx_runtime40.jsx)(Icon, { name: icon, size: 16, tone: "muted" }) : icon), (0, import_jsx_runtime40.jsx)(Text, {
|
|
41072
|
+
return (0, import_jsx_runtime40.jsxs)(Stack, { gap: "xs", className, style, children: [(0, import_jsx_runtime40.jsxs)(Row, { gap: "xs", align: "center", children: [icon !== void 0 && (typeof icon === "string" ? (0, import_jsx_runtime40.jsx)(Icon, { name: icon, size: 16, tone: "muted" }) : icon), (0, import_jsx_runtime40.jsx)(Text, { size: "xs", weight: "semibold", caps: true, tone: "muted", children: label })] }), (0, import_jsx_runtime40.jsxs)(Row, { gap: "sm", align: "end", children: [(0, import_jsx_runtime40.jsx)(Text, { size: "3xl", weight: "bold", children: value }), delta !== void 0 && (0, import_jsx_runtime40.jsx)(Text, { size: "sm", weight: "semibold", tone: deltaTone, children: delta })] })] });
|
|
41073
|
+
}
|
|
41074
|
+
var MARKER_SIZE = 28;
|
|
41075
|
+
function stepState(index, current) {
|
|
41076
|
+
if (index < current)
|
|
41077
|
+
return "completed";
|
|
41078
|
+
if (index === current)
|
|
41079
|
+
return "current";
|
|
41080
|
+
return "upcoming";
|
|
41081
|
+
}
|
|
41082
|
+
var markerStyles = {
|
|
41083
|
+
completed: {
|
|
41084
|
+
backgroundColor: "var(--ggui-color-primary-100, #e0f2fe)",
|
|
41085
|
+
border: "1px solid var(--ggui-color-primary-300, #7dd3fc)",
|
|
41086
|
+
color: "var(--ggui-color-primary-700, #0369a1)"
|
|
41087
|
+
},
|
|
41088
|
+
current: {
|
|
41089
|
+
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
41090
|
+
border: "1px solid var(--ggui-color-primary-600, #0284c7)",
|
|
41091
|
+
color: "var(--ggui-color-onPrimary, #ffffff)"
|
|
41092
|
+
},
|
|
41093
|
+
upcoming: {
|
|
41094
|
+
backgroundColor: "var(--ggui-color-surface, #fafafa)",
|
|
41095
|
+
border: "1px solid var(--ggui-color-outline, #d4d4d8)",
|
|
41096
|
+
color: "var(--ggui-color-onSurfaceVariant, #52525b)"
|
|
41097
|
+
}
|
|
41098
|
+
};
|
|
41099
|
+
function Marker({ index, state }) {
|
|
41100
|
+
return (0, import_jsx_runtime41.jsx)("span", { "aria-hidden": "true", style: {
|
|
41101
|
+
width: MARKER_SIZE,
|
|
41102
|
+
height: MARKER_SIZE,
|
|
41103
|
+
borderRadius: "50%",
|
|
41104
|
+
display: "inline-flex",
|
|
41105
|
+
alignItems: "center",
|
|
41106
|
+
justifyContent: "center",
|
|
41107
|
+
flexShrink: 0,
|
|
41108
|
+
boxSizing: "border-box",
|
|
41109
|
+
transition: "background-color 0.2s, border-color 0.2s, color 0.2s",
|
|
41110
|
+
...markerStyles[state]
|
|
41111
|
+
}, children: state === "completed" ? (0, import_jsx_runtime41.jsx)(Icon, { name: "check", size: 16, tone: "inherit" }) : (0, import_jsx_runtime41.jsx)(Text, { is: "span", size: "sm", weight: "semibold", tone: "inherit", children: index + 1 }) });
|
|
41112
|
+
}
|
|
41113
|
+
function StepLabel({ label, state }) {
|
|
41114
|
+
return (0, import_jsx_runtime41.jsx)(Text, { is: "span", size: "sm", weight: state === "current" ? "semibold" : "normal", tone: state === "upcoming" ? "muted" : "default", children: label });
|
|
41115
|
+
}
|
|
41116
|
+
function Stepper({ steps, current, orientation = "horizontal", onStepClick, style, className }) {
|
|
41117
|
+
const renderStep = (label, index) => {
|
|
41118
|
+
const state = stepState(index, current);
|
|
41119
|
+
const content = (0, import_jsx_runtime41.jsxs)(Row, { gap: "sm", align: "center", children: [(0, import_jsx_runtime41.jsx)(Marker, { index, state }), (0, import_jsx_runtime41.jsx)(StepLabel, { label, state })] });
|
|
41120
|
+
if (onStepClick === void 0) {
|
|
41121
|
+
return (0, import_jsx_runtime41.jsx)("span", { "aria-current": state === "current" ? "step" : void 0, children: content });
|
|
41122
|
+
}
|
|
41123
|
+
return (0, import_jsx_runtime41.jsx)("button", { type: "button", onClick: () => onStepClick(index), "aria-current": state === "current" ? "step" : void 0, style: {
|
|
41124
|
+
background: "none",
|
|
41125
|
+
border: "none",
|
|
41126
|
+
padding: 0,
|
|
41127
|
+
margin: 0,
|
|
41128
|
+
font: "inherit",
|
|
41129
|
+
textAlign: "inherit",
|
|
41130
|
+
cursor: "pointer"
|
|
41131
|
+
}, children: content });
|
|
41132
|
+
};
|
|
41133
|
+
if (orientation === "vertical") {
|
|
41134
|
+
return (0, import_jsx_runtime41.jsx)("nav", { "aria-label": "Progress", className, style, children: (0, import_jsx_runtime41.jsx)(Stack, { gap: "none", align: "start", children: steps.map((label, index) => (0, import_jsx_runtime41.jsxs)(Stack, { gap: "none", align: "start", children: [index > 0 && (0, import_jsx_runtime41.jsx)("span", { style: {
|
|
41135
|
+
width: MARKER_SIZE,
|
|
41136
|
+
height: 16,
|
|
41137
|
+
display: "inline-flex",
|
|
41138
|
+
justifyContent: "center"
|
|
41139
|
+
}, children: (0, import_jsx_runtime41.jsx)(Divider, { orientation: "vertical", margin: 0 }) }), renderStep(label, index)] }, index)) }) });
|
|
41140
|
+
}
|
|
41141
|
+
return (0, import_jsx_runtime41.jsx)("nav", { "aria-label": "Progress", className, style, children: (0, import_jsx_runtime41.jsx)(Row, { gap: "sm", align: "center", children: steps.map((label, index) => (0, import_jsx_runtime41.jsxs)(Row, { gap: "sm", align: "center", style: index > 0 ? { flex: 1 } : void 0, children: [index > 0 && (0, import_jsx_runtime41.jsx)(Divider, { style: { flex: 1, minWidth: 16, margin: 0 } }), renderStep(label, index)] }, index)) }) });
|
|
41097
41142
|
}
|
|
41098
41143
|
var compositions_exports = {};
|
|
41099
41144
|
__export2(compositions_exports, {
|
|
@@ -41106,19 +41151,13 @@ __export2(compositions_exports, {
|
|
|
41106
41151
|
Footer: () => Footer,
|
|
41107
41152
|
Header: () => Header,
|
|
41108
41153
|
Hero: () => Hero,
|
|
41109
|
-
IncidentTimeline: () => IncidentTimeline,
|
|
41110
|
-
MakeTabLayout: () => MakeTabLayout,
|
|
41111
|
-
MarketingCTA: () => MarketingCTA,
|
|
41112
|
-
MarketingFeatures: () => MarketingFeatures,
|
|
41113
|
-
MarketingHero: () => MarketingHero,
|
|
41114
41154
|
Modal: () => Modal,
|
|
41115
41155
|
NavigationBar: () => NavigationBar,
|
|
41116
41156
|
NotificationCenter: () => NotificationCenter,
|
|
41117
|
-
Sidebar: () => Sidebar
|
|
41118
|
-
UserProfileCard: () => UserProfileCard
|
|
41157
|
+
Sidebar: () => Sidebar
|
|
41119
41158
|
});
|
|
41120
41159
|
function Header({ logo, navigation, actions, sticky = false, background, bordered = true, style, className }) {
|
|
41121
|
-
return (0,
|
|
41160
|
+
return (0, import_jsx_runtime42.jsxs)("header", { className, style: {
|
|
41122
41161
|
display: "flex",
|
|
41123
41162
|
alignItems: "center",
|
|
41124
41163
|
justifyContent: "space-between",
|
|
@@ -41132,7 +41171,7 @@ function Header({ logo, navigation, actions, sticky = false, background, bordere
|
|
|
41132
41171
|
boxShadow: shadow.sm
|
|
41133
41172
|
},
|
|
41134
41173
|
...style
|
|
41135
|
-
}, children: [logo && (0,
|
|
41174
|
+
}, children: [logo && (0, import_jsx_runtime42.jsx)("div", { style: { flexShrink: 0 }, children: logo }), navigation && (0, import_jsx_runtime42.jsx)("nav", { style: { display: "flex", alignItems: "center", flex: 1, marginLeft: "32px" }, children: navigation }), actions && (0, import_jsx_runtime42.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "12px", flexShrink: 0 }, children: actions })] });
|
|
41136
41175
|
}
|
|
41137
41176
|
function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
41138
41177
|
const [expanded, setExpanded] = (0, import_react36.useState)(false);
|
|
@@ -41144,7 +41183,7 @@ function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
|
41144
41183
|
}
|
|
41145
41184
|
onItemClick?.(item);
|
|
41146
41185
|
};
|
|
41147
|
-
return (0,
|
|
41186
|
+
return (0, import_jsx_runtime43.jsxs)("div", { children: [(0, import_jsx_runtime43.jsxs)("button", { onClick: handleClick, disabled: item.disabled, style: {
|
|
41148
41187
|
display: "flex",
|
|
41149
41188
|
alignItems: "center",
|
|
41150
41189
|
gap: "12px",
|
|
@@ -41161,11 +41200,11 @@ function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
|
41161
41200
|
cursor: item.disabled ? "not-allowed" : "pointer",
|
|
41162
41201
|
transition: "all 0.15s",
|
|
41163
41202
|
justifyContent: collapsed ? "center" : "flex-start"
|
|
41164
|
-
}, children: [item.icon && (0,
|
|
41203
|
+
}, children: [item.icon && (0, import_jsx_runtime43.jsx)("span", { style: { display: "flex", flexShrink: 0 }, children: item.icon }), !collapsed && (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [(0, import_jsx_runtime43.jsx)("span", { style: { flex: 1 }, children: item.label }), item.badge && (0, import_jsx_runtime43.jsx)("span", { children: item.badge }), hasChildren && (0, import_jsx_runtime43.jsx)(Icon, { name: expanded ? "chevron-down" : "chevron-right", size: 14, tone: "subtle" })] })] }), hasChildren && expanded && !collapsed && (0, import_jsx_runtime43.jsx)("div", { style: { marginTop: "4px" }, children: item.children.map((child) => (0, import_jsx_runtime43.jsx)(SidebarItem, { item: child, activeId, onItemClick, collapsed, depth: depth + 1 }, child.id)) })] });
|
|
41165
41204
|
}
|
|
41166
41205
|
function Sidebar({ items, activeId, onItemClick, collapsed = false, header, footer, width = 256, collapsedWidth = 64, style, className }) {
|
|
41167
41206
|
const currentWidth = collapsed ? collapsedWidth : width;
|
|
41168
|
-
return (0,
|
|
41207
|
+
return (0, import_jsx_runtime43.jsxs)("aside", { className, style: {
|
|
41169
41208
|
width: currentWidth,
|
|
41170
41209
|
minWidth: currentWidth,
|
|
41171
41210
|
height: "100%",
|
|
@@ -41176,15 +41215,15 @@ function Sidebar({ items, activeId, onItemClick, collapsed = false, header, foot
|
|
|
41176
41215
|
transition: "width 0.2s",
|
|
41177
41216
|
overflow: "hidden",
|
|
41178
41217
|
...style
|
|
41179
|
-
}, children: [header && (0,
|
|
41218
|
+
}, children: [header && (0, import_jsx_runtime43.jsx)("div", { style: {
|
|
41180
41219
|
padding: collapsed ? "16px 8px" : "16px",
|
|
41181
41220
|
borderBottom: `1px solid ${colors.gray[200]}`
|
|
41182
|
-
}, children: header }), (0,
|
|
41221
|
+
}, children: header }), (0, import_jsx_runtime43.jsx)("nav", { style: {
|
|
41183
41222
|
flex: 1,
|
|
41184
41223
|
padding: "8px",
|
|
41185
41224
|
overflowY: "auto",
|
|
41186
41225
|
overflowX: "hidden"
|
|
41187
|
-
}, children: (0,
|
|
41226
|
+
}, children: (0, import_jsx_runtime43.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: items.map((item) => (0, import_jsx_runtime43.jsx)(SidebarItem, { item, activeId, onItemClick, collapsed }, item.id)) }) }), footer && (0, import_jsx_runtime43.jsx)("div", { style: {
|
|
41188
41227
|
padding: collapsed ? "16px 8px" : "16px",
|
|
41189
41228
|
borderTop: `1px solid ${colors.gray[200]}`
|
|
41190
41229
|
}, children: footer })] });
|
|
@@ -41196,7 +41235,7 @@ function CardGrid({ children, columns = 3, gap = 16, style, className }) {
|
|
|
41196
41235
|
}
|
|
41197
41236
|
return `repeat(auto-fit, minmax(280px, 1fr))`;
|
|
41198
41237
|
};
|
|
41199
|
-
return (0,
|
|
41238
|
+
return (0, import_jsx_runtime44.jsx)("div", { className, style: {
|
|
41200
41239
|
display: "grid",
|
|
41201
41240
|
gridTemplateColumns: getGridColumns(),
|
|
41202
41241
|
gap: `${gap}px`,
|
|
@@ -41214,20 +41253,20 @@ function CommentItem({ comment, onReply, onReaction, depth = 0 }) {
|
|
|
41214
41253
|
}
|
|
41215
41254
|
};
|
|
41216
41255
|
const timestamp = comment.timestamp instanceof Date ? comment.timestamp.toLocaleString() : comment.timestamp;
|
|
41217
|
-
return (0,
|
|
41256
|
+
return (0, import_jsx_runtime45.jsxs)("div", { style: { marginLeft: depth > 0 ? "40px" : 0 }, children: [(0, import_jsx_runtime45.jsxs)("div", { style: { display: "flex", gap: "12px" }, children: [(0, import_jsx_runtime45.jsx)(Avatar, { name: comment.author.name, src: comment.author.avatar, size: "sm" }), (0, import_jsx_runtime45.jsxs)("div", { style: { flex: 1 }, children: [(0, import_jsx_runtime45.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [(0, import_jsx_runtime45.jsx)("span", { style: { fontWeight: 500, fontSize: fontSize.sm }, children: comment.author.name }), (0, import_jsx_runtime45.jsx)("span", { style: { color: colors.gray[500], fontSize: fontSize.xs }, children: timestamp })] }), (0, import_jsx_runtime45.jsx)("p", { style: { margin: "4px 0 8px", fontSize: fontSize.sm, color: colors.gray[700] }, children: comment.content }), (0, import_jsx_runtime45.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [comment.reactions?.map((reaction) => (0, import_jsx_runtime45.jsxs)("button", { onClick: () => onReaction?.(comment.id, reaction.emoji), style: {
|
|
41218
41257
|
padding: "2px 8px",
|
|
41219
41258
|
border: `1px solid ${colors.gray[200]}`,
|
|
41220
41259
|
borderRadius: "12px",
|
|
41221
41260
|
backgroundColor: colors.gray[50],
|
|
41222
41261
|
fontSize: fontSize.xs,
|
|
41223
41262
|
cursor: "pointer"
|
|
41224
|
-
}, children: [reaction.emoji, " ", reaction.count] }, reaction.emoji)), (0,
|
|
41263
|
+
}, children: [reaction.emoji, " ", reaction.count] }, reaction.emoji)), (0, import_jsx_runtime45.jsx)("button", { onClick: () => setShowReplyInput(!showReplyInput), style: {
|
|
41225
41264
|
background: "none",
|
|
41226
41265
|
border: "none",
|
|
41227
41266
|
color: colors.gray[500],
|
|
41228
41267
|
fontSize: fontSize.xs,
|
|
41229
41268
|
cursor: "pointer"
|
|
41230
|
-
}, children: "Reply" })] }), showReplyInput && (0,
|
|
41269
|
+
}, children: "Reply" })] }), showReplyInput && (0, import_jsx_runtime45.jsxs)("div", { style: { marginTop: "12px" }, children: [(0, import_jsx_runtime45.jsx)(TextArea, { value: replyContent, onChange: setReplyContent, placeholder: "Write a reply...", rows: 2 }), (0, import_jsx_runtime45.jsxs)("div", { style: { display: "flex", gap: "8px", marginTop: "8px" }, children: [(0, import_jsx_runtime45.jsx)(Button, { size: "sm", onClick: handleSubmitReply, children: "Reply" }), (0, import_jsx_runtime45.jsx)(Button, { size: "sm", variant: "ghost", onClick: () => setShowReplyInput(false), children: "Cancel" })] })] })] })] }), comment.replies?.map((reply) => (0, import_jsx_runtime45.jsx)("div", { style: { marginTop: "16px" }, children: (0, import_jsx_runtime45.jsx)(CommentItem, { comment: reply, onReply, onReaction, depth: depth + 1 }) }, reply.id))] });
|
|
41231
41270
|
}
|
|
41232
41271
|
function CommentThread({ comments, currentUser, onAddComment, onReply, onReaction, loading, style, className }) {
|
|
41233
41272
|
const [newComment, setNewComment] = (0, import_react37.useState)("");
|
|
@@ -41237,7 +41276,7 @@ function CommentThread({ comments, currentUser, onAddComment, onReply, onReactio
|
|
|
41237
41276
|
setNewComment("");
|
|
41238
41277
|
}
|
|
41239
41278
|
};
|
|
41240
|
-
return (0,
|
|
41279
|
+
return (0, import_jsx_runtime45.jsxs)("div", { className, style: { ...style }, children: [currentUser && (0, import_jsx_runtime45.jsxs)("div", { style: { display: "flex", gap: "12px", marginBottom: "24px" }, children: [(0, import_jsx_runtime45.jsx)(Avatar, { name: currentUser.name, src: currentUser.avatar, size: "sm" }), (0, import_jsx_runtime45.jsxs)("div", { style: { flex: 1 }, children: [(0, import_jsx_runtime45.jsx)(TextArea, { value: newComment, onChange: setNewComment, placeholder: "Write a comment...", rows: 3 }), (0, import_jsx_runtime45.jsx)("div", { style: { marginTop: "8px", display: "flex", justifyContent: "flex-end" }, children: (0, import_jsx_runtime45.jsx)(Button, { onClick: handleSubmit, disabled: !newComment.trim(), children: "Comment" }) })] })] }), loading ? (0, import_jsx_runtime45.jsx)("div", { style: { display: "flex", justifyContent: "center", padding: "24px" }, children: (0, import_jsx_runtime45.jsx)(Spinner, { size: 24 }) }) : (0, import_jsx_runtime45.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: comments.map((comment) => (0, import_jsx_runtime45.jsx)(CommentItem, { comment, onReply, onReaction }, comment.id)) })] });
|
|
41241
41280
|
}
|
|
41242
41281
|
function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data", onSort, sortKey, sortDirection, onRowClick, selectable, selectedKeys = [], onSelectionChange, style, className }) {
|
|
41243
41282
|
const getRowKey = (row, index) => {
|
|
@@ -41262,16 +41301,16 @@ function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data
|
|
|
41262
41301
|
};
|
|
41263
41302
|
const allSelected = data.length > 0 && selectedKeys.length === data.length;
|
|
41264
41303
|
const someSelected = selectedKeys.length > 0 && selectedKeys.length < data.length;
|
|
41265
|
-
return (0,
|
|
41304
|
+
return (0, import_jsx_runtime46.jsx)("div", { className, style: {
|
|
41266
41305
|
border: `1px solid ${colors.gray[200]}`,
|
|
41267
41306
|
borderRadius: "8px",
|
|
41268
41307
|
overflow: "hidden",
|
|
41269
41308
|
...style
|
|
41270
|
-
}, children: (0,
|
|
41309
|
+
}, children: (0, import_jsx_runtime46.jsxs)("table", { style: {
|
|
41271
41310
|
width: "100%",
|
|
41272
41311
|
borderCollapse: "collapse",
|
|
41273
41312
|
fontSize: fontSize.sm
|
|
41274
|
-
}, children: [(0,
|
|
41313
|
+
}, children: [(0, import_jsx_runtime46.jsx)("thead", { children: (0, import_jsx_runtime46.jsxs)("tr", { style: { backgroundColor: colors.gray[50] }, children: [selectable && (0, import_jsx_runtime46.jsx)("th", { style: { width: "40px", padding: "12px" }, children: (0, import_jsx_runtime46.jsx)(Checkbox, { checked: allSelected, indeterminate: someSelected, onChange: handleSelectAll }) }), columns.map((col) => (0, import_jsx_runtime46.jsx)("th", { style: {
|
|
41275
41314
|
padding: "12px 16px",
|
|
41276
41315
|
textAlign: col.align || "left",
|
|
41277
41316
|
fontWeight: fontWeight.semibold,
|
|
@@ -41279,14 +41318,14 @@ function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data
|
|
|
41279
41318
|
borderBottom: `1px solid ${colors.gray[200]}`,
|
|
41280
41319
|
cursor: col.sortable ? "pointer" : void 0,
|
|
41281
41320
|
width: col.width
|
|
41282
|
-
}, onClick: () => col.sortable && onSort?.(col.key, sortKey === col.key && sortDirection === "asc" ? "desc" : "asc"), children: (0,
|
|
41321
|
+
}, onClick: () => col.sortable && onSort?.(col.key, sortKey === col.key && sortDirection === "asc" ? "desc" : "asc"), children: (0, import_jsx_runtime46.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [col.header, col.sortable && sortKey === col.key && (0, import_jsx_runtime46.jsx)(Icon, { name: sortDirection === "asc" ? "chevron-up" : "chevron-down", size: 14 })] }) }, col.key))] }) }), (0, import_jsx_runtime46.jsx)("tbody", { children: loading ? (0, import_jsx_runtime46.jsx)("tr", { children: (0, import_jsx_runtime46.jsx)("td", { colSpan: columns.length + (selectable ? 1 : 0), style: { padding: "48px", textAlign: "center" }, children: (0, import_jsx_runtime46.jsx)(Spinner, { size: 24 }) }) }) : data.length === 0 ? (0, import_jsx_runtime46.jsx)("tr", { children: (0, import_jsx_runtime46.jsx)("td", { colSpan: columns.length + (selectable ? 1 : 0), style: { padding: "48px", textAlign: "center", color: colors.gray[500] }, children: emptyText }) }) : data.map((row, index) => {
|
|
41283
41322
|
const key = getRowKey(row, index);
|
|
41284
41323
|
const isSelected = selectedKeys.includes(key);
|
|
41285
|
-
return (0,
|
|
41324
|
+
return (0, import_jsx_runtime46.jsxs)("tr", { onClick: () => onRowClick?.(row, index), style: {
|
|
41286
41325
|
backgroundColor: isSelected ? colors.primary[50] : void 0,
|
|
41287
41326
|
cursor: onRowClick ? "pointer" : void 0,
|
|
41288
41327
|
transition: "background-color 0.15s"
|
|
41289
|
-
}, children: [selectable && (0,
|
|
41328
|
+
}, children: [selectable && (0, import_jsx_runtime46.jsx)("td", { style: { padding: "12px" }, children: (0, import_jsx_runtime46.jsx)(Checkbox, { checked: isSelected, onChange: (checked) => handleSelectRow(key, checked) }) }), columns.map((col) => (0, import_jsx_runtime46.jsx)("td", { style: {
|
|
41290
41329
|
padding: "12px 16px",
|
|
41291
41330
|
textAlign: col.align || "left",
|
|
41292
41331
|
color: colors.gray[900],
|
|
@@ -41312,7 +41351,7 @@ function ChatWindow({ messages, currentUserId, onSendMessage, loading, typing, p
|
|
|
41312
41351
|
handleSend();
|
|
41313
41352
|
}
|
|
41314
41353
|
};
|
|
41315
|
-
return (0,
|
|
41354
|
+
return (0, import_jsx_runtime47.jsxs)("div", { className, style: {
|
|
41316
41355
|
display: "flex",
|
|
41317
41356
|
flexDirection: "column",
|
|
41318
41357
|
height: "100%",
|
|
@@ -41321,51 +41360,51 @@ function ChatWindow({ messages, currentUserId, onSendMessage, loading, typing, p
|
|
|
41321
41360
|
backgroundColor: colors.white,
|
|
41322
41361
|
overflow: "hidden",
|
|
41323
41362
|
...style
|
|
41324
|
-
}, children: [header && (0,
|
|
41363
|
+
}, children: [header && (0, import_jsx_runtime47.jsx)("div", { style: {
|
|
41325
41364
|
padding: "12px 16px",
|
|
41326
41365
|
borderBottom: `1px solid ${colors.gray[200]}`
|
|
41327
|
-
}, children: header }), (0,
|
|
41366
|
+
}, children: header }), (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41328
41367
|
flex: 1,
|
|
41329
41368
|
padding: "16px",
|
|
41330
41369
|
overflowY: "auto",
|
|
41331
41370
|
display: "flex",
|
|
41332
41371
|
flexDirection: "column",
|
|
41333
41372
|
gap: "12px"
|
|
41334
|
-
}, children: [loading ? (0,
|
|
41373
|
+
}, children: [loading ? (0, import_jsx_runtime47.jsx)("div", { style: { display: "flex", justifyContent: "center", padding: "24px" }, children: (0, import_jsx_runtime47.jsx)(Spinner, { size: 24 }) }) : messages.map((message) => {
|
|
41335
41374
|
const isOwn = message.sender.id === currentUserId;
|
|
41336
41375
|
const timestamp = message.timestamp instanceof Date ? message.timestamp.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : message.timestamp;
|
|
41337
|
-
return (0,
|
|
41376
|
+
return (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41338
41377
|
display: "flex",
|
|
41339
41378
|
flexDirection: isOwn ? "row-reverse" : "row",
|
|
41340
41379
|
alignItems: "flex-end",
|
|
41341
41380
|
gap: "8px"
|
|
41342
|
-
}, children: [!isOwn && (0,
|
|
41381
|
+
}, children: [!isOwn && (0, import_jsx_runtime47.jsx)(Avatar, { name: message.sender.name, src: message.sender.avatar, size: "xs" }), (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41343
41382
|
maxWidth: "70%",
|
|
41344
41383
|
padding: "10px 14px",
|
|
41345
41384
|
borderRadius: radius.lg,
|
|
41346
41385
|
backgroundColor: isOwn ? colors.primary[600] : colors.gray[100],
|
|
41347
41386
|
color: isOwn ? colors.white : colors.gray[900]
|
|
41348
|
-
}, children: [(0,
|
|
41387
|
+
}, children: [(0, import_jsx_runtime47.jsx)("p", { style: { margin: 0, fontSize: fontSize.sm }, children: message.content }), (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41349
41388
|
display: "flex",
|
|
41350
41389
|
alignItems: "center",
|
|
41351
41390
|
gap: "4px",
|
|
41352
41391
|
marginTop: "4px",
|
|
41353
41392
|
fontSize: fontSize.xs,
|
|
41354
41393
|
opacity: 0.7
|
|
41355
|
-
}, children: [(0,
|
|
41356
|
-
}), typing && (0,
|
|
41394
|
+
}, children: [(0, import_jsx_runtime47.jsx)("span", { children: timestamp }), isOwn && message.status && (0, import_jsx_runtime47.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);
|
|
41395
|
+
}), typing && (0, import_jsx_runtime47.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: (0, import_jsx_runtime47.jsxs)("span", { style: { fontSize: fontSize.xs, color: colors.gray[500] }, children: [typing.name, " is typing..."] }) }), (0, import_jsx_runtime47.jsx)("div", { ref: messagesEndRef })] }), (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41357
41396
|
padding: "12px 16px",
|
|
41358
41397
|
borderTop: `1px solid ${colors.gray[200]}`,
|
|
41359
41398
|
display: "flex",
|
|
41360
41399
|
gap: "8px"
|
|
41361
|
-
}, children: [(0,
|
|
41400
|
+
}, children: [(0, import_jsx_runtime47.jsx)("input", { type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder, style: {
|
|
41362
41401
|
flex: 1,
|
|
41363
41402
|
padding: "10px 14px",
|
|
41364
41403
|
border: `1px solid ${colors.gray[300]}`,
|
|
41365
41404
|
borderRadius: radius.full,
|
|
41366
41405
|
fontSize: fontSize.sm,
|
|
41367
41406
|
outline: "none"
|
|
41368
|
-
} }), (0,
|
|
41407
|
+
} }), (0, import_jsx_runtime47.jsx)(Button, { onClick: handleSend, disabled: !inputValue.trim(), children: (0, import_jsx_runtime47.jsx)(Icon, { name: "chevron-right", size: 18 }) })] })] });
|
|
41369
41408
|
}
|
|
41370
41409
|
function NavigationBar({ items, activeId, onItemClick, orientation = "horizontal", variant = "default", style, className }) {
|
|
41371
41410
|
const renderItem = (item) => {
|
|
@@ -41407,16 +41446,16 @@ function NavigationBar({ items, activeId, onItemClick, orientation = "horizontal
|
|
|
41407
41446
|
onItemClick?.(item);
|
|
41408
41447
|
}
|
|
41409
41448
|
};
|
|
41410
|
-
const content = (0,
|
|
41449
|
+
const content = (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [item.icon && (0, import_jsx_runtime48.jsx)("span", { style: { display: "flex" }, children: item.icon }), (0, import_jsx_runtime48.jsx)("span", { children: item.label })] });
|
|
41411
41450
|
if (item.href) {
|
|
41412
|
-
return (0,
|
|
41451
|
+
return (0, import_jsx_runtime48.jsx)("a", { href: item.href, onClick: (e) => {
|
|
41413
41452
|
e.preventDefault();
|
|
41414
41453
|
handleClick();
|
|
41415
41454
|
}, style: { ...baseStyle, ...variantStyles6[variant] }, children: content }, item.id);
|
|
41416
41455
|
}
|
|
41417
|
-
return (0,
|
|
41456
|
+
return (0, import_jsx_runtime48.jsx)("button", { onClick: handleClick, disabled: item.disabled, style: { ...baseStyle, ...variantStyles6[variant] }, children: content }, item.id);
|
|
41418
41457
|
};
|
|
41419
|
-
return (0,
|
|
41458
|
+
return (0, import_jsx_runtime48.jsx)("nav", { className, style: {
|
|
41420
41459
|
display: "flex",
|
|
41421
41460
|
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
41422
41461
|
gap: orientation === "horizontal" ? "4px" : "2px",
|
|
@@ -41465,7 +41504,7 @@ function FileUploader({ files = [], onFilesSelected, onFileRemove, accept, multi
|
|
|
41465
41504
|
const handleDragLeave = () => {
|
|
41466
41505
|
setIsDragOver(false);
|
|
41467
41506
|
};
|
|
41468
|
-
return (0,
|
|
41507
|
+
return (0, import_jsx_runtime49.jsxs)("div", { className, style: { ...style }, children: [(0, import_jsx_runtime49.jsxs)("div", { onClick: () => !disabled && inputRef.current?.click(), onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, style: {
|
|
41469
41508
|
border: `2px dashed ${isDragOver ? colors.primary[400] : colors.gray[300]}`,
|
|
41470
41509
|
borderRadius: radius.lg,
|
|
41471
41510
|
padding: "32px",
|
|
@@ -41474,7 +41513,7 @@ function FileUploader({ files = [], onFilesSelected, onFileRemove, accept, multi
|
|
|
41474
41513
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
41475
41514
|
transition: "all 0.2s",
|
|
41476
41515
|
opacity: disabled ? 0.5 : 1
|
|
41477
|
-
}, children: [(0,
|
|
41516
|
+
}, children: [(0, import_jsx_runtime49.jsx)("input", { ref: inputRef, type: "file", accept, multiple, onChange: (e) => handleFiles(e.target.files), disabled, style: { display: "none" } }), (0, import_jsx_runtime49.jsx)(Icon, { name: "plus", size: 32, tone: "subtle" }), (0, import_jsx_runtime49.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_runtime49.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_runtime49.jsx)("div", { style: { marginTop: "16px", display: "flex", flexDirection: "column", gap: "8px" }, children: files.map((file2) => (0, import_jsx_runtime49.jsxs)("div", { style: {
|
|
41478
41517
|
display: "flex",
|
|
41479
41518
|
alignItems: "center",
|
|
41480
41519
|
gap: "12px",
|
|
@@ -41482,74 +41521,14 @@ function FileUploader({ files = [], onFilesSelected, onFileRemove, accept, multi
|
|
|
41482
41521
|
border: `1px solid ${colors.gray[200]}`,
|
|
41483
41522
|
borderRadius: radius.md,
|
|
41484
41523
|
backgroundColor: colors.white
|
|
41485
|
-
}, children: [(0,
|
|
41524
|
+
}, children: [(0, import_jsx_runtime49.jsx)(Icon, { name: "menu", size: 20, tone: "subtle" }), (0, import_jsx_runtime49.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [(0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41486
41525
|
margin: 0,
|
|
41487
41526
|
fontSize: fontSize.sm,
|
|
41488
41527
|
color: colors.gray[900],
|
|
41489
41528
|
whiteSpace: "nowrap",
|
|
41490
41529
|
overflow: "hidden",
|
|
41491
41530
|
textOverflow: "ellipsis"
|
|
41492
|
-
}, children: file2.name }), (0,
|
|
41493
|
-
}
|
|
41494
|
-
function UserProfileCard({ name, subtitle, avatar, coverImage, bio, stats, actions, compact, style, className }) {
|
|
41495
|
-
if (compact) {
|
|
41496
|
-
return (0, import_jsx_runtime49.jsx)(Card, { className, style: { padding: "16px", ...style }, children: (0, import_jsx_runtime49.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [(0, import_jsx_runtime49.jsx)(Avatar, { name, src: avatar, size: "md" }), (0, import_jsx_runtime49.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [(0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41497
|
-
margin: 0,
|
|
41498
|
-
fontWeight: fontWeight.semibold,
|
|
41499
|
-
color: colors.gray[900],
|
|
41500
|
-
fontSize: fontSize.sm
|
|
41501
|
-
}, children: name }), subtitle && (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41502
|
-
margin: "2px 0 0",
|
|
41503
|
-
color: colors.gray[500],
|
|
41504
|
-
fontSize: fontSize.xs
|
|
41505
|
-
}, children: subtitle })] }), actions] }) });
|
|
41506
|
-
}
|
|
41507
|
-
return (0, import_jsx_runtime49.jsxs)(Card, { className, style: { padding: 0, overflow: "hidden", ...style }, children: [coverImage && (0, import_jsx_runtime49.jsx)("div", { style: {
|
|
41508
|
-
height: "120px",
|
|
41509
|
-
backgroundImage: `url(${coverImage})`,
|
|
41510
|
-
backgroundSize: "cover",
|
|
41511
|
-
backgroundPosition: "center"
|
|
41512
|
-
} }), (0, import_jsx_runtime49.jsxs)("div", { style: {
|
|
41513
|
-
padding: "16px",
|
|
41514
|
-
paddingTop: coverImage ? "0" : "16px",
|
|
41515
|
-
textAlign: "center"
|
|
41516
|
-
}, children: [(0, import_jsx_runtime49.jsx)("div", { style: {
|
|
41517
|
-
marginTop: coverImage ? "-40px" : "0",
|
|
41518
|
-
marginBottom: "12px"
|
|
41519
|
-
}, children: (0, import_jsx_runtime49.jsx)(Avatar, { name, src: avatar, size: "xl", style: {
|
|
41520
|
-
border: `4px solid ${colors.white}`,
|
|
41521
|
-
margin: "0 auto"
|
|
41522
|
-
} }) }), (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41523
|
-
margin: 0,
|
|
41524
|
-
fontWeight: fontWeight.semibold,
|
|
41525
|
-
color: colors.gray[900],
|
|
41526
|
-
fontSize: fontSize.lg
|
|
41527
|
-
}, children: name }), subtitle && (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41528
|
-
margin: "4px 0 0",
|
|
41529
|
-
color: colors.gray[500],
|
|
41530
|
-
fontSize: fontSize.sm
|
|
41531
|
-
}, children: subtitle }), bio && (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41532
|
-
margin: "12px 0 0",
|
|
41533
|
-
color: colors.gray[600],
|
|
41534
|
-
fontSize: fontSize.sm,
|
|
41535
|
-
lineHeight: 1.5
|
|
41536
|
-
}, children: bio }), stats && stats.length > 0 && (0, import_jsx_runtime49.jsx)("div", { style: {
|
|
41537
|
-
display: "flex",
|
|
41538
|
-
justifyContent: "center",
|
|
41539
|
-
gap: "24px",
|
|
41540
|
-
marginTop: "16px",
|
|
41541
|
-
paddingTop: "16px",
|
|
41542
|
-
borderTop: `1px solid ${colors.gray[200]}`
|
|
41543
|
-
}, children: stats.map((stat, index) => (0, import_jsx_runtime49.jsxs)("div", { style: { textAlign: "center" }, children: [(0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41544
|
-
margin: 0,
|
|
41545
|
-
fontWeight: fontWeight.semibold,
|
|
41546
|
-
color: colors.gray[900],
|
|
41547
|
-
fontSize: fontSize.lg
|
|
41548
|
-
}, children: stat.value }), (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41549
|
-
margin: "2px 0 0",
|
|
41550
|
-
color: colors.gray[500],
|
|
41551
|
-
fontSize: fontSize.xs
|
|
41552
|
-
}, children: stat.label })] }, index)) }), actions && (0, import_jsx_runtime49.jsx)("div", { style: { marginTop: "16px", display: "flex", justifyContent: "center", gap: "8px" }, children: actions })] })] });
|
|
41531
|
+
}, children: file2.name }), (0, import_jsx_runtime49.jsxs)("p", { style: { margin: "2px 0 0", fontSize: fontSize.xs, color: colors.gray[500] }, children: [formatFileSize(file2.size), file2.error && (0, import_jsx_runtime49.jsx)("span", { style: { color: colors.error[500], marginLeft: "8px" }, children: file2.error })] }), file2.status === "uploading" && file2.progress !== void 0 && (0, import_jsx_runtime49.jsx)(Progress, { value: file2.progress, size: "sm", style: { marginTop: "8px" } })] }), (0, import_jsx_runtime49.jsx)(Button, { variant: "ghost", size: "sm", onClick: () => onFileRemove?.(file2.id), children: (0, import_jsx_runtime49.jsx)(Icon, { name: "x", size: 16 }) })] }, file2.id)) })] });
|
|
41553
41532
|
}
|
|
41554
41533
|
var variantColors2 = {
|
|
41555
41534
|
info: colors.info[500],
|
|
@@ -42003,434 +41982,15 @@ function Hero({ heading, description, primaryAction, secondaryAction, media, ali
|
|
|
42003
41982
|
...align === "center" && { marginTop: "16px" }
|
|
42004
41983
|
}, children: media })] })] });
|
|
42005
41984
|
}
|
|
42006
|
-
var severityColors = {
|
|
42007
|
-
minor: {
|
|
42008
|
-
bg: "var(--ggui-color-warning-50, #fffbeb)",
|
|
42009
|
-
text: "var(--ggui-color-warning-700, #b45309)",
|
|
42010
|
-
dot: "var(--ggui-color-warning-500, #f59e0b)"
|
|
42011
|
-
},
|
|
42012
|
-
major: {
|
|
42013
|
-
bg: "var(--ggui-color-error-50, #fef2f2)",
|
|
42014
|
-
text: "var(--ggui-color-error-700, #b91c1c)",
|
|
42015
|
-
dot: "var(--ggui-color-error-500, #ef4444)"
|
|
42016
|
-
},
|
|
42017
|
-
critical: {
|
|
42018
|
-
bg: "var(--ggui-color-error-100, #fee2e2)",
|
|
42019
|
-
text: "var(--ggui-color-error-800, #991b1b)",
|
|
42020
|
-
dot: "var(--ggui-color-error-700, #b91c1c)"
|
|
42021
|
-
}
|
|
42022
|
-
};
|
|
42023
|
-
var statusLabels = {
|
|
42024
|
-
investigating: "Investigating",
|
|
42025
|
-
identified: "Identified",
|
|
42026
|
-
monitoring: "Monitoring",
|
|
42027
|
-
resolved: "Resolved"
|
|
42028
|
-
};
|
|
42029
|
-
function getDayKey(date5) {
|
|
42030
|
-
return `${date5.getFullYear()}-${String(date5.getMonth() + 1).padStart(2, "0")}-${String(date5.getDate()).padStart(2, "0")}`;
|
|
42031
|
-
}
|
|
42032
|
-
function formatDate(date5) {
|
|
42033
|
-
return date5.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
42034
|
-
}
|
|
42035
|
-
function formatTime(date5) {
|
|
42036
|
-
return new Date(date5).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" });
|
|
42037
|
-
}
|
|
42038
|
-
function getWorstSeverity(incidents) {
|
|
42039
|
-
if (incidents.some((i) => i.severity === "critical"))
|
|
42040
|
-
return "critical";
|
|
42041
|
-
if (incidents.some((i) => i.severity === "major"))
|
|
42042
|
-
return "major";
|
|
42043
|
-
if (incidents.some((i) => i.severity === "minor"))
|
|
42044
|
-
return "minor";
|
|
42045
|
-
return null;
|
|
42046
|
-
}
|
|
42047
|
-
function DaySquare({ severity }) {
|
|
42048
|
-
const color = severity ? severityColors[severity].dot : "var(--ggui-color-success-500, #22c55e)";
|
|
42049
|
-
const style = {
|
|
42050
|
-
width: "12px",
|
|
42051
|
-
height: "12px",
|
|
42052
|
-
borderRadius: "var(--ggui-shape-radius-sm, 4px)",
|
|
42053
|
-
backgroundColor: color,
|
|
42054
|
-
flexShrink: 0
|
|
42055
|
-
};
|
|
42056
|
-
return (0, import_jsx_runtime55.jsx)("div", { style });
|
|
42057
|
-
}
|
|
42058
|
-
function SeverityBadge({ severity }) {
|
|
42059
|
-
const colors2 = severityColors[severity];
|
|
42060
|
-
const style = {
|
|
42061
|
-
display: "inline-flex",
|
|
42062
|
-
alignItems: "center",
|
|
42063
|
-
gap: "4px",
|
|
42064
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42065
|
-
fontWeight: 500,
|
|
42066
|
-
padding: "2px 8px",
|
|
42067
|
-
borderRadius: "var(--ggui-shape-radius-full, 9999px)",
|
|
42068
|
-
backgroundColor: colors2.bg,
|
|
42069
|
-
color: colors2.text,
|
|
42070
|
-
textTransform: "capitalize"
|
|
42071
|
-
};
|
|
42072
|
-
return (0, import_jsx_runtime55.jsx)("span", { style, children: severity });
|
|
42073
|
-
}
|
|
42074
|
-
function StatusLabel({ status }) {
|
|
42075
|
-
const isResolved = status === "resolved";
|
|
42076
|
-
const style = {
|
|
42077
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42078
|
-
color: isResolved ? "var(--ggui-color-success-600, #16a34a)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42079
|
-
fontWeight: isResolved ? 500 : 400
|
|
42080
|
-
};
|
|
42081
|
-
return (0, import_jsx_runtime55.jsx)("span", { style, children: statusLabels[status] });
|
|
42082
|
-
}
|
|
42083
|
-
function IncidentCard({ incident, compact }) {
|
|
42084
|
-
const [expanded, setExpanded] = (0, import_react42.useState)(false);
|
|
42085
|
-
const cardStyle = {
|
|
42086
|
-
border: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42087
|
-
borderRadius: "var(--ggui-shape-radius-md, 8px)",
|
|
42088
|
-
overflow: "hidden",
|
|
42089
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)"
|
|
42090
|
-
};
|
|
42091
|
-
const headerStyle2 = {
|
|
42092
|
-
display: "flex",
|
|
42093
|
-
alignItems: "center",
|
|
42094
|
-
justifyContent: "space-between",
|
|
42095
|
-
padding: "12px 16px",
|
|
42096
|
-
cursor: compact ? "default" : "pointer",
|
|
42097
|
-
gap: "8px"
|
|
42098
|
-
};
|
|
42099
|
-
const titleStyle = {
|
|
42100
|
-
fontSize: "var(--ggui-font-size-sm, 14px)",
|
|
42101
|
-
fontWeight: 500,
|
|
42102
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42103
|
-
margin: 0,
|
|
42104
|
-
flex: 1,
|
|
42105
|
-
minWidth: 0
|
|
42106
|
-
};
|
|
42107
|
-
return (0, import_jsx_runtime55.jsxs)("div", { style: cardStyle, children: [(0, import_jsx_runtime55.jsxs)("div", { style: headerStyle2, onClick: compact ? void 0 : () => setExpanded(!expanded), role: compact ? void 0 : "button", tabIndex: compact ? void 0 : 0, onKeyDown: compact ? void 0 : (e) => {
|
|
42108
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
42109
|
-
e.preventDefault();
|
|
42110
|
-
setExpanded(!expanded);
|
|
42111
|
-
}
|
|
42112
|
-
}, children: [(0, import_jsx_runtime55.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", flex: 1, minWidth: 0 }, children: [(0, import_jsx_runtime55.jsx)(SeverityBadge, { severity: incident.severity }), (0, import_jsx_runtime55.jsx)("p", { style: titleStyle, children: incident.title })] }), (0, import_jsx_runtime55.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [(0, import_jsx_runtime55.jsx)(StatusLabel, { status: incident.status }), !compact && (0, import_jsx_runtime55.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "var(--ggui-color-outline, #d4d4d8)", strokeWidth: "2", style: {
|
|
42113
|
-
transform: expanded ? "rotate(180deg)" : "none",
|
|
42114
|
-
transition: "transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
42115
|
-
}, children: (0, import_jsx_runtime55.jsx)("path", { d: "M6 9l6 6 6-6" }) })] })] }), incident.affectedServices && incident.affectedServices.length > 0 && (0, import_jsx_runtime55.jsx)("div", { style: { padding: "0 16px 8px", display: "flex", gap: "4px", flexWrap: "wrap" }, children: incident.affectedServices.map((service) => (0, import_jsx_runtime55.jsx)("span", { style: {
|
|
42116
|
-
fontSize: "11px",
|
|
42117
|
-
padding: "1px 6px",
|
|
42118
|
-
borderRadius: "var(--ggui-shape-radius-sm, 4px)",
|
|
42119
|
-
backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
|
|
42120
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)"
|
|
42121
|
-
}, children: service }, service)) }), !compact && expanded && incident.updates.length > 0 && (0, import_jsx_runtime55.jsx)("div", { style: {
|
|
42122
|
-
borderTop: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42123
|
-
padding: "12px 16px"
|
|
42124
|
-
}, children: (0, import_jsx_runtime55.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: incident.updates.map((update) => (0, import_jsx_runtime55.jsxs)("div", { style: { display: "flex", gap: "8px", fontSize: "12px" }, children: [(0, import_jsx_runtime55.jsx)("span", { style: {
|
|
42125
|
-
color: "var(--ggui-color-outline, #d4d4d8)",
|
|
42126
|
-
flexShrink: 0,
|
|
42127
|
-
fontVariantNumeric: "tabular-nums"
|
|
42128
|
-
}, children: formatTime(update.timestamp) }), (0, import_jsx_runtime55.jsx)("span", { style: {
|
|
42129
|
-
fontWeight: 500,
|
|
42130
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42131
|
-
flexShrink: 0,
|
|
42132
|
-
textTransform: "capitalize"
|
|
42133
|
-
}, children: statusLabels[update.status] }), (0, import_jsx_runtime55.jsx)("span", { style: { color: "var(--ggui-color-onSurface, #18181b)" }, children: update.message })] }, update.id)) }) })] });
|
|
42134
|
-
}
|
|
42135
|
-
function IncidentTimeline({ incidents, days = 14, emptyText = "All systems operational", compact = false, style, className }) {
|
|
42136
|
-
const now = /* @__PURE__ */ new Date();
|
|
42137
|
-
const dayEntries = [];
|
|
42138
|
-
for (let i = 0; i < days; i++) {
|
|
42139
|
-
const date5 = new Date(now);
|
|
42140
|
-
date5.setDate(date5.getDate() - i);
|
|
42141
|
-
const key = getDayKey(date5);
|
|
42142
|
-
const dayIncidents = incidents.filter((inc) => {
|
|
42143
|
-
const created = new Date(inc.createdAt);
|
|
42144
|
-
return getDayKey(created) === key;
|
|
42145
|
-
});
|
|
42146
|
-
dayEntries.push({ date: date5, key, incidents: dayIncidents });
|
|
42147
|
-
}
|
|
42148
|
-
const hasAnyIncidents = incidents.length > 0;
|
|
42149
|
-
const containerStyle = {
|
|
42150
|
-
fontFamily: "var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",
|
|
42151
|
-
...style
|
|
42152
|
-
};
|
|
42153
|
-
return (0, import_jsx_runtime55.jsxs)("div", { style: containerStyle, className, children: [(0, import_jsx_runtime55.jsxs)("div", { style: { marginBottom: "24px" }, children: [(0, import_jsx_runtime55.jsxs)("div", { style: {
|
|
42154
|
-
display: "flex",
|
|
42155
|
-
alignItems: "center",
|
|
42156
|
-
justifyContent: "space-between",
|
|
42157
|
-
marginBottom: "8px"
|
|
42158
|
-
}, children: [(0, import_jsx_runtime55.jsxs)("span", { style: {
|
|
42159
|
-
fontSize: "var(--ggui-font-size-sm, 14px)",
|
|
42160
|
-
fontWeight: 500,
|
|
42161
|
-
color: "var(--ggui-color-onSurface, #18181b)"
|
|
42162
|
-
}, children: [days, "-Day History"] }), !hasAnyIncidents && (0, import_jsx_runtime55.jsxs)("span", { style: {
|
|
42163
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42164
|
-
color: "var(--ggui-color-success-600, #16a34a)",
|
|
42165
|
-
display: "flex",
|
|
42166
|
-
alignItems: "center",
|
|
42167
|
-
gap: "4px"
|
|
42168
|
-
}, children: [(0, import_jsx_runtime55.jsx)(DaySquare, { severity: null }), emptyText] })] }), (0, import_jsx_runtime55.jsx)("div", { style: {
|
|
42169
|
-
display: "flex",
|
|
42170
|
-
gap: "3px",
|
|
42171
|
-
flexDirection: "row-reverse",
|
|
42172
|
-
justifyContent: "flex-end"
|
|
42173
|
-
}, children: dayEntries.map((entry) => {
|
|
42174
|
-
const severity = getWorstSeverity(entry.incidents);
|
|
42175
|
-
return (0, import_jsx_runtime55.jsx)("div", { title: `${formatDate(entry.date)}: ${entry.incidents.length === 0 ? "No incidents" : `${entry.incidents.length} incident(s)`}`, children: (0, import_jsx_runtime55.jsx)(DaySquare, { severity }) }, entry.key);
|
|
42176
|
-
}) }), (0, import_jsx_runtime55.jsxs)("div", { style: {
|
|
42177
|
-
display: "flex",
|
|
42178
|
-
justifyContent: "space-between",
|
|
42179
|
-
marginTop: "4px",
|
|
42180
|
-
fontSize: "10px",
|
|
42181
|
-
color: "var(--ggui-color-outline, #d4d4d8)"
|
|
42182
|
-
}, children: [(0, import_jsx_runtime55.jsx)("span", { children: formatDate(dayEntries[dayEntries.length - 1]?.date ?? now) }), (0, import_jsx_runtime55.jsx)("span", { children: "Today" })] })] }), hasAnyIncidents && (0, import_jsx_runtime55.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: dayEntries.filter((e) => e.incidents.length > 0).map((entry) => (0, import_jsx_runtime55.jsxs)("div", { children: [(0, import_jsx_runtime55.jsx)("div", { style: {
|
|
42183
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42184
|
-
fontWeight: 500,
|
|
42185
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42186
|
-
marginBottom: "8px",
|
|
42187
|
-
textTransform: "uppercase",
|
|
42188
|
-
letterSpacing: "0.05em"
|
|
42189
|
-
}, children: formatDate(entry.date) }), (0, import_jsx_runtime55.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: entry.incidents.map((incident) => (0, import_jsx_runtime55.jsx)(IncidentCard, { incident, compact }, incident.id)) })] }, entry.key)) })] });
|
|
42190
|
-
}
|
|
42191
|
-
function MakeTabLayout({ chat, canvas, chatWidth = "400px", style, className }) {
|
|
42192
|
-
return (0, import_jsx_runtime56.jsxs)("div", { className, style: {
|
|
42193
|
-
display: "flex",
|
|
42194
|
-
height: "100%",
|
|
42195
|
-
minHeight: 0,
|
|
42196
|
-
...style
|
|
42197
|
-
}, children: [(0, import_jsx_runtime56.jsx)("div", { style: {
|
|
42198
|
-
width: chatWidth,
|
|
42199
|
-
minWidth: "320px",
|
|
42200
|
-
maxWidth: "50%",
|
|
42201
|
-
flexShrink: 0,
|
|
42202
|
-
borderRight: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42203
|
-
display: "flex",
|
|
42204
|
-
flexDirection: "column",
|
|
42205
|
-
overflow: "hidden"
|
|
42206
|
-
}, children: chat }), (0, import_jsx_runtime56.jsx)("div", { style: {
|
|
42207
|
-
flex: 1,
|
|
42208
|
-
minWidth: 0,
|
|
42209
|
-
display: "flex",
|
|
42210
|
-
flexDirection: "column",
|
|
42211
|
-
overflow: "hidden"
|
|
42212
|
-
}, children: canvas })] });
|
|
42213
|
-
}
|
|
42214
|
-
function MarketingHero({ headline, subheadline, primaryAction, secondaryAction, variant = "default", media, style, className }) {
|
|
42215
|
-
const backgroundStyles = {
|
|
42216
|
-
default: {
|
|
42217
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)"
|
|
42218
|
-
},
|
|
42219
|
-
gradient: {
|
|
42220
|
-
background: "linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"
|
|
42221
|
-
},
|
|
42222
|
-
pattern: {
|
|
42223
|
-
backgroundColor: "var(--ggui-color-primary-900, #0c4a6e)",
|
|
42224
|
-
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%)"
|
|
42225
|
-
}
|
|
42226
|
-
};
|
|
42227
|
-
const isPatternVariant = variant === "pattern";
|
|
42228
|
-
return (0, import_jsx_runtime57.jsx)("section", { className, style: {
|
|
42229
|
-
position: "relative",
|
|
42230
|
-
overflow: "hidden",
|
|
42231
|
-
...backgroundStyles[variant],
|
|
42232
|
-
...style
|
|
42233
|
-
}, children: (0, import_jsx_runtime57.jsxs)("div", { style: {
|
|
42234
|
-
maxWidth: "1280px",
|
|
42235
|
-
margin: "0 auto",
|
|
42236
|
-
padding: "96px 24px",
|
|
42237
|
-
display: "flex",
|
|
42238
|
-
alignItems: "center",
|
|
42239
|
-
gap: "64px",
|
|
42240
|
-
flexWrap: "wrap"
|
|
42241
|
-
}, children: [(0, import_jsx_runtime57.jsxs)("div", { style: { flex: "1 1 480px", minWidth: 0 }, children: [(0, import_jsx_runtime57.jsx)("h1", { style: {
|
|
42242
|
-
fontSize: "var(--ggui-font-size-5xl, 48px)",
|
|
42243
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
42244
|
-
lineHeight: 1.1,
|
|
42245
|
-
letterSpacing: "-0.025em",
|
|
42246
|
-
color: isPatternVariant ? "#ffffff" : "var(--ggui-color-onSurface, #18181b)",
|
|
42247
|
-
margin: "0 0 24px 0"
|
|
42248
|
-
}, children: headline }), subheadline && (0, import_jsx_runtime57.jsx)("p", { style: {
|
|
42249
|
-
fontSize: "var(--ggui-font-size-xl, 20px)",
|
|
42250
|
-
lineHeight: 1.6,
|
|
42251
|
-
color: isPatternVariant ? "rgba(255, 255, 255, 0.85)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42252
|
-
margin: "0 0 40px 0",
|
|
42253
|
-
maxWidth: "560px"
|
|
42254
|
-
}, children: subheadline }), (primaryAction || secondaryAction) && (0, import_jsx_runtime57.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "16px" }, children: [primaryAction && (0, import_jsx_runtime57.jsx)(ActionButton, { action: primaryAction, variant: "primary", dark: isPatternVariant }), secondaryAction && (0, import_jsx_runtime57.jsx)(ActionButton, { action: secondaryAction, variant: "secondary", dark: isPatternVariant })] })] }), media && (0, import_jsx_runtime57.jsx)("div", { style: {
|
|
42255
|
-
flex: "1 1 400px",
|
|
42256
|
-
display: "flex",
|
|
42257
|
-
justifyContent: "center",
|
|
42258
|
-
alignItems: "center",
|
|
42259
|
-
minWidth: 0
|
|
42260
|
-
}, children: media })] }) });
|
|
42261
|
-
}
|
|
42262
|
-
function ActionButton({ action, variant, dark }) {
|
|
42263
|
-
const isPrimary = variant === "primary";
|
|
42264
|
-
const baseStyles = {
|
|
42265
|
-
display: "inline-flex",
|
|
42266
|
-
alignItems: "center",
|
|
42267
|
-
justifyContent: "center",
|
|
42268
|
-
padding: "14px 32px",
|
|
42269
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42270
|
-
fontWeight: 600,
|
|
42271
|
-
borderRadius: "var(--ggui-shape-radius-lg, 12px)",
|
|
42272
|
-
cursor: "pointer",
|
|
42273
|
-
transition: "all 0.2s ease",
|
|
42274
|
-
textDecoration: "none",
|
|
42275
|
-
border: "none",
|
|
42276
|
-
lineHeight: "1.5"
|
|
42277
|
-
};
|
|
42278
|
-
const primaryStyles = dark ? {
|
|
42279
|
-
backgroundColor: "#ffffff",
|
|
42280
|
-
color: "var(--ggui-color-primary-900, #0c4a6e)"
|
|
42281
|
-
} : {
|
|
42282
|
-
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
42283
|
-
color: "#ffffff"
|
|
42284
|
-
};
|
|
42285
|
-
const secondaryStyles = dark ? {
|
|
42286
|
-
backgroundColor: "transparent",
|
|
42287
|
-
color: "#ffffff",
|
|
42288
|
-
border: "2px solid rgba(255, 255, 255, 0.3)"
|
|
42289
|
-
} : {
|
|
42290
|
-
backgroundColor: "transparent",
|
|
42291
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42292
|
-
border: "2px solid var(--ggui-color-outline, #d4d4d8)"
|
|
42293
|
-
};
|
|
42294
|
-
const combined = {
|
|
42295
|
-
...baseStyles,
|
|
42296
|
-
...isPrimary ? primaryStyles : secondaryStyles
|
|
42297
|
-
};
|
|
42298
|
-
if (action.href) {
|
|
42299
|
-
return (0, import_jsx_runtime57.jsx)("a", { href: action.href, onClick: action.onClick, style: combined, role: "button", children: action.label });
|
|
42300
|
-
}
|
|
42301
|
-
return (0, import_jsx_runtime57.jsx)("button", { type: "button", onClick: action.onClick, style: combined, children: action.label });
|
|
42302
|
-
}
|
|
42303
|
-
function MarketingFeatures({ heading, subheading, features, columns = 3, style, className }) {
|
|
42304
|
-
return (0, import_jsx_runtime58.jsxs)("section", { className, style: {
|
|
42305
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)",
|
|
42306
|
-
...style
|
|
42307
|
-
}, children: [(0, import_jsx_runtime58.jsxs)("div", { style: {
|
|
42308
|
-
maxWidth: "1280px",
|
|
42309
|
-
margin: "0 auto",
|
|
42310
|
-
padding: "80px 24px"
|
|
42311
|
-
}, children: [(heading || subheading) && (0, import_jsx_runtime58.jsxs)("div", { style: { textAlign: "center", marginBottom: "64px" }, children: [heading && (0, import_jsx_runtime58.jsx)("h2", { style: {
|
|
42312
|
-
fontSize: "var(--ggui-font-size-3xl, 30px)",
|
|
42313
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
42314
|
-
lineHeight: 1.2,
|
|
42315
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42316
|
-
margin: "0 0 16px 0"
|
|
42317
|
-
}, children: heading }), subheading && (0, import_jsx_runtime58.jsx)("p", { style: {
|
|
42318
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42319
|
-
lineHeight: 1.6,
|
|
42320
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42321
|
-
margin: 0,
|
|
42322
|
-
maxWidth: "640px",
|
|
42323
|
-
marginLeft: "auto",
|
|
42324
|
-
marginRight: "auto"
|
|
42325
|
-
}, children: subheading })] }), (0, import_jsx_runtime58.jsx)("div", { className: "ggui-features-grid", style: {
|
|
42326
|
-
display: "grid",
|
|
42327
|
-
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
42328
|
-
gap: "32px"
|
|
42329
|
-
}, children: features.map((feature, index) => (0, import_jsx_runtime58.jsx)(FeatureCard, { feature }, index)) })] }), (0, import_jsx_runtime58.jsx)("style", { children: `
|
|
42330
|
-
@media (max-width: 768px) {
|
|
42331
|
-
.ggui-features-grid {
|
|
42332
|
-
grid-template-columns: 1fr !important;
|
|
42333
|
-
}
|
|
42334
|
-
}
|
|
42335
|
-
` })] });
|
|
42336
|
-
}
|
|
42337
|
-
function FeatureCard({ feature }) {
|
|
42338
|
-
return (0, import_jsx_runtime58.jsxs)("div", { style: {
|
|
42339
|
-
padding: "var(--ggui-spacing-6, 24px)",
|
|
42340
|
-
borderRadius: "var(--ggui-shape-radius-xl, 16px)",
|
|
42341
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)",
|
|
42342
|
-
border: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42343
|
-
transition: "box-shadow 0.2s ease, transform 0.2s ease",
|
|
42344
|
-
cursor: "default"
|
|
42345
|
-
}, onMouseEnter: (e) => {
|
|
42346
|
-
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))";
|
|
42347
|
-
e.currentTarget.style.transform = "translateY(-2px)";
|
|
42348
|
-
}, onMouseLeave: (e) => {
|
|
42349
|
-
e.currentTarget.style.boxShadow = "none";
|
|
42350
|
-
e.currentTarget.style.transform = "translateY(0)";
|
|
42351
|
-
}, children: [feature.icon && (0, import_jsx_runtime58.jsx)("div", { style: {
|
|
42352
|
-
fontSize: "32px",
|
|
42353
|
-
marginBottom: "var(--ggui-spacing-4, 16px)",
|
|
42354
|
-
lineHeight: 1
|
|
42355
|
-
}, children: feature.icon }), (0, import_jsx_runtime58.jsx)("h3", { style: {
|
|
42356
|
-
fontSize: "var(--ggui-font-size-xl, 20px)",
|
|
42357
|
-
fontWeight: "var(--ggui-font-weight-semibold, 600)",
|
|
42358
|
-
lineHeight: 1.3,
|
|
42359
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42360
|
-
margin: "0 0 8px 0"
|
|
42361
|
-
}, children: feature.title }), (0, import_jsx_runtime58.jsx)("p", { style: {
|
|
42362
|
-
fontSize: "var(--ggui-font-size-base, 16px)",
|
|
42363
|
-
lineHeight: 1.6,
|
|
42364
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42365
|
-
margin: 0
|
|
42366
|
-
}, children: feature.description })] });
|
|
42367
|
-
}
|
|
42368
|
-
function MarketingCTA({ headline, description, action, variant = "filled", style, className }) {
|
|
42369
|
-
const isFilled = variant === "filled";
|
|
42370
|
-
return (0, import_jsx_runtime59.jsx)("section", { className, style: {
|
|
42371
|
-
backgroundColor: isFilled ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-surface, #ffffff)",
|
|
42372
|
-
...isFilled ? {} : {
|
|
42373
|
-
borderTop: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42374
|
-
borderBottom: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)"
|
|
42375
|
-
},
|
|
42376
|
-
...style
|
|
42377
|
-
}, children: (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
42378
|
-
maxWidth: "800px",
|
|
42379
|
-
margin: "0 auto",
|
|
42380
|
-
padding: "80px 24px",
|
|
42381
|
-
textAlign: "center"
|
|
42382
|
-
}, children: [(0, import_jsx_runtime59.jsx)("h2", { style: {
|
|
42383
|
-
fontSize: "var(--ggui-font-size-3xl, 30px)",
|
|
42384
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
42385
|
-
lineHeight: 1.2,
|
|
42386
|
-
color: isFilled ? "#ffffff" : "var(--ggui-color-onSurface, #18181b)",
|
|
42387
|
-
margin: "0 0 16px 0"
|
|
42388
|
-
}, children: headline }), description && (0, import_jsx_runtime59.jsx)("p", { style: {
|
|
42389
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42390
|
-
lineHeight: 1.6,
|
|
42391
|
-
color: isFilled ? "rgba(255, 255, 255, 0.85)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42392
|
-
margin: "0 0 32px 0",
|
|
42393
|
-
maxWidth: "560px",
|
|
42394
|
-
marginLeft: "auto",
|
|
42395
|
-
marginRight: "auto"
|
|
42396
|
-
}, children: description }), (0, import_jsx_runtime59.jsx)(CTAButton, { action, filled: isFilled })] }) });
|
|
42397
|
-
}
|
|
42398
|
-
function CTAButton({ action, filled }) {
|
|
42399
|
-
const styles = {
|
|
42400
|
-
display: "inline-flex",
|
|
42401
|
-
alignItems: "center",
|
|
42402
|
-
justifyContent: "center",
|
|
42403
|
-
padding: "14px 36px",
|
|
42404
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42405
|
-
fontWeight: 600,
|
|
42406
|
-
borderRadius: "var(--ggui-shape-radius-lg, 12px)",
|
|
42407
|
-
cursor: "pointer",
|
|
42408
|
-
transition: "all 0.2s ease",
|
|
42409
|
-
textDecoration: "none",
|
|
42410
|
-
border: "none",
|
|
42411
|
-
lineHeight: "1.5",
|
|
42412
|
-
...filled ? {
|
|
42413
|
-
backgroundColor: "#ffffff",
|
|
42414
|
-
color: "var(--ggui-color-primary-700, #0369a1)"
|
|
42415
|
-
} : {
|
|
42416
|
-
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
42417
|
-
color: "#ffffff"
|
|
42418
|
-
}
|
|
42419
|
-
};
|
|
42420
|
-
if (action.href) {
|
|
42421
|
-
return (0, import_jsx_runtime59.jsx)("a", { href: action.href, onClick: action.onClick, style: styles, role: "button", children: action.label });
|
|
42422
|
-
}
|
|
42423
|
-
return (0, import_jsx_runtime59.jsx)("button", { type: "button", onClick: action.onClick, style: styles, children: action.label });
|
|
42424
|
-
}
|
|
42425
41985
|
var interact_exports = {};
|
|
42426
41986
|
__export2(interact_exports, {
|
|
42427
41987
|
Clickable: () => Clickable,
|
|
42428
41988
|
Hoverable: () => Hoverable,
|
|
42429
41989
|
Pressable: () => Pressable
|
|
42430
41990
|
});
|
|
42431
|
-
var Clickable = (0,
|
|
42432
|
-
const [hovered, setHovered] = (0,
|
|
42433
|
-
const [active, setActive] = (0,
|
|
41991
|
+
var Clickable = (0, import_react42.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) {
|
|
41992
|
+
const [hovered, setHovered] = (0, import_react42.useState)(false);
|
|
41993
|
+
const [active, setActive] = (0, import_react42.useState)(false);
|
|
42434
41994
|
const hasClick = !!onClick;
|
|
42435
41995
|
const resolvedCursor = disabled ? "not-allowed" : cursor ?? (hasClick ? "pointer" : void 0);
|
|
42436
41996
|
const resolvedRole = role ?? (hasClick ? "button" : void 0);
|
|
@@ -42451,19 +42011,19 @@ var Clickable = (0, import_react43.forwardRef)(function Clickable2({ children, o
|
|
|
42451
42011
|
...hovered && !disabled ? hoverStyle : {},
|
|
42452
42012
|
...active && !disabled ? activeStyle : {}
|
|
42453
42013
|
};
|
|
42454
|
-
return (0,
|
|
42014
|
+
return (0, import_jsx_runtime55.jsx)("div", { ref, className, style: mergedStyle, onClick: disabled ? void 0 : onClick, onDoubleClick: disabled ? void 0 : onDoubleClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => {
|
|
42455
42015
|
setHovered(false);
|
|
42456
42016
|
setActive(false);
|
|
42457
42017
|
}, onMouseDown: () => setActive(true), onMouseUp: () => setActive(false), onKeyDown: handleKeyDown, role: resolvedRole, "aria-label": ariaLabel, "aria-disabled": disabled || void 0, tabIndex: resolvedTabIndex, ...rest, children });
|
|
42458
42018
|
});
|
|
42459
|
-
var Hoverable = (0,
|
|
42460
|
-
const [hovered, setHovered] = (0,
|
|
42019
|
+
var Hoverable = (0, import_react43.forwardRef)(function Hoverable2({ children, hoverStyle, onHoverChange, transition: transition2 = "all 200ms ease", style, className, ...rest }, ref) {
|
|
42020
|
+
const [hovered, setHovered] = (0, import_react43.useState)(false);
|
|
42461
42021
|
const mergedStyle = {
|
|
42462
42022
|
...style,
|
|
42463
42023
|
transition: transition2,
|
|
42464
42024
|
...hovered ? hoverStyle : {}
|
|
42465
42025
|
};
|
|
42466
|
-
return (0,
|
|
42026
|
+
return (0, import_jsx_runtime56.jsx)("div", { ref, className, style: mergedStyle, onMouseEnter: () => {
|
|
42467
42027
|
setHovered(true);
|
|
42468
42028
|
onHoverChange?.(true);
|
|
42469
42029
|
}, onMouseLeave: () => {
|
|
@@ -42471,10 +42031,10 @@ var Hoverable = (0, import_react44.forwardRef)(function Hoverable2({ children, h
|
|
|
42471
42031
|
onHoverChange?.(false);
|
|
42472
42032
|
}, ...rest, children });
|
|
42473
42033
|
});
|
|
42474
|
-
var Pressable = (0,
|
|
42475
|
-
const [hovered, setHovered] = (0,
|
|
42476
|
-
const [pressed, setPressed] = (0,
|
|
42477
|
-
const [longPressTimer, setLongPressTimer] = (0,
|
|
42034
|
+
var Pressable = (0, import_react44.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) {
|
|
42035
|
+
const [hovered, setHovered] = (0, import_react44.useState)(false);
|
|
42036
|
+
const [pressed, setPressed] = (0, import_react44.useState)(false);
|
|
42037
|
+
const [longPressTimer, setLongPressTimer] = (0, import_react44.useState)(null);
|
|
42478
42038
|
const hasPress = !!onPress || !!onLongPress;
|
|
42479
42039
|
const handleMouseDown = (e) => {
|
|
42480
42040
|
if (disabled)
|
|
@@ -42517,7 +42077,7 @@ var Pressable = (0, import_react45.forwardRef)(function Pressable2({ children, o
|
|
|
42517
42077
|
...pressed && !disabled ? pressStyle : {}
|
|
42518
42078
|
};
|
|
42519
42079
|
const content = typeof children === "function" ? children({ pressed, hovered }) : children;
|
|
42520
|
-
return (0,
|
|
42080
|
+
return (0, import_jsx_runtime57.jsx)("div", { ref, className, style: mergedStyle, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseEnter: () => setHovered(true), onMouseLeave: () => {
|
|
42521
42081
|
setHovered(false);
|
|
42522
42082
|
setPressed(false);
|
|
42523
42083
|
if (longPressTimer)
|
|
@@ -45361,7 +44921,7 @@ function getTheme(id, mode = "light") {
|
|
|
45361
44921
|
function getDefaultThemeId() {
|
|
45362
44922
|
return "ggui";
|
|
45363
44923
|
}
|
|
45364
|
-
var ThemeContext = (0,
|
|
44924
|
+
var ThemeContext = (0, import_react45.createContext)(null);
|
|
45365
44925
|
var COLOR_MIX_SUPPORTS = "@supports (color: color-mix(in srgb, red, blue))";
|
|
45366
44926
|
function resolvePrimary500Hex(cssVariables) {
|
|
45367
44927
|
const match = cssVariables.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);
|
|
@@ -45555,7 +45115,8 @@ var COMPONENTS_EXPORTS = [
|
|
|
45555
45115
|
"Breadcrumb",
|
|
45556
45116
|
"Pagination",
|
|
45557
45117
|
"EmptyState",
|
|
45558
|
-
"Stat"
|
|
45118
|
+
"Stat",
|
|
45119
|
+
"Stepper"
|
|
45559
45120
|
];
|
|
45560
45121
|
var COMPOSITIONS_EXPORTS = [
|
|
45561
45122
|
"Header",
|
|
@@ -45566,17 +45127,11 @@ var COMPOSITIONS_EXPORTS = [
|
|
|
45566
45127
|
"ChatWindow",
|
|
45567
45128
|
"NavigationBar",
|
|
45568
45129
|
"FileUploader",
|
|
45569
|
-
"UserProfileCard",
|
|
45570
45130
|
"NotificationCenter",
|
|
45571
45131
|
"Modal",
|
|
45572
45132
|
"CommandPalette",
|
|
45573
45133
|
"Footer",
|
|
45574
|
-
"Hero"
|
|
45575
|
-
"IncidentTimeline",
|
|
45576
|
-
"MakeTabLayout",
|
|
45577
|
-
"MarketingHero",
|
|
45578
|
-
"MarketingCTA",
|
|
45579
|
-
"MarketingFeatures"
|
|
45134
|
+
"Hero"
|
|
45580
45135
|
];
|
|
45581
45136
|
var INTERACT_EXPORTS = [
|
|
45582
45137
|
"Clickable",
|
|
@@ -45655,7 +45210,6 @@ var TOKENS_EXPORTS = [
|
|
|
45655
45210
|
"lineHeight",
|
|
45656
45211
|
"letterSpacing",
|
|
45657
45212
|
"headingStyles",
|
|
45658
|
-
"textStyles",
|
|
45659
45213
|
// Layout / shape
|
|
45660
45214
|
"spacing",
|
|
45661
45215
|
"spacingValues",
|
|
@@ -45878,7 +45432,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45878
45432
|
const { error: error210, autoRetrying, catchCount } = this.state;
|
|
45879
45433
|
if (!error210) return this.props.children;
|
|
45880
45434
|
if (autoRetrying) {
|
|
45881
|
-
return /* @__PURE__ */ (0,
|
|
45435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
45882
45436
|
display: "flex",
|
|
45883
45437
|
alignItems: "center",
|
|
45884
45438
|
justifyContent: "center",
|
|
@@ -45889,7 +45443,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45889
45443
|
fontSize: 13,
|
|
45890
45444
|
color: "rgba(255,255,255,0.4)"
|
|
45891
45445
|
}, children: [
|
|
45892
|
-
/* @__PURE__ */ (0,
|
|
45446
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
45893
45447
|
width: 16,
|
|
45894
45448
|
height: 16,
|
|
45895
45449
|
border: "2px solid rgba(255,255,255,0.15)",
|
|
@@ -45898,10 +45452,10 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45898
45452
|
animation: "ggui-err-spin 0.6s linear infinite"
|
|
45899
45453
|
} }),
|
|
45900
45454
|
"Retrying...",
|
|
45901
|
-
/* @__PURE__ */ (0,
|
|
45455
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("style", { children: `@keyframes ggui-err-spin { to { transform: rotate(360deg); } }` })
|
|
45902
45456
|
] });
|
|
45903
45457
|
}
|
|
45904
|
-
return /* @__PURE__ */ (0,
|
|
45458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
45905
45459
|
display: "flex",
|
|
45906
45460
|
flexDirection: "column",
|
|
45907
45461
|
alignItems: "center",
|
|
@@ -45912,7 +45466,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45912
45466
|
textAlign: "center",
|
|
45913
45467
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
45914
45468
|
}, children: [
|
|
45915
|
-
/* @__PURE__ */ (0,
|
|
45469
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
45916
45470
|
width: 48,
|
|
45917
45471
|
height: 48,
|
|
45918
45472
|
borderRadius: 14,
|
|
@@ -45922,9 +45476,9 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45922
45476
|
justifyContent: "center",
|
|
45923
45477
|
fontSize: 22
|
|
45924
45478
|
}, children: "!" }),
|
|
45925
|
-
/* @__PURE__ */ (0,
|
|
45926
|
-
/* @__PURE__ */ (0,
|
|
45927
|
-
/* @__PURE__ */ (0,
|
|
45479
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { fontSize: 14, fontWeight: 600, color: "rgba(255,255,255,0.8)" }, children: "Something went wrong" }),
|
|
45480
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { fontSize: 12, color: "rgba(255,255,255,0.4)", maxWidth: 280, lineHeight: 1.4 }, children: "This component encountered an error. Try asking for a different view." }),
|
|
45481
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
45928
45482
|
"button",
|
|
45929
45483
|
{
|
|
45930
45484
|
onClick: () => this.setState({ error: null, catchCount: 0 }),
|
|
@@ -45942,7 +45496,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45942
45496
|
children: "Retry"
|
|
45943
45497
|
}
|
|
45944
45498
|
),
|
|
45945
|
-
catchCount > 1 && /* @__PURE__ */ (0,
|
|
45499
|
+
catchCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { fontSize: 11, color: "rgba(255,255,255,0.2)" }, children: error210.message })
|
|
45946
45500
|
] });
|
|
45947
45501
|
}
|
|
45948
45502
|
};
|
|
@@ -45951,7 +45505,7 @@ function ReactComponentRenderer({
|
|
|
45951
45505
|
props = {},
|
|
45952
45506
|
themeId,
|
|
45953
45507
|
cssOverrides,
|
|
45954
|
-
fallback = /* @__PURE__ */ (0,
|
|
45508
|
+
fallback = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: "Loading component..." }),
|
|
45955
45509
|
onError
|
|
45956
45510
|
}) {
|
|
45957
45511
|
const reactId = (0, import_react12.useId)();
|
|
@@ -46031,13 +45585,13 @@ function ReactComponentRenderer({
|
|
|
46031
45585
|
}, [code]);
|
|
46032
45586
|
const themeCss = themeId ? getScopedThemeCss(themeId, scopeClass) : getScopedCssTokens(scopeClass);
|
|
46033
45587
|
if (!code || code.trim().length === 0) {
|
|
46034
|
-
return /* @__PURE__ */ (0,
|
|
45588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: fallback });
|
|
46035
45589
|
}
|
|
46036
45590
|
if (loading) {
|
|
46037
|
-
return /* @__PURE__ */ (0,
|
|
45591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: fallback });
|
|
46038
45592
|
}
|
|
46039
45593
|
if (error210) {
|
|
46040
|
-
return /* @__PURE__ */ (0,
|
|
45594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
46041
45595
|
display: "flex",
|
|
46042
45596
|
flexDirection: "column",
|
|
46043
45597
|
alignItems: "center",
|
|
@@ -46048,7 +45602,7 @@ function ReactComponentRenderer({
|
|
|
46048
45602
|
textAlign: "center",
|
|
46049
45603
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
46050
45604
|
}, children: [
|
|
46051
|
-
/* @__PURE__ */ (0,
|
|
45605
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
46052
45606
|
width: 48,
|
|
46053
45607
|
height: 48,
|
|
46054
45608
|
borderRadius: 14,
|
|
@@ -46058,19 +45612,19 @@ function ReactComponentRenderer({
|
|
|
46058
45612
|
justifyContent: "center",
|
|
46059
45613
|
fontSize: 22
|
|
46060
45614
|
}, children: "!" }),
|
|
46061
|
-
/* @__PURE__ */ (0,
|
|
46062
|
-
/* @__PURE__ */ (0,
|
|
45615
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { fontSize: 14, fontWeight: 600, color: "rgba(255,255,255,0.8)" }, children: "Failed to load component" }),
|
|
45616
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { fontSize: 12, color: "rgba(255,255,255,0.4)", maxWidth: 280, lineHeight: 1.4 }, children: error210.message })
|
|
46063
45617
|
] });
|
|
46064
45618
|
}
|
|
46065
45619
|
if (!Component2) {
|
|
46066
|
-
return /* @__PURE__ */ (0,
|
|
45620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: fallback });
|
|
46067
45621
|
}
|
|
46068
|
-
return /* @__PURE__ */ (0,
|
|
46069
|
-
/* @__PURE__ */ (0,
|
|
45622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: scopeClass, children: [
|
|
45623
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("style", { children: [
|
|
46070
45624
|
themeCss,
|
|
46071
45625
|
cssOverrides ?? ""
|
|
46072
45626
|
] }),
|
|
46073
|
-
/* @__PURE__ */ (0,
|
|
45627
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Component2, { ...props }) }, code.length)
|
|
46074
45628
|
] });
|
|
46075
45629
|
}
|
|
46076
45630
|
var previewShimmerKeyframes = `@keyframes ggui-preview-shimmer {
|
|
@@ -46103,7 +45657,7 @@ var previewKeyframesCss = [
|
|
|
46103
45657
|
var DynamicComponent = ReactComponentRenderer;
|
|
46104
45658
|
|
|
46105
45659
|
// hub-preview-client/main.tsx
|
|
46106
|
-
var
|
|
45660
|
+
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
46107
45661
|
function bootstrap() {
|
|
46108
45662
|
const boot = window.__GGUI_DEV_PREVIEW__;
|
|
46109
45663
|
return {
|
|
@@ -46194,90 +45748,90 @@ function PreviewApp({
|
|
|
46194
45748
|
return () => controller.abort();
|
|
46195
45749
|
}, [selectedId, token]);
|
|
46196
45750
|
if (state.kind === "idle") {
|
|
46197
|
-
return /* @__PURE__ */ (0,
|
|
46198
|
-
/* @__PURE__ */ (0,
|
|
46199
|
-
/* @__PURE__ */ (0,
|
|
45751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45752
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Meta, { children: "No UI selected" }),
|
|
45753
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Status, { children: "Pick a UI from the Discovered UIs panel to preview it here." })
|
|
46200
45754
|
] });
|
|
46201
45755
|
}
|
|
46202
45756
|
if (state.kind === "loading") {
|
|
46203
|
-
return /* @__PURE__ */ (0,
|
|
46204
|
-
/* @__PURE__ */ (0,
|
|
45757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45758
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Meta, { children: [
|
|
46205
45759
|
"Preview of ",
|
|
46206
|
-
/* @__PURE__ */ (0,
|
|
45760
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: selectedId })
|
|
46207
45761
|
] }),
|
|
46208
|
-
/* @__PURE__ */ (0,
|
|
45762
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Status, { children: "Loading bundle\u2026" })
|
|
46209
45763
|
] });
|
|
46210
45764
|
}
|
|
46211
45765
|
if (state.kind === "ready") {
|
|
46212
|
-
return /* @__PURE__ */ (0,
|
|
45766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "surface", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DynamicComponent, { code: state.code }) });
|
|
46213
45767
|
}
|
|
46214
45768
|
if (state.kind === "not-found") {
|
|
46215
|
-
return /* @__PURE__ */ (0,
|
|
46216
|
-
/* @__PURE__ */ (0,
|
|
45769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45770
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Meta, { children: [
|
|
46217
45771
|
"Preview of ",
|
|
46218
|
-
/* @__PURE__ */ (0,
|
|
45772
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: selectedId })
|
|
46219
45773
|
] }),
|
|
46220
|
-
/* @__PURE__ */ (0,
|
|
45774
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Status, { children: "The server doesn't know this id. It may have been removed from the registry." })
|
|
46221
45775
|
] });
|
|
46222
45776
|
}
|
|
46223
45777
|
if (state.kind === "missing") {
|
|
46224
|
-
return /* @__PURE__ */ (0,
|
|
46225
|
-
/* @__PURE__ */ (0,
|
|
46226
|
-
/* @__PURE__ */ (0,
|
|
45778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45779
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Meta, { children: "No renderable entry" }),
|
|
45780
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Status, { children: [
|
|
46227
45781
|
"Declare ",
|
|
46228
|
-
/* @__PURE__ */ (0,
|
|
45782
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "entryPoint" }),
|
|
46229
45783
|
" in ",
|
|
46230
|
-
/* @__PURE__ */ (0,
|
|
45784
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "ggui.ui.json" }),
|
|
46231
45785
|
", or colocate a ",
|
|
46232
|
-
/* @__PURE__ */ (0,
|
|
45786
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "ggui.ui.tsx" }),
|
|
46233
45787
|
" beside the manifest."
|
|
46234
45788
|
] }),
|
|
46235
|
-
state.tried.length > 0 && /* @__PURE__ */ (0,
|
|
45789
|
+
state.tried.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("pre", { className: "tried", children: state.tried.join("\n") })
|
|
46236
45790
|
] });
|
|
46237
45791
|
}
|
|
46238
45792
|
if (state.kind === "compile") {
|
|
46239
|
-
return /* @__PURE__ */ (0,
|
|
46240
|
-
/* @__PURE__ */ (0,
|
|
46241
|
-
/* @__PURE__ */ (0,
|
|
45793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45794
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Meta, { children: "Local compile failed" }),
|
|
45795
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "errors", children: state.detail.errors.map((err, i) => {
|
|
46242
45796
|
const loc = err.location;
|
|
46243
45797
|
const locLine = loc ? `${loc.file ?? state.detail.entry}:${loc.line ?? "?"}:${loc.column ?? "?"}` : state.detail.entry;
|
|
46244
|
-
return /* @__PURE__ */ (0,
|
|
46245
|
-
/* @__PURE__ */ (0,
|
|
46246
|
-
/* @__PURE__ */ (0,
|
|
46247
|
-
loc?.lineText && /* @__PURE__ */ (0,
|
|
45798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("li", { children: [
|
|
45799
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("pre", { className: "location", children: locLine }),
|
|
45800
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("pre", { className: "error", children: err.text }),
|
|
45801
|
+
loc?.lineText && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("pre", { className: "line-text", children: loc.lineText })
|
|
46248
45802
|
] }, i);
|
|
46249
45803
|
}) })
|
|
46250
45804
|
] });
|
|
46251
45805
|
}
|
|
46252
45806
|
if (state.kind === "http") {
|
|
46253
|
-
return /* @__PURE__ */ (0,
|
|
46254
|
-
/* @__PURE__ */ (0,
|
|
45807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45808
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Meta, { children: [
|
|
46255
45809
|
"Bundle fetch failed (HTTP ",
|
|
46256
45810
|
state.status,
|
|
46257
45811
|
")"
|
|
46258
45812
|
] }),
|
|
46259
|
-
/* @__PURE__ */ (0,
|
|
45813
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Status, { children: state.message })
|
|
46260
45814
|
] });
|
|
46261
45815
|
}
|
|
46262
|
-
return /* @__PURE__ */ (0,
|
|
46263
|
-
/* @__PURE__ */ (0,
|
|
46264
|
-
/* @__PURE__ */ (0,
|
|
45816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45817
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Meta, { children: "Local ggui dev server is unreachable" }),
|
|
45818
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Status, { children: [
|
|
46265
45819
|
"Studio could not reach the server \u2014 is ",
|
|
46266
|
-
/* @__PURE__ */ (0,
|
|
45820
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "ggui dev" }),
|
|
46267
45821
|
" still running?",
|
|
46268
|
-
/* @__PURE__ */ (0,
|
|
46269
|
-
/* @__PURE__ */ (0,
|
|
45822
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("br", {}),
|
|
45823
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "dim", children: state.message })
|
|
46270
45824
|
] })
|
|
46271
45825
|
] });
|
|
46272
45826
|
}
|
|
46273
45827
|
function Pane({ children }) {
|
|
46274
|
-
return /* @__PURE__ */ (0,
|
|
45828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "frame", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "pane", children }) });
|
|
46275
45829
|
}
|
|
46276
45830
|
function Meta({ children }) {
|
|
46277
|
-
return /* @__PURE__ */ (0,
|
|
45831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "meta", children });
|
|
46278
45832
|
}
|
|
46279
45833
|
function Status({ children }) {
|
|
46280
|
-
return /* @__PURE__ */ (0,
|
|
45834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "status", children });
|
|
46281
45835
|
}
|
|
46282
45836
|
async function subscribeToRegistry(token, signal, onEvent) {
|
|
46283
45837
|
let backoff = 500;
|
|
@@ -46346,7 +45900,7 @@ function mount() {
|
|
|
46346
45900
|
if (!root) throw new Error("preview-root element not found in shell");
|
|
46347
45901
|
const { token, selectedId } = bootstrap();
|
|
46348
45902
|
(0, import_client.createRoot)(root).render(
|
|
46349
|
-
/* @__PURE__ */ (0,
|
|
45903
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PreviewApp, { token, selectedId }) })
|
|
46350
45904
|
);
|
|
46351
45905
|
}
|
|
46352
45906
|
mount();
|