@ggui-ai/dev-stack 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/dist/hub-preview/client.js +281 -698
- package/package.json +8 -8
|
@@ -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,
|
|
@@ -33446,6 +33446,16 @@ var renderCacheMarkerSchema = external_exports.object({
|
|
|
33446
33446
|
kind: external_exports.enum(["full-template", "cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),
|
|
33447
33447
|
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.")
|
|
33448
33448
|
});
|
|
33449
|
+
var renderErrorCodeSchema = external_exports.enum([
|
|
33450
|
+
"PRODUCTION_FAILED",
|
|
33451
|
+
"VALIDATION_ERROR",
|
|
33452
|
+
"NO_PLATFORM_KEY",
|
|
33453
|
+
"NO_CREDENTIALS"
|
|
33454
|
+
]);
|
|
33455
|
+
var renderErrorSchema = external_exports.object({
|
|
33456
|
+
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."),
|
|
33457
|
+
message: external_exports.string().describe("Human-readable failure detail \u2014 fold into the next attempt or surface to the operator.")
|
|
33458
|
+
});
|
|
33449
33459
|
var renderOutputSchema = external_exports.object({
|
|
33450
33460
|
sessionId: external_exports.string(),
|
|
33451
33461
|
/**
|
|
@@ -33455,13 +33465,24 @@ var renderOutputSchema = external_exports.object({
|
|
|
33455
33465
|
* tool_results (OpenAI Agents SDK, Google ADK) reach the mount URI;
|
|
33456
33466
|
* SDKs that preserve `_meta` see the same value on both fields.
|
|
33457
33467
|
* Mirrors the `resourceUri` field on `ggui_update`'s output.
|
|
33468
|
+
*
|
|
33469
|
+
* OPTIONAL — present iff the render is mountable. Absent on the
|
|
33470
|
+
* failure envelope (`error` present): a failed render commits an
|
|
33471
|
+
* error GguiSession but exposes no mount affordance.
|
|
33458
33472
|
*/
|
|
33459
|
-
resourceUri: external_exports.string(),
|
|
33473
|
+
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."),
|
|
33460
33474
|
action: external_exports.enum(["create", "reuse", "update", "replace", "declined"]),
|
|
33461
33475
|
contractHash: external_exports.string().describe("Canonical hash of the rendered data contract (shape only \u2014 fields, types, specs). Same hash \u27FA same data flow."),
|
|
33462
33476
|
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."),
|
|
33463
33477
|
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."),
|
|
33464
33478
|
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."),
|
|
33479
|
+
/**
|
|
33480
|
+
* In-result failure marker — present iff the tool result is
|
|
33481
|
+
* `isError: true`. The structuredContent stays schema-conformant on
|
|
33482
|
+
* failures; this field carries the canonical `{code, message}`
|
|
33483
|
+
* classification. Absent on every successful render.
|
|
33484
|
+
*/
|
|
33485
|
+
error: renderErrorSchema.optional().describe("Present iff the tool result is isError \u2014 canonical {code, message} for a failed/rejected generation. Absent on success."),
|
|
33465
33486
|
/**
|
|
33466
33487
|
* Wire-shape recovery hint for the next call. Emitted ONLY when the
|
|
33467
33488
|
* rendered contract has a non-empty `actionSpec` — i.e. the agent will
|
|
@@ -33497,7 +33518,15 @@ var updateInputSchema = external_exports.discriminatedUnion("kind", [
|
|
|
33497
33518
|
]);
|
|
33498
33519
|
var updateOutputSchema = external_exports.object({
|
|
33499
33520
|
sessionId: external_exports.string(),
|
|
33500
|
-
updated: external_exports.boolean()
|
|
33521
|
+
updated: external_exports.boolean(),
|
|
33522
|
+
/**
|
|
33523
|
+
* Unchanged from the initial render — the same `ui://ggui/render/{id}`
|
|
33524
|
+
* URI the mount stamped. Mirrored on the LLM-visible structuredContent
|
|
33525
|
+
* so SDKs that strip `_meta` from tool_results can still reach the
|
|
33526
|
+
* mount URI. Kept in sync with the update handler's wire shape —
|
|
33527
|
+
* this export and the handler's inline schema must not drift.
|
|
33528
|
+
*/
|
|
33529
|
+
resourceUri: external_exports.string()
|
|
33501
33530
|
});
|
|
33502
33531
|
var declareToolCatalogInputSchema = external_exports.object({
|
|
33503
33532
|
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.")
|
|
@@ -34647,17 +34676,17 @@ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
|
|
|
34647
34676
|
var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
|
|
34648
34677
|
var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
|
|
34649
34678
|
var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
|
|
34650
|
-
var import_react36 = __toESM(require_react(), 1);
|
|
34651
34679
|
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
34680
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
34652
34681
|
var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
|
|
34653
|
-
var import_react37 = __toESM(require_react(), 1);
|
|
34654
34682
|
var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
|
|
34683
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
34655
34684
|
var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
|
|
34656
|
-
var import_react38 = __toESM(require_react(), 1);
|
|
34657
34685
|
var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
|
|
34686
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
34658
34687
|
var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
34659
|
-
var import_react39 = __toESM(require_react(), 1);
|
|
34660
34688
|
var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
|
|
34689
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
34661
34690
|
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
34662
34691
|
var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
|
|
34663
34692
|
var import_react40 = __toESM(require_react(), 1);
|
|
@@ -34668,32 +34697,28 @@ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
|
|
|
34668
34697
|
var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
|
|
34669
34698
|
var import_react42 = __toESM(require_react(), 1);
|
|
34670
34699
|
var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
|
|
34700
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
34671
34701
|
var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
|
|
34702
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
34672
34703
|
var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
|
|
34704
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
34673
34705
|
var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
|
|
34706
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
34674
34707
|
var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
|
|
34675
|
-
var
|
|
34708
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
34676
34709
|
var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
|
|
34677
|
-
var import_react44 = __toESM(require_react(), 1);
|
|
34678
34710
|
var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
|
|
34679
|
-
var import_react45 = __toESM(require_react(), 1);
|
|
34680
34711
|
var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
|
|
34681
|
-
var import_react46 = __toESM(require_react(), 1);
|
|
34682
|
-
var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
34683
|
-
var import_react47 = __toESM(require_react(), 1);
|
|
34684
|
-
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
34685
34712
|
var import_react48 = __toESM(require_react(), 1);
|
|
34686
|
-
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
|
|
34687
|
-
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
34688
|
-
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
34689
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);
|
|
34690
34716
|
var import_react50 = __toESM(require_react(), 1);
|
|
34691
|
-
var
|
|
34692
|
-
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
34717
|
+
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
|
|
34693
34718
|
var import_react51 = __toESM(require_react(), 1);
|
|
34694
|
-
var
|
|
34719
|
+
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
34695
34720
|
var import_react52 = __toESM(require_react(), 1);
|
|
34696
|
-
var
|
|
34721
|
+
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
34697
34722
|
var StreamBusContext = (0, import_react11.createContext)(null);
|
|
34698
34723
|
var primitives_exports = {};
|
|
34699
34724
|
__export2(primitives_exports, {
|
|
@@ -35053,6 +35078,55 @@ function Spacer({ size = 16, style, className }) {
|
|
|
35053
35078
|
...style
|
|
35054
35079
|
} });
|
|
35055
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
|
+
}
|
|
35056
35130
|
var fontSize = {
|
|
35057
35131
|
xs: "12px",
|
|
35058
35132
|
sm: "14px",
|
|
@@ -35130,76 +35204,6 @@ var headingStyles = {
|
|
|
35130
35204
|
letterSpacing: letterSpacing.normal
|
|
35131
35205
|
}
|
|
35132
35206
|
};
|
|
35133
|
-
var textStyles = {
|
|
35134
|
-
body: {
|
|
35135
|
-
fontSize: fontSize.base,
|
|
35136
|
-
fontWeight: fontWeight.normal,
|
|
35137
|
-
lineHeight: lineHeight.normal
|
|
35138
|
-
},
|
|
35139
|
-
bodySmall: {
|
|
35140
|
-
fontSize: fontSize.sm,
|
|
35141
|
-
fontWeight: fontWeight.normal,
|
|
35142
|
-
lineHeight: lineHeight.normal
|
|
35143
|
-
},
|
|
35144
|
-
bodyLarge: {
|
|
35145
|
-
fontSize: fontSize.lg,
|
|
35146
|
-
fontWeight: fontWeight.normal,
|
|
35147
|
-
lineHeight: lineHeight.relaxed
|
|
35148
|
-
},
|
|
35149
|
-
caption: {
|
|
35150
|
-
fontSize: fontSize.xs,
|
|
35151
|
-
fontWeight: fontWeight.normal,
|
|
35152
|
-
lineHeight: lineHeight.normal
|
|
35153
|
-
},
|
|
35154
|
-
label: {
|
|
35155
|
-
fontSize: fontSize.sm,
|
|
35156
|
-
fontWeight: fontWeight.medium,
|
|
35157
|
-
lineHeight: lineHeight.normal
|
|
35158
|
-
},
|
|
35159
|
-
overline: {
|
|
35160
|
-
fontSize: fontSize.xs,
|
|
35161
|
-
fontWeight: fontWeight.semibold,
|
|
35162
|
-
lineHeight: lineHeight.normal,
|
|
35163
|
-
letterSpacing: letterSpacing.wider,
|
|
35164
|
-
textTransform: "uppercase"
|
|
35165
|
-
}
|
|
35166
|
-
};
|
|
35167
|
-
var sizeMap = {
|
|
35168
|
-
xs: "var(--ggui-font-size-xs, 12px)",
|
|
35169
|
-
sm: "var(--ggui-font-size-sm, 14px)",
|
|
35170
|
-
base: "var(--ggui-font-size-base, 16px)",
|
|
35171
|
-
lg: "var(--ggui-font-size-lg, 18px)",
|
|
35172
|
-
xl: "var(--ggui-font-size-xl, 20px)",
|
|
35173
|
-
"2xl": "var(--ggui-font-size-2xl, 24px)",
|
|
35174
|
-
"3xl": "var(--ggui-font-size-3xl, 30px)",
|
|
35175
|
-
"4xl": "var(--ggui-font-size-4xl, 36px)"
|
|
35176
|
-
};
|
|
35177
|
-
var weightMap = {
|
|
35178
|
-
normal: "var(--ggui-font-weight-normal, 400)",
|
|
35179
|
-
medium: "var(--ggui-font-weight-medium, 500)",
|
|
35180
|
-
semibold: "var(--ggui-font-weight-semibold, 600)",
|
|
35181
|
-
bold: "var(--ggui-font-weight-bold, 700)"
|
|
35182
|
-
};
|
|
35183
|
-
function Text({ children, variant = "body", size, weight, tone, align, truncate, is = "p", id, htmlFor, style, className }) {
|
|
35184
|
-
const variantStyle = textStyles[variant] || textStyles.body;
|
|
35185
|
-
const resolvedColor = tone ? resolveToneCss(tone) : "var(--ggui-color-onSurface, #18181b)";
|
|
35186
|
-
const textStyle = {
|
|
35187
|
-
...variantStyle,
|
|
35188
|
-
fontSize: size ? sizeMap[size] || size : void 0,
|
|
35189
|
-
fontWeight: weight ? weightMap[weight] : void 0,
|
|
35190
|
-
color: resolvedColor,
|
|
35191
|
-
textAlign: align,
|
|
35192
|
-
margin: 0,
|
|
35193
|
-
...truncate && {
|
|
35194
|
-
overflow: "hidden",
|
|
35195
|
-
textOverflow: "ellipsis",
|
|
35196
|
-
whiteSpace: "nowrap"
|
|
35197
|
-
},
|
|
35198
|
-
...style
|
|
35199
|
-
};
|
|
35200
|
-
const elementProps = { id, htmlFor, className, style: textStyle };
|
|
35201
|
-
return (0, import_react15.createElement)(is, elementProps, children);
|
|
35202
|
-
}
|
|
35203
35207
|
function Heading({ children, level = 2, tone, align, style, className }) {
|
|
35204
35208
|
const tag = `h${level}`;
|
|
35205
35209
|
const headingStyle = headingStyles[tag] || headingStyles.h2;
|
|
@@ -40543,6 +40547,7 @@ __export2(components_exports, {
|
|
|
40543
40547
|
Pagination: () => Pagination,
|
|
40544
40548
|
SearchField: () => SearchField,
|
|
40545
40549
|
Stat: () => Stat,
|
|
40550
|
+
Stepper: () => Stepper,
|
|
40546
40551
|
Tag: () => Tag
|
|
40547
40552
|
});
|
|
40548
40553
|
var primary = {
|
|
@@ -41064,7 +41069,76 @@ function EmptyState({ icon, title, description, action, style, className }) {
|
|
|
41064
41069
|
}
|
|
41065
41070
|
function Stat({ label, value, delta, trend = "neutral", icon, style, className }) {
|
|
41066
41071
|
const deltaTone = trend === "up" ? "success" : trend === "down" ? "error" : "muted";
|
|
41067
|
-
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)) }) });
|
|
41068
41142
|
}
|
|
41069
41143
|
var compositions_exports = {};
|
|
41070
41144
|
__export2(compositions_exports, {
|
|
@@ -41077,19 +41151,13 @@ __export2(compositions_exports, {
|
|
|
41077
41151
|
Footer: () => Footer,
|
|
41078
41152
|
Header: () => Header,
|
|
41079
41153
|
Hero: () => Hero,
|
|
41080
|
-
IncidentTimeline: () => IncidentTimeline,
|
|
41081
|
-
MakeTabLayout: () => MakeTabLayout,
|
|
41082
|
-
MarketingCTA: () => MarketingCTA,
|
|
41083
|
-
MarketingFeatures: () => MarketingFeatures,
|
|
41084
|
-
MarketingHero: () => MarketingHero,
|
|
41085
41154
|
Modal: () => Modal,
|
|
41086
41155
|
NavigationBar: () => NavigationBar,
|
|
41087
41156
|
NotificationCenter: () => NotificationCenter,
|
|
41088
|
-
Sidebar: () => Sidebar
|
|
41089
|
-
UserProfileCard: () => UserProfileCard
|
|
41157
|
+
Sidebar: () => Sidebar
|
|
41090
41158
|
});
|
|
41091
41159
|
function Header({ logo, navigation, actions, sticky = false, background, bordered = true, style, className }) {
|
|
41092
|
-
return (0,
|
|
41160
|
+
return (0, import_jsx_runtime42.jsxs)("header", { className, style: {
|
|
41093
41161
|
display: "flex",
|
|
41094
41162
|
alignItems: "center",
|
|
41095
41163
|
justifyContent: "space-between",
|
|
@@ -41103,7 +41171,7 @@ function Header({ logo, navigation, actions, sticky = false, background, bordere
|
|
|
41103
41171
|
boxShadow: shadow.sm
|
|
41104
41172
|
},
|
|
41105
41173
|
...style
|
|
41106
|
-
}, 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 })] });
|
|
41107
41175
|
}
|
|
41108
41176
|
function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
41109
41177
|
const [expanded, setExpanded] = (0, import_react36.useState)(false);
|
|
@@ -41115,7 +41183,7 @@ function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
|
41115
41183
|
}
|
|
41116
41184
|
onItemClick?.(item);
|
|
41117
41185
|
};
|
|
41118
|
-
return (0,
|
|
41186
|
+
return (0, import_jsx_runtime43.jsxs)("div", { children: [(0, import_jsx_runtime43.jsxs)("button", { onClick: handleClick, disabled: item.disabled, style: {
|
|
41119
41187
|
display: "flex",
|
|
41120
41188
|
alignItems: "center",
|
|
41121
41189
|
gap: "12px",
|
|
@@ -41132,11 +41200,11 @@ function SidebarItem({ item, activeId, onItemClick, collapsed, depth = 0 }) {
|
|
|
41132
41200
|
cursor: item.disabled ? "not-allowed" : "pointer",
|
|
41133
41201
|
transition: "all 0.15s",
|
|
41134
41202
|
justifyContent: collapsed ? "center" : "flex-start"
|
|
41135
|
-
}, 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)) })] });
|
|
41136
41204
|
}
|
|
41137
41205
|
function Sidebar({ items, activeId, onItemClick, collapsed = false, header, footer, width = 256, collapsedWidth = 64, style, className }) {
|
|
41138
41206
|
const currentWidth = collapsed ? collapsedWidth : width;
|
|
41139
|
-
return (0,
|
|
41207
|
+
return (0, import_jsx_runtime43.jsxs)("aside", { className, style: {
|
|
41140
41208
|
width: currentWidth,
|
|
41141
41209
|
minWidth: currentWidth,
|
|
41142
41210
|
height: "100%",
|
|
@@ -41147,15 +41215,15 @@ function Sidebar({ items, activeId, onItemClick, collapsed = false, header, foot
|
|
|
41147
41215
|
transition: "width 0.2s",
|
|
41148
41216
|
overflow: "hidden",
|
|
41149
41217
|
...style
|
|
41150
|
-
}, children: [header && (0,
|
|
41218
|
+
}, children: [header && (0, import_jsx_runtime43.jsx)("div", { style: {
|
|
41151
41219
|
padding: collapsed ? "16px 8px" : "16px",
|
|
41152
41220
|
borderBottom: `1px solid ${colors.gray[200]}`
|
|
41153
|
-
}, children: header }), (0,
|
|
41221
|
+
}, children: header }), (0, import_jsx_runtime43.jsx)("nav", { style: {
|
|
41154
41222
|
flex: 1,
|
|
41155
41223
|
padding: "8px",
|
|
41156
41224
|
overflowY: "auto",
|
|
41157
41225
|
overflowX: "hidden"
|
|
41158
|
-
}, 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: {
|
|
41159
41227
|
padding: collapsed ? "16px 8px" : "16px",
|
|
41160
41228
|
borderTop: `1px solid ${colors.gray[200]}`
|
|
41161
41229
|
}, children: footer })] });
|
|
@@ -41167,7 +41235,7 @@ function CardGrid({ children, columns = 3, gap = 16, style, className }) {
|
|
|
41167
41235
|
}
|
|
41168
41236
|
return `repeat(auto-fit, minmax(280px, 1fr))`;
|
|
41169
41237
|
};
|
|
41170
|
-
return (0,
|
|
41238
|
+
return (0, import_jsx_runtime44.jsx)("div", { className, style: {
|
|
41171
41239
|
display: "grid",
|
|
41172
41240
|
gridTemplateColumns: getGridColumns(),
|
|
41173
41241
|
gap: `${gap}px`,
|
|
@@ -41185,20 +41253,20 @@ function CommentItem({ comment, onReply, onReaction, depth = 0 }) {
|
|
|
41185
41253
|
}
|
|
41186
41254
|
};
|
|
41187
41255
|
const timestamp = comment.timestamp instanceof Date ? comment.timestamp.toLocaleString() : comment.timestamp;
|
|
41188
|
-
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: {
|
|
41189
41257
|
padding: "2px 8px",
|
|
41190
41258
|
border: `1px solid ${colors.gray[200]}`,
|
|
41191
41259
|
borderRadius: "12px",
|
|
41192
41260
|
backgroundColor: colors.gray[50],
|
|
41193
41261
|
fontSize: fontSize.xs,
|
|
41194
41262
|
cursor: "pointer"
|
|
41195
|
-
}, 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: {
|
|
41196
41264
|
background: "none",
|
|
41197
41265
|
border: "none",
|
|
41198
41266
|
color: colors.gray[500],
|
|
41199
41267
|
fontSize: fontSize.xs,
|
|
41200
41268
|
cursor: "pointer"
|
|
41201
|
-
}, 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))] });
|
|
41202
41270
|
}
|
|
41203
41271
|
function CommentThread({ comments, currentUser, onAddComment, onReply, onReaction, loading, style, className }) {
|
|
41204
41272
|
const [newComment, setNewComment] = (0, import_react37.useState)("");
|
|
@@ -41208,7 +41276,7 @@ function CommentThread({ comments, currentUser, onAddComment, onReply, onReactio
|
|
|
41208
41276
|
setNewComment("");
|
|
41209
41277
|
}
|
|
41210
41278
|
};
|
|
41211
|
-
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)) })] });
|
|
41212
41280
|
}
|
|
41213
41281
|
function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data", onSort, sortKey, sortDirection, onRowClick, selectable, selectedKeys = [], onSelectionChange, style, className }) {
|
|
41214
41282
|
const getRowKey = (row, index) => {
|
|
@@ -41233,16 +41301,16 @@ function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data
|
|
|
41233
41301
|
};
|
|
41234
41302
|
const allSelected = data.length > 0 && selectedKeys.length === data.length;
|
|
41235
41303
|
const someSelected = selectedKeys.length > 0 && selectedKeys.length < data.length;
|
|
41236
|
-
return (0,
|
|
41304
|
+
return (0, import_jsx_runtime46.jsx)("div", { className, style: {
|
|
41237
41305
|
border: `1px solid ${colors.gray[200]}`,
|
|
41238
41306
|
borderRadius: "8px",
|
|
41239
41307
|
overflow: "hidden",
|
|
41240
41308
|
...style
|
|
41241
|
-
}, children: (0,
|
|
41309
|
+
}, children: (0, import_jsx_runtime46.jsxs)("table", { style: {
|
|
41242
41310
|
width: "100%",
|
|
41243
41311
|
borderCollapse: "collapse",
|
|
41244
41312
|
fontSize: fontSize.sm
|
|
41245
|
-
}, 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: {
|
|
41246
41314
|
padding: "12px 16px",
|
|
41247
41315
|
textAlign: col.align || "left",
|
|
41248
41316
|
fontWeight: fontWeight.semibold,
|
|
@@ -41250,14 +41318,14 @@ function DataTable({ columns, data, rowKey = "id", loading, emptyText = "No data
|
|
|
41250
41318
|
borderBottom: `1px solid ${colors.gray[200]}`,
|
|
41251
41319
|
cursor: col.sortable ? "pointer" : void 0,
|
|
41252
41320
|
width: col.width
|
|
41253
|
-
}, 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) => {
|
|
41254
41322
|
const key = getRowKey(row, index);
|
|
41255
41323
|
const isSelected = selectedKeys.includes(key);
|
|
41256
|
-
return (0,
|
|
41324
|
+
return (0, import_jsx_runtime46.jsxs)("tr", { onClick: () => onRowClick?.(row, index), style: {
|
|
41257
41325
|
backgroundColor: isSelected ? colors.primary[50] : void 0,
|
|
41258
41326
|
cursor: onRowClick ? "pointer" : void 0,
|
|
41259
41327
|
transition: "background-color 0.15s"
|
|
41260
|
-
}, 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: {
|
|
41261
41329
|
padding: "12px 16px",
|
|
41262
41330
|
textAlign: col.align || "left",
|
|
41263
41331
|
color: colors.gray[900],
|
|
@@ -41283,7 +41351,7 @@ function ChatWindow({ messages, currentUserId, onSendMessage, loading, typing, p
|
|
|
41283
41351
|
handleSend();
|
|
41284
41352
|
}
|
|
41285
41353
|
};
|
|
41286
|
-
return (0,
|
|
41354
|
+
return (0, import_jsx_runtime47.jsxs)("div", { className, style: {
|
|
41287
41355
|
display: "flex",
|
|
41288
41356
|
flexDirection: "column",
|
|
41289
41357
|
height: "100%",
|
|
@@ -41292,51 +41360,51 @@ function ChatWindow({ messages, currentUserId, onSendMessage, loading, typing, p
|
|
|
41292
41360
|
backgroundColor: colors.white,
|
|
41293
41361
|
overflow: "hidden",
|
|
41294
41362
|
...style
|
|
41295
|
-
}, children: [header && (0,
|
|
41363
|
+
}, children: [header && (0, import_jsx_runtime47.jsx)("div", { style: {
|
|
41296
41364
|
padding: "12px 16px",
|
|
41297
41365
|
borderBottom: `1px solid ${colors.gray[200]}`
|
|
41298
|
-
}, children: header }), (0,
|
|
41366
|
+
}, children: header }), (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41299
41367
|
flex: 1,
|
|
41300
41368
|
padding: "16px",
|
|
41301
41369
|
overflowY: "auto",
|
|
41302
41370
|
display: "flex",
|
|
41303
41371
|
flexDirection: "column",
|
|
41304
41372
|
gap: "12px"
|
|
41305
|
-
}, 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) => {
|
|
41306
41374
|
const isOwn = message.sender.id === currentUserId;
|
|
41307
41375
|
const timestamp = message.timestamp instanceof Date ? message.timestamp.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : message.timestamp;
|
|
41308
|
-
return (0,
|
|
41376
|
+
return (0, import_jsx_runtime47.jsxs)("div", { style: {
|
|
41309
41377
|
display: "flex",
|
|
41310
41378
|
flexDirection: isOwn ? "row-reverse" : "row",
|
|
41311
41379
|
alignItems: "flex-end",
|
|
41312
41380
|
gap: "8px"
|
|
41313
|
-
}, 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: {
|
|
41314
41382
|
maxWidth: "70%",
|
|
41315
41383
|
padding: "10px 14px",
|
|
41316
41384
|
borderRadius: radius.lg,
|
|
41317
41385
|
backgroundColor: isOwn ? colors.primary[600] : colors.gray[100],
|
|
41318
41386
|
color: isOwn ? colors.white : colors.gray[900]
|
|
41319
|
-
}, 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: {
|
|
41320
41388
|
display: "flex",
|
|
41321
41389
|
alignItems: "center",
|
|
41322
41390
|
gap: "4px",
|
|
41323
41391
|
marginTop: "4px",
|
|
41324
41392
|
fontSize: fontSize.xs,
|
|
41325
41393
|
opacity: 0.7
|
|
41326
|
-
}, children: [(0,
|
|
41327
|
-
}), 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: {
|
|
41328
41396
|
padding: "12px 16px",
|
|
41329
41397
|
borderTop: `1px solid ${colors.gray[200]}`,
|
|
41330
41398
|
display: "flex",
|
|
41331
41399
|
gap: "8px"
|
|
41332
|
-
}, children: [(0,
|
|
41400
|
+
}, children: [(0, import_jsx_runtime47.jsx)("input", { type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder, style: {
|
|
41333
41401
|
flex: 1,
|
|
41334
41402
|
padding: "10px 14px",
|
|
41335
41403
|
border: `1px solid ${colors.gray[300]}`,
|
|
41336
41404
|
borderRadius: radius.full,
|
|
41337
41405
|
fontSize: fontSize.sm,
|
|
41338
41406
|
outline: "none"
|
|
41339
|
-
} }), (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 }) })] })] });
|
|
41340
41408
|
}
|
|
41341
41409
|
function NavigationBar({ items, activeId, onItemClick, orientation = "horizontal", variant = "default", style, className }) {
|
|
41342
41410
|
const renderItem = (item) => {
|
|
@@ -41378,16 +41446,16 @@ function NavigationBar({ items, activeId, onItemClick, orientation = "horizontal
|
|
|
41378
41446
|
onItemClick?.(item);
|
|
41379
41447
|
}
|
|
41380
41448
|
};
|
|
41381
|
-
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 })] });
|
|
41382
41450
|
if (item.href) {
|
|
41383
|
-
return (0,
|
|
41451
|
+
return (0, import_jsx_runtime48.jsx)("a", { href: item.href, onClick: (e) => {
|
|
41384
41452
|
e.preventDefault();
|
|
41385
41453
|
handleClick();
|
|
41386
41454
|
}, style: { ...baseStyle, ...variantStyles6[variant] }, children: content }, item.id);
|
|
41387
41455
|
}
|
|
41388
|
-
return (0,
|
|
41456
|
+
return (0, import_jsx_runtime48.jsx)("button", { onClick: handleClick, disabled: item.disabled, style: { ...baseStyle, ...variantStyles6[variant] }, children: content }, item.id);
|
|
41389
41457
|
};
|
|
41390
|
-
return (0,
|
|
41458
|
+
return (0, import_jsx_runtime48.jsx)("nav", { className, style: {
|
|
41391
41459
|
display: "flex",
|
|
41392
41460
|
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
41393
41461
|
gap: orientation === "horizontal" ? "4px" : "2px",
|
|
@@ -41436,7 +41504,7 @@ function FileUploader({ files = [], onFilesSelected, onFileRemove, accept, multi
|
|
|
41436
41504
|
const handleDragLeave = () => {
|
|
41437
41505
|
setIsDragOver(false);
|
|
41438
41506
|
};
|
|
41439
|
-
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: {
|
|
41440
41508
|
border: `2px dashed ${isDragOver ? colors.primary[400] : colors.gray[300]}`,
|
|
41441
41509
|
borderRadius: radius.lg,
|
|
41442
41510
|
padding: "32px",
|
|
@@ -41445,7 +41513,7 @@ function FileUploader({ files = [], onFilesSelected, onFileRemove, accept, multi
|
|
|
41445
41513
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
41446
41514
|
transition: "all 0.2s",
|
|
41447
41515
|
opacity: disabled ? 0.5 : 1
|
|
41448
|
-
}, 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: {
|
|
41449
41517
|
display: "flex",
|
|
41450
41518
|
alignItems: "center",
|
|
41451
41519
|
gap: "12px",
|
|
@@ -41453,74 +41521,14 @@ function FileUploader({ files = [], onFilesSelected, onFileRemove, accept, multi
|
|
|
41453
41521
|
border: `1px solid ${colors.gray[200]}`,
|
|
41454
41522
|
borderRadius: radius.md,
|
|
41455
41523
|
backgroundColor: colors.white
|
|
41456
|
-
}, 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: {
|
|
41457
41525
|
margin: 0,
|
|
41458
41526
|
fontSize: fontSize.sm,
|
|
41459
41527
|
color: colors.gray[900],
|
|
41460
41528
|
whiteSpace: "nowrap",
|
|
41461
41529
|
overflow: "hidden",
|
|
41462
41530
|
textOverflow: "ellipsis"
|
|
41463
|
-
}, children: file2.name }), (0,
|
|
41464
|
-
}
|
|
41465
|
-
function UserProfileCard({ name, subtitle, avatar, coverImage, bio, stats, actions, compact, style, className }) {
|
|
41466
|
-
if (compact) {
|
|
41467
|
-
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: {
|
|
41468
|
-
margin: 0,
|
|
41469
|
-
fontWeight: fontWeight.semibold,
|
|
41470
|
-
color: colors.gray[900],
|
|
41471
|
-
fontSize: fontSize.sm
|
|
41472
|
-
}, children: name }), subtitle && (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41473
|
-
margin: "2px 0 0",
|
|
41474
|
-
color: colors.gray[500],
|
|
41475
|
-
fontSize: fontSize.xs
|
|
41476
|
-
}, children: subtitle })] }), actions] }) });
|
|
41477
|
-
}
|
|
41478
|
-
return (0, import_jsx_runtime49.jsxs)(Card, { className, style: { padding: 0, overflow: "hidden", ...style }, children: [coverImage && (0, import_jsx_runtime49.jsx)("div", { style: {
|
|
41479
|
-
height: "120px",
|
|
41480
|
-
backgroundImage: `url(${coverImage})`,
|
|
41481
|
-
backgroundSize: "cover",
|
|
41482
|
-
backgroundPosition: "center"
|
|
41483
|
-
} }), (0, import_jsx_runtime49.jsxs)("div", { style: {
|
|
41484
|
-
padding: "16px",
|
|
41485
|
-
paddingTop: coverImage ? "0" : "16px",
|
|
41486
|
-
textAlign: "center"
|
|
41487
|
-
}, children: [(0, import_jsx_runtime49.jsx)("div", { style: {
|
|
41488
|
-
marginTop: coverImage ? "-40px" : "0",
|
|
41489
|
-
marginBottom: "12px"
|
|
41490
|
-
}, children: (0, import_jsx_runtime49.jsx)(Avatar, { name, src: avatar, size: "xl", style: {
|
|
41491
|
-
border: `4px solid ${colors.white}`,
|
|
41492
|
-
margin: "0 auto"
|
|
41493
|
-
} }) }), (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41494
|
-
margin: 0,
|
|
41495
|
-
fontWeight: fontWeight.semibold,
|
|
41496
|
-
color: colors.gray[900],
|
|
41497
|
-
fontSize: fontSize.lg
|
|
41498
|
-
}, children: name }), subtitle && (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41499
|
-
margin: "4px 0 0",
|
|
41500
|
-
color: colors.gray[500],
|
|
41501
|
-
fontSize: fontSize.sm
|
|
41502
|
-
}, children: subtitle }), bio && (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41503
|
-
margin: "12px 0 0",
|
|
41504
|
-
color: colors.gray[600],
|
|
41505
|
-
fontSize: fontSize.sm,
|
|
41506
|
-
lineHeight: 1.5
|
|
41507
|
-
}, children: bio }), stats && stats.length > 0 && (0, import_jsx_runtime49.jsx)("div", { style: {
|
|
41508
|
-
display: "flex",
|
|
41509
|
-
justifyContent: "center",
|
|
41510
|
-
gap: "24px",
|
|
41511
|
-
marginTop: "16px",
|
|
41512
|
-
paddingTop: "16px",
|
|
41513
|
-
borderTop: `1px solid ${colors.gray[200]}`
|
|
41514
|
-
}, children: stats.map((stat, index) => (0, import_jsx_runtime49.jsxs)("div", { style: { textAlign: "center" }, children: [(0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41515
|
-
margin: 0,
|
|
41516
|
-
fontWeight: fontWeight.semibold,
|
|
41517
|
-
color: colors.gray[900],
|
|
41518
|
-
fontSize: fontSize.lg
|
|
41519
|
-
}, children: stat.value }), (0, import_jsx_runtime49.jsx)("p", { style: {
|
|
41520
|
-
margin: "2px 0 0",
|
|
41521
|
-
color: colors.gray[500],
|
|
41522
|
-
fontSize: fontSize.xs
|
|
41523
|
-
}, 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)) })] });
|
|
41524
41532
|
}
|
|
41525
41533
|
var variantColors2 = {
|
|
41526
41534
|
info: colors.info[500],
|
|
@@ -41974,434 +41982,15 @@ function Hero({ heading, description, primaryAction, secondaryAction, media, ali
|
|
|
41974
41982
|
...align === "center" && { marginTop: "16px" }
|
|
41975
41983
|
}, children: media })] })] });
|
|
41976
41984
|
}
|
|
41977
|
-
var severityColors = {
|
|
41978
|
-
minor: {
|
|
41979
|
-
bg: "var(--ggui-color-warning-50, #fffbeb)",
|
|
41980
|
-
text: "var(--ggui-color-warning-700, #b45309)",
|
|
41981
|
-
dot: "var(--ggui-color-warning-500, #f59e0b)"
|
|
41982
|
-
},
|
|
41983
|
-
major: {
|
|
41984
|
-
bg: "var(--ggui-color-error-50, #fef2f2)",
|
|
41985
|
-
text: "var(--ggui-color-error-700, #b91c1c)",
|
|
41986
|
-
dot: "var(--ggui-color-error-500, #ef4444)"
|
|
41987
|
-
},
|
|
41988
|
-
critical: {
|
|
41989
|
-
bg: "var(--ggui-color-error-100, #fee2e2)",
|
|
41990
|
-
text: "var(--ggui-color-error-800, #991b1b)",
|
|
41991
|
-
dot: "var(--ggui-color-error-700, #b91c1c)"
|
|
41992
|
-
}
|
|
41993
|
-
};
|
|
41994
|
-
var statusLabels = {
|
|
41995
|
-
investigating: "Investigating",
|
|
41996
|
-
identified: "Identified",
|
|
41997
|
-
monitoring: "Monitoring",
|
|
41998
|
-
resolved: "Resolved"
|
|
41999
|
-
};
|
|
42000
|
-
function getDayKey(date5) {
|
|
42001
|
-
return `${date5.getFullYear()}-${String(date5.getMonth() + 1).padStart(2, "0")}-${String(date5.getDate()).padStart(2, "0")}`;
|
|
42002
|
-
}
|
|
42003
|
-
function formatDate(date5) {
|
|
42004
|
-
return date5.toLocaleDateString("en-US", { month: "short", day: "numeric" });
|
|
42005
|
-
}
|
|
42006
|
-
function formatTime(date5) {
|
|
42007
|
-
return new Date(date5).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" });
|
|
42008
|
-
}
|
|
42009
|
-
function getWorstSeverity(incidents) {
|
|
42010
|
-
if (incidents.some((i) => i.severity === "critical"))
|
|
42011
|
-
return "critical";
|
|
42012
|
-
if (incidents.some((i) => i.severity === "major"))
|
|
42013
|
-
return "major";
|
|
42014
|
-
if (incidents.some((i) => i.severity === "minor"))
|
|
42015
|
-
return "minor";
|
|
42016
|
-
return null;
|
|
42017
|
-
}
|
|
42018
|
-
function DaySquare({ severity }) {
|
|
42019
|
-
const color = severity ? severityColors[severity].dot : "var(--ggui-color-success-500, #22c55e)";
|
|
42020
|
-
const style = {
|
|
42021
|
-
width: "12px",
|
|
42022
|
-
height: "12px",
|
|
42023
|
-
borderRadius: "var(--ggui-shape-radius-sm, 4px)",
|
|
42024
|
-
backgroundColor: color,
|
|
42025
|
-
flexShrink: 0
|
|
42026
|
-
};
|
|
42027
|
-
return (0, import_jsx_runtime55.jsx)("div", { style });
|
|
42028
|
-
}
|
|
42029
|
-
function SeverityBadge({ severity }) {
|
|
42030
|
-
const colors2 = severityColors[severity];
|
|
42031
|
-
const style = {
|
|
42032
|
-
display: "inline-flex",
|
|
42033
|
-
alignItems: "center",
|
|
42034
|
-
gap: "4px",
|
|
42035
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42036
|
-
fontWeight: 500,
|
|
42037
|
-
padding: "2px 8px",
|
|
42038
|
-
borderRadius: "var(--ggui-shape-radius-full, 9999px)",
|
|
42039
|
-
backgroundColor: colors2.bg,
|
|
42040
|
-
color: colors2.text,
|
|
42041
|
-
textTransform: "capitalize"
|
|
42042
|
-
};
|
|
42043
|
-
return (0, import_jsx_runtime55.jsx)("span", { style, children: severity });
|
|
42044
|
-
}
|
|
42045
|
-
function StatusLabel({ status }) {
|
|
42046
|
-
const isResolved = status === "resolved";
|
|
42047
|
-
const style = {
|
|
42048
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42049
|
-
color: isResolved ? "var(--ggui-color-success-600, #16a34a)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42050
|
-
fontWeight: isResolved ? 500 : 400
|
|
42051
|
-
};
|
|
42052
|
-
return (0, import_jsx_runtime55.jsx)("span", { style, children: statusLabels[status] });
|
|
42053
|
-
}
|
|
42054
|
-
function IncidentCard({ incident, compact }) {
|
|
42055
|
-
const [expanded, setExpanded] = (0, import_react42.useState)(false);
|
|
42056
|
-
const cardStyle = {
|
|
42057
|
-
border: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42058
|
-
borderRadius: "var(--ggui-shape-radius-md, 8px)",
|
|
42059
|
-
overflow: "hidden",
|
|
42060
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)"
|
|
42061
|
-
};
|
|
42062
|
-
const headerStyle2 = {
|
|
42063
|
-
display: "flex",
|
|
42064
|
-
alignItems: "center",
|
|
42065
|
-
justifyContent: "space-between",
|
|
42066
|
-
padding: "12px 16px",
|
|
42067
|
-
cursor: compact ? "default" : "pointer",
|
|
42068
|
-
gap: "8px"
|
|
42069
|
-
};
|
|
42070
|
-
const titleStyle = {
|
|
42071
|
-
fontSize: "var(--ggui-font-size-sm, 14px)",
|
|
42072
|
-
fontWeight: 500,
|
|
42073
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42074
|
-
margin: 0,
|
|
42075
|
-
flex: 1,
|
|
42076
|
-
minWidth: 0
|
|
42077
|
-
};
|
|
42078
|
-
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) => {
|
|
42079
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
42080
|
-
e.preventDefault();
|
|
42081
|
-
setExpanded(!expanded);
|
|
42082
|
-
}
|
|
42083
|
-
}, 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: {
|
|
42084
|
-
transform: expanded ? "rotate(180deg)" : "none",
|
|
42085
|
-
transition: "transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
42086
|
-
}, 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: {
|
|
42087
|
-
fontSize: "11px",
|
|
42088
|
-
padding: "1px 6px",
|
|
42089
|
-
borderRadius: "var(--ggui-shape-radius-sm, 4px)",
|
|
42090
|
-
backgroundColor: "var(--ggui-color-surfaceVariant, #f4f4f5)",
|
|
42091
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)"
|
|
42092
|
-
}, children: service }, service)) }), !compact && expanded && incident.updates.length > 0 && (0, import_jsx_runtime55.jsx)("div", { style: {
|
|
42093
|
-
borderTop: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42094
|
-
padding: "12px 16px"
|
|
42095
|
-
}, 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: {
|
|
42096
|
-
color: "var(--ggui-color-outline, #d4d4d8)",
|
|
42097
|
-
flexShrink: 0,
|
|
42098
|
-
fontVariantNumeric: "tabular-nums"
|
|
42099
|
-
}, children: formatTime(update.timestamp) }), (0, import_jsx_runtime55.jsx)("span", { style: {
|
|
42100
|
-
fontWeight: 500,
|
|
42101
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42102
|
-
flexShrink: 0,
|
|
42103
|
-
textTransform: "capitalize"
|
|
42104
|
-
}, children: statusLabels[update.status] }), (0, import_jsx_runtime55.jsx)("span", { style: { color: "var(--ggui-color-onSurface, #18181b)" }, children: update.message })] }, update.id)) }) })] });
|
|
42105
|
-
}
|
|
42106
|
-
function IncidentTimeline({ incidents, days = 14, emptyText = "All systems operational", compact = false, style, className }) {
|
|
42107
|
-
const now = /* @__PURE__ */ new Date();
|
|
42108
|
-
const dayEntries = [];
|
|
42109
|
-
for (let i = 0; i < days; i++) {
|
|
42110
|
-
const date5 = new Date(now);
|
|
42111
|
-
date5.setDate(date5.getDate() - i);
|
|
42112
|
-
const key = getDayKey(date5);
|
|
42113
|
-
const dayIncidents = incidents.filter((inc) => {
|
|
42114
|
-
const created = new Date(inc.createdAt);
|
|
42115
|
-
return getDayKey(created) === key;
|
|
42116
|
-
});
|
|
42117
|
-
dayEntries.push({ date: date5, key, incidents: dayIncidents });
|
|
42118
|
-
}
|
|
42119
|
-
const hasAnyIncidents = incidents.length > 0;
|
|
42120
|
-
const containerStyle = {
|
|
42121
|
-
fontFamily: "var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",
|
|
42122
|
-
...style
|
|
42123
|
-
};
|
|
42124
|
-
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: {
|
|
42125
|
-
display: "flex",
|
|
42126
|
-
alignItems: "center",
|
|
42127
|
-
justifyContent: "space-between",
|
|
42128
|
-
marginBottom: "8px"
|
|
42129
|
-
}, children: [(0, import_jsx_runtime55.jsxs)("span", { style: {
|
|
42130
|
-
fontSize: "var(--ggui-font-size-sm, 14px)",
|
|
42131
|
-
fontWeight: 500,
|
|
42132
|
-
color: "var(--ggui-color-onSurface, #18181b)"
|
|
42133
|
-
}, children: [days, "-Day History"] }), !hasAnyIncidents && (0, import_jsx_runtime55.jsxs)("span", { style: {
|
|
42134
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42135
|
-
color: "var(--ggui-color-success-600, #16a34a)",
|
|
42136
|
-
display: "flex",
|
|
42137
|
-
alignItems: "center",
|
|
42138
|
-
gap: "4px"
|
|
42139
|
-
}, children: [(0, import_jsx_runtime55.jsx)(DaySquare, { severity: null }), emptyText] })] }), (0, import_jsx_runtime55.jsx)("div", { style: {
|
|
42140
|
-
display: "flex",
|
|
42141
|
-
gap: "3px",
|
|
42142
|
-
flexDirection: "row-reverse",
|
|
42143
|
-
justifyContent: "flex-end"
|
|
42144
|
-
}, children: dayEntries.map((entry) => {
|
|
42145
|
-
const severity = getWorstSeverity(entry.incidents);
|
|
42146
|
-
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);
|
|
42147
|
-
}) }), (0, import_jsx_runtime55.jsxs)("div", { style: {
|
|
42148
|
-
display: "flex",
|
|
42149
|
-
justifyContent: "space-between",
|
|
42150
|
-
marginTop: "4px",
|
|
42151
|
-
fontSize: "10px",
|
|
42152
|
-
color: "var(--ggui-color-outline, #d4d4d8)"
|
|
42153
|
-
}, 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: {
|
|
42154
|
-
fontSize: "var(--ggui-font-size-xs, 12px)",
|
|
42155
|
-
fontWeight: 500,
|
|
42156
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42157
|
-
marginBottom: "8px",
|
|
42158
|
-
textTransform: "uppercase",
|
|
42159
|
-
letterSpacing: "0.05em"
|
|
42160
|
-
}, 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)) })] });
|
|
42161
|
-
}
|
|
42162
|
-
function MakeTabLayout({ chat, canvas, chatWidth = "400px", style, className }) {
|
|
42163
|
-
return (0, import_jsx_runtime56.jsxs)("div", { className, style: {
|
|
42164
|
-
display: "flex",
|
|
42165
|
-
height: "100%",
|
|
42166
|
-
minHeight: 0,
|
|
42167
|
-
...style
|
|
42168
|
-
}, children: [(0, import_jsx_runtime56.jsx)("div", { style: {
|
|
42169
|
-
width: chatWidth,
|
|
42170
|
-
minWidth: "320px",
|
|
42171
|
-
maxWidth: "50%",
|
|
42172
|
-
flexShrink: 0,
|
|
42173
|
-
borderRight: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42174
|
-
display: "flex",
|
|
42175
|
-
flexDirection: "column",
|
|
42176
|
-
overflow: "hidden"
|
|
42177
|
-
}, children: chat }), (0, import_jsx_runtime56.jsx)("div", { style: {
|
|
42178
|
-
flex: 1,
|
|
42179
|
-
minWidth: 0,
|
|
42180
|
-
display: "flex",
|
|
42181
|
-
flexDirection: "column",
|
|
42182
|
-
overflow: "hidden"
|
|
42183
|
-
}, children: canvas })] });
|
|
42184
|
-
}
|
|
42185
|
-
function MarketingHero({ headline, subheadline, primaryAction, secondaryAction, variant = "default", media, style, className }) {
|
|
42186
|
-
const backgroundStyles = {
|
|
42187
|
-
default: {
|
|
42188
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)"
|
|
42189
|
-
},
|
|
42190
|
-
gradient: {
|
|
42191
|
-
background: "linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"
|
|
42192
|
-
},
|
|
42193
|
-
pattern: {
|
|
42194
|
-
backgroundColor: "var(--ggui-color-primary-900, #0c4a6e)",
|
|
42195
|
-
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%)"
|
|
42196
|
-
}
|
|
42197
|
-
};
|
|
42198
|
-
const isPatternVariant = variant === "pattern";
|
|
42199
|
-
return (0, import_jsx_runtime57.jsx)("section", { className, style: {
|
|
42200
|
-
position: "relative",
|
|
42201
|
-
overflow: "hidden",
|
|
42202
|
-
...backgroundStyles[variant],
|
|
42203
|
-
...style
|
|
42204
|
-
}, children: (0, import_jsx_runtime57.jsxs)("div", { style: {
|
|
42205
|
-
maxWidth: "1280px",
|
|
42206
|
-
margin: "0 auto",
|
|
42207
|
-
padding: "96px 24px",
|
|
42208
|
-
display: "flex",
|
|
42209
|
-
alignItems: "center",
|
|
42210
|
-
gap: "64px",
|
|
42211
|
-
flexWrap: "wrap"
|
|
42212
|
-
}, children: [(0, import_jsx_runtime57.jsxs)("div", { style: { flex: "1 1 480px", minWidth: 0 }, children: [(0, import_jsx_runtime57.jsx)("h1", { style: {
|
|
42213
|
-
fontSize: "var(--ggui-font-size-5xl, 48px)",
|
|
42214
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
42215
|
-
lineHeight: 1.1,
|
|
42216
|
-
letterSpacing: "-0.025em",
|
|
42217
|
-
color: isPatternVariant ? "#ffffff" : "var(--ggui-color-onSurface, #18181b)",
|
|
42218
|
-
margin: "0 0 24px 0"
|
|
42219
|
-
}, children: headline }), subheadline && (0, import_jsx_runtime57.jsx)("p", { style: {
|
|
42220
|
-
fontSize: "var(--ggui-font-size-xl, 20px)",
|
|
42221
|
-
lineHeight: 1.6,
|
|
42222
|
-
color: isPatternVariant ? "rgba(255, 255, 255, 0.85)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42223
|
-
margin: "0 0 40px 0",
|
|
42224
|
-
maxWidth: "560px"
|
|
42225
|
-
}, 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: {
|
|
42226
|
-
flex: "1 1 400px",
|
|
42227
|
-
display: "flex",
|
|
42228
|
-
justifyContent: "center",
|
|
42229
|
-
alignItems: "center",
|
|
42230
|
-
minWidth: 0
|
|
42231
|
-
}, children: media })] }) });
|
|
42232
|
-
}
|
|
42233
|
-
function ActionButton({ action, variant, dark }) {
|
|
42234
|
-
const isPrimary = variant === "primary";
|
|
42235
|
-
const baseStyles = {
|
|
42236
|
-
display: "inline-flex",
|
|
42237
|
-
alignItems: "center",
|
|
42238
|
-
justifyContent: "center",
|
|
42239
|
-
padding: "14px 32px",
|
|
42240
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42241
|
-
fontWeight: 600,
|
|
42242
|
-
borderRadius: "var(--ggui-shape-radius-lg, 12px)",
|
|
42243
|
-
cursor: "pointer",
|
|
42244
|
-
transition: "all 0.2s ease",
|
|
42245
|
-
textDecoration: "none",
|
|
42246
|
-
border: "none",
|
|
42247
|
-
lineHeight: "1.5"
|
|
42248
|
-
};
|
|
42249
|
-
const primaryStyles = dark ? {
|
|
42250
|
-
backgroundColor: "#ffffff",
|
|
42251
|
-
color: "var(--ggui-color-primary-900, #0c4a6e)"
|
|
42252
|
-
} : {
|
|
42253
|
-
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
42254
|
-
color: "#ffffff"
|
|
42255
|
-
};
|
|
42256
|
-
const secondaryStyles = dark ? {
|
|
42257
|
-
backgroundColor: "transparent",
|
|
42258
|
-
color: "#ffffff",
|
|
42259
|
-
border: "2px solid rgba(255, 255, 255, 0.3)"
|
|
42260
|
-
} : {
|
|
42261
|
-
backgroundColor: "transparent",
|
|
42262
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42263
|
-
border: "2px solid var(--ggui-color-outline, #d4d4d8)"
|
|
42264
|
-
};
|
|
42265
|
-
const combined = {
|
|
42266
|
-
...baseStyles,
|
|
42267
|
-
...isPrimary ? primaryStyles : secondaryStyles
|
|
42268
|
-
};
|
|
42269
|
-
if (action.href) {
|
|
42270
|
-
return (0, import_jsx_runtime57.jsx)("a", { href: action.href, onClick: action.onClick, style: combined, role: "button", children: action.label });
|
|
42271
|
-
}
|
|
42272
|
-
return (0, import_jsx_runtime57.jsx)("button", { type: "button", onClick: action.onClick, style: combined, children: action.label });
|
|
42273
|
-
}
|
|
42274
|
-
function MarketingFeatures({ heading, subheading, features, columns = 3, style, className }) {
|
|
42275
|
-
return (0, import_jsx_runtime58.jsxs)("section", { className, style: {
|
|
42276
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)",
|
|
42277
|
-
...style
|
|
42278
|
-
}, children: [(0, import_jsx_runtime58.jsxs)("div", { style: {
|
|
42279
|
-
maxWidth: "1280px",
|
|
42280
|
-
margin: "0 auto",
|
|
42281
|
-
padding: "80px 24px"
|
|
42282
|
-
}, children: [(heading || subheading) && (0, import_jsx_runtime58.jsxs)("div", { style: { textAlign: "center", marginBottom: "64px" }, children: [heading && (0, import_jsx_runtime58.jsx)("h2", { style: {
|
|
42283
|
-
fontSize: "var(--ggui-font-size-3xl, 30px)",
|
|
42284
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
42285
|
-
lineHeight: 1.2,
|
|
42286
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42287
|
-
margin: "0 0 16px 0"
|
|
42288
|
-
}, children: heading }), subheading && (0, import_jsx_runtime58.jsx)("p", { style: {
|
|
42289
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42290
|
-
lineHeight: 1.6,
|
|
42291
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42292
|
-
margin: 0,
|
|
42293
|
-
maxWidth: "640px",
|
|
42294
|
-
marginLeft: "auto",
|
|
42295
|
-
marginRight: "auto"
|
|
42296
|
-
}, children: subheading })] }), (0, import_jsx_runtime58.jsx)("div", { className: "ggui-features-grid", style: {
|
|
42297
|
-
display: "grid",
|
|
42298
|
-
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
42299
|
-
gap: "32px"
|
|
42300
|
-
}, children: features.map((feature, index) => (0, import_jsx_runtime58.jsx)(FeatureCard, { feature }, index)) })] }), (0, import_jsx_runtime58.jsx)("style", { children: `
|
|
42301
|
-
@media (max-width: 768px) {
|
|
42302
|
-
.ggui-features-grid {
|
|
42303
|
-
grid-template-columns: 1fr !important;
|
|
42304
|
-
}
|
|
42305
|
-
}
|
|
42306
|
-
` })] });
|
|
42307
|
-
}
|
|
42308
|
-
function FeatureCard({ feature }) {
|
|
42309
|
-
return (0, import_jsx_runtime58.jsxs)("div", { style: {
|
|
42310
|
-
padding: "var(--ggui-spacing-6, 24px)",
|
|
42311
|
-
borderRadius: "var(--ggui-shape-radius-xl, 16px)",
|
|
42312
|
-
backgroundColor: "var(--ggui-color-surface, #ffffff)",
|
|
42313
|
-
border: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42314
|
-
transition: "box-shadow 0.2s ease, transform 0.2s ease",
|
|
42315
|
-
cursor: "default"
|
|
42316
|
-
}, onMouseEnter: (e) => {
|
|
42317
|
-
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))";
|
|
42318
|
-
e.currentTarget.style.transform = "translateY(-2px)";
|
|
42319
|
-
}, onMouseLeave: (e) => {
|
|
42320
|
-
e.currentTarget.style.boxShadow = "none";
|
|
42321
|
-
e.currentTarget.style.transform = "translateY(0)";
|
|
42322
|
-
}, children: [feature.icon && (0, import_jsx_runtime58.jsx)("div", { style: {
|
|
42323
|
-
fontSize: "32px",
|
|
42324
|
-
marginBottom: "var(--ggui-spacing-4, 16px)",
|
|
42325
|
-
lineHeight: 1
|
|
42326
|
-
}, children: feature.icon }), (0, import_jsx_runtime58.jsx)("h3", { style: {
|
|
42327
|
-
fontSize: "var(--ggui-font-size-xl, 20px)",
|
|
42328
|
-
fontWeight: "var(--ggui-font-weight-semibold, 600)",
|
|
42329
|
-
lineHeight: 1.3,
|
|
42330
|
-
color: "var(--ggui-color-onSurface, #18181b)",
|
|
42331
|
-
margin: "0 0 8px 0"
|
|
42332
|
-
}, children: feature.title }), (0, import_jsx_runtime58.jsx)("p", { style: {
|
|
42333
|
-
fontSize: "var(--ggui-font-size-base, 16px)",
|
|
42334
|
-
lineHeight: 1.6,
|
|
42335
|
-
color: "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42336
|
-
margin: 0
|
|
42337
|
-
}, children: feature.description })] });
|
|
42338
|
-
}
|
|
42339
|
-
function MarketingCTA({ headline, description, action, variant = "filled", style, className }) {
|
|
42340
|
-
const isFilled = variant === "filled";
|
|
42341
|
-
return (0, import_jsx_runtime59.jsx)("section", { className, style: {
|
|
42342
|
-
backgroundColor: isFilled ? "var(--ggui-color-primary-600, #0284c7)" : "var(--ggui-color-surface, #ffffff)",
|
|
42343
|
-
...isFilled ? {} : {
|
|
42344
|
-
borderTop: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)",
|
|
42345
|
-
borderBottom: "1px solid var(--ggui-color-outlineVariant, #e4e4e7)"
|
|
42346
|
-
},
|
|
42347
|
-
...style
|
|
42348
|
-
}, children: (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
42349
|
-
maxWidth: "800px",
|
|
42350
|
-
margin: "0 auto",
|
|
42351
|
-
padding: "80px 24px",
|
|
42352
|
-
textAlign: "center"
|
|
42353
|
-
}, children: [(0, import_jsx_runtime59.jsx)("h2", { style: {
|
|
42354
|
-
fontSize: "var(--ggui-font-size-3xl, 30px)",
|
|
42355
|
-
fontWeight: "var(--ggui-font-weight-bold, 700)",
|
|
42356
|
-
lineHeight: 1.2,
|
|
42357
|
-
color: isFilled ? "#ffffff" : "var(--ggui-color-onSurface, #18181b)",
|
|
42358
|
-
margin: "0 0 16px 0"
|
|
42359
|
-
}, children: headline }), description && (0, import_jsx_runtime59.jsx)("p", { style: {
|
|
42360
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42361
|
-
lineHeight: 1.6,
|
|
42362
|
-
color: isFilled ? "rgba(255, 255, 255, 0.85)" : "var(--ggui-color-onSurfaceVariant, #52525b)",
|
|
42363
|
-
margin: "0 0 32px 0",
|
|
42364
|
-
maxWidth: "560px",
|
|
42365
|
-
marginLeft: "auto",
|
|
42366
|
-
marginRight: "auto"
|
|
42367
|
-
}, children: description }), (0, import_jsx_runtime59.jsx)(CTAButton, { action, filled: isFilled })] }) });
|
|
42368
|
-
}
|
|
42369
|
-
function CTAButton({ action, filled }) {
|
|
42370
|
-
const styles = {
|
|
42371
|
-
display: "inline-flex",
|
|
42372
|
-
alignItems: "center",
|
|
42373
|
-
justifyContent: "center",
|
|
42374
|
-
padding: "14px 36px",
|
|
42375
|
-
fontSize: "var(--ggui-font-size-lg, 18px)",
|
|
42376
|
-
fontWeight: 600,
|
|
42377
|
-
borderRadius: "var(--ggui-shape-radius-lg, 12px)",
|
|
42378
|
-
cursor: "pointer",
|
|
42379
|
-
transition: "all 0.2s ease",
|
|
42380
|
-
textDecoration: "none",
|
|
42381
|
-
border: "none",
|
|
42382
|
-
lineHeight: "1.5",
|
|
42383
|
-
...filled ? {
|
|
42384
|
-
backgroundColor: "#ffffff",
|
|
42385
|
-
color: "var(--ggui-color-primary-700, #0369a1)"
|
|
42386
|
-
} : {
|
|
42387
|
-
backgroundColor: "var(--ggui-color-primary-600, #0284c7)",
|
|
42388
|
-
color: "#ffffff"
|
|
42389
|
-
}
|
|
42390
|
-
};
|
|
42391
|
-
if (action.href) {
|
|
42392
|
-
return (0, import_jsx_runtime59.jsx)("a", { href: action.href, onClick: action.onClick, style: styles, role: "button", children: action.label });
|
|
42393
|
-
}
|
|
42394
|
-
return (0, import_jsx_runtime59.jsx)("button", { type: "button", onClick: action.onClick, style: styles, children: action.label });
|
|
42395
|
-
}
|
|
42396
41985
|
var interact_exports = {};
|
|
42397
41986
|
__export2(interact_exports, {
|
|
42398
41987
|
Clickable: () => Clickable,
|
|
42399
41988
|
Hoverable: () => Hoverable,
|
|
42400
41989
|
Pressable: () => Pressable
|
|
42401
41990
|
});
|
|
42402
|
-
var Clickable = (0,
|
|
42403
|
-
const [hovered, setHovered] = (0,
|
|
42404
|
-
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);
|
|
42405
41994
|
const hasClick = !!onClick;
|
|
42406
41995
|
const resolvedCursor = disabled ? "not-allowed" : cursor ?? (hasClick ? "pointer" : void 0);
|
|
42407
41996
|
const resolvedRole = role ?? (hasClick ? "button" : void 0);
|
|
@@ -42422,19 +42011,19 @@ var Clickable = (0, import_react43.forwardRef)(function Clickable2({ children, o
|
|
|
42422
42011
|
...hovered && !disabled ? hoverStyle : {},
|
|
42423
42012
|
...active && !disabled ? activeStyle : {}
|
|
42424
42013
|
};
|
|
42425
|
-
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: () => {
|
|
42426
42015
|
setHovered(false);
|
|
42427
42016
|
setActive(false);
|
|
42428
42017
|
}, onMouseDown: () => setActive(true), onMouseUp: () => setActive(false), onKeyDown: handleKeyDown, role: resolvedRole, "aria-label": ariaLabel, "aria-disabled": disabled || void 0, tabIndex: resolvedTabIndex, ...rest, children });
|
|
42429
42018
|
});
|
|
42430
|
-
var Hoverable = (0,
|
|
42431
|
-
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);
|
|
42432
42021
|
const mergedStyle = {
|
|
42433
42022
|
...style,
|
|
42434
42023
|
transition: transition2,
|
|
42435
42024
|
...hovered ? hoverStyle : {}
|
|
42436
42025
|
};
|
|
42437
|
-
return (0,
|
|
42026
|
+
return (0, import_jsx_runtime56.jsx)("div", { ref, className, style: mergedStyle, onMouseEnter: () => {
|
|
42438
42027
|
setHovered(true);
|
|
42439
42028
|
onHoverChange?.(true);
|
|
42440
42029
|
}, onMouseLeave: () => {
|
|
@@ -42442,10 +42031,10 @@ var Hoverable = (0, import_react44.forwardRef)(function Hoverable2({ children, h
|
|
|
42442
42031
|
onHoverChange?.(false);
|
|
42443
42032
|
}, ...rest, children });
|
|
42444
42033
|
});
|
|
42445
|
-
var Pressable = (0,
|
|
42446
|
-
const [hovered, setHovered] = (0,
|
|
42447
|
-
const [pressed, setPressed] = (0,
|
|
42448
|
-
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);
|
|
42449
42038
|
const hasPress = !!onPress || !!onLongPress;
|
|
42450
42039
|
const handleMouseDown = (e) => {
|
|
42451
42040
|
if (disabled)
|
|
@@ -42488,7 +42077,7 @@ var Pressable = (0, import_react45.forwardRef)(function Pressable2({ children, o
|
|
|
42488
42077
|
...pressed && !disabled ? pressStyle : {}
|
|
42489
42078
|
};
|
|
42490
42079
|
const content = typeof children === "function" ? children({ pressed, hovered }) : children;
|
|
42491
|
-
return (0,
|
|
42080
|
+
return (0, import_jsx_runtime57.jsx)("div", { ref, className, style: mergedStyle, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseEnter: () => setHovered(true), onMouseLeave: () => {
|
|
42492
42081
|
setHovered(false);
|
|
42493
42082
|
setPressed(false);
|
|
42494
42083
|
if (longPressTimer)
|
|
@@ -45332,7 +44921,7 @@ function getTheme(id, mode = "light") {
|
|
|
45332
44921
|
function getDefaultThemeId() {
|
|
45333
44922
|
return "ggui";
|
|
45334
44923
|
}
|
|
45335
|
-
var ThemeContext = (0,
|
|
44924
|
+
var ThemeContext = (0, import_react45.createContext)(null);
|
|
45336
44925
|
var COLOR_MIX_SUPPORTS = "@supports (color: color-mix(in srgb, red, blue))";
|
|
45337
44926
|
function resolvePrimary500Hex(cssVariables) {
|
|
45338
44927
|
const match = cssVariables.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);
|
|
@@ -45526,7 +45115,8 @@ var COMPONENTS_EXPORTS = [
|
|
|
45526
45115
|
"Breadcrumb",
|
|
45527
45116
|
"Pagination",
|
|
45528
45117
|
"EmptyState",
|
|
45529
|
-
"Stat"
|
|
45118
|
+
"Stat",
|
|
45119
|
+
"Stepper"
|
|
45530
45120
|
];
|
|
45531
45121
|
var COMPOSITIONS_EXPORTS = [
|
|
45532
45122
|
"Header",
|
|
@@ -45537,17 +45127,11 @@ var COMPOSITIONS_EXPORTS = [
|
|
|
45537
45127
|
"ChatWindow",
|
|
45538
45128
|
"NavigationBar",
|
|
45539
45129
|
"FileUploader",
|
|
45540
|
-
"UserProfileCard",
|
|
45541
45130
|
"NotificationCenter",
|
|
45542
45131
|
"Modal",
|
|
45543
45132
|
"CommandPalette",
|
|
45544
45133
|
"Footer",
|
|
45545
|
-
"Hero"
|
|
45546
|
-
"IncidentTimeline",
|
|
45547
|
-
"MakeTabLayout",
|
|
45548
|
-
"MarketingHero",
|
|
45549
|
-
"MarketingCTA",
|
|
45550
|
-
"MarketingFeatures"
|
|
45134
|
+
"Hero"
|
|
45551
45135
|
];
|
|
45552
45136
|
var INTERACT_EXPORTS = [
|
|
45553
45137
|
"Clickable",
|
|
@@ -45626,7 +45210,6 @@ var TOKENS_EXPORTS = [
|
|
|
45626
45210
|
"lineHeight",
|
|
45627
45211
|
"letterSpacing",
|
|
45628
45212
|
"headingStyles",
|
|
45629
|
-
"textStyles",
|
|
45630
45213
|
// Layout / shape
|
|
45631
45214
|
"spacing",
|
|
45632
45215
|
"spacingValues",
|
|
@@ -45849,7 +45432,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45849
45432
|
const { error: error210, autoRetrying, catchCount } = this.state;
|
|
45850
45433
|
if (!error210) return this.props.children;
|
|
45851
45434
|
if (autoRetrying) {
|
|
45852
|
-
return /* @__PURE__ */ (0,
|
|
45435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
45853
45436
|
display: "flex",
|
|
45854
45437
|
alignItems: "center",
|
|
45855
45438
|
justifyContent: "center",
|
|
@@ -45860,7 +45443,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45860
45443
|
fontSize: 13,
|
|
45861
45444
|
color: "rgba(255,255,255,0.4)"
|
|
45862
45445
|
}, children: [
|
|
45863
|
-
/* @__PURE__ */ (0,
|
|
45446
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
45864
45447
|
width: 16,
|
|
45865
45448
|
height: 16,
|
|
45866
45449
|
border: "2px solid rgba(255,255,255,0.15)",
|
|
@@ -45869,10 +45452,10 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45869
45452
|
animation: "ggui-err-spin 0.6s linear infinite"
|
|
45870
45453
|
} }),
|
|
45871
45454
|
"Retrying...",
|
|
45872
|
-
/* @__PURE__ */ (0,
|
|
45455
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("style", { children: `@keyframes ggui-err-spin { to { transform: rotate(360deg); } }` })
|
|
45873
45456
|
] });
|
|
45874
45457
|
}
|
|
45875
|
-
return /* @__PURE__ */ (0,
|
|
45458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
45876
45459
|
display: "flex",
|
|
45877
45460
|
flexDirection: "column",
|
|
45878
45461
|
alignItems: "center",
|
|
@@ -45883,7 +45466,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45883
45466
|
textAlign: "center",
|
|
45884
45467
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
45885
45468
|
}, children: [
|
|
45886
|
-
/* @__PURE__ */ (0,
|
|
45469
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
45887
45470
|
width: 48,
|
|
45888
45471
|
height: 48,
|
|
45889
45472
|
borderRadius: 14,
|
|
@@ -45893,9 +45476,9 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45893
45476
|
justifyContent: "center",
|
|
45894
45477
|
fontSize: 22
|
|
45895
45478
|
}, children: "!" }),
|
|
45896
|
-
/* @__PURE__ */ (0,
|
|
45897
|
-
/* @__PURE__ */ (0,
|
|
45898
|
-
/* @__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)(
|
|
45899
45482
|
"button",
|
|
45900
45483
|
{
|
|
45901
45484
|
onClick: () => this.setState({ error: null, catchCount: 0 }),
|
|
@@ -45913,7 +45496,7 @@ var ErrorBoundary = class extends import_react12.default.Component {
|
|
|
45913
45496
|
children: "Retry"
|
|
45914
45497
|
}
|
|
45915
45498
|
),
|
|
45916
|
-
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 })
|
|
45917
45500
|
] });
|
|
45918
45501
|
}
|
|
45919
45502
|
};
|
|
@@ -45922,7 +45505,7 @@ function ReactComponentRenderer({
|
|
|
45922
45505
|
props = {},
|
|
45923
45506
|
themeId,
|
|
45924
45507
|
cssOverrides,
|
|
45925
|
-
fallback = /* @__PURE__ */ (0,
|
|
45508
|
+
fallback = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: "Loading component..." }),
|
|
45926
45509
|
onError
|
|
45927
45510
|
}) {
|
|
45928
45511
|
const reactId = (0, import_react12.useId)();
|
|
@@ -46002,13 +45585,13 @@ function ReactComponentRenderer({
|
|
|
46002
45585
|
}, [code]);
|
|
46003
45586
|
const themeCss = themeId ? getScopedThemeCss(themeId, scopeClass) : getScopedCssTokens(scopeClass);
|
|
46004
45587
|
if (!code || code.trim().length === 0) {
|
|
46005
|
-
return /* @__PURE__ */ (0,
|
|
45588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: fallback });
|
|
46006
45589
|
}
|
|
46007
45590
|
if (loading) {
|
|
46008
|
-
return /* @__PURE__ */ (0,
|
|
45591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: fallback });
|
|
46009
45592
|
}
|
|
46010
45593
|
if (error210) {
|
|
46011
|
-
return /* @__PURE__ */ (0,
|
|
45594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { style: {
|
|
46012
45595
|
display: "flex",
|
|
46013
45596
|
flexDirection: "column",
|
|
46014
45597
|
alignItems: "center",
|
|
@@ -46019,7 +45602,7 @@ function ReactComponentRenderer({
|
|
|
46019
45602
|
textAlign: "center",
|
|
46020
45603
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
46021
45604
|
}, children: [
|
|
46022
|
-
/* @__PURE__ */ (0,
|
|
45605
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
46023
45606
|
width: 48,
|
|
46024
45607
|
height: 48,
|
|
46025
45608
|
borderRadius: 14,
|
|
@@ -46029,19 +45612,19 @@ function ReactComponentRenderer({
|
|
|
46029
45612
|
justifyContent: "center",
|
|
46030
45613
|
fontSize: 22
|
|
46031
45614
|
}, children: "!" }),
|
|
46032
|
-
/* @__PURE__ */ (0,
|
|
46033
|
-
/* @__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 })
|
|
46034
45617
|
] });
|
|
46035
45618
|
}
|
|
46036
45619
|
if (!Component2) {
|
|
46037
|
-
return /* @__PURE__ */ (0,
|
|
45620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: fallback });
|
|
46038
45621
|
}
|
|
46039
|
-
return /* @__PURE__ */ (0,
|
|
46040
|
-
/* @__PURE__ */ (0,
|
|
45622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: scopeClass, children: [
|
|
45623
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("style", { children: [
|
|
46041
45624
|
themeCss,
|
|
46042
45625
|
cssOverrides ?? ""
|
|
46043
45626
|
] }),
|
|
46044
|
-
/* @__PURE__ */ (0,
|
|
45627
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Component2, { ...props }) }, code.length)
|
|
46045
45628
|
] });
|
|
46046
45629
|
}
|
|
46047
45630
|
var previewShimmerKeyframes = `@keyframes ggui-preview-shimmer {
|
|
@@ -46074,7 +45657,7 @@ var previewKeyframesCss = [
|
|
|
46074
45657
|
var DynamicComponent = ReactComponentRenderer;
|
|
46075
45658
|
|
|
46076
45659
|
// hub-preview-client/main.tsx
|
|
46077
|
-
var
|
|
45660
|
+
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
46078
45661
|
function bootstrap() {
|
|
46079
45662
|
const boot = window.__GGUI_DEV_PREVIEW__;
|
|
46080
45663
|
return {
|
|
@@ -46165,90 +45748,90 @@ function PreviewApp({
|
|
|
46165
45748
|
return () => controller.abort();
|
|
46166
45749
|
}, [selectedId, token]);
|
|
46167
45750
|
if (state.kind === "idle") {
|
|
46168
|
-
return /* @__PURE__ */ (0,
|
|
46169
|
-
/* @__PURE__ */ (0,
|
|
46170
|
-
/* @__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." })
|
|
46171
45754
|
] });
|
|
46172
45755
|
}
|
|
46173
45756
|
if (state.kind === "loading") {
|
|
46174
|
-
return /* @__PURE__ */ (0,
|
|
46175
|
-
/* @__PURE__ */ (0,
|
|
45757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45758
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Meta, { children: [
|
|
46176
45759
|
"Preview of ",
|
|
46177
|
-
/* @__PURE__ */ (0,
|
|
45760
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: selectedId })
|
|
46178
45761
|
] }),
|
|
46179
|
-
/* @__PURE__ */ (0,
|
|
45762
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Status, { children: "Loading bundle\u2026" })
|
|
46180
45763
|
] });
|
|
46181
45764
|
}
|
|
46182
45765
|
if (state.kind === "ready") {
|
|
46183
|
-
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 }) });
|
|
46184
45767
|
}
|
|
46185
45768
|
if (state.kind === "not-found") {
|
|
46186
|
-
return /* @__PURE__ */ (0,
|
|
46187
|
-
/* @__PURE__ */ (0,
|
|
45769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45770
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Meta, { children: [
|
|
46188
45771
|
"Preview of ",
|
|
46189
|
-
/* @__PURE__ */ (0,
|
|
45772
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: selectedId })
|
|
46190
45773
|
] }),
|
|
46191
|
-
/* @__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." })
|
|
46192
45775
|
] });
|
|
46193
45776
|
}
|
|
46194
45777
|
if (state.kind === "missing") {
|
|
46195
|
-
return /* @__PURE__ */ (0,
|
|
46196
|
-
/* @__PURE__ */ (0,
|
|
46197
|
-
/* @__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: [
|
|
46198
45781
|
"Declare ",
|
|
46199
|
-
/* @__PURE__ */ (0,
|
|
45782
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "entryPoint" }),
|
|
46200
45783
|
" in ",
|
|
46201
|
-
/* @__PURE__ */ (0,
|
|
45784
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "ggui.ui.json" }),
|
|
46202
45785
|
", or colocate a ",
|
|
46203
|
-
/* @__PURE__ */ (0,
|
|
45786
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "ggui.ui.tsx" }),
|
|
46204
45787
|
" beside the manifest."
|
|
46205
45788
|
] }),
|
|
46206
|
-
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") })
|
|
46207
45790
|
] });
|
|
46208
45791
|
}
|
|
46209
45792
|
if (state.kind === "compile") {
|
|
46210
|
-
return /* @__PURE__ */ (0,
|
|
46211
|
-
/* @__PURE__ */ (0,
|
|
46212
|
-
/* @__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) => {
|
|
46213
45796
|
const loc = err.location;
|
|
46214
45797
|
const locLine = loc ? `${loc.file ?? state.detail.entry}:${loc.line ?? "?"}:${loc.column ?? "?"}` : state.detail.entry;
|
|
46215
|
-
return /* @__PURE__ */ (0,
|
|
46216
|
-
/* @__PURE__ */ (0,
|
|
46217
|
-
/* @__PURE__ */ (0,
|
|
46218
|
-
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 })
|
|
46219
45802
|
] }, i);
|
|
46220
45803
|
}) })
|
|
46221
45804
|
] });
|
|
46222
45805
|
}
|
|
46223
45806
|
if (state.kind === "http") {
|
|
46224
|
-
return /* @__PURE__ */ (0,
|
|
46225
|
-
/* @__PURE__ */ (0,
|
|
45807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Pane, { children: [
|
|
45808
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Meta, { children: [
|
|
46226
45809
|
"Bundle fetch failed (HTTP ",
|
|
46227
45810
|
state.status,
|
|
46228
45811
|
")"
|
|
46229
45812
|
] }),
|
|
46230
|
-
/* @__PURE__ */ (0,
|
|
45813
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Status, { children: state.message })
|
|
46231
45814
|
] });
|
|
46232
45815
|
}
|
|
46233
|
-
return /* @__PURE__ */ (0,
|
|
46234
|
-
/* @__PURE__ */ (0,
|
|
46235
|
-
/* @__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: [
|
|
46236
45819
|
"Studio could not reach the server \u2014 is ",
|
|
46237
|
-
/* @__PURE__ */ (0,
|
|
45820
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("code", { children: "ggui dev" }),
|
|
46238
45821
|
" still running?",
|
|
46239
|
-
/* @__PURE__ */ (0,
|
|
46240
|
-
/* @__PURE__ */ (0,
|
|
45822
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("br", {}),
|
|
45823
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "dim", children: state.message })
|
|
46241
45824
|
] })
|
|
46242
45825
|
] });
|
|
46243
45826
|
}
|
|
46244
45827
|
function Pane({ children }) {
|
|
46245
|
-
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 }) });
|
|
46246
45829
|
}
|
|
46247
45830
|
function Meta({ children }) {
|
|
46248
|
-
return /* @__PURE__ */ (0,
|
|
45831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "meta", children });
|
|
46249
45832
|
}
|
|
46250
45833
|
function Status({ children }) {
|
|
46251
|
-
return /* @__PURE__ */ (0,
|
|
45834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "status", children });
|
|
46252
45835
|
}
|
|
46253
45836
|
async function subscribeToRegistry(token, signal, onEvent) {
|
|
46254
45837
|
let backoff = 500;
|
|
@@ -46317,7 +45900,7 @@ function mount() {
|
|
|
46317
45900
|
if (!root) throw new Error("preview-root element not found in shell");
|
|
46318
45901
|
const { token, selectedId } = bootstrap();
|
|
46319
45902
|
(0, import_client.createRoot)(root).render(
|
|
46320
|
-
/* @__PURE__ */ (0,
|
|
45903
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PreviewApp, { token, selectedId }) })
|
|
46321
45904
|
);
|
|
46322
45905
|
}
|
|
46323
45906
|
mount();
|