@workflow/web 5.0.0-beta.14 → 5.0.0-beta.16
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/build/client/assets/{highlighted-body-B3W2YXNL-BEqiCpJd.js → highlighted-body-B3W2YXNL-QKf7Yrcl.js} +1 -1
- package/build/client/assets/{home-D9oyGYfj.js → home-C2tAadK2.js} +2 -2
- package/build/client/assets/{manifest-6fc92124.js → manifest-96e6bcc7.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-DKxHcEOp.css → mermaid-3ZIDBTTL-CVTQRy2j.css} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-C02sm-ZS.js → mermaid-3ZIDBTTL-DQJ4rkIZ.js} +1019 -307
- package/build/client/assets/root-D1iC2mNY.css +1 -0
- package/build/client/assets/{root-Dduz44vX.js → root-QCHdCGTF.js} +1 -1
- package/build/client/assets/{run-detail-uOQTua8_.js → run-detail-D4mcR51B.js} +201 -222
- package/build/client/assets/server-build-6KQbeuD8.css +1 -0
- package/build/client/assets/{workflow-graph-viewer-CU0UU458.js → workflow-graph-viewer-BEhdopGj.js} +4918 -4917
- package/build/server/assets/{app-BKJ-G0q_.js → app-BxW1wRWj.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-Frh10t8y.js → highlighted-body-B3W2YXNL-CP6Zp179.js} +2 -2
- package/build/server/assets/index-Cxv7xPiz.js +95 -0
- package/build/server/assets/{mermaid-3ZIDBTTL-BtSvadnb.js → mermaid-3ZIDBTTL-BMFjZDcW.js} +2 -2
- package/build/server/assets/{server-build-B9XdaVeE.js → server-build-B4JanZE6.js} +10782 -9572
- package/build/server/assets/{token-util-FXtXbDcd.js → token-util-Cw2FB_2n.js} +2 -2
- package/build/server/assets/{token-CpI-8AoV.js → token-w6r7bnnd.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +5 -5
- package/build/client/assets/root-Bqr5evzw.css +0 -1
- package/build/client/assets/server-build-CNnlgxpd.css +0 -1
- package/build/server/assets/index-GhULR6rc.js +0 -92
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-g14N5vQl.js","assets/index-B6-SzLmT.js","assets/index-BXZSIDEp.js","assets/highlighted-body-B3W2YXNL-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-g14N5vQl.js","assets/index-B6-SzLmT.js","assets/index-BXZSIDEp.js","assets/highlighted-body-B3W2YXNL-QKf7Yrcl.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -2376,7 +2376,7 @@ var Arrow$2 = reactExports.forwardRef((props, forwardedRef) => {
|
|
|
2376
2376
|
);
|
|
2377
2377
|
});
|
|
2378
2378
|
Arrow$2.displayName = NAME$1;
|
|
2379
|
-
var Root$
|
|
2379
|
+
var Root$2 = Arrow$2;
|
|
2380
2380
|
function useSize(element2) {
|
|
2381
2381
|
const [size2, setSize] = reactExports.useState(void 0);
|
|
2382
2382
|
useLayoutEffect2(() => {
|
|
@@ -2623,7 +2623,7 @@ var PopperArrow = reactExports.forwardRef(function PopperArrow2(props, forwarded
|
|
|
2623
2623
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
2624
2624
|
},
|
|
2625
2625
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2626
|
-
Root$
|
|
2626
|
+
Root$2,
|
|
2627
2627
|
{
|
|
2628
2628
|
...arrowProps,
|
|
2629
2629
|
ref: forwardedRef,
|
|
@@ -2908,7 +2908,7 @@ var VisuallyHidden = reactExports.forwardRef(
|
|
|
2908
2908
|
}
|
|
2909
2909
|
);
|
|
2910
2910
|
VisuallyHidden.displayName = NAME;
|
|
2911
|
-
var Root = VisuallyHidden;
|
|
2911
|
+
var Root$1 = VisuallyHidden;
|
|
2912
2912
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
2913
2913
|
createPopperScope
|
|
2914
2914
|
]);
|
|
@@ -3240,7 +3240,7 @@ var TooltipContentImpl = reactExports.forwardRef(
|
|
|
3240
3240
|
},
|
|
3241
3241
|
children: [
|
|
3242
3242
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Slottable$1, { children: children2 }),
|
|
3243
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children2 }) })
|
|
3243
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$1, { id: context.contentId, role: "tooltip", children: ariaLabel || children2 }) })
|
|
3244
3244
|
]
|
|
3245
3245
|
}
|
|
3246
3246
|
)
|
|
@@ -15311,10 +15311,12 @@ function _instanceof(cls, params = {}) {
|
|
|
15311
15311
|
function date(params) {
|
|
15312
15312
|
return /* @__PURE__ */ _coercedDate(ZodDate, params);
|
|
15313
15313
|
}
|
|
15314
|
-
|
|
15314
|
+
const RESERVED_ATTRIBUTE_KEY_PREFIX = "$";
|
|
15315
|
+
const AttributeChangeSchema = object({
|
|
15315
15316
|
key: string$2(),
|
|
15316
15317
|
value: union([string$2(), _null()])
|
|
15317
15318
|
});
|
|
15319
|
+
const AttributeChangesSchema = array(AttributeChangeSchema);
|
|
15318
15320
|
const BinarySerializedDataSchema = _instanceof(Uint8Array);
|
|
15319
15321
|
const LegacySerializedDataSchemaV1 = any();
|
|
15320
15322
|
const SerializedDataSchema = union([
|
|
@@ -15339,6 +15341,8 @@ const EventTypeSchema = _enum([
|
|
|
15339
15341
|
"run_completed",
|
|
15340
15342
|
"run_failed",
|
|
15341
15343
|
"run_cancelled",
|
|
15344
|
+
// Run attribute events
|
|
15345
|
+
"attr_set",
|
|
15342
15346
|
// Step lifecycle events
|
|
15343
15347
|
"step_created",
|
|
15344
15348
|
"step_completed",
|
|
@@ -15454,13 +15458,34 @@ const WaitCompletedEventSchema = BaseEventSchema.extend({
|
|
|
15454
15458
|
resumeAt: date().optional()
|
|
15455
15459
|
}).optional()
|
|
15456
15460
|
});
|
|
15461
|
+
const AttributeWriterSchema = discriminatedUnion("type", [
|
|
15462
|
+
object({
|
|
15463
|
+
type: literal("workflow")
|
|
15464
|
+
}),
|
|
15465
|
+
object({
|
|
15466
|
+
type: literal("step"),
|
|
15467
|
+
stepId: string$2(),
|
|
15468
|
+
attempt: number$2()
|
|
15469
|
+
})
|
|
15470
|
+
]);
|
|
15471
|
+
const AttrSetEventSchema = BaseEventSchema.extend({
|
|
15472
|
+
eventType: literal("attr_set"),
|
|
15473
|
+
correlationId: string$2().optional(),
|
|
15474
|
+
eventData: object({
|
|
15475
|
+
changes: AttributeChangesSchema,
|
|
15476
|
+
writer: AttributeWriterSchema,
|
|
15477
|
+
allowReservedAttributes: literal(true).optional()
|
|
15478
|
+
})
|
|
15479
|
+
});
|
|
15457
15480
|
const RunCreatedEventSchema = BaseEventSchema.extend({
|
|
15458
15481
|
eventType: literal("run_created"),
|
|
15459
15482
|
eventData: object({
|
|
15460
15483
|
deploymentId: string$2(),
|
|
15461
15484
|
workflowName: string$2(),
|
|
15462
15485
|
input: SerializedDataSchema,
|
|
15463
|
-
executionContext: record(string$2(), any()).optional()
|
|
15486
|
+
executionContext: record(string$2(), any()).optional(),
|
|
15487
|
+
attributes: record(string$2(), string$2()).optional(),
|
|
15488
|
+
allowReservedAttributes: literal(true).optional()
|
|
15464
15489
|
})
|
|
15465
15490
|
});
|
|
15466
15491
|
const RunStartedEventSchema = BaseEventSchema.extend({
|
|
@@ -15469,7 +15494,9 @@ const RunStartedEventSchema = BaseEventSchema.extend({
|
|
|
15469
15494
|
input: SerializedDataSchema.optional(),
|
|
15470
15495
|
deploymentId: string$2().optional(),
|
|
15471
15496
|
workflowName: string$2().optional(),
|
|
15472
|
-
executionContext: record(string$2(), any()).optional()
|
|
15497
|
+
executionContext: record(string$2(), any()).optional(),
|
|
15498
|
+
attributes: record(string$2(), string$2()).optional(),
|
|
15499
|
+
allowReservedAttributes: literal(true).optional()
|
|
15473
15500
|
}).optional()
|
|
15474
15501
|
});
|
|
15475
15502
|
const RunCompletedEventSchema = BaseEventSchema.extend({
|
|
@@ -15501,6 +15528,7 @@ discriminatedUnion("eventType", [
|
|
|
15501
15528
|
RunCompletedEventSchema,
|
|
15502
15529
|
RunFailedEventSchema,
|
|
15503
15530
|
RunCancelledEventSchema,
|
|
15531
|
+
AttrSetEventSchema,
|
|
15504
15532
|
// Step lifecycle events
|
|
15505
15533
|
StepCreatedEventSchema,
|
|
15506
15534
|
StepCompletedEventSchema,
|
|
@@ -15522,6 +15550,7 @@ const AllEventsSchema = discriminatedUnion("eventType", [
|
|
|
15522
15550
|
RunCompletedEventSchema,
|
|
15523
15551
|
RunFailedEventSchema,
|
|
15524
15552
|
RunCancelledEventSchema,
|
|
15553
|
+
AttrSetEventSchema,
|
|
15525
15554
|
// Step lifecycle events
|
|
15526
15555
|
StepCreatedEventSchema,
|
|
15527
15556
|
StepCompletedEventSchema,
|
|
@@ -15568,7 +15597,15 @@ const RunInputSchema = object({
|
|
|
15568
15597
|
deploymentId: string$2(),
|
|
15569
15598
|
workflowName: string$2(),
|
|
15570
15599
|
specVersion: number$2(),
|
|
15571
|
-
executionContext: record(string$2(), any()).optional()
|
|
15600
|
+
executionContext: record(string$2(), any()).optional(),
|
|
15601
|
+
/** Initial plaintext run attributes, for resilient run creation. */
|
|
15602
|
+
attributes: record(string$2(), string$2()).optional(),
|
|
15603
|
+
/**
|
|
15604
|
+
* Permits reserved `$`-prefixed keys in `attributes`, mirrored from the
|
|
15605
|
+
* `start()` option so resilient run creation validates the same way as
|
|
15606
|
+
* the original `run_created` attempt.
|
|
15607
|
+
*/
|
|
15608
|
+
allowReservedAttributes: literal(true).optional()
|
|
15572
15609
|
});
|
|
15573
15610
|
const WorkflowInvokePayloadSchema = object({
|
|
15574
15611
|
runId: string$2(),
|
|
@@ -17218,6 +17255,87 @@ const ToastContext = reactExports.createContext(defaultAdapter);
|
|
|
17218
17255
|
function useToast() {
|
|
17219
17256
|
return reactExports.useContext(ToastContext);
|
|
17220
17257
|
}
|
|
17258
|
+
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
17259
|
+
const cx = clsx;
|
|
17260
|
+
const cva = (base, config2) => (props) => {
|
|
17261
|
+
var _config_compoundVariants;
|
|
17262
|
+
if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
17263
|
+
const { variants, defaultVariants } = config2;
|
|
17264
|
+
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
17265
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
17266
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
17267
|
+
if (variantProp === null) return null;
|
|
17268
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
17269
|
+
return variants[variant][variantKey];
|
|
17270
|
+
});
|
|
17271
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
17272
|
+
let [key, value] = param;
|
|
17273
|
+
if (value === void 0) {
|
|
17274
|
+
return acc;
|
|
17275
|
+
}
|
|
17276
|
+
acc[key] = value;
|
|
17277
|
+
return acc;
|
|
17278
|
+
}, {});
|
|
17279
|
+
const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (_config_compoundVariants = config2.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
17280
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
17281
|
+
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
17282
|
+
let [key, value] = param2;
|
|
17283
|
+
return Array.isArray(value) ? value.includes({
|
|
17284
|
+
...defaultVariants,
|
|
17285
|
+
...propsWithoutUndefined
|
|
17286
|
+
}[key]) : {
|
|
17287
|
+
...defaultVariants,
|
|
17288
|
+
...propsWithoutUndefined
|
|
17289
|
+
}[key] === value;
|
|
17290
|
+
}) ? [
|
|
17291
|
+
...acc,
|
|
17292
|
+
cvClass,
|
|
17293
|
+
cvClassName
|
|
17294
|
+
] : acc;
|
|
17295
|
+
}, []);
|
|
17296
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
17297
|
+
};
|
|
17298
|
+
const buttonVariants$1 = cva([
|
|
17299
|
+
"outline-none m-0 border-0 align-baseline no-underline group/trigger",
|
|
17300
|
+
"relative cursor-pointer select-none transform translate-z-0",
|
|
17301
|
+
"inline-flex max-w-full items-center justify-center gap-x-1 whitespace-nowrap rounded-md font-medium",
|
|
17302
|
+
"!text-gray-100",
|
|
17303
|
+
"bg-gray-1000",
|
|
17304
|
+
"transition-[border-color,background,color,transform,box-shadow] duration-150 ease-in-out",
|
|
17305
|
+
// Geist invert hover: literal fallbacks (no token dep, so it resolves in any
|
|
17306
|
+
// consuming app), darkened via ancestor theme class without a registered variant.
|
|
17307
|
+
"hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_22%))]",
|
|
17308
|
+
"[.dark-theme_&]:hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_80%))]",
|
|
17309
|
+
"[[data-theme=dark]_&]:hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_80%))]",
|
|
17310
|
+
// Geist focus ring as arbitrary properties (no bare `outline`/ambiguous
|
|
17311
|
+
// arbitrary-color utilities, which differ between Tailwind v3 and v4).
|
|
17312
|
+
"focus-visible:[outline:2px_solid_var(--ds-focus-color)] focus-visible:[outline-offset:2px]",
|
|
17313
|
+
// disabled styles
|
|
17314
|
+
"disabled:cursor-not-allowed aria-disabled:cursor-not-allowed",
|
|
17315
|
+
"disabled:bg-gray-100 disabled:!text-gray-700 disabled:hover:bg-gray-100",
|
|
17316
|
+
"aria-disabled:bg-gray-100 aria-disabled:text-gray-700 aria-disabled:hover:bg-gray-100"
|
|
17317
|
+
], {
|
|
17318
|
+
variants: {
|
|
17319
|
+
variant: {
|
|
17320
|
+
default: "",
|
|
17321
|
+
secondary: "border border-gray-alpha-400 [--themed-bg:_var(--ds-background-100)] [--themed-fg:_var(--ds-gray-1000)] [--themed-hover-bg:_var(--ds-gray-alpha-200)]",
|
|
17322
|
+
ghost: "[--themed-bg:_transparent] [--themed-fg:_var(--ds-gray-1000)] [--themed-hover-bg:_var(--ds-gray-alpha-100)]"
|
|
17323
|
+
},
|
|
17324
|
+
size: {
|
|
17325
|
+
default: "h-10 px-4 text-[14px]",
|
|
17326
|
+
sm: "h-8 px-3 text-[14px]",
|
|
17327
|
+
xs: "h-6 px-1.5 py-0.5 text-button-12 rounded-[4px]",
|
|
17328
|
+
icon: "h-8 w-8"
|
|
17329
|
+
}
|
|
17330
|
+
},
|
|
17331
|
+
defaultVariants: {
|
|
17332
|
+
variant: "default",
|
|
17333
|
+
size: "default"
|
|
17334
|
+
}
|
|
17335
|
+
});
|
|
17336
|
+
function Button$1({ className, variant, size: size2, type = "button", ...props }) {
|
|
17337
|
+
return jsxRuntimeExports.jsx("button", { type, className: cn$4(buttonVariants$1({ variant, size: size2, className })), ...props });
|
|
17338
|
+
}
|
|
17221
17339
|
var __create = Object.create;
|
|
17222
17340
|
var __defProp2 = Object.defineProperty;
|
|
17223
17341
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -18084,87 +18202,6 @@ const geistTheme = {
|
|
|
18084
18202
|
};
|
|
18085
18203
|
const inspectorThemeLight = geistTheme;
|
|
18086
18204
|
const inspectorThemeDark = geistTheme;
|
|
18087
|
-
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
18088
|
-
const cx = clsx;
|
|
18089
|
-
const cva = (base, config2) => (props) => {
|
|
18090
|
-
var _config_compoundVariants;
|
|
18091
|
-
if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
18092
|
-
const { variants, defaultVariants } = config2;
|
|
18093
|
-
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
18094
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
18095
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
18096
|
-
if (variantProp === null) return null;
|
|
18097
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
18098
|
-
return variants[variant][variantKey];
|
|
18099
|
-
});
|
|
18100
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
18101
|
-
let [key, value] = param;
|
|
18102
|
-
if (value === void 0) {
|
|
18103
|
-
return acc;
|
|
18104
|
-
}
|
|
18105
|
-
acc[key] = value;
|
|
18106
|
-
return acc;
|
|
18107
|
-
}, {});
|
|
18108
|
-
const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (_config_compoundVariants = config2.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
18109
|
-
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
18110
|
-
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
18111
|
-
let [key, value] = param2;
|
|
18112
|
-
return Array.isArray(value) ? value.includes({
|
|
18113
|
-
...defaultVariants,
|
|
18114
|
-
...propsWithoutUndefined
|
|
18115
|
-
}[key]) : {
|
|
18116
|
-
...defaultVariants,
|
|
18117
|
-
...propsWithoutUndefined
|
|
18118
|
-
}[key] === value;
|
|
18119
|
-
}) ? [
|
|
18120
|
-
...acc,
|
|
18121
|
-
cvClass,
|
|
18122
|
-
cvClassName
|
|
18123
|
-
] : acc;
|
|
18124
|
-
}, []);
|
|
18125
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
18126
|
-
};
|
|
18127
|
-
const buttonVariants$1 = cva([
|
|
18128
|
-
"outline-none m-0 border-0 align-baseline no-underline group/trigger",
|
|
18129
|
-
"relative cursor-pointer select-none transform translate-z-0",
|
|
18130
|
-
"inline-flex max-w-full items-center justify-center gap-x-1 whitespace-nowrap rounded-md font-medium",
|
|
18131
|
-
"!text-gray-100",
|
|
18132
|
-
"bg-gray-1000",
|
|
18133
|
-
"transition-[border-color,background,color,transform,box-shadow] duration-150 ease-in-out",
|
|
18134
|
-
// Geist invert hover: literal fallbacks (no token dep, so it resolves in any
|
|
18135
|
-
// consuming app), darkened via ancestor theme class without a registered variant.
|
|
18136
|
-
"hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_22%))]",
|
|
18137
|
-
"[.dark-theme_&]:hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_80%))]",
|
|
18138
|
-
"[[data-theme=dark]_&]:hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_80%))]",
|
|
18139
|
-
// Geist focus ring as arbitrary properties (no bare `outline`/ambiguous
|
|
18140
|
-
// arbitrary-color utilities, which differ between Tailwind v3 and v4).
|
|
18141
|
-
"focus-visible:[outline:2px_solid_var(--ds-focus-color)] focus-visible:[outline-offset:2px]",
|
|
18142
|
-
// disabled styles
|
|
18143
|
-
"disabled:cursor-not-allowed aria-disabled:cursor-not-allowed",
|
|
18144
|
-
"disabled:bg-gray-100 disabled:!text-gray-700 disabled:hover:bg-gray-100",
|
|
18145
|
-
"aria-disabled:bg-gray-100 aria-disabled:text-gray-700 aria-disabled:hover:bg-gray-100"
|
|
18146
|
-
], {
|
|
18147
|
-
variants: {
|
|
18148
|
-
variant: {
|
|
18149
|
-
default: "",
|
|
18150
|
-
secondary: "border border-gray-alpha-400 [--themed-bg:_var(--ds-background-100)] [--themed-fg:_var(--ds-gray-1000)] [--themed-hover-bg:_var(--ds-gray-alpha-200)]",
|
|
18151
|
-
ghost: "[--themed-bg:_transparent] [--themed-fg:_var(--ds-gray-1000)] [--themed-hover-bg:_var(--ds-gray-alpha-100)]"
|
|
18152
|
-
},
|
|
18153
|
-
size: {
|
|
18154
|
-
default: "h-10 px-4 text-[14px]",
|
|
18155
|
-
sm: "h-8 px-3 text-[14px]",
|
|
18156
|
-
xs: "h-6 px-1.5 py-0.5 text-button-12 rounded-[4px]",
|
|
18157
|
-
icon: "h-8 w-8"
|
|
18158
|
-
}
|
|
18159
|
-
},
|
|
18160
|
-
defaultVariants: {
|
|
18161
|
-
variant: "default",
|
|
18162
|
-
size: "default"
|
|
18163
|
-
}
|
|
18164
|
-
});
|
|
18165
|
-
function Button$1({ className, variant, size: size2, type = "button", ...props }) {
|
|
18166
|
-
return jsxRuntimeExports.jsx("button", { type, className: cn$4(buttonVariants$1({ variant, size: size2, className })), ...props });
|
|
18167
|
-
}
|
|
18168
18205
|
const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
|
|
18169
18206
|
function Spinner({ size: size2 = 14, color: color5 }) {
|
|
18170
18207
|
const config2 = size2 <= 12 ? {
|
|
@@ -18517,6 +18554,735 @@ function isDeepEqual(a2, b2, seen2 = /* @__PURE__ */ new WeakMap()) {
|
|
|
18517
18554
|
}
|
|
18518
18555
|
return true;
|
|
18519
18556
|
}
|
|
18557
|
+
function setRef(ref, value) {
|
|
18558
|
+
if (typeof ref === "function") {
|
|
18559
|
+
return ref(value);
|
|
18560
|
+
} else if (ref !== null && ref !== void 0) {
|
|
18561
|
+
ref.current = value;
|
|
18562
|
+
}
|
|
18563
|
+
}
|
|
18564
|
+
function composeRefs(...refs) {
|
|
18565
|
+
return (node2) => {
|
|
18566
|
+
let hasCleanup = false;
|
|
18567
|
+
const cleanups = refs.map((ref) => {
|
|
18568
|
+
const cleanup = setRef(ref, node2);
|
|
18569
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
18570
|
+
hasCleanup = true;
|
|
18571
|
+
}
|
|
18572
|
+
return cleanup;
|
|
18573
|
+
});
|
|
18574
|
+
if (hasCleanup) {
|
|
18575
|
+
return () => {
|
|
18576
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
18577
|
+
const cleanup = cleanups[i];
|
|
18578
|
+
if (typeof cleanup == "function") {
|
|
18579
|
+
cleanup();
|
|
18580
|
+
} else {
|
|
18581
|
+
setRef(refs[i], null);
|
|
18582
|
+
}
|
|
18583
|
+
}
|
|
18584
|
+
};
|
|
18585
|
+
}
|
|
18586
|
+
};
|
|
18587
|
+
}
|
|
18588
|
+
function useComposedRefs(...refs) {
|
|
18589
|
+
return reactExports.useCallback(composeRefs(...refs), refs);
|
|
18590
|
+
}
|
|
18591
|
+
var Slot = reactExports.forwardRef((props, forwardedRef) => {
|
|
18592
|
+
const { children: children2, ...slotProps } = props;
|
|
18593
|
+
const childrenArray = reactExports.Children.toArray(children2);
|
|
18594
|
+
const slottable = childrenArray.find(isSlottable);
|
|
18595
|
+
if (slottable) {
|
|
18596
|
+
const newElement = slottable.props.children;
|
|
18597
|
+
const newChildren = childrenArray.map((child) => {
|
|
18598
|
+
if (child === slottable) {
|
|
18599
|
+
if (reactExports.Children.count(newElement) > 1) return reactExports.Children.only(null);
|
|
18600
|
+
return reactExports.isValidElement(newElement) ? newElement.props.children : null;
|
|
18601
|
+
} else {
|
|
18602
|
+
return child;
|
|
18603
|
+
}
|
|
18604
|
+
});
|
|
18605
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: reactExports.isValidElement(newElement) ? reactExports.cloneElement(newElement, void 0, newChildren) : null });
|
|
18606
|
+
}
|
|
18607
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: children2 });
|
|
18608
|
+
});
|
|
18609
|
+
Slot.displayName = "Slot";
|
|
18610
|
+
var SlotClone = reactExports.forwardRef((props, forwardedRef) => {
|
|
18611
|
+
const { children: children2, ...slotProps } = props;
|
|
18612
|
+
if (reactExports.isValidElement(children2)) {
|
|
18613
|
+
const childrenRef = getElementRef(children2);
|
|
18614
|
+
return reactExports.cloneElement(children2, {
|
|
18615
|
+
...mergeProps(slotProps, children2.props),
|
|
18616
|
+
// @ts-ignore
|
|
18617
|
+
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
18618
|
+
});
|
|
18619
|
+
}
|
|
18620
|
+
return reactExports.Children.count(children2) > 1 ? reactExports.Children.only(null) : null;
|
|
18621
|
+
});
|
|
18622
|
+
SlotClone.displayName = "SlotClone";
|
|
18623
|
+
var Slottable = ({ children: children2 }) => {
|
|
18624
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 });
|
|
18625
|
+
};
|
|
18626
|
+
function isSlottable(child) {
|
|
18627
|
+
return reactExports.isValidElement(child) && child.type === Slottable;
|
|
18628
|
+
}
|
|
18629
|
+
function mergeProps(slotProps, childProps) {
|
|
18630
|
+
const overrideProps = { ...childProps };
|
|
18631
|
+
for (const propName in childProps) {
|
|
18632
|
+
const slotPropValue = slotProps[propName];
|
|
18633
|
+
const childPropValue = childProps[propName];
|
|
18634
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
18635
|
+
if (isHandler) {
|
|
18636
|
+
if (slotPropValue && childPropValue) {
|
|
18637
|
+
overrideProps[propName] = (...args) => {
|
|
18638
|
+
childPropValue(...args);
|
|
18639
|
+
slotPropValue(...args);
|
|
18640
|
+
};
|
|
18641
|
+
} else if (slotPropValue) {
|
|
18642
|
+
overrideProps[propName] = slotPropValue;
|
|
18643
|
+
}
|
|
18644
|
+
} else if (propName === "style") {
|
|
18645
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
18646
|
+
} else if (propName === "className") {
|
|
18647
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
18648
|
+
}
|
|
18649
|
+
}
|
|
18650
|
+
return { ...slotProps, ...overrideProps };
|
|
18651
|
+
}
|
|
18652
|
+
function getElementRef(element2) {
|
|
18653
|
+
var _a3, _b2;
|
|
18654
|
+
let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
|
|
18655
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
18656
|
+
if (mayWarn) {
|
|
18657
|
+
return element2.ref;
|
|
18658
|
+
}
|
|
18659
|
+
getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
|
|
18660
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
18661
|
+
if (mayWarn) {
|
|
18662
|
+
return element2.props.ref;
|
|
18663
|
+
}
|
|
18664
|
+
return element2.props.ref || element2.ref;
|
|
18665
|
+
}
|
|
18666
|
+
var Root = Slot;
|
|
18667
|
+
var debounce_1;
|
|
18668
|
+
var hasRequiredDebounce;
|
|
18669
|
+
function requireDebounce() {
|
|
18670
|
+
if (hasRequiredDebounce) return debounce_1;
|
|
18671
|
+
hasRequiredDebounce = 1;
|
|
18672
|
+
function debounce(func, wait, immediate) {
|
|
18673
|
+
var timeout, args, context, timestamp, result;
|
|
18674
|
+
if (null == wait) wait = 100;
|
|
18675
|
+
function later() {
|
|
18676
|
+
var last = Date.now() - timestamp;
|
|
18677
|
+
if (last < wait && last >= 0) {
|
|
18678
|
+
timeout = setTimeout(later, wait - last);
|
|
18679
|
+
} else {
|
|
18680
|
+
timeout = null;
|
|
18681
|
+
if (!immediate) {
|
|
18682
|
+
result = func.apply(context, args);
|
|
18683
|
+
context = args = null;
|
|
18684
|
+
}
|
|
18685
|
+
}
|
|
18686
|
+
}
|
|
18687
|
+
var debounced = function() {
|
|
18688
|
+
context = this;
|
|
18689
|
+
args = arguments;
|
|
18690
|
+
timestamp = Date.now();
|
|
18691
|
+
var callNow = immediate && !timeout;
|
|
18692
|
+
if (!timeout) timeout = setTimeout(later, wait);
|
|
18693
|
+
if (callNow) {
|
|
18694
|
+
result = func.apply(context, args);
|
|
18695
|
+
context = args = null;
|
|
18696
|
+
}
|
|
18697
|
+
return result;
|
|
18698
|
+
};
|
|
18699
|
+
debounced.clear = function() {
|
|
18700
|
+
if (timeout) {
|
|
18701
|
+
clearTimeout(timeout);
|
|
18702
|
+
timeout = null;
|
|
18703
|
+
}
|
|
18704
|
+
};
|
|
18705
|
+
debounced.flush = function() {
|
|
18706
|
+
if (timeout) {
|
|
18707
|
+
result = func.apply(context, args);
|
|
18708
|
+
context = args = null;
|
|
18709
|
+
clearTimeout(timeout);
|
|
18710
|
+
timeout = null;
|
|
18711
|
+
}
|
|
18712
|
+
};
|
|
18713
|
+
return debounced;
|
|
18714
|
+
}
|
|
18715
|
+
debounce.debounce = debounce;
|
|
18716
|
+
debounce_1 = debounce;
|
|
18717
|
+
return debounce_1;
|
|
18718
|
+
}
|
|
18719
|
+
var debounceExports = requireDebounce();
|
|
18720
|
+
const createDebounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
|
|
18721
|
+
function useMeasure(_temp) {
|
|
18722
|
+
let {
|
|
18723
|
+
debounce,
|
|
18724
|
+
scroll,
|
|
18725
|
+
polyfill,
|
|
18726
|
+
offsetSize
|
|
18727
|
+
} = {
|
|
18728
|
+
debounce: 0,
|
|
18729
|
+
scroll: false,
|
|
18730
|
+
offsetSize: false
|
|
18731
|
+
};
|
|
18732
|
+
const ResizeObserver2 = polyfill || (typeof window === "undefined" ? class ResizeObserver {
|
|
18733
|
+
} : window.ResizeObserver);
|
|
18734
|
+
if (!ResizeObserver2) {
|
|
18735
|
+
throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");
|
|
18736
|
+
}
|
|
18737
|
+
const [bounds, set] = reactExports.useState({
|
|
18738
|
+
left: 0,
|
|
18739
|
+
top: 0,
|
|
18740
|
+
width: 0,
|
|
18741
|
+
height: 0,
|
|
18742
|
+
bottom: 0,
|
|
18743
|
+
right: 0,
|
|
18744
|
+
x: 0,
|
|
18745
|
+
y: 0
|
|
18746
|
+
});
|
|
18747
|
+
const state = reactExports.useRef({
|
|
18748
|
+
element: null,
|
|
18749
|
+
scrollContainers: null,
|
|
18750
|
+
resizeObserver: null,
|
|
18751
|
+
lastBounds: bounds
|
|
18752
|
+
});
|
|
18753
|
+
const scrollDebounce = debounce ? typeof debounce === "number" ? debounce : debounce.scroll : null;
|
|
18754
|
+
const resizeDebounce = debounce ? typeof debounce === "number" ? debounce : debounce.resize : null;
|
|
18755
|
+
const mounted = reactExports.useRef(false);
|
|
18756
|
+
reactExports.useEffect(() => {
|
|
18757
|
+
mounted.current = true;
|
|
18758
|
+
return () => void (mounted.current = false);
|
|
18759
|
+
});
|
|
18760
|
+
const [forceRefresh, resizeChange, scrollChange] = reactExports.useMemo(() => {
|
|
18761
|
+
const callback = () => {
|
|
18762
|
+
if (!state.current.element) return;
|
|
18763
|
+
const {
|
|
18764
|
+
left,
|
|
18765
|
+
top,
|
|
18766
|
+
width,
|
|
18767
|
+
height,
|
|
18768
|
+
bottom,
|
|
18769
|
+
right,
|
|
18770
|
+
x: x2,
|
|
18771
|
+
y: y2
|
|
18772
|
+
} = state.current.element.getBoundingClientRect();
|
|
18773
|
+
const size2 = {
|
|
18774
|
+
left,
|
|
18775
|
+
top,
|
|
18776
|
+
width,
|
|
18777
|
+
height,
|
|
18778
|
+
bottom,
|
|
18779
|
+
right,
|
|
18780
|
+
x: x2,
|
|
18781
|
+
y: y2
|
|
18782
|
+
};
|
|
18783
|
+
if (state.current.element instanceof HTMLElement && offsetSize) {
|
|
18784
|
+
size2.height = state.current.element.offsetHeight;
|
|
18785
|
+
size2.width = state.current.element.offsetWidth;
|
|
18786
|
+
}
|
|
18787
|
+
Object.freeze(size2);
|
|
18788
|
+
if (mounted.current && !areBoundsEqual(state.current.lastBounds, size2)) set(state.current.lastBounds = size2);
|
|
18789
|
+
};
|
|
18790
|
+
return [callback, resizeDebounce ? createDebounce(callback, resizeDebounce) : callback, scrollDebounce ? createDebounce(callback, scrollDebounce) : callback];
|
|
18791
|
+
}, [set, offsetSize, scrollDebounce, resizeDebounce]);
|
|
18792
|
+
function removeListeners() {
|
|
18793
|
+
if (state.current.scrollContainers) {
|
|
18794
|
+
state.current.scrollContainers.forEach((element2) => element2.removeEventListener("scroll", scrollChange, true));
|
|
18795
|
+
state.current.scrollContainers = null;
|
|
18796
|
+
}
|
|
18797
|
+
if (state.current.resizeObserver) {
|
|
18798
|
+
state.current.resizeObserver.disconnect();
|
|
18799
|
+
state.current.resizeObserver = null;
|
|
18800
|
+
}
|
|
18801
|
+
}
|
|
18802
|
+
function addListeners() {
|
|
18803
|
+
if (!state.current.element) return;
|
|
18804
|
+
state.current.resizeObserver = new ResizeObserver2(scrollChange);
|
|
18805
|
+
state.current.resizeObserver.observe(state.current.element);
|
|
18806
|
+
if (scroll && state.current.scrollContainers) {
|
|
18807
|
+
state.current.scrollContainers.forEach((scrollContainer) => scrollContainer.addEventListener("scroll", scrollChange, {
|
|
18808
|
+
capture: true,
|
|
18809
|
+
passive: true
|
|
18810
|
+
}));
|
|
18811
|
+
}
|
|
18812
|
+
}
|
|
18813
|
+
const ref = (node2) => {
|
|
18814
|
+
if (!node2 || node2 === state.current.element) return;
|
|
18815
|
+
removeListeners();
|
|
18816
|
+
state.current.element = node2;
|
|
18817
|
+
state.current.scrollContainers = findScrollContainers(node2);
|
|
18818
|
+
addListeners();
|
|
18819
|
+
};
|
|
18820
|
+
useOnWindowScroll(scrollChange, Boolean(scroll));
|
|
18821
|
+
useOnWindowResize(resizeChange);
|
|
18822
|
+
reactExports.useEffect(() => {
|
|
18823
|
+
removeListeners();
|
|
18824
|
+
addListeners();
|
|
18825
|
+
}, [scroll, scrollChange, resizeChange]);
|
|
18826
|
+
reactExports.useEffect(() => removeListeners, []);
|
|
18827
|
+
return [ref, bounds, forceRefresh];
|
|
18828
|
+
}
|
|
18829
|
+
function useOnWindowResize(onWindowResize) {
|
|
18830
|
+
reactExports.useEffect(() => {
|
|
18831
|
+
const cb = onWindowResize;
|
|
18832
|
+
window.addEventListener("resize", cb);
|
|
18833
|
+
return () => void window.removeEventListener("resize", cb);
|
|
18834
|
+
}, [onWindowResize]);
|
|
18835
|
+
}
|
|
18836
|
+
function useOnWindowScroll(onScroll, enabled) {
|
|
18837
|
+
reactExports.useEffect(() => {
|
|
18838
|
+
if (enabled) {
|
|
18839
|
+
const cb = onScroll;
|
|
18840
|
+
window.addEventListener("scroll", cb, {
|
|
18841
|
+
capture: true,
|
|
18842
|
+
passive: true
|
|
18843
|
+
});
|
|
18844
|
+
return () => void window.removeEventListener("scroll", cb, true);
|
|
18845
|
+
}
|
|
18846
|
+
}, [onScroll, enabled]);
|
|
18847
|
+
}
|
|
18848
|
+
function findScrollContainers(element2) {
|
|
18849
|
+
const result = [];
|
|
18850
|
+
if (!element2 || element2 === document.body) return result;
|
|
18851
|
+
const {
|
|
18852
|
+
overflow,
|
|
18853
|
+
overflowX,
|
|
18854
|
+
overflowY
|
|
18855
|
+
} = window.getComputedStyle(element2);
|
|
18856
|
+
if ([overflow, overflowX, overflowY].some((prop) => prop === "auto" || prop === "scroll")) result.push(element2);
|
|
18857
|
+
return [...result, ...findScrollContainers(element2.parentElement)];
|
|
18858
|
+
}
|
|
18859
|
+
const keys$1 = ["x", "y", "top", "bottom", "left", "right", "width", "height"];
|
|
18860
|
+
const areBoundsEqual = (a2, b2) => keys$1.every((key) => a2[key] === b2[key]);
|
|
18861
|
+
const QUERY = "(prefers-reduced-motion: reduce)";
|
|
18862
|
+
const useReducedMotion = () => {
|
|
18863
|
+
const [reduced, setReduced] = reactExports.useState(() => {
|
|
18864
|
+
if (typeof window === "undefined" || !window.matchMedia)
|
|
18865
|
+
return false;
|
|
18866
|
+
return window.matchMedia(QUERY).matches;
|
|
18867
|
+
});
|
|
18868
|
+
reactExports.useEffect(() => {
|
|
18869
|
+
if (typeof window === "undefined" || !window.matchMedia)
|
|
18870
|
+
return;
|
|
18871
|
+
const media = window.matchMedia(QUERY);
|
|
18872
|
+
const onChange = () => setReduced(media.matches);
|
|
18873
|
+
media.addEventListener("change", onChange);
|
|
18874
|
+
onChange();
|
|
18875
|
+
return () => media.removeEventListener("change", onChange);
|
|
18876
|
+
}, []);
|
|
18877
|
+
return reduced;
|
|
18878
|
+
};
|
|
18879
|
+
const INACTIVE_TIMEOUT_MS = 250;
|
|
18880
|
+
const ENTER_DELAY_MS = 0;
|
|
18881
|
+
const OPEN_DELAY_MS = 150;
|
|
18882
|
+
const MAX_TRANSITION_DISTANCE_PX = 150;
|
|
18883
|
+
const MAX_OVERLAP_FOR_TRANSITION_PERCENT = 100;
|
|
18884
|
+
const PERSIST_TIMEOUT_MS = 1e3;
|
|
18885
|
+
const ContextCardContext = reactExports.createContext({
|
|
18886
|
+
rootOrigin: { x: 0, y: 0 },
|
|
18887
|
+
rootBounds: { width: 0, height: 0 },
|
|
18888
|
+
portalRef: null,
|
|
18889
|
+
activeId: null,
|
|
18890
|
+
setActiveId: () => void 0,
|
|
18891
|
+
hoveredId: null,
|
|
18892
|
+
setHoveredId: () => void 0,
|
|
18893
|
+
updateActiveContextCard: () => void 0,
|
|
18894
|
+
skipTransition: false,
|
|
18895
|
+
rootVisible: false,
|
|
18896
|
+
distanceFromLast: 0,
|
|
18897
|
+
lastOrigin: null,
|
|
18898
|
+
isProvided: false
|
|
18899
|
+
});
|
|
18900
|
+
ContextCardContext.displayName = "ContextCardContext";
|
|
18901
|
+
function useHasContextCardProvider() {
|
|
18902
|
+
return reactExports.useContext(ContextCardContext).isProvided;
|
|
18903
|
+
}
|
|
18904
|
+
function usePrevious(value) {
|
|
18905
|
+
const ref = reactExports.useRef(null);
|
|
18906
|
+
reactExports.useEffect(() => {
|
|
18907
|
+
ref.current = value;
|
|
18908
|
+
});
|
|
18909
|
+
return ref.current;
|
|
18910
|
+
}
|
|
18911
|
+
function isRefObject(value) {
|
|
18912
|
+
return value !== null && value !== void 0 && "current" in value;
|
|
18913
|
+
}
|
|
18914
|
+
function ContextCardProvider({ children: children2, portalTarget }) {
|
|
18915
|
+
const [isMounted, setIsMounted] = reactExports.useState(false);
|
|
18916
|
+
reactExports.useEffect(() => setIsMounted(true), []);
|
|
18917
|
+
const resolvedPortalTarget = isRefObject(portalTarget) ? portalTarget.current : portalTarget;
|
|
18918
|
+
const [ref, bounds] = useMeasure();
|
|
18919
|
+
const portalRef = reactExports.useRef(null);
|
|
18920
|
+
const [activeContextCard, setActiveContextCard] = reactExports.useState(null);
|
|
18921
|
+
const [visible, setVisible] = reactExports.useState(false);
|
|
18922
|
+
const [hoveredId, setHoveredId] = reactExports.useState(null);
|
|
18923
|
+
const activeId = reactExports.useRef(null);
|
|
18924
|
+
function setActiveId(id) {
|
|
18925
|
+
activeId.current = id;
|
|
18926
|
+
setVisible(id !== null);
|
|
18927
|
+
}
|
|
18928
|
+
const updateActiveContextCard = (update) => {
|
|
18929
|
+
if ((update == null ? void 0 : update.id) !== activeId.current && update !== null)
|
|
18930
|
+
return;
|
|
18931
|
+
setActiveContextCard(update);
|
|
18932
|
+
};
|
|
18933
|
+
const BORDER_WIDTH = 1;
|
|
18934
|
+
const activeBounds = reactExports.useMemo(() => {
|
|
18935
|
+
if (!activeContextCard)
|
|
18936
|
+
return {
|
|
18937
|
+
width: 0,
|
|
18938
|
+
height: 0,
|
|
18939
|
+
x: 0,
|
|
18940
|
+
y: 0,
|
|
18941
|
+
side: "top",
|
|
18942
|
+
arrowOffset: { x: 0, y: 0 }
|
|
18943
|
+
};
|
|
18944
|
+
return {
|
|
18945
|
+
width: activeContextCard.contentSize.width + BORDER_WIDTH * 2,
|
|
18946
|
+
height: activeContextCard.contentSize.height + BORDER_WIDTH * 2,
|
|
18947
|
+
x: activeContextCard.origin.x,
|
|
18948
|
+
y: activeContextCard.origin.y,
|
|
18949
|
+
side: activeContextCard.side,
|
|
18950
|
+
arrowOffset: activeContextCard.arrowOffset
|
|
18951
|
+
};
|
|
18952
|
+
}, [activeContextCard]);
|
|
18953
|
+
const lastBounds = usePrevious(activeBounds);
|
|
18954
|
+
const lastId = usePrevious(activeId.current);
|
|
18955
|
+
const percentOverlapFromLast = reactExports.useMemo(() => {
|
|
18956
|
+
if (!lastBounds)
|
|
18957
|
+
return 0;
|
|
18958
|
+
const overlapLeft = Math.max(activeBounds.x, lastBounds.x);
|
|
18959
|
+
const overlapRight = Math.min(activeBounds.x + activeBounds.width, lastBounds.x + lastBounds.width);
|
|
18960
|
+
const overlapTop = Math.max(activeBounds.y, lastBounds.y);
|
|
18961
|
+
const overlapBottom = Math.min(activeBounds.y + activeBounds.height, lastBounds.y + lastBounds.height);
|
|
18962
|
+
if (overlapLeft < overlapRight && overlapTop < overlapBottom) {
|
|
18963
|
+
const overlapArea = (overlapRight - overlapLeft) * (overlapBottom - overlapTop);
|
|
18964
|
+
const activeBoundsArea = activeBounds.width * activeBounds.height;
|
|
18965
|
+
if (activeBoundsArea === 0)
|
|
18966
|
+
return 0;
|
|
18967
|
+
return overlapArea / activeBoundsArea * 100;
|
|
18968
|
+
}
|
|
18969
|
+
return 0;
|
|
18970
|
+
}, [activeBounds, lastBounds]);
|
|
18971
|
+
const distanceFromLast = reactExports.useMemo(() => Math.sqrt((((lastBounds == null ? void 0 : lastBounds.x) ?? 0) - activeBounds.x) ** 2 + (((lastBounds == null ? void 0 : lastBounds.y) ?? 0) - activeBounds.y) ** 2), [activeBounds.x, activeBounds.y, lastBounds == null ? void 0 : lastBounds.x, lastBounds == null ? void 0 : lastBounds.y]);
|
|
18972
|
+
const lastOrigin = reactExports.useMemo(() => {
|
|
18973
|
+
if (!lastBounds)
|
|
18974
|
+
return null;
|
|
18975
|
+
return {
|
|
18976
|
+
x: lastBounds.x - activeBounds.x,
|
|
18977
|
+
y: lastBounds.y - activeBounds.y
|
|
18978
|
+
};
|
|
18979
|
+
}, [activeBounds, lastBounds]);
|
|
18980
|
+
const [isScrolling, setIsScrolling] = reactExports.useState(false);
|
|
18981
|
+
const skipTransition = reactExports.useMemo(() => distanceFromLast > MAX_TRANSITION_DISTANCE_PX || percentOverlapFromLast > MAX_OVERLAP_FOR_TRANSITION_PERCENT || lastId === null || isScrolling, [distanceFromLast, isScrolling, lastId, percentOverlapFromLast]);
|
|
18982
|
+
reactExports.useEffect(() => {
|
|
18983
|
+
let isScrollingTimeout = null;
|
|
18984
|
+
const onScroll = () => {
|
|
18985
|
+
if (isScrollingTimeout)
|
|
18986
|
+
window.clearTimeout(isScrollingTimeout);
|
|
18987
|
+
isScrollingTimeout = setTimeout(() => {
|
|
18988
|
+
setIsScrolling(false);
|
|
18989
|
+
}, 66);
|
|
18990
|
+
if (!isScrolling) {
|
|
18991
|
+
setIsScrolling(true);
|
|
18992
|
+
}
|
|
18993
|
+
};
|
|
18994
|
+
document.addEventListener("scroll", onScroll, true);
|
|
18995
|
+
return () => {
|
|
18996
|
+
document.removeEventListener("scroll", onScroll, true);
|
|
18997
|
+
};
|
|
18998
|
+
}, [isScrolling]);
|
|
18999
|
+
const contextValue = reactExports.useMemo(() => ({
|
|
19000
|
+
updateActiveContextCard,
|
|
19001
|
+
rootOrigin: { ...activeBounds },
|
|
19002
|
+
rootBounds: bounds,
|
|
19003
|
+
portalRef,
|
|
19004
|
+
setActiveId,
|
|
19005
|
+
activeId,
|
|
19006
|
+
setHoveredId,
|
|
19007
|
+
hoveredId,
|
|
19008
|
+
skipTransition,
|
|
19009
|
+
rootVisible: visible,
|
|
19010
|
+
distanceFromLast,
|
|
19011
|
+
lastOrigin,
|
|
19012
|
+
isProvided: true
|
|
19013
|
+
}), [
|
|
19014
|
+
activeBounds,
|
|
19015
|
+
bounds,
|
|
19016
|
+
hoveredId,
|
|
19017
|
+
skipTransition,
|
|
19018
|
+
visible,
|
|
19019
|
+
distanceFromLast,
|
|
19020
|
+
lastOrigin
|
|
19021
|
+
]);
|
|
19022
|
+
return jsxRuntimeExports.jsxs(ContextCardContext.Provider, { value: contextValue, children: [children2, isMounted ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: "w-full h-full inset-0 fixed pointer-events-none z-[100000]", ref, children: jsxRuntimeExports.jsx("div", { className: "min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", style: {
|
|
19023
|
+
opacity: visible ? 1 : 0
|
|
19024
|
+
}, children: jsxRuntimeExports.jsxs("div", { className: cn$4("absolute bg-background-100 bg-clip-padding rounded-[6px] overflow-visible pointer-events-none z-[1000000] shadow-[var(--ds-shadow-tooltip),0_0_0_1px_var(--ds-background-100)] w-fit [--context-card-tip-stroke:#DBDBDB] dark-theme:[--context-card-tip-stroke:#252525]", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), "data-skip-transition": skipTransition, style: {
|
|
19025
|
+
transform: `translate(${activeBounds.x}px,${activeBounds.y}px)`,
|
|
19026
|
+
width: activeBounds.width,
|
|
19027
|
+
height: activeBounds.height
|
|
19028
|
+
}, children: [jsxRuntimeExports.jsx("div", { className: cn$4("w-[14px] h-[7px] absolute grid place-content-center z-[999999999] origin-center", {
|
|
19029
|
+
"top-full -translate-x-1/2 rotate-0": activeBounds.side === "top",
|
|
19030
|
+
"right-full -translate-y-1/2 rotate-90 -mr-[3.5px]": activeBounds.side === "right",
|
|
19031
|
+
"bottom-full -translate-x-1/2 rotate-180": activeBounds.side === "bottom",
|
|
19032
|
+
"left-full -translate-y-1/2 rotate-[270deg] -ml-[3.5px]": activeBounds.side === "left"
|
|
19033
|
+
}, skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), style: {
|
|
19034
|
+
...activeBounds.side === "top" || activeBounds.side === "bottom" ? {
|
|
19035
|
+
left: `calc(50% + ${activeBounds.arrowOffset.x}px)`
|
|
19036
|
+
} : {
|
|
19037
|
+
top: `calc(50% + ${activeBounds.arrowOffset.y}px)`
|
|
19038
|
+
}
|
|
19039
|
+
}, "data-skip-transition": skipTransition, "data-side": activeBounds.side, children: jsxRuntimeExports.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsxRuntimeExports.jsx("g", { clipPath: "url(#context-card-tip-clip)", children: jsxRuntimeExports.jsx("path", { d: "M15 -0.5V0.5H12.9834L12.8184 0.508789C12.4377 0.550822 12.0853 0.738056 11.8359 1.03418L8.53027 4.95996C7.73114 5.90893 6.26886 5.90892 5.46973 4.95996L2.16406 1.03418C1.87905 0.695733 1.45907 0.5 1.0166 0.5H-1V-0.5H15Z", fill: "var(--ds-background-100)", style: {
|
|
19040
|
+
fill: "var(--ds-background-100)",
|
|
19041
|
+
fillOpacity: 1,
|
|
19042
|
+
stroke: "var(--context-card-tip-stroke)",
|
|
19043
|
+
strokeOpacity: 1
|
|
19044
|
+
} }) }), jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsx("clipPath", { id: "context-card-tip-clip", children: jsxRuntimeExports.jsx("rect", { width: "14", height: "7", fill: "white", style: { fill: "white", fillOpacity: 1 } }) }) })] }) }), jsxRuntimeExports.jsx("div", { ref: portalRef })] }) }) }), resolvedPortalTarget ?? document.body) : null] });
|
|
19045
|
+
}
|
|
19046
|
+
function ContextCardTrigger({ content: content2, children: children2, side = "right", align = "center", sideOffset = 16, alignOffset = 0, ignoreCardPointerEvents = false, noPadding, asChild, className, hide: hide2, inactiveTimeoutMs = INACTIVE_TIMEOUT_MS }) {
|
|
19047
|
+
const triggerRef = reactExports.useRef(null);
|
|
19048
|
+
const contentRef = reactExports.useRef(null);
|
|
19049
|
+
const [contentMeasureRef, contentMeasureBounds] = useMeasure();
|
|
19050
|
+
const { portalRef, updateActiveContextCard, activeId, setActiveId, hoveredId, setHoveredId, skipTransition, rootVisible } = reactExports.useContext(ContextCardContext);
|
|
19051
|
+
const id = reactExports.useId();
|
|
19052
|
+
reactExports.useEffect(() => {
|
|
19053
|
+
return () => {
|
|
19054
|
+
if (activeId.current === id) {
|
|
19055
|
+
setActiveId(null);
|
|
19056
|
+
}
|
|
19057
|
+
};
|
|
19058
|
+
}, []);
|
|
19059
|
+
const reduceMotion = useReducedMotion();
|
|
19060
|
+
const [localHover, setLocalHover] = reactExports.useState(false);
|
|
19061
|
+
const [persisting, setPersisting] = reactExports.useState(false);
|
|
19062
|
+
const [visible, setVisible] = reactExports.useState(false);
|
|
19063
|
+
const activeTimeout = reactExports.useRef(null);
|
|
19064
|
+
const persistingTimeout = reactExports.useRef(null);
|
|
19065
|
+
const openTimeout = reactExports.useRef(null);
|
|
19066
|
+
reactExports.useEffect(() => {
|
|
19067
|
+
if (localHover && contentMeasureBounds.width > 0 && contentMeasureBounds.height > 0) {
|
|
19068
|
+
if (openTimeout.current)
|
|
19069
|
+
clearTimeout(openTimeout.current);
|
|
19070
|
+
openTimeout.current = setTimeout(() => {
|
|
19071
|
+
setActiveId(id);
|
|
19072
|
+
updateBounds();
|
|
19073
|
+
}, rootVisible ? 0 : OPEN_DELAY_MS);
|
|
19074
|
+
}
|
|
19075
|
+
return () => {
|
|
19076
|
+
if (openTimeout.current)
|
|
19077
|
+
clearTimeout(openTimeout.current);
|
|
19078
|
+
};
|
|
19079
|
+
}, [localHover, contentMeasureBounds]);
|
|
19080
|
+
const enterTimeout = reactExports.useRef(null);
|
|
19081
|
+
reactExports.useEffect(() => {
|
|
19082
|
+
if (enterTimeout.current)
|
|
19083
|
+
clearTimeout(enterTimeout.current);
|
|
19084
|
+
if (hoveredId !== id) {
|
|
19085
|
+
setVisible(false);
|
|
19086
|
+
} else {
|
|
19087
|
+
enterTimeout.current = setTimeout(() => {
|
|
19088
|
+
setVisible(true);
|
|
19089
|
+
}, reduceMotion || skipTransition ? 0 : ENTER_DELAY_MS);
|
|
19090
|
+
}
|
|
19091
|
+
}, [hoveredId, id, reduceMotion, skipTransition]);
|
|
19092
|
+
function updateBounds() {
|
|
19093
|
+
if (!contentRef.current)
|
|
19094
|
+
return;
|
|
19095
|
+
const bounds = computeBounds();
|
|
19096
|
+
updateActiveContextCard({ id, ...bounds });
|
|
19097
|
+
}
|
|
19098
|
+
function computeBounds(sideOverride) {
|
|
19099
|
+
if (!triggerRef.current)
|
|
19100
|
+
throw new Error("Trigger not found");
|
|
19101
|
+
if (!contentRef.current)
|
|
19102
|
+
throw new Error("Content not found");
|
|
19103
|
+
const appliedSide = sideOverride ?? side;
|
|
19104
|
+
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
19105
|
+
const contentRect = contentRef.current.getBoundingClientRect();
|
|
19106
|
+
contentRef.current.style.width = "max-content";
|
|
19107
|
+
contentRef.current.style.position = "absolute";
|
|
19108
|
+
const contentSize = {
|
|
19109
|
+
width: Math.max(contentRect.width, contentRef.current.offsetWidth),
|
|
19110
|
+
height: contentRect.height
|
|
19111
|
+
};
|
|
19112
|
+
let origin;
|
|
19113
|
+
const arrowWidth = 14;
|
|
19114
|
+
const halfArrowWidth = arrowWidth / 2;
|
|
19115
|
+
const halfTriggerWidth = triggerRect.width / 2;
|
|
19116
|
+
const halfTriggerHeight = triggerRect.height / 2;
|
|
19117
|
+
const halfContentWidth = contentSize.width / 2;
|
|
19118
|
+
const halfContentHeight = contentSize.height / 2;
|
|
19119
|
+
const top = triggerRect.top;
|
|
19120
|
+
const left = triggerRect.left;
|
|
19121
|
+
let alignX = left + halfTriggerWidth - halfContentWidth + alignOffset;
|
|
19122
|
+
if (align === "start")
|
|
19123
|
+
alignX = left + alignOffset;
|
|
19124
|
+
if (align === "end")
|
|
19125
|
+
alignX = left + triggerRect.width - contentRect.width + alignOffset;
|
|
19126
|
+
let alignY = top + halfTriggerHeight - halfContentHeight + alignOffset;
|
|
19127
|
+
if (align === "start")
|
|
19128
|
+
alignY = top + alignOffset;
|
|
19129
|
+
if (align === "end")
|
|
19130
|
+
alignY = top + triggerRect.height - contentRect.height + alignOffset;
|
|
19131
|
+
switch (appliedSide) {
|
|
19132
|
+
case "top":
|
|
19133
|
+
origin = {
|
|
19134
|
+
x: alignX,
|
|
19135
|
+
y: top - contentRect.height - sideOffset
|
|
19136
|
+
};
|
|
19137
|
+
break;
|
|
19138
|
+
case "right":
|
|
19139
|
+
origin = {
|
|
19140
|
+
x: left + triggerRect.width + sideOffset,
|
|
19141
|
+
y: alignY
|
|
19142
|
+
};
|
|
19143
|
+
break;
|
|
19144
|
+
case "bottom":
|
|
19145
|
+
origin = {
|
|
19146
|
+
x: alignX,
|
|
19147
|
+
y: top + triggerRect.height + sideOffset
|
|
19148
|
+
};
|
|
19149
|
+
break;
|
|
19150
|
+
case "left":
|
|
19151
|
+
origin = {
|
|
19152
|
+
x: left - contentRect.width - sideOffset,
|
|
19153
|
+
y: alignY
|
|
19154
|
+
};
|
|
19155
|
+
break;
|
|
19156
|
+
default: {
|
|
19157
|
+
const _exhaustive = appliedSide;
|
|
19158
|
+
throw new Error(`Unknown side: ${String(_exhaustive)}`);
|
|
19159
|
+
}
|
|
19160
|
+
}
|
|
19161
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
19162
|
+
const viewportHeight = document.documentElement.clientHeight;
|
|
19163
|
+
const isOffscreenLeft = origin.x < 0;
|
|
19164
|
+
const isOffscreenRight = origin.x + contentRect.width > viewportWidth;
|
|
19165
|
+
const isOffscreenTop = origin.y < 0;
|
|
19166
|
+
const isOffscreenBottom = origin.y + contentRect.height > viewportHeight;
|
|
19167
|
+
if (!sideOverride) {
|
|
19168
|
+
const spaceAbove = top;
|
|
19169
|
+
const spaceBelow = viewportHeight - (top + triggerRect.height);
|
|
19170
|
+
const spaceLeft = left;
|
|
19171
|
+
const spaceRight = viewportWidth - (left + triggerRect.width);
|
|
19172
|
+
if (side === "top" && isOffscreenTop && spaceBelow > spaceAbove) {
|
|
19173
|
+
return computeBounds("bottom");
|
|
19174
|
+
}
|
|
19175
|
+
if (side === "bottom" && isOffscreenBottom && spaceAbove > spaceBelow) {
|
|
19176
|
+
return computeBounds("top");
|
|
19177
|
+
}
|
|
19178
|
+
if (side === "right" && isOffscreenRight && spaceLeft > spaceRight) {
|
|
19179
|
+
return computeBounds("left");
|
|
19180
|
+
}
|
|
19181
|
+
if (side === "left" && isOffscreenLeft && spaceRight > spaceLeft) {
|
|
19182
|
+
return computeBounds("right");
|
|
19183
|
+
}
|
|
19184
|
+
if ((side === "top" || side === "bottom") && isOffscreenLeft && spaceRight > contentRect.width) {
|
|
19185
|
+
return computeBounds("right");
|
|
19186
|
+
}
|
|
19187
|
+
if ((side === "top" || side === "bottom") && isOffscreenRight && spaceLeft > contentRect.width) {
|
|
19188
|
+
return computeBounds("left");
|
|
19189
|
+
}
|
|
19190
|
+
if ((side === "left" || side === "right") && isOffscreenTop && spaceBelow > contentRect.height) {
|
|
19191
|
+
return computeBounds("bottom");
|
|
19192
|
+
}
|
|
19193
|
+
if ((side === "left" || side === "right") && isOffscreenBottom && spaceAbove > contentRect.height) {
|
|
19194
|
+
return computeBounds("top");
|
|
19195
|
+
}
|
|
19196
|
+
}
|
|
19197
|
+
const viewportPadding = 8;
|
|
19198
|
+
if (appliedSide === "left" || appliedSide === "right") {
|
|
19199
|
+
origin.y = Math.max(viewportPadding, Math.min(origin.y, viewportHeight - contentSize.height - viewportPadding));
|
|
19200
|
+
} else {
|
|
19201
|
+
origin.x = Math.max(viewportPadding, Math.min(origin.x, viewportWidth - contentSize.width - viewportPadding));
|
|
19202
|
+
}
|
|
19203
|
+
origin.y = Math.max(viewportPadding, Math.min(origin.y, viewportHeight - contentSize.height - viewportPadding));
|
|
19204
|
+
const triggerCenterX = left + halfTriggerWidth;
|
|
19205
|
+
const triggerCenterY = top + halfTriggerHeight;
|
|
19206
|
+
const cardCenterX = origin.x + contentSize.width / 2;
|
|
19207
|
+
const cardCenterY = origin.y + contentSize.height / 2;
|
|
19208
|
+
let arrowOffsetX = triggerCenterX - cardCenterX;
|
|
19209
|
+
let arrowOffsetY = triggerCenterY - cardCenterY;
|
|
19210
|
+
const maxArrowOffsetX = halfContentWidth - halfArrowWidth;
|
|
19211
|
+
const maxArrowOffsetY = halfContentHeight - halfArrowWidth;
|
|
19212
|
+
if (appliedSide === "top" || appliedSide === "bottom") {
|
|
19213
|
+
arrowOffsetX = Math.max(-maxArrowOffsetX, Math.min(arrowOffsetX, maxArrowOffsetX));
|
|
19214
|
+
}
|
|
19215
|
+
if (appliedSide === "left" || appliedSide === "right") {
|
|
19216
|
+
arrowOffsetY = Math.max(-maxArrowOffsetY, Math.min(arrowOffsetY, maxArrowOffsetY));
|
|
19217
|
+
}
|
|
19218
|
+
const arrowOffset = {
|
|
19219
|
+
x: arrowOffsetX,
|
|
19220
|
+
y: arrowOffsetY
|
|
19221
|
+
};
|
|
19222
|
+
return { origin, contentSize, side: appliedSide, arrowOffset };
|
|
19223
|
+
}
|
|
19224
|
+
reactExports.useEffect(() => {
|
|
19225
|
+
document.addEventListener("scroll", updateBounds, true);
|
|
19226
|
+
window.addEventListener("resize", updateBounds);
|
|
19227
|
+
return () => {
|
|
19228
|
+
document.removeEventListener("scroll", updateBounds, true);
|
|
19229
|
+
window.removeEventListener("resize", updateBounds);
|
|
19230
|
+
};
|
|
19231
|
+
}, []);
|
|
19232
|
+
function resetDestructiveTimeouts() {
|
|
19233
|
+
if (activeTimeout.current)
|
|
19234
|
+
clearTimeout(activeTimeout.current);
|
|
19235
|
+
if (persistingTimeout.current)
|
|
19236
|
+
clearTimeout(persistingTimeout.current);
|
|
19237
|
+
if (openTimeout.current)
|
|
19238
|
+
clearTimeout(openTimeout.current);
|
|
19239
|
+
}
|
|
19240
|
+
function attemptDeactivate() {
|
|
19241
|
+
if (activeTimeout.current)
|
|
19242
|
+
clearTimeout(activeTimeout.current);
|
|
19243
|
+
activeTimeout.current = setTimeout(() => {
|
|
19244
|
+
if (activeId.current !== id)
|
|
19245
|
+
return;
|
|
19246
|
+
setActiveId(null);
|
|
19247
|
+
}, inactiveTimeoutMs);
|
|
19248
|
+
}
|
|
19249
|
+
function attemptPersist() {
|
|
19250
|
+
setPersisting(true);
|
|
19251
|
+
if (persistingTimeout.current)
|
|
19252
|
+
clearTimeout(persistingTimeout.current);
|
|
19253
|
+
persistingTimeout.current = setTimeout(() => {
|
|
19254
|
+
setPersisting(false);
|
|
19255
|
+
}, PERSIST_TIMEOUT_MS);
|
|
19256
|
+
}
|
|
19257
|
+
function onMouseEnter() {
|
|
19258
|
+
resetDestructiveTimeouts();
|
|
19259
|
+
setHoveredId(id);
|
|
19260
|
+
setLocalHover(true);
|
|
19261
|
+
}
|
|
19262
|
+
function onMouseLeave() {
|
|
19263
|
+
setLocalHover(false);
|
|
19264
|
+
attemptDeactivate();
|
|
19265
|
+
attemptPersist();
|
|
19266
|
+
}
|
|
19267
|
+
reactExports.useEffect(() => {
|
|
19268
|
+
if (hide2) {
|
|
19269
|
+
setLocalHover(false);
|
|
19270
|
+
setActiveId(null);
|
|
19271
|
+
}
|
|
19272
|
+
}, [hide2, setActiveId]);
|
|
19273
|
+
function handleClick(e) {
|
|
19274
|
+
if (e.target instanceof HTMLElement && e.target.closest("a[href]")) {
|
|
19275
|
+
onMouseLeave();
|
|
19276
|
+
}
|
|
19277
|
+
}
|
|
19278
|
+
const Comp = asChild ? Root : "div";
|
|
19279
|
+
return jsxRuntimeExports.jsxs(Comp, { className: cn$4("inline-flex cursor-pointer flex-[0_1_auto] overflow-hidden", className), onMouseEnter, onMouseLeave, onClick: handleClick, ref: triggerRef, children: [jsxRuntimeExports.jsx(Slottable, { children: children2 }), (portalRef == null ? void 0 : portalRef.current) && (localHover || persisting) ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: cn$4("absolute top-0 p-3 left-0 max-w-max transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition && "!transition-none"), ref: contentRef, style: {
|
|
19280
|
+
...noPadding ? { padding: 0 } : {},
|
|
19281
|
+
pointerEvents: rootVisible && visible && !ignoreCardPointerEvents ? "all" : "none"
|
|
19282
|
+
}, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), ref: contentMeasureRef, style: {
|
|
19283
|
+
opacity: Number(visible)
|
|
19284
|
+
}, children: content2 }) }, id), portalRef.current) : null] });
|
|
19285
|
+
}
|
|
18520
19286
|
function Skeleton$1({ className, style: style2, ...props }) {
|
|
18521
19287
|
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style: { backgroundColor: "var(--ds-gray-200)", ...style2 } });
|
|
18522
19288
|
}
|
|
@@ -43282,7 +44048,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
43282
44048
|
var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
|
|
43283
44049
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
43284
44050
|
var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
|
|
43285
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-
|
|
44051
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-QKf7Yrcl.js"), true ? __vite__mapDeps([3,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
43286
44052
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
43287
44053
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
43288
44054
|
return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
|
|
@@ -44224,7 +44990,7 @@ const eventFailed = "_eventFailed_1fmf2_1432";
|
|
|
44224
44990
|
const eventRetrying = "_eventRetrying_1fmf2_1441";
|
|
44225
44991
|
const eventHook = "_eventHook_1fmf2_1450";
|
|
44226
44992
|
const eventDefault = "_eventDefault_1fmf2_1459";
|
|
44227
|
-
const styles = {
|
|
44993
|
+
const styles$1 = {
|
|
44228
44994
|
traceNode,
|
|
44229
44995
|
childRow,
|
|
44230
44996
|
spanNode,
|
|
@@ -44694,15 +45460,15 @@ const SEGMENT_LABELS = {
|
|
|
44694
45460
|
function SegmentLayer({ segments, spanDuration: spanDuration2 }) {
|
|
44695
45461
|
if (segments.length === 0)
|
|
44696
45462
|
return null;
|
|
44697
|
-
return jsxRuntimeExports.jsx("div", { className: styles.segmentLayer, children: segments.map((seg, i) => {
|
|
44698
|
-
const className = styles[SEGMENT_CLASS_MAP[seg.status]];
|
|
45463
|
+
return jsxRuntimeExports.jsx("div", { className: styles$1.segmentLayer, children: segments.map((seg, i) => {
|
|
45464
|
+
const className = styles$1[SEGMENT_CLASS_MAP[seg.status]];
|
|
44699
45465
|
const segDuration = (seg.endFraction - seg.startFraction) * spanDuration2;
|
|
44700
45466
|
const label = SEGMENT_LABELS[seg.status];
|
|
44701
45467
|
const style2 = {
|
|
44702
45468
|
left: `${seg.startFraction * 100}%`,
|
|
44703
45469
|
width: `${(seg.endFraction - seg.startFraction) * 100}%`
|
|
44704
45470
|
};
|
|
44705
|
-
return jsxRuntimeExports.jsx("div", { className: `${styles.segment} ${String(className)}`, style: style2, title: label ? `${label} ${formatDuration(segDuration)}` : formatDuration(segDuration) }, `seg-${seg.status}-${String(i)}`);
|
|
45471
|
+
return jsxRuntimeExports.jsx("div", { className: `${styles$1.segment} ${String(className)}`, style: style2, title: label ? `${label} ${formatDuration(segDuration)}` : formatDuration(segDuration) }, `seg-${seg.status}-${String(i)}`);
|
|
44706
45472
|
}) });
|
|
44707
45473
|
}
|
|
44708
45474
|
function getSegmentTags(segments, spanDuration2) {
|
|
@@ -44731,7 +45497,7 @@ function TextContent({ node: node2, layout, durationMs, segmentTags }) {
|
|
|
44731
45497
|
return null;
|
|
44732
45498
|
}
|
|
44733
45499
|
const showTags = segmentTags && segmentTags.length > 0 && (layout.isHovered || layout.width > 200);
|
|
44734
|
-
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("span", { className: styles.spanName, children: [node2.label || node2.span.name, showTags ? segmentTags.map((tag, i) => jsxRuntimeExports.jsxs("span", { className: styles.segmentTag, children: [" · ", tag.label, " ", tag.duration] }, i)) : null] }), layout.isHuge ? jsxRuntimeExports.jsx("span", { className: styles.spanSpacer }) : null, layout.isHovered || layout.width > 128 ? jsxRuntimeExports.jsx("span", { className: styles.spanDuration, children: duration2 }) : null] });
|
|
45500
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("span", { className: styles$1.spanName, children: [node2.label || node2.span.name, showTags ? segmentTags.map((tag, i) => jsxRuntimeExports.jsxs("span", { className: styles$1.segmentTag, children: [" · ", tag.label, " ", tag.duration] }, i)) : null] }), layout.isHuge ? jsxRuntimeExports.jsx("span", { className: styles$1.spanSpacer }) : null, layout.isHovered || layout.width > 128 ? jsxRuntimeExports.jsx("span", { className: styles$1.spanDuration, children: duration2 }) : null] });
|
|
44735
45501
|
}
|
|
44736
45502
|
function DefaultContent({ node: node2, layout }) {
|
|
44737
45503
|
return jsxRuntimeExports.jsx(TextContent, { node: node2, layout });
|
|
@@ -44854,8 +45620,8 @@ function getSpanLayout(resourceType, node2, root2, scale, scrollSnapshotRef) {
|
|
|
44854
45620
|
}
|
|
44855
45621
|
const getSpanColorClassName = (node2) => {
|
|
44856
45622
|
if (node2.isVercel)
|
|
44857
|
-
return String(styles.colorVercel);
|
|
44858
|
-
return String(styles[`color${node2.resourceIndex % 5}`]);
|
|
45623
|
+
return String(styles$1.colorVercel);
|
|
45624
|
+
return String(styles$1[`color${node2.resourceIndex % 5}`]);
|
|
44859
45625
|
};
|
|
44860
45626
|
function getTerminalTimestamp(resourceType, node2) {
|
|
44861
45627
|
const events = node2.events;
|
|
@@ -44998,7 +45764,7 @@ const SpanComponent = reactExports.memo(function SpanComponent2({ node: node2, r
|
|
|
44998
45764
|
return () => cancelAnimationFrame(rafId);
|
|
44999
45765
|
}, [isLive, canonicalStartTime, scale]);
|
|
45000
45766
|
const renderNode = segmentNode;
|
|
45001
|
-
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("button", { "aria-label": `${span.name} - ${duration2}`, className: clsx(styles.spanNode, layout.isHuge && styles.huge, layout.isSmall && styles.small, layout.isExpanded && styles.xHover, node2.isHighlighted ? styles.colorHighlight : getSpanColorClassName(node2), node2.isHighlighted === false && styles.unlit, customClassName, hasSegments2 && styles.hasSegments), "data-span-id": span.spanId, "data-start-time": segmentNode.startTime - root2.startTime, "data-right-side": layout.isNearRightSide, "data-selected": node2.isSelected ? "" : void 0, ref, style: getSpanStyle(layout, segmentNode, root2, scale), type: "button", children: jsxRuntimeExports.jsx(SpanContent, { durationMs, resourceType, node: renderNode, layout }) }), segmentNode.events && !layout.isSmall ? segmentNode.events.map((x2) => jsxRuntimeExports.jsx(SpanEventComponent, { customSpanEventClassNameFunc, event: x2, node: segmentNode, root: root2, scale, asBoundary: isWorkflowSpan }, x2.key)) : null] });
|
|
45767
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("button", { "aria-label": `${span.name} - ${duration2}`, className: clsx(styles$1.spanNode, layout.isHuge && styles$1.huge, layout.isSmall && styles$1.small, layout.isExpanded && styles$1.xHover, node2.isHighlighted ? styles$1.colorHighlight : getSpanColorClassName(node2), node2.isHighlighted === false && styles$1.unlit, customClassName, hasSegments2 && styles$1.hasSegments), "data-span-id": span.spanId, "data-start-time": segmentNode.startTime - root2.startTime, "data-right-side": layout.isNearRightSide, "data-selected": node2.isSelected ? "" : void 0, ref, style: getSpanStyle(layout, segmentNode, root2, scale), type: "button", children: jsxRuntimeExports.jsx(SpanContent, { durationMs, resourceType, node: renderNode, layout }) }), segmentNode.events && !layout.isSmall ? segmentNode.events.map((x2) => jsxRuntimeExports.jsx(SpanEventComponent, { customSpanEventClassNameFunc, event: x2, node: segmentNode, root: root2, scale, asBoundary: isWorkflowSpan }, x2.key)) : null] });
|
|
45002
45768
|
});
|
|
45003
45769
|
const BOUNDARY_LABELS = {
|
|
45004
45770
|
step_started: "Started",
|
|
@@ -45012,7 +45778,8 @@ const BOUNDARY_LABELS = {
|
|
|
45012
45778
|
run_started: "Started",
|
|
45013
45779
|
run_completed: "Completed",
|
|
45014
45780
|
run_failed: "Run failed",
|
|
45015
|
-
step_completed: "Completed"
|
|
45781
|
+
step_completed: "Completed",
|
|
45782
|
+
attr_set: "Attributes set"
|
|
45016
45783
|
};
|
|
45017
45784
|
const SpanEventComponent = reactExports.memo(function SpanEventComponent2({ event, node: node2, root: root2, scale, customSpanEventClassNameFunc, asBoundary = false }) {
|
|
45018
45785
|
const ref = reactExports.useRef(null);
|
|
@@ -45056,17 +45823,17 @@ const SpanEventComponent = reactExports.memo(function SpanEventComponent2({ even
|
|
|
45056
45823
|
const isLeftAligned = node2.duration <= 0 || (event.timestamp - node2.startTime) / node2.duration < 0.5;
|
|
45057
45824
|
const customClassName = customSpanEventClassNameFunc ? customSpanEventClassNameFunc(event) : "";
|
|
45058
45825
|
return jsxRuntimeExports.jsxs("div", { title: phaseDuration ? `${displayLabel} ${timestamp}
|
|
45059
|
-
${phaseLabel} ${phaseDuration}` : `${displayLabel} ${timestamp}`, className: clsx(styles.spanNodeEvent, customClassName, asBoundary && styles.boundaryMarker, node2.isHighlighted ? styles.colorHighlight : getSpanColorClassName(node2), node2.isHighlighted === false && styles.unlit), "data-hovered": event.isHovered, ref, style: {
|
|
45826
|
+
${phaseLabel} ${phaseDuration}` : `${displayLabel} ${timestamp}`, className: clsx(styles$1.spanNodeEvent, customClassName, asBoundary && styles$1.boundaryMarker, node2.isHighlighted ? styles$1.colorHighlight : getSpanColorClassName(node2), node2.isHighlighted === false && styles$1.unlit), "data-hovered": event.isHovered, ref, style: {
|
|
45060
45827
|
left,
|
|
45061
45828
|
top
|
|
45062
|
-
}, children: [jsxRuntimeExports.jsx("div", { className: clsx(styles.hoverInfo, isLeftAligned ? styles.alignStart : styles.alignEnd), children: asBoundary ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles.eventName, children: displayLabel }), jsxRuntimeExports.jsx("span", { className: styles.eventTimestamp, children: timestamp }), phaseDuration ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles.eventName, children: phaseLabel }), jsxRuntimeExports.jsx("span", { className: styles.eventTimestamp, children: phaseDuration })] }) : null] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles.eventName, children: name2 }), jsxRuntimeExports.jsx("span", { className: styles.eventTimestamp, children: timestamp })] }) }), asBoundary ? jsxRuntimeExports.jsx("div", { className: styles.boundaryLine }) : jsxRuntimeExports.jsx("div", { className: styles.eventDiamond })] });
|
|
45829
|
+
}, children: [jsxRuntimeExports.jsx("div", { className: clsx(styles$1.hoverInfo, isLeftAligned ? styles$1.alignStart : styles$1.alignEnd), children: asBoundary ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$1.eventName, children: displayLabel }), jsxRuntimeExports.jsx("span", { className: styles$1.eventTimestamp, children: timestamp }), phaseDuration ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$1.eventName, children: phaseLabel }), jsxRuntimeExports.jsx("span", { className: styles$1.eventTimestamp, children: phaseDuration })] }) : null] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$1.eventName, children: name2 }), jsxRuntimeExports.jsx("span", { className: styles$1.eventTimestamp, children: timestamp })] }) }), asBoundary ? jsxRuntimeExports.jsx("div", { className: styles$1.boundaryLine }) : jsxRuntimeExports.jsx("div", { className: styles$1.eventDiamond })] });
|
|
45063
45830
|
});
|
|
45064
45831
|
const colorTokenMap = {
|
|
45065
45832
|
"gray-700": "var(--ds-gray-700)",
|
|
45066
45833
|
"gray-900": "var(--ds-gray-900)"
|
|
45067
45834
|
};
|
|
45068
45835
|
function IconChevronDown({ size: size2 = 16 }) {
|
|
45069
|
-
return jsxRuntimeExports.jsxs("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true, className: styles.detailHeadingIcon, children: [jsxRuntimeExports.jsx("title", { children: "Chevron Down" }), jsxRuntimeExports.jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] });
|
|
45836
|
+
return jsxRuntimeExports.jsxs("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true, className: styles$1.detailHeadingIcon, children: [jsxRuntimeExports.jsx("title", { children: "Chevron Down" }), jsxRuntimeExports.jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] });
|
|
45070
45837
|
}
|
|
45071
45838
|
function IconExternalSmall({ size: size2 = 16, color: color5 = "gray-900" }) {
|
|
45072
45839
|
const style2 = { color: colorTokenMap[color5] || color5 };
|
|
@@ -45081,7 +45848,7 @@ function Link(props) {
|
|
|
45081
45848
|
return jsxRuntimeExports.jsx("a", { className, href, ...rest, children: children2 });
|
|
45082
45849
|
}
|
|
45083
45850
|
function Skeleton({ width, height, rounded }) {
|
|
45084
|
-
return jsxRuntimeExports.jsx("span", { className: clsx(styles.skeleton, rounded && styles.skeletonRounded), style: { width, height }, "aria-hidden": true });
|
|
45851
|
+
return jsxRuntimeExports.jsx("span", { className: clsx(styles$1.skeleton, rounded && styles$1.skeletonRounded), style: { width, height }, "aria-hidden": true });
|
|
45085
45852
|
}
|
|
45086
45853
|
const EXPANDED_STORAGE_KEY_PREFIX = "vc-trace-span-exp:";
|
|
45087
45854
|
function DetailGroup({ name: name2, className = "", children: children2 }) {
|
|
@@ -45097,7 +45864,7 @@ function DetailGroup({ name: name2, className = "", children: children2 }) {
|
|
|
45097
45864
|
return willBeExpanded;
|
|
45098
45865
|
});
|
|
45099
45866
|
}, [name2]);
|
|
45100
|
-
return jsxRuntimeExports.jsxs("div", { className: clsx(styles.detailGroup, isExpanded ? styles.expanded : styles.collapsed, className), children: [jsxRuntimeExports.jsxs("button", { className: styles.detailHeading, onClick: toggleExpanded, type: "button", children: [jsxRuntimeExports.jsx("span", { children: name2 }), jsxRuntimeExports.jsx(IconChevronDown, {})] }), isExpanded ? children2 : null] });
|
|
45867
|
+
return jsxRuntimeExports.jsxs("div", { className: clsx(styles$1.detailGroup, isExpanded ? styles$1.expanded : styles$1.collapsed, className), children: [jsxRuntimeExports.jsxs("button", { className: styles$1.detailHeading, onClick: toggleExpanded, type: "button", children: [jsxRuntimeExports.jsx("span", { children: name2 }), jsxRuntimeExports.jsx(IconChevronDown, {})] }), isExpanded ? children2 : null] });
|
|
45101
45868
|
}
|
|
45102
45869
|
reactExports.memo(function EntrySpanLinks({ getQuickLinks, span }) {
|
|
45103
45870
|
const links = getQuickLinks(span);
|
|
@@ -45121,7 +45888,7 @@ function usePromise(promise) {
|
|
|
45121
45888
|
}
|
|
45122
45889
|
function EntrySpanLink({ name: name2, link: linkPromise }) {
|
|
45123
45890
|
const link2 = usePromise(linkPromise);
|
|
45124
|
-
return jsxRuntimeExports.jsxs(Link, { as: link2 ? void 0 : "span", className: clsx(styles.spanDetailPanelAttribute, styles.spanDetailPanelQuickLink), href: (link2 == null ? void 0 : link2.href) || "", children: [jsxRuntimeExports.jsx("span", { className: styles.spanDetailPanelAttributeKey, children: name2 }), jsxRuntimeExports.jsx("span", { className: clsx(styles.spanDetailPanelAttributeValue, styles.spanDetailPanelQuickLinkLabel), children: link2 ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [link2.label, link2.icon || jsxRuntimeExports.jsx(IconExternalSmall, { color: "gray-900" })] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Skeleton, { height: 18, width: 32 + name2.length * 8 }), jsxRuntimeExports.jsx(Skeleton, { height: 18, rounded: true, width: 18 })] }) })] });
|
|
45891
|
+
return jsxRuntimeExports.jsxs(Link, { as: link2 ? void 0 : "span", className: clsx(styles$1.spanDetailPanelAttribute, styles$1.spanDetailPanelQuickLink), href: (link2 == null ? void 0 : link2.href) || "", children: [jsxRuntimeExports.jsx("span", { className: styles$1.spanDetailPanelAttributeKey, children: name2 }), jsxRuntimeExports.jsx("span", { className: clsx(styles$1.spanDetailPanelAttributeValue, styles$1.spanDetailPanelQuickLinkLabel), children: link2 ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [link2.label, link2.icon || jsxRuntimeExports.jsx(IconExternalSmall, { color: "gray-900" })] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Skeleton, { height: 18, width: 32 + name2.length * 8 }), jsxRuntimeExports.jsx(Skeleton, { height: 18, rounded: true, width: 18 })] }) })] });
|
|
45125
45892
|
}
|
|
45126
45893
|
function useImmediateStyle(ref) {
|
|
45127
45894
|
const styleRef = reactExports.useRef({});
|
|
@@ -45280,10 +46047,10 @@ reactExports.memo(function MiniMap({ timelineRef, rows, scale }) {
|
|
|
45280
46047
|
$timeline.removeEventListener("scroll", onScroll);
|
|
45281
46048
|
};
|
|
45282
46049
|
}, [timelineRef, thumbRatio, setThumbStyle]);
|
|
45283
|
-
return jsxRuntimeExports.jsxs("div", { className: styles.mapContainer, ref: containerRef, style: {
|
|
46050
|
+
return jsxRuntimeExports.jsxs("div", { className: styles$1.mapContainer, ref: containerRef, style: {
|
|
45284
46051
|
width: thumbWidth > 0 ? mapWidth : "100%",
|
|
45285
46052
|
height: MAP_HEIGHT
|
|
45286
|
-
}, children: [jsxRuntimeExports.jsx("canvas", { className: styles.mapCanvas, height: MAP_HEIGHT * dpi, ref: canvasRef, style: { width: mapWidth, height: MAP_HEIGHT }, width: mapWidth * dpi }), jsxRuntimeExports.jsx("div", { className: styles.mapThumb, ref: thumbRef, style: {
|
|
46053
|
+
}, children: [jsxRuntimeExports.jsx("canvas", { className: styles$1.mapCanvas, height: MAP_HEIGHT * dpi, ref: canvasRef, style: { width: mapWidth, height: MAP_HEIGHT }, width: mapWidth * dpi }), jsxRuntimeExports.jsx("div", { className: styles$1.mapThumb, ref: thumbRef, style: {
|
|
45287
46054
|
transform: thumbStyle.transform,
|
|
45288
46055
|
width: thumbWidth > 0 ? thumbWidth : `calc(100% - ${TIMELINE_PADDING * 2}px)`,
|
|
45289
46056
|
top: 2,
|
|
@@ -45348,6 +46115,11 @@ const iconButtonVariants = cva([
|
|
|
45348
46115
|
});
|
|
45349
46116
|
const IconButton = reactExports.forwardRef(({ className, variant, size: size2, type = "button", ...props }, ref) => jsxRuntimeExports.jsx("button", { ref, type, className: cn$4(iconButtonVariants({ variant, size: size2, className })), ...props }));
|
|
45350
46117
|
IconButton.displayName = "IconButton";
|
|
46118
|
+
const TooltipProvider = Provider;
|
|
46119
|
+
const Tooltip$1 = Root3;
|
|
46120
|
+
const TooltipTrigger$1 = Trigger;
|
|
46121
|
+
const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsxs(Content2, { ref, sideOffset, className: cn$4("z-[99999] flex items-center gap-1 rounded-[10px] bg-gray-1000 px-2 py-1.5 !text-label-13 text-background-100 shadow-md select-none", className), ...props, children: [children2, showArrow ? jsxRuntimeExports.jsx(Arrow2, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
|
|
46122
|
+
TooltipContent$1.displayName = Content2.displayName;
|
|
45351
46123
|
const ATTR_FILTER_REGEX = /(?:^|\s)(?<pair>(?<key>[\w.]+):(?<value>\S*))/g;
|
|
45352
46124
|
function parseSpanSearchQuery(rawQuery) {
|
|
45353
46125
|
var _a3, _b2, _c;
|
|
@@ -45724,15 +46496,22 @@ function computeSleepSegmentsFromSpan(_startMs, duration2, _events) {
|
|
|
45724
46496
|
return [];
|
|
45725
46497
|
return [{ startFraction: 0, endFraction: 1, status: "sleeping" }];
|
|
45726
46498
|
}
|
|
46499
|
+
function runSegmentStatus(runStatus) {
|
|
46500
|
+
if (runStatus === "failed")
|
|
46501
|
+
return "failed";
|
|
46502
|
+
if (runStatus === "running" || runStatus === "pending")
|
|
46503
|
+
return "running";
|
|
46504
|
+
return "completed";
|
|
46505
|
+
}
|
|
45727
46506
|
function computeRunSegmentsFromSpan(startMs, duration2, activeStartMs, events, attributes) {
|
|
45728
46507
|
const segments = [];
|
|
45729
46508
|
if (duration2 <= 0)
|
|
45730
46509
|
return segments;
|
|
45731
46510
|
const sorted = [...events].map((e) => ({ name: e.name, time: getHighResInMs(e.timestamp) })).sort((a2, b2) => a2.time - b2.time);
|
|
46511
|
+
const runData = attributes == null ? void 0 : attributes.data;
|
|
46512
|
+
const runStatus = runData == null ? void 0 : runData.status;
|
|
45732
46513
|
const hasRunCreated = sorted.some((e) => e.name === "run_created");
|
|
45733
46514
|
if (!hasRunCreated) {
|
|
45734
|
-
const runData = attributes == null ? void 0 : attributes.data;
|
|
45735
|
-
const runStatus = runData == null ? void 0 : runData.status;
|
|
45736
46515
|
return computeV1RunSegments(startMs, duration2, activeStartMs, runStatus);
|
|
45737
46516
|
}
|
|
45738
46517
|
const failedEvent = sorted.find((e) => e.name === "run_failed");
|
|
@@ -45751,7 +46530,7 @@ function computeRunSegmentsFromSpan(startMs, duration2, activeStartMs, events, a
|
|
|
45751
46530
|
segments.push({
|
|
45752
46531
|
startFraction: cursor,
|
|
45753
46532
|
endFraction: 1,
|
|
45754
|
-
status: failedEvent ? "failed" :
|
|
46533
|
+
status: failedEvent ? "failed" : runSegmentStatus(runStatus)
|
|
45755
46534
|
});
|
|
45756
46535
|
return segments;
|
|
45757
46536
|
}
|
|
@@ -45772,7 +46551,7 @@ function computeV1RunSegments(startMs, duration2, activeStartMs, runStatus) {
|
|
|
45772
46551
|
segments.push({
|
|
45773
46552
|
startFraction: cursor,
|
|
45774
46553
|
endFraction: 1,
|
|
45775
|
-
status: runStatus
|
|
46554
|
+
status: runSegmentStatus(runStatus)
|
|
45776
46555
|
});
|
|
45777
46556
|
return segments;
|
|
45778
46557
|
}
|
|
@@ -45841,6 +46620,10 @@ function useRowWindow(ref, rowCount, rowHeight, overscan = 12) {
|
|
|
45841
46620
|
return range;
|
|
45842
46621
|
}
|
|
45843
46622
|
const ROW_HEIGHT_PX = 40;
|
|
46623
|
+
const runningStripes = "_runningStripes_62ud0_1";
|
|
46624
|
+
const styles = {
|
|
46625
|
+
runningStripes
|
|
46626
|
+
};
|
|
45844
46627
|
const TINY_BAR_BOX_SIZE_PX = 24;
|
|
45845
46628
|
const TINY_BAR_WIDTH_PX = 4;
|
|
45846
46629
|
const TIMELINE_PADDING_PX = 16;
|
|
@@ -45849,6 +46632,7 @@ const SEGMENT_CLASSES = {
|
|
|
45849
46632
|
retrying: "bg-gray-400 border border-gray-500",
|
|
45850
46633
|
waiting: "bg-gray-400 border border-gray-500",
|
|
45851
46634
|
running: "bg-blue-200 border border-blue-500",
|
|
46635
|
+
completed: "bg-blue-200 border border-blue-500",
|
|
45852
46636
|
failed: "bg-red-200 border border-red-500",
|
|
45853
46637
|
succeeded: "bg-green-200 border border-green-500",
|
|
45854
46638
|
sleeping: "bg-gray-400 border border-gray-500",
|
|
@@ -45858,6 +46642,13 @@ const TIMELINE_INSET_STYLE = {
|
|
|
45858
46642
|
left: TIMELINE_PADDING_PX,
|
|
45859
46643
|
right: TIMELINE_PADDING_PX
|
|
45860
46644
|
};
|
|
46645
|
+
const ACTIVE_SEGMENT_STATUSES = /* @__PURE__ */ new Set([
|
|
46646
|
+
"running",
|
|
46647
|
+
"received"
|
|
46648
|
+
]);
|
|
46649
|
+
function RunningStripes() {
|
|
46650
|
+
return jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: styles.runningStripes });
|
|
46651
|
+
}
|
|
45861
46652
|
function computeBarGeometry(startMs, endMs, viewStart, viewEnd, containerWidth) {
|
|
45862
46653
|
const viewDuration = viewEnd - viewStart;
|
|
45863
46654
|
const visibleStartMs = Math.max(startMs, viewStart);
|
|
@@ -45930,21 +46721,51 @@ function BoundaryArrow({ direction }) {
|
|
|
45930
46721
|
function PlainBar({ bg, border, label }) {
|
|
45931
46722
|
return jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full min-w-1 rounded-[0.25rem] border", style: { background: bg, borderColor: border }, children: label ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null });
|
|
45932
46723
|
}
|
|
46724
|
+
function LeadInConnector({ leftPct, widthPct, label }) {
|
|
46725
|
+
return jsxRuntimeExports.jsxs("div", { className: "absolute top-1/2 h-6 -translate-y-1/2", style: {
|
|
46726
|
+
left: `calc(${leftPct}% + 0.5px)`,
|
|
46727
|
+
width: `calc(${widthPct}% - 1px)`
|
|
46728
|
+
}, children: [jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-1/2 h-4 w-px -translate-y-1/2 bg-gray-500" }), jsxRuntimeExports.jsx("div", { className: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-gray-500" }), label ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null] });
|
|
46729
|
+
}
|
|
45933
46730
|
function SegmentBar({ segments }) {
|
|
45934
46731
|
return jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full", children: segments.map((seg, i) => {
|
|
46732
|
+
if (seg.status === "queued") {
|
|
46733
|
+
const leadInLabel = formatDurationPrecise(seg.fullDurationMs);
|
|
46734
|
+
const showLeadInLabel = seg.pixelWidth >= Math.max(40, leadInLabel.length * 6 + 12);
|
|
46735
|
+
return jsxRuntimeExports.jsx(LeadInConnector, { leftPct: seg.leftPct, widthPct: seg.widthPct, label: showLeadInLabel ? leadInLabel : null }, i);
|
|
46736
|
+
}
|
|
45935
46737
|
const label = formatDurationPrecise(seg.fullDurationMs);
|
|
45936
46738
|
const showLabel = seg.pixelWidth >= Math.max(40, label.length * 6 + 12);
|
|
45937
|
-
|
|
45938
|
-
const overrideBg = isNarrowQueued ? "var(--ds-gray-400)" : void 0;
|
|
45939
|
-
const overrideBorder = isNarrowQueued ? "var(--ds-gray-500)" : void 0;
|
|
45940
|
-
return jsxRuntimeExports.jsx("div", { className: cn$4("absolute h-full rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
46739
|
+
return jsxRuntimeExports.jsxs("div", { className: cn$4("absolute h-full overflow-hidden rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
45941
46740
|
// 1px gap between adjacent segments, distributed equally.
|
|
45942
46741
|
left: `calc(${seg.leftPct}% + 0.5px)`,
|
|
45943
46742
|
width: `calc(${seg.widthPct}% - 1px)`,
|
|
45944
|
-
minWidth: 1
|
|
45945
|
-
|
|
45946
|
-
|
|
45947
|
-
|
|
46743
|
+
minWidth: 1
|
|
46744
|
+
}, children: [ACTIVE_SEGMENT_STATUSES.has(seg.status) ? jsxRuntimeExports.jsx(RunningStripes, {}) : null, showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null] }, i);
|
|
46745
|
+
}) });
|
|
46746
|
+
}
|
|
46747
|
+
function formatMarkerTime(ms) {
|
|
46748
|
+
const date2 = new Date(ms);
|
|
46749
|
+
return date2.toLocaleTimeString("en-US", {
|
|
46750
|
+
hour: "2-digit",
|
|
46751
|
+
minute: "2-digit",
|
|
46752
|
+
second: "2-digit",
|
|
46753
|
+
hour12: false
|
|
46754
|
+
}) + "." + date2.getMilliseconds().toString().padStart(3, "0");
|
|
46755
|
+
}
|
|
46756
|
+
function AttrSetMarkers({ span, viewStart, viewDuration }) {
|
|
46757
|
+
const markers2 = reactExports.useMemo(() => span.events.filter((e) => e.name === "attr_set"), [span.events]);
|
|
46758
|
+
if (markers2.length === 0 || viewDuration <= 0)
|
|
46759
|
+
return null;
|
|
46760
|
+
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: markers2.map((event, index2) => {
|
|
46761
|
+
const timeMs = getHighResInMs(event.timestamp);
|
|
46762
|
+
const frac = (timeMs - viewStart) / viewDuration;
|
|
46763
|
+
if (frac < 0 || frac > 1)
|
|
46764
|
+
return null;
|
|
46765
|
+
return jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx("div", { "aria-label": "Attributes set", className: "absolute top-1/2 z-10 flex h-4 w-4 -translate-x-1/2 -translate-y-1/2 cursor-pointer items-center justify-center", style: { left: `${frac * 100}%` }, children: jsxRuntimeExports.jsx("div", { className: "h-2 w-2 rotate-45 rounded-[1px] border", style: {
|
|
46766
|
+
backgroundColor: "var(--ds-teal-400)",
|
|
46767
|
+
borderColor: "var(--ds-teal-900)"
|
|
46768
|
+
} }) }) }), jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Attributes set · ", formatMarkerTime(timeMs)] })] }, `attr-set-${index2}`);
|
|
45948
46769
|
}) });
|
|
45949
46770
|
}
|
|
45950
46771
|
const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, isDimmed, onSelect }) {
|
|
@@ -45965,7 +46786,7 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
|
|
|
45965
46786
|
const handleClick = reactExports.useCallback(() => {
|
|
45966
46787
|
onSelect(span.spanId);
|
|
45967
46788
|
}, [onSelect, span.spanId]);
|
|
45968
|
-
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.
|
|
46789
|
+
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-y-0", style: TIMELINE_INSET_STYLE, children: [jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-6 -translate-y-1/2 rounded-[0.25rem]", style: getBarPositionStyle(geometry), children: geometry.mode.kind === "arrow" ? jsxRuntimeExports.jsx(BoundaryArrow, { direction: geometry.mode.direction }) : geometry.mode.kind === "tiny" ? jsxRuntimeExports.jsx("div", { className: "h-6 rounded-[0.25rem] border", style: { background: fallbackBg, borderColor: fallbackBorder } }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments }) : jsxRuntimeExports.jsx(PlainBar, { bg: fallbackBg, border: fallbackBorder, label: showTotalLabel ? totalLabel : null }) }), jsxRuntimeExports.jsx(AttrSetMarkers, { span, viewStart, viewDuration })] }) });
|
|
45969
46790
|
});
|
|
45970
46791
|
const DELTA_CAP_HEIGHT_PX = 8;
|
|
45971
46792
|
const DELTA_ROW_OFFSET_PX = 8;
|
|
@@ -46003,11 +46824,6 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, se
|
|
|
46003
46824
|
Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, String(marker2.value)) : null
|
|
46004
46825
|
)) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start * ROW_HEIGHT_PX}px)` }, children: spans.slice(start, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
|
|
46005
46826
|
}
|
|
46006
|
-
const TooltipProvider = Provider;
|
|
46007
|
-
const Tooltip$1 = Root3;
|
|
46008
|
-
const TooltipTrigger$1 = Trigger;
|
|
46009
|
-
const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsxs(Content2, { ref, sideOffset, className: cn$4("z-[99999] flex items-center gap-1 rounded-[10px] bg-gray-1000 px-2 py-1.5 !text-label-13 text-background-100 shadow-md select-none", className), ...props, children: [children2, showArrow ? jsxRuntimeExports.jsx(Arrow2, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
|
|
46010
|
-
TooltipContent$1.displayName = Content2.displayName;
|
|
46011
46827
|
const ActiveSpanContext = reactExports.createContext(null);
|
|
46012
46828
|
ActiveSpanContext.displayName = "ActiveSpanContext";
|
|
46013
46829
|
function ActiveSpanProvider({ spans, children: children2 }) {
|
|
@@ -46098,115 +46914,6 @@ function useServerConfig() {
|
|
|
46098
46914
|
}
|
|
46099
46915
|
return context;
|
|
46100
46916
|
}
|
|
46101
|
-
function setRef(ref, value) {
|
|
46102
|
-
if (typeof ref === "function") {
|
|
46103
|
-
return ref(value);
|
|
46104
|
-
} else if (ref !== null && ref !== void 0) {
|
|
46105
|
-
ref.current = value;
|
|
46106
|
-
}
|
|
46107
|
-
}
|
|
46108
|
-
function composeRefs(...refs) {
|
|
46109
|
-
return (node2) => {
|
|
46110
|
-
let hasCleanup = false;
|
|
46111
|
-
const cleanups = refs.map((ref) => {
|
|
46112
|
-
const cleanup = setRef(ref, node2);
|
|
46113
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
46114
|
-
hasCleanup = true;
|
|
46115
|
-
}
|
|
46116
|
-
return cleanup;
|
|
46117
|
-
});
|
|
46118
|
-
if (hasCleanup) {
|
|
46119
|
-
return () => {
|
|
46120
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
46121
|
-
const cleanup = cleanups[i];
|
|
46122
|
-
if (typeof cleanup == "function") {
|
|
46123
|
-
cleanup();
|
|
46124
|
-
} else {
|
|
46125
|
-
setRef(refs[i], null);
|
|
46126
|
-
}
|
|
46127
|
-
}
|
|
46128
|
-
};
|
|
46129
|
-
}
|
|
46130
|
-
};
|
|
46131
|
-
}
|
|
46132
|
-
function useComposedRefs(...refs) {
|
|
46133
|
-
return reactExports.useCallback(composeRefs(...refs), refs);
|
|
46134
|
-
}
|
|
46135
|
-
var Slot = reactExports.forwardRef((props, forwardedRef) => {
|
|
46136
|
-
const { children: children2, ...slotProps } = props;
|
|
46137
|
-
const childrenArray = reactExports.Children.toArray(children2);
|
|
46138
|
-
const slottable = childrenArray.find(isSlottable);
|
|
46139
|
-
if (slottable) {
|
|
46140
|
-
const newElement = slottable.props.children;
|
|
46141
|
-
const newChildren = childrenArray.map((child) => {
|
|
46142
|
-
if (child === slottable) {
|
|
46143
|
-
if (reactExports.Children.count(newElement) > 1) return reactExports.Children.only(null);
|
|
46144
|
-
return reactExports.isValidElement(newElement) ? newElement.props.children : null;
|
|
46145
|
-
} else {
|
|
46146
|
-
return child;
|
|
46147
|
-
}
|
|
46148
|
-
});
|
|
46149
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: reactExports.isValidElement(newElement) ? reactExports.cloneElement(newElement, void 0, newChildren) : null });
|
|
46150
|
-
}
|
|
46151
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: children2 });
|
|
46152
|
-
});
|
|
46153
|
-
Slot.displayName = "Slot";
|
|
46154
|
-
var SlotClone = reactExports.forwardRef((props, forwardedRef) => {
|
|
46155
|
-
const { children: children2, ...slotProps } = props;
|
|
46156
|
-
if (reactExports.isValidElement(children2)) {
|
|
46157
|
-
const childrenRef = getElementRef(children2);
|
|
46158
|
-
return reactExports.cloneElement(children2, {
|
|
46159
|
-
...mergeProps(slotProps, children2.props),
|
|
46160
|
-
// @ts-ignore
|
|
46161
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
46162
|
-
});
|
|
46163
|
-
}
|
|
46164
|
-
return reactExports.Children.count(children2) > 1 ? reactExports.Children.only(null) : null;
|
|
46165
|
-
});
|
|
46166
|
-
SlotClone.displayName = "SlotClone";
|
|
46167
|
-
var Slottable = ({ children: children2 }) => {
|
|
46168
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children2 });
|
|
46169
|
-
};
|
|
46170
|
-
function isSlottable(child) {
|
|
46171
|
-
return reactExports.isValidElement(child) && child.type === Slottable;
|
|
46172
|
-
}
|
|
46173
|
-
function mergeProps(slotProps, childProps) {
|
|
46174
|
-
const overrideProps = { ...childProps };
|
|
46175
|
-
for (const propName in childProps) {
|
|
46176
|
-
const slotPropValue = slotProps[propName];
|
|
46177
|
-
const childPropValue = childProps[propName];
|
|
46178
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
46179
|
-
if (isHandler) {
|
|
46180
|
-
if (slotPropValue && childPropValue) {
|
|
46181
|
-
overrideProps[propName] = (...args) => {
|
|
46182
|
-
childPropValue(...args);
|
|
46183
|
-
slotPropValue(...args);
|
|
46184
|
-
};
|
|
46185
|
-
} else if (slotPropValue) {
|
|
46186
|
-
overrideProps[propName] = slotPropValue;
|
|
46187
|
-
}
|
|
46188
|
-
} else if (propName === "style") {
|
|
46189
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
46190
|
-
} else if (propName === "className") {
|
|
46191
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
46192
|
-
}
|
|
46193
|
-
}
|
|
46194
|
-
return { ...slotProps, ...overrideProps };
|
|
46195
|
-
}
|
|
46196
|
-
function getElementRef(element2) {
|
|
46197
|
-
var _a3, _b2;
|
|
46198
|
-
let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
|
|
46199
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
46200
|
-
if (mayWarn) {
|
|
46201
|
-
return element2.ref;
|
|
46202
|
-
}
|
|
46203
|
-
getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
|
|
46204
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
46205
|
-
if (mayWarn) {
|
|
46206
|
-
return element2.props.ref;
|
|
46207
|
-
}
|
|
46208
|
-
return element2.props.ref || element2.ref;
|
|
46209
|
-
}
|
|
46210
46917
|
const buttonVariants = cva(
|
|
46211
46918
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
46212
46919
|
{
|
|
@@ -48559,7 +49266,7 @@ const mermaid3ZIDBTTL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
48559
49266
|
Mermaid: Nt
|
|
48560
49267
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
48561
49268
|
export {
|
|
48562
|
-
|
|
49269
|
+
ContextCardProvider as $,
|
|
48563
49270
|
Anchor as A,
|
|
48564
49271
|
Button as B,
|
|
48565
49272
|
Content as C,
|
|
@@ -48573,85 +49280,90 @@ export {
|
|
|
48573
49280
|
Ks as K,
|
|
48574
49281
|
LoaderCircle as L,
|
|
48575
49282
|
fetchWorkflowsManifest as M,
|
|
48576
|
-
|
|
48577
|
-
|
|
49283
|
+
cn$4 as N,
|
|
49284
|
+
DataInspector as O,
|
|
48578
49285
|
Primitive as P,
|
|
48579
49286
|
Qe as Q,
|
|
48580
49287
|
R,
|
|
48581
49288
|
ServerConfigProvider as S,
|
|
48582
49289
|
Tooltip as T,
|
|
48583
|
-
|
|
49290
|
+
DecryptClickContext as U,
|
|
48584
49291
|
VISUALLY_HIDDEN_STYLES as V,
|
|
48585
|
-
|
|
48586
|
-
|
|
48587
|
-
|
|
48588
|
-
|
|
48589
|
-
|
|
49292
|
+
Button$1 as W,
|
|
49293
|
+
Spinner as X,
|
|
49294
|
+
Lock as Y,
|
|
49295
|
+
RESERVED_ATTRIBUTE_KEY_PREFIX as Z,
|
|
49296
|
+
useHasContextCardProvider as _,
|
|
48590
49297
|
TooltipTrigger as a,
|
|
48591
|
-
|
|
48592
|
-
|
|
48593
|
-
|
|
48594
|
-
|
|
48595
|
-
|
|
48596
|
-
|
|
48597
|
-
|
|
48598
|
-
|
|
48599
|
-
|
|
48600
|
-
|
|
48601
|
-
|
|
48602
|
-
|
|
48603
|
-
|
|
48604
|
-
|
|
48605
|
-
|
|
48606
|
-
|
|
48607
|
-
|
|
48608
|
-
|
|
48609
|
-
|
|
48610
|
-
|
|
48611
|
-
|
|
48612
|
-
|
|
48613
|
-
|
|
48614
|
-
|
|
48615
|
-
|
|
48616
|
-
|
|
48617
|
-
|
|
48618
|
-
|
|
48619
|
-
|
|
48620
|
-
|
|
48621
|
-
|
|
48622
|
-
|
|
48623
|
-
|
|
48624
|
-
|
|
48625
|
-
|
|
48626
|
-
|
|
48627
|
-
|
|
48628
|
-
|
|
48629
|
-
|
|
48630
|
-
|
|
48631
|
-
|
|
48632
|
-
|
|
48633
|
-
|
|
48634
|
-
|
|
48635
|
-
|
|
48636
|
-
|
|
48637
|
-
|
|
48638
|
-
|
|
48639
|
-
|
|
48640
|
-
|
|
48641
|
-
|
|
48642
|
-
|
|
48643
|
-
|
|
48644
|
-
|
|
48645
|
-
|
|
48646
|
-
|
|
48647
|
-
|
|
48648
|
-
|
|
48649
|
-
|
|
48650
|
-
|
|
48651
|
-
|
|
48652
|
-
|
|
48653
|
-
|
|
49298
|
+
cancelRun as a$,
|
|
49299
|
+
ContextCardTrigger as a0,
|
|
49300
|
+
Skeleton$1 as a1,
|
|
49301
|
+
Yr as a2,
|
|
49302
|
+
isEncryptedMarker as a3,
|
|
49303
|
+
formatDuration as a4,
|
|
49304
|
+
_r as a5,
|
|
49305
|
+
RunClickContext as a6,
|
|
49306
|
+
StreamClickContext as a7,
|
|
49307
|
+
isExpiredMarker as a8,
|
|
49308
|
+
isDoStreamStep as a9,
|
|
49309
|
+
SidebarDataProvider as aA,
|
|
49310
|
+
hydrateResourceIOWithKey as aB,
|
|
49311
|
+
hydrateResourceIO as aC,
|
|
49312
|
+
fetchHook as aD,
|
|
49313
|
+
fetchStep as aE,
|
|
49314
|
+
fetchStreams as aF,
|
|
49315
|
+
Slot as aG,
|
|
49316
|
+
Slottable as aH,
|
|
49317
|
+
buttonVariants as aI,
|
|
49318
|
+
fetchEvent as aJ,
|
|
49319
|
+
fetchEventsByCorrelationId as aK,
|
|
49320
|
+
isEncryptedData as aL,
|
|
49321
|
+
hydrateData as aM,
|
|
49322
|
+
getWebRevivers as aN,
|
|
49323
|
+
LIVE_UPDATE_INTERVAL_MS as aO,
|
|
49324
|
+
getEncryptionKeyForRun as aP,
|
|
49325
|
+
StreamViewer as aQ,
|
|
49326
|
+
composeRefs as aR,
|
|
49327
|
+
useFloating as aS,
|
|
49328
|
+
offset as aT,
|
|
49329
|
+
shift as aU,
|
|
49330
|
+
limitShift as aV,
|
|
49331
|
+
flip as aW,
|
|
49332
|
+
size as aX,
|
|
49333
|
+
arrow as aY,
|
|
49334
|
+
hide as aZ,
|
|
49335
|
+
autoUpdate as a_,
|
|
49336
|
+
extractConversation as aa,
|
|
49337
|
+
hasEncryptedFields as ab,
|
|
49338
|
+
EVENT_DATA_REF_FIELDS as ac,
|
|
49339
|
+
useSidebarDataOptional as ad,
|
|
49340
|
+
clsx as ae,
|
|
49341
|
+
useRowWindow as af,
|
|
49342
|
+
isSpanDimmedBySearch as ag,
|
|
49343
|
+
ROW_HEIGHT_PX as ah,
|
|
49344
|
+
getSpanDurationMs as ai,
|
|
49345
|
+
formatDurationPrecise as aj,
|
|
49346
|
+
TooltipProvider as ak,
|
|
49347
|
+
ActiveSpanProvider as al,
|
|
49348
|
+
useActiveSpan as am,
|
|
49349
|
+
useSidebarData as an,
|
|
49350
|
+
searchSpans as ao,
|
|
49351
|
+
computeRootBounds as ap,
|
|
49352
|
+
computeTimeMarkers as aq,
|
|
49353
|
+
getHighResInMs as ar,
|
|
49354
|
+
TIMELINE_PADDING_PX as as,
|
|
49355
|
+
Timeline as at,
|
|
49356
|
+
TimelineHeader as au,
|
|
49357
|
+
IconButton as av,
|
|
49358
|
+
Tooltip$1 as aw,
|
|
49359
|
+
TooltipTrigger$1 as ax,
|
|
49360
|
+
TooltipContent$1 as ay,
|
|
49361
|
+
useReducedMotion as az,
|
|
48654
49362
|
TooltipContent as b,
|
|
49363
|
+
reenqueueRun as b0,
|
|
49364
|
+
wakeUpRun as b1,
|
|
49365
|
+
resumeHook as b2,
|
|
49366
|
+
recreateRun as b3,
|
|
48655
49367
|
createLucideIcon as c,
|
|
48656
49368
|
cn as d,
|
|
48657
49369
|
Toaster as e,
|