@workflow/web 5.0.0-beta.6 → 5.0.0-beta.8
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/{encryption-DU49MAQV.js → encryption-C69WMRfh.js} +11 -5
- package/build/client/assets/{highlighted-body-B3W2YXNL-BZLzBNxn.js → highlighted-body-B3W2YXNL-WHMd9MPa.js} +1 -1
- package/build/client/assets/{home-DmK2qlF4.js → home-Cai0GqMt.js} +8 -16
- package/build/client/assets/{manifest-f8f46e3c.js → manifest-127f70fe.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-D3hhpLut.js → mermaid-3ZIDBTTL-TNUP6Q3m.js} +356 -219
- package/build/client/assets/root-COvK3yNk.css +1 -0
- package/build/client/assets/{root-DCSDR-Tx.js → root-ORTTXEp6.js} +1 -1
- package/build/client/assets/{run-detail-qu2t8u4x.js → run-detail-DNZJxxPM.js} +1231 -1151
- package/build/client/assets/server-build-DzzvWTSG.css +1 -0
- package/build/client/assets/{workflow-graph-viewer-Bl8eU-PY.js → workflow-graph-viewer-DKqOOMnz.js} +50 -41
- package/build/server/assets/{app-C_Lhht8k.js → app-BxqFvIap.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-DOOlKIMb.js → highlighted-body-B3W2YXNL-BuIiME1D.js} +2 -2
- package/build/server/assets/index-CdMzuwNr.js +89 -0
- package/build/server/assets/{mermaid-3ZIDBTTL-CglyhPap.js → mermaid-3ZIDBTTL-TSh7T1Pv.js} +2 -2
- package/build/server/assets/{server-build-CeQwCbX_.js → server-build-fc5Vuxba.js} +3488 -3014
- package/build/server/assets/{token-CZpVopko.js → token--89oCxEK.js} +2 -2
- package/build/server/assets/{token-util-DUvMx9Gj.js → token-util-N0DDbkKZ.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +7 -7
- package/build/client/assets/root-5XHFuftH.css +0 -1
- package/build/client/assets/server-build-olrGumlh.css +0 -1
- package/build/server/assets/index-CRYPN_tt.js +0 -80
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-C69WMRfh.js","assets/index-Byi8AWfe.js","assets/index-BsV8i_Jn.js","assets/highlighted-body-B3W2YXNL-WHMd9MPa.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);
|
|
@@ -10359,7 +10359,7 @@ function hydrateData(value, revivers) {
|
|
|
10359
10359
|
async function hydrateDataWithKey(value, revivers, key) {
|
|
10360
10360
|
if (value instanceof Uint8Array && isEncryptedData(value) && key) {
|
|
10361
10361
|
const { decrypt } = await __vitePreload(async () => {
|
|
10362
|
-
const { decrypt: decrypt2 } = await import("./encryption-
|
|
10362
|
+
const { decrypt: decrypt2 } = await import("./encryption-C69WMRfh.js");
|
|
10363
10363
|
return { decrypt: decrypt2 };
|
|
10364
10364
|
}, true ? __vite__mapDeps([0,1,2]) : void 0);
|
|
10365
10365
|
const { payload } = decodeFormatPrefix(value);
|
|
@@ -15311,6 +15311,10 @@ function _instanceof(cls, params = {}) {
|
|
|
15311
15311
|
function date(params) {
|
|
15312
15312
|
return /* @__PURE__ */ _coercedDate(ZodDate, params);
|
|
15313
15313
|
}
|
|
15314
|
+
object({
|
|
15315
|
+
key: string$2(),
|
|
15316
|
+
value: union([string$2(), _null()])
|
|
15317
|
+
});
|
|
15314
15318
|
const BinarySerializedDataSchema = _instanceof(Uint8Array);
|
|
15315
15319
|
const LegacySerializedDataSchemaV1 = any();
|
|
15316
15320
|
const SerializedDataSchema = union([
|
|
@@ -15360,6 +15364,7 @@ const StepCompletedEventSchema = BaseEventSchema.extend({
|
|
|
15360
15364
|
eventType: literal("step_completed"),
|
|
15361
15365
|
correlationId: string$2(),
|
|
15362
15366
|
eventData: object({
|
|
15367
|
+
stepName: string$2().optional(),
|
|
15363
15368
|
result: SerializedDataSchema
|
|
15364
15369
|
})
|
|
15365
15370
|
});
|
|
@@ -15367,6 +15372,7 @@ const StepFailedEventSchema = BaseEventSchema.extend({
|
|
|
15367
15372
|
eventType: literal("step_failed"),
|
|
15368
15373
|
correlationId: string$2(),
|
|
15369
15374
|
eventData: object({
|
|
15375
|
+
stepName: string$2().optional(),
|
|
15370
15376
|
// The thrown value, serialized via the workflow serialization pipeline.
|
|
15371
15377
|
// Can be any JavaScript value (string, number, object, Error, etc.)
|
|
15372
15378
|
error: SerializedDataSchema
|
|
@@ -15376,6 +15382,7 @@ const StepRetryingEventSchema = BaseEventSchema.extend({
|
|
|
15376
15382
|
eventType: literal("step_retrying"),
|
|
15377
15383
|
correlationId: string$2(),
|
|
15378
15384
|
eventData: object({
|
|
15385
|
+
stepName: string$2().optional(),
|
|
15379
15386
|
// The thrown value, serialized via the workflow serialization pipeline.
|
|
15380
15387
|
// Can be any JavaScript value (string, number, object, Error, etc.)
|
|
15381
15388
|
error: SerializedDataSchema,
|
|
@@ -15386,6 +15393,7 @@ const StepStartedEventSchema = BaseEventSchema.extend({
|
|
|
15386
15393
|
eventType: literal("step_started"),
|
|
15387
15394
|
correlationId: string$2(),
|
|
15388
15395
|
eventData: object({
|
|
15396
|
+
stepName: string$2().optional(),
|
|
15389
15397
|
attempt: number$2().optional()
|
|
15390
15398
|
}).optional()
|
|
15391
15399
|
});
|
|
@@ -15411,12 +15419,16 @@ const HookReceivedEventSchema = BaseEventSchema.extend({
|
|
|
15411
15419
|
eventType: literal("hook_received"),
|
|
15412
15420
|
correlationId: string$2(),
|
|
15413
15421
|
eventData: object({
|
|
15422
|
+
token: string$2().optional(),
|
|
15414
15423
|
payload: SerializedDataSchema
|
|
15415
15424
|
})
|
|
15416
15425
|
});
|
|
15417
15426
|
const HookDisposedEventSchema = BaseEventSchema.extend({
|
|
15418
15427
|
eventType: literal("hook_disposed"),
|
|
15419
|
-
correlationId: string$2()
|
|
15428
|
+
correlationId: string$2(),
|
|
15429
|
+
eventData: object({
|
|
15430
|
+
token: string$2().optional()
|
|
15431
|
+
}).optional()
|
|
15420
15432
|
});
|
|
15421
15433
|
const HookConflictEventSchema = BaseEventSchema.extend({
|
|
15422
15434
|
eventType: literal("hook_conflict"),
|
|
@@ -15437,7 +15449,10 @@ const WaitCreatedEventSchema = BaseEventSchema.extend({
|
|
|
15437
15449
|
});
|
|
15438
15450
|
const WaitCompletedEventSchema = BaseEventSchema.extend({
|
|
15439
15451
|
eventType: literal("wait_completed"),
|
|
15440
|
-
correlationId: string$2()
|
|
15452
|
+
correlationId: string$2(),
|
|
15453
|
+
eventData: object({
|
|
15454
|
+
resumeAt: date().optional()
|
|
15455
|
+
}).optional()
|
|
15441
15456
|
});
|
|
15442
15457
|
const RunCreatedEventSchema = BaseEventSchema.extend({
|
|
15443
15458
|
eventType: literal("run_created"),
|
|
@@ -15623,7 +15638,7 @@ const WorkflowRunBaseSchema = object({
|
|
|
15623
15638
|
// Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
|
|
15624
15639
|
specVersion: number$2().optional(),
|
|
15625
15640
|
executionContext: record(string$2(), any()).optional(),
|
|
15626
|
-
input: SerializedDataSchema,
|
|
15641
|
+
input: SerializedDataSchema.optional(),
|
|
15627
15642
|
output: SerializedDataSchema.optional(),
|
|
15628
15643
|
/**
|
|
15629
15644
|
* The thrown value from a run_failed event, serialized via the workflow
|
|
@@ -15639,6 +15654,24 @@ const WorkflowRunBaseSchema = object({
|
|
|
15639
15654
|
* without needing to decrypt the full error payload.
|
|
15640
15655
|
*/
|
|
15641
15656
|
errorCode: string$2().optional(),
|
|
15657
|
+
/**
|
|
15658
|
+
* Plaintext string-string metadata attached to the run via
|
|
15659
|
+
* `experimental_setAttributes()` (or, in the future, materialized
|
|
15660
|
+
* from `attr_set` events). Stored unencrypted alongside other
|
|
15661
|
+
* plaintext fields so observability surfaces can read it without
|
|
15662
|
+
* going through the decryption pipeline.
|
|
15663
|
+
*
|
|
15664
|
+
* Defaults to `{}` after schema parsing so consumers always receive
|
|
15665
|
+
* a record regardless of world. World adapters need not initialize
|
|
15666
|
+
* the field on disk — `world-local` JSON files written before this
|
|
15667
|
+
* field existed, and rows from any other adapter that omits the
|
|
15668
|
+
* column, both read as `{}` after Zod parses them.
|
|
15669
|
+
*
|
|
15670
|
+
* EXPERIMENTAL (MVP): the full Workflow Attributes feature replaces
|
|
15671
|
+
* the direct-mutation MVP path with an event-sourced model — see
|
|
15672
|
+
* the attributes-mvp changelog entry.
|
|
15673
|
+
*/
|
|
15674
|
+
attributes: record(string$2(), string$2()).default({}),
|
|
15642
15675
|
expiredAt: date().optional(),
|
|
15643
15676
|
startedAt: date().optional(),
|
|
15644
15677
|
completedAt: date().optional(),
|
|
@@ -15689,7 +15722,7 @@ object({
|
|
|
15689
15722
|
message: string$2(),
|
|
15690
15723
|
stack: string$2().optional(),
|
|
15691
15724
|
code: string$2().optional()
|
|
15692
|
-
// Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR) for run_failed events
|
|
15725
|
+
// Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR, etc.) for run_failed events
|
|
15693
15726
|
});
|
|
15694
15727
|
const StepStatusSchema = _enum([
|
|
15695
15728
|
"pending",
|
|
@@ -15723,7 +15756,7 @@ object({
|
|
|
15723
15756
|
*/
|
|
15724
15757
|
stepName: string$2(),
|
|
15725
15758
|
status: StepStatusSchema,
|
|
15726
|
-
input: SerializedDataSchema,
|
|
15759
|
+
input: SerializedDataSchema.optional(),
|
|
15727
15760
|
output: SerializedDataSchema.optional(),
|
|
15728
15761
|
/**
|
|
15729
15762
|
* The thrown value from a step_retrying or step_failed event, serialized
|
|
@@ -16015,7 +16048,7 @@ async function hydrateResourceIOWithKey(resource, key) {
|
|
|
16015
16048
|
return { hydrateDataWithKey: hydrateDataWithKey3 };
|
|
16016
16049
|
}, true ? void 0 : void 0);
|
|
16017
16050
|
const { importKey } = await __vitePreload(async () => {
|
|
16018
|
-
const { importKey: importKey2 } = await import("./encryption-
|
|
16051
|
+
const { importKey: importKey2 } = await import("./encryption-C69WMRfh.js");
|
|
16019
16052
|
return { importKey: importKey2 };
|
|
16020
16053
|
}, true ? __vite__mapDeps([0,1,2]) : void 0);
|
|
16021
16054
|
const cryptoKey = await importKey(key);
|
|
@@ -16989,6 +17022,80 @@ const geistTheme = {
|
|
|
16989
17022
|
};
|
|
16990
17023
|
const inspectorThemeLight = geistTheme;
|
|
16991
17024
|
const inspectorThemeDark = geistTheme;
|
|
17025
|
+
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
17026
|
+
const cx = clsx;
|
|
17027
|
+
const cva = (base, config2) => (props) => {
|
|
17028
|
+
var _config_compoundVariants;
|
|
17029
|
+
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);
|
|
17030
|
+
const { variants, defaultVariants } = config2;
|
|
17031
|
+
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
17032
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
17033
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
17034
|
+
if (variantProp === null) return null;
|
|
17035
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
17036
|
+
return variants[variant][variantKey];
|
|
17037
|
+
});
|
|
17038
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
17039
|
+
let [key, value] = param;
|
|
17040
|
+
if (value === void 0) {
|
|
17041
|
+
return acc;
|
|
17042
|
+
}
|
|
17043
|
+
acc[key] = value;
|
|
17044
|
+
return acc;
|
|
17045
|
+
}, {});
|
|
17046
|
+
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) => {
|
|
17047
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
17048
|
+
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
17049
|
+
let [key, value] = param2;
|
|
17050
|
+
return Array.isArray(value) ? value.includes({
|
|
17051
|
+
...defaultVariants,
|
|
17052
|
+
...propsWithoutUndefined
|
|
17053
|
+
}[key]) : {
|
|
17054
|
+
...defaultVariants,
|
|
17055
|
+
...propsWithoutUndefined
|
|
17056
|
+
}[key] === value;
|
|
17057
|
+
}) ? [
|
|
17058
|
+
...acc,
|
|
17059
|
+
cvClass,
|
|
17060
|
+
cvClassName
|
|
17061
|
+
] : acc;
|
|
17062
|
+
}, []);
|
|
17063
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
17064
|
+
};
|
|
17065
|
+
const buttonVariants$1 = cva([
|
|
17066
|
+
"outline-none m-0 border-0 align-baseline no-underline group/trigger",
|
|
17067
|
+
"relative cursor-pointer select-none transform translate-z-0",
|
|
17068
|
+
"inline-flex max-w-full items-center justify-center gap-x-1 whitespace-nowrap rounded-md font-medium",
|
|
17069
|
+
"!text-gray-100",
|
|
17070
|
+
"bg-gray-1000",
|
|
17071
|
+
"transition-[border-color,background,color,transform,box-shadow] duration-150 ease-in-out",
|
|
17072
|
+
"hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_22%))] dark-theme:hover:bg-[var(--themed-hover-bg,_hsl(0,_0%,_80%))]",
|
|
17073
|
+
// disabled styles
|
|
17074
|
+
"disabled:cursor-not-allowed aria-disabled:cursor-not-allowed",
|
|
17075
|
+
"disabled:bg-gray-100 disabled:!text-gray-700 disabled:hover:bg-gray-100",
|
|
17076
|
+
"aria-disabled:bg-gray-100 aria-disabled:text-gray-700 aria-disabled:hover:bg-gray-100"
|
|
17077
|
+
], {
|
|
17078
|
+
variants: {
|
|
17079
|
+
variant: {
|
|
17080
|
+
default: "",
|
|
17081
|
+
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)]",
|
|
17082
|
+
ghost: "[--themed-bg:_transparent] [--themed-fg:_var(--ds-gray-1000)] [--themed-hover-bg:_var(--ds-gray-alpha-100)]"
|
|
17083
|
+
},
|
|
17084
|
+
size: {
|
|
17085
|
+
default: "h-10 px-4 text-[14px]",
|
|
17086
|
+
sm: "h-8 px-3 text-[14px]",
|
|
17087
|
+
xs: "h-6 px-1.5 py-0.5 text-button-12",
|
|
17088
|
+
icon: "h-8 w-8"
|
|
17089
|
+
}
|
|
17090
|
+
},
|
|
17091
|
+
defaultVariants: {
|
|
17092
|
+
variant: "default",
|
|
17093
|
+
size: "default"
|
|
17094
|
+
}
|
|
17095
|
+
});
|
|
17096
|
+
function Button$1({ className, variant, size: size2, type = "button", ...props }) {
|
|
17097
|
+
return jsxRuntimeExports.jsx("button", { type, className: cn$4(buttonVariants$1({ variant, size: size2, className })), ...props });
|
|
17098
|
+
}
|
|
16992
17099
|
const STREAM_REF_TYPE = "__workflow_stream_ref__";
|
|
16993
17100
|
const CLASS_INSTANCE_REF_TYPE = "__workflow_class_instance_ref__";
|
|
16994
17101
|
const RUN_REF_TYPE = "__workflow_run_ref__";
|
|
@@ -17038,16 +17145,10 @@ const RunClickContext = reactExports.createContext(void 0);
|
|
|
17038
17145
|
function EncryptedInlineLabel() {
|
|
17039
17146
|
const ctx = reactExports.useContext(DecryptClickContext);
|
|
17040
17147
|
if (ctx) {
|
|
17041
|
-
return jsxRuntimeExports.jsxs(
|
|
17042
|
-
backgroundColor: "var(--ds-gray-100)",
|
|
17043
|
-
color: "var(--ds-gray-700)",
|
|
17044
|
-
border: "1px solid var(--ds-gray-400)",
|
|
17045
|
-
fontStyle: "italic",
|
|
17046
|
-
opacity: ctx.isDecrypting ? 0.6 : 1
|
|
17047
|
-
}, disabled: ctx.isDecrypting, onClick: (e) => {
|
|
17148
|
+
return jsxRuntimeExports.jsxs(Button$1, { size: "xs", className: "align-baseline gap-x-1", disabled: ctx.isDecrypting, onClick: (e) => {
|
|
17048
17149
|
e.stopPropagation();
|
|
17049
17150
|
ctx.onDecrypt();
|
|
17050
|
-
},
|
|
17151
|
+
}, children: [ctx.isDecrypting ? jsxRuntimeExports.jsx(Spinner, { size: 10 }) : jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Decrypt" })] });
|
|
17051
17152
|
}
|
|
17052
17153
|
return jsxRuntimeExports.jsxs("span", { style: { color: "var(--ds-gray-600)", fontStyle: "italic" }, children: [jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3", style: {
|
|
17053
17154
|
display: "inline",
|
|
@@ -17293,6 +17394,9 @@ function isDeepEqual(a2, b2, seen2 = /* @__PURE__ */ new WeakMap()) {
|
|
|
17293
17394
|
}
|
|
17294
17395
|
return true;
|
|
17295
17396
|
}
|
|
17397
|
+
function Skeleton$1({ className, style: style2, ...props }) {
|
|
17398
|
+
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style: { backgroundColor: "var(--ds-gray-200)", ...style2 } });
|
|
17399
|
+
}
|
|
17296
17400
|
function __insertCSS(code2) {
|
|
17297
17401
|
if (typeof document == "undefined") return;
|
|
17298
17402
|
let head = document.head || document.getElementsByTagName("head")[0];
|
|
@@ -18382,9 +18486,6 @@ const ToastContext = reactExports.createContext(defaultAdapter);
|
|
|
18382
18486
|
function useToast() {
|
|
18383
18487
|
return reactExports.useContext(ToastContext);
|
|
18384
18488
|
}
|
|
18385
|
-
function Skeleton$1({ className, style: style2, ...props }) {
|
|
18386
|
-
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style: { backgroundColor: "var(--ds-gray-200)", ...style2 } });
|
|
18387
|
-
}
|
|
18388
18489
|
const convert = (
|
|
18389
18490
|
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
18390
18491
|
/**
|
|
@@ -43147,7 +43248,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
43147
43248
|
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 });
|
|
43148
43249
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
43149
43250
|
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 }) });
|
|
43150
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-
|
|
43251
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-WHMd9MPa.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 }) => {
|
|
43151
43252
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
43152
43253
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
43153
43254
|
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 }) })] }) });
|
|
@@ -43911,10 +44012,18 @@ var Nt = ({ chart: e, className: t, config: o, fullscreen: n = false, showContro
|
|
|
43911
44012
|
let T2 = l || d2;
|
|
43912
44013
|
return jsxRuntimeExports.jsx("div", { className: f("size-full", t), "data-streamdown": "mermaid", ref: w2, children: jsxRuntimeExports.jsx(So, { className: f(n ? "size-full overflow-hidden" : "overflow-hidden", t), fullscreen: n, maxZoom: 3, minZoom: 0.5, showControls: s2, zoomStep: 0.1, children: jsxRuntimeExports.jsx("div", { "aria-label": "Mermaid chart", className: f("flex justify-center", n ? "size-full items-center" : null), dangerouslySetInnerHTML: { __html: T2 }, role: "img" }) }) });
|
|
43913
44014
|
};
|
|
44015
|
+
const SidebarDataContext = reactExports.createContext(null);
|
|
44016
|
+
SidebarDataContext.displayName = "SidebarDataContext";
|
|
44017
|
+
function SidebarDataProvider({ value, children: children2 }) {
|
|
44018
|
+
return jsxRuntimeExports.jsx(SidebarDataContext.Provider, { value, children: children2 });
|
|
44019
|
+
}
|
|
44020
|
+
function useSidebarDataOptional() {
|
|
44021
|
+
return reactExports.useContext(SidebarDataContext);
|
|
44022
|
+
}
|
|
43914
44023
|
const MAP_HEIGHT = 56;
|
|
43915
44024
|
const TIMELINE_PADDING = 8;
|
|
43916
44025
|
const ROW_PADDING = 2;
|
|
43917
|
-
const ROW_HEIGHT
|
|
44026
|
+
const ROW_HEIGHT = 24;
|
|
43918
44027
|
const MARKER_HEIGHT = 24;
|
|
43919
44028
|
const initialState = {
|
|
43920
44029
|
root: {
|
|
@@ -44650,17 +44759,17 @@ function computeIsNearRightSide(node2, root2, scrollSnapshotRef, isHovered) {
|
|
|
44650
44759
|
}
|
|
44651
44760
|
function computeDefaultLayout(node2, root2, scale, scrollSnapshotRef) {
|
|
44652
44761
|
const left = (node2.startTime - root2.startTime) * scale;
|
|
44653
|
-
let top = MARKER_HEIGHT + (ROW_HEIGHT
|
|
44762
|
+
let top = MARKER_HEIGHT + (ROW_HEIGHT + ROW_PADDING) * node2.row;
|
|
44654
44763
|
const actualWidth = node2.duration * scale;
|
|
44655
44764
|
const width = Math.max(actualWidth, MIN_SPAN_WIDTH);
|
|
44656
|
-
let height = ROW_HEIGHT
|
|
44765
|
+
let height = ROW_HEIGHT;
|
|
44657
44766
|
const isHuge = computeIsHuge(actualWidth);
|
|
44658
44767
|
const isSmall = computeIsSmall(actualWidth);
|
|
44659
44768
|
const isHovered = computeIsHovered(node2, isHuge);
|
|
44660
44769
|
const isExpanded = isHovered || Boolean(node2.isSelected);
|
|
44661
44770
|
if (isSmall && !isExpanded) {
|
|
44662
44771
|
height *= 0.4;
|
|
44663
|
-
top += (ROW_HEIGHT
|
|
44772
|
+
top += (ROW_HEIGHT - height) * 0.5;
|
|
44664
44773
|
}
|
|
44665
44774
|
const isNearRightSide = computeIsNearRightSide(node2, root2, scrollSnapshotRef, isExpanded);
|
|
44666
44775
|
return {
|
|
@@ -44826,8 +44935,8 @@ const SpanComponent = reactExports.memo(function SpanComponent2({ node: node2, r
|
|
|
44826
44935
|
layout.isSmall = liveActualWidth < 64;
|
|
44827
44936
|
layout.isHuge = liveActualWidth >= 500;
|
|
44828
44937
|
if (!layout.isSmall) {
|
|
44829
|
-
layout.height = ROW_HEIGHT
|
|
44830
|
-
layout.top = MARKER_HEIGHT + (ROW_HEIGHT
|
|
44938
|
+
layout.height = ROW_HEIGHT;
|
|
44939
|
+
layout.top = MARKER_HEIGHT + (ROW_HEIGHT + ROW_PADDING) * segmentNode.row;
|
|
44831
44940
|
}
|
|
44832
44941
|
}
|
|
44833
44942
|
reactExports.useEffect(() => {
|
|
@@ -44902,7 +45011,7 @@ const SpanEventComponent = reactExports.memo(function SpanEventComponent2({ even
|
|
|
44902
45011
|
}
|
|
44903
45012
|
}
|
|
44904
45013
|
const left = (event.timestamp - root2.startTime) * scale;
|
|
44905
|
-
const top = MARKER_HEIGHT + (ROW_HEIGHT
|
|
45014
|
+
const top = MARKER_HEIGHT + (ROW_HEIGHT + ROW_PADDING) * node2.row;
|
|
44906
45015
|
const isLeftAligned = node2.duration <= 0 || (event.timestamp - node2.startTime) / node2.duration < 0.5;
|
|
44907
45016
|
const customClassName = customSpanEventClassNameFunc ? customSpanEventClassNameFunc(event) : "";
|
|
44908
45017
|
return jsxRuntimeExports.jsxs("div", { title: phaseDuration ? `${displayLabel} ${timestamp}
|
|
@@ -45140,14 +45249,6 @@ reactExports.memo(function MiniMap({ timelineRef, rows, scale }) {
|
|
|
45140
45249
|
height: MAP_HEIGHT - 4
|
|
45141
45250
|
} })] });
|
|
45142
45251
|
});
|
|
45143
|
-
const SidebarDataContext = reactExports.createContext(null);
|
|
45144
|
-
SidebarDataContext.displayName = "SidebarDataContext";
|
|
45145
|
-
function SidebarDataProvider({ value, children: children2 }) {
|
|
45146
|
-
return jsxRuntimeExports.jsx(SidebarDataContext.Provider, { value, children: children2 });
|
|
45147
|
-
}
|
|
45148
|
-
function useSidebarDataOptional() {
|
|
45149
|
-
return reactExports.useContext(SidebarDataContext);
|
|
45150
|
-
}
|
|
45151
45252
|
const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk, index: index2 }) {
|
|
45152
45253
|
return jsxRuntimeExports.jsx("div", { className: "text-[11px] rounded-md border p-3", style: {
|
|
45153
45254
|
borderColor: "var(--ds-gray-300)",
|
|
@@ -45284,11 +45385,36 @@ function computeSpanGaps(spans, viewStart, viewEnd) {
|
|
|
45284
45385
|
return gaps;
|
|
45285
45386
|
}
|
|
45286
45387
|
const RESOURCE_COLORS = {
|
|
45287
|
-
run: {
|
|
45288
|
-
|
|
45289
|
-
|
|
45290
|
-
|
|
45291
|
-
|
|
45388
|
+
run: {
|
|
45389
|
+
bg: "var(--ds-blue-200)",
|
|
45390
|
+
border: "var(--ds-blue-500)",
|
|
45391
|
+
errorBg: "var(--ds-red-200)",
|
|
45392
|
+
errorBorder: "var(--ds-red-500)"
|
|
45393
|
+
},
|
|
45394
|
+
step: {
|
|
45395
|
+
bg: "var(--ds-green-200)",
|
|
45396
|
+
border: "var(--ds-green-500)",
|
|
45397
|
+
errorBg: "var(--ds-red-200)",
|
|
45398
|
+
errorBorder: "var(--ds-red-500)"
|
|
45399
|
+
},
|
|
45400
|
+
hook: {
|
|
45401
|
+
bg: "var(--ds-amber-200)",
|
|
45402
|
+
border: "var(--ds-amber-500)",
|
|
45403
|
+
errorBg: "var(--ds-red-200)",
|
|
45404
|
+
errorBorder: "var(--ds-red-500)"
|
|
45405
|
+
},
|
|
45406
|
+
sleep: {
|
|
45407
|
+
bg: "var(--ds-purple-200)",
|
|
45408
|
+
border: "var(--ds-purple-500)",
|
|
45409
|
+
errorBg: "var(--ds-red-200)",
|
|
45410
|
+
errorBorder: "var(--ds-red-500)"
|
|
45411
|
+
},
|
|
45412
|
+
default: {
|
|
45413
|
+
bg: "var(--ds-gray-200)",
|
|
45414
|
+
border: "var(--ds-gray-500)",
|
|
45415
|
+
errorBg: "var(--ds-red-200)",
|
|
45416
|
+
errorBorder: "var(--ds-red-500)"
|
|
45417
|
+
}
|
|
45292
45418
|
};
|
|
45293
45419
|
function getResourceColor(resource) {
|
|
45294
45420
|
return RESOURCE_COLORS[resource] ?? RESOURCE_COLORS.default;
|
|
@@ -45481,87 +45607,143 @@ function computeSpanSegments(span) {
|
|
|
45481
45607
|
return [];
|
|
45482
45608
|
}
|
|
45483
45609
|
}
|
|
45484
|
-
const SEGMENT_CONFIG = {
|
|
45485
|
-
queued: { className: "bg-gray-500" },
|
|
45486
|
-
retrying: {
|
|
45487
|
-
className: "box-border bg-gray-500"
|
|
45488
|
-
},
|
|
45489
|
-
waiting: { className: "bg-gray-500" },
|
|
45490
|
-
running: { className: "bg-blue-700" },
|
|
45491
|
-
failed: { className: "bg-red-700" },
|
|
45492
|
-
succeeded: { className: "bg-green-700" },
|
|
45493
|
-
sleeping: { className: "bg-gray-500" },
|
|
45494
|
-
received: { className: "bg-blue-700" }
|
|
45495
|
-
};
|
|
45496
|
-
const BAR_HEIGHT_PX = 24;
|
|
45497
45610
|
const TINY_BAR_BOX_SIZE_PX = 24;
|
|
45498
45611
|
const TINY_BAR_WIDTH_PX = 4;
|
|
45499
|
-
const SEGMENT_GAP_PX = 1;
|
|
45500
|
-
const ROW_HEIGHT = 40;
|
|
45501
|
-
const CONTAINER_PAD_Y = 8;
|
|
45502
|
-
const END_CAP_HEIGHT = 8;
|
|
45503
45612
|
const TIMELINE_PADDING_PX = 16;
|
|
45504
|
-
const
|
|
45505
|
-
|
|
45506
|
-
|
|
45507
|
-
|
|
45508
|
-
|
|
45509
|
-
|
|
45510
|
-
|
|
45511
|
-
|
|
45512
|
-
|
|
45513
|
-
}
|
|
45514
|
-
const
|
|
45613
|
+
const SEGMENT_CLASSES = {
|
|
45614
|
+
queued: "bg-gray-400 border border-gray-500",
|
|
45615
|
+
retrying: "bg-gray-400 border border-gray-500",
|
|
45616
|
+
waiting: "bg-gray-400 border border-gray-500",
|
|
45617
|
+
running: "bg-blue-200 border border-blue-500",
|
|
45618
|
+
failed: "bg-red-200 border border-red-500",
|
|
45619
|
+
succeeded: "bg-green-200 border border-green-500",
|
|
45620
|
+
sleeping: "bg-gray-400 border border-gray-500",
|
|
45621
|
+
received: "bg-blue-200 border border-blue-500"
|
|
45622
|
+
};
|
|
45623
|
+
const TIMELINE_INSET_STYLE = {
|
|
45624
|
+
left: TIMELINE_PADDING_PX,
|
|
45625
|
+
right: TIMELINE_PADDING_PX
|
|
45626
|
+
};
|
|
45627
|
+
function computeBarGeometry(startMs, endMs, viewStart, viewEnd, containerWidth) {
|
|
45628
|
+
const viewDuration = viewEnd - viewStart;
|
|
45629
|
+
const visibleStartMs = Math.max(startMs, viewStart);
|
|
45630
|
+
const visibleEndMs = Math.min(endMs, viewEnd);
|
|
45631
|
+
const visibleDurationMs = Math.max(0, visibleEndMs - visibleStartMs);
|
|
45632
|
+
const widthFrac = viewDuration > 0 ? visibleDurationMs / viewDuration : 0;
|
|
45633
|
+
const visiblePixelWidth = widthFrac * containerWidth;
|
|
45634
|
+
const isTiny = containerWidth > 0 && visiblePixelWidth < TINY_BAR_BOX_SIZE_PX;
|
|
45635
|
+
const extendsOffLeft = startMs < viewStart;
|
|
45636
|
+
const extendsOffRight = endMs > viewEnd;
|
|
45637
|
+
const mode = isTiny && (extendsOffLeft || extendsOffRight) ? { kind: "arrow", direction: extendsOffRight ? "right" : "left" } : isTiny ? { kind: "tiny" } : { kind: "full" };
|
|
45638
|
+
return {
|
|
45639
|
+
mode,
|
|
45640
|
+
leftPct: viewDuration > 0 ? (visibleStartMs - viewStart) / viewDuration * 100 : 0,
|
|
45641
|
+
widthPct: widthFrac * 100,
|
|
45642
|
+
visibleStartMs,
|
|
45643
|
+
visibleEndMs,
|
|
45644
|
+
visiblePixelWidth
|
|
45645
|
+
};
|
|
45646
|
+
}
|
|
45647
|
+
function getBarPositionStyle(geometry) {
|
|
45648
|
+
switch (geometry.mode.kind) {
|
|
45649
|
+
case "arrow":
|
|
45650
|
+
return {
|
|
45651
|
+
left: geometry.mode.direction === "right" ? `calc(100% - ${TINY_BAR_BOX_SIZE_PX}px)` : "0px",
|
|
45652
|
+
width: `${TINY_BAR_BOX_SIZE_PX}px`
|
|
45653
|
+
};
|
|
45654
|
+
case "tiny":
|
|
45655
|
+
return {
|
|
45656
|
+
left: `min(${geometry.leftPct}%, calc(100% - ${TINY_BAR_WIDTH_PX}px))`,
|
|
45657
|
+
width: `${TINY_BAR_WIDTH_PX}px`
|
|
45658
|
+
};
|
|
45659
|
+
case "full":
|
|
45660
|
+
return {
|
|
45661
|
+
left: `${geometry.leftPct}%`,
|
|
45662
|
+
width: `max(${geometry.widthPct}%, 4px)`
|
|
45663
|
+
};
|
|
45664
|
+
}
|
|
45665
|
+
}
|
|
45666
|
+
function projectSegments(segments, spanStartMs, spanDurationMs, geometry) {
|
|
45667
|
+
const visibleDurationMs = geometry.visibleEndMs - geometry.visibleStartMs;
|
|
45668
|
+
if (visibleDurationMs <= 0)
|
|
45669
|
+
return [];
|
|
45670
|
+
return segments.flatMap((seg) => {
|
|
45671
|
+
const segStartMs = spanStartMs + seg.startFraction * spanDurationMs;
|
|
45672
|
+
const segEndMs = spanStartMs + seg.endFraction * spanDurationMs;
|
|
45673
|
+
const startMs = Math.max(segStartMs, geometry.visibleStartMs);
|
|
45674
|
+
const endMs = Math.min(segEndMs, geometry.visibleEndMs);
|
|
45675
|
+
if (endMs <= startMs)
|
|
45676
|
+
return [];
|
|
45677
|
+
const widthFrac = (endMs - startMs) / visibleDurationMs;
|
|
45678
|
+
return [
|
|
45679
|
+
{
|
|
45680
|
+
status: seg.status,
|
|
45681
|
+
leftPct: (startMs - geometry.visibleStartMs) / visibleDurationMs * 100,
|
|
45682
|
+
widthPct: widthFrac * 100,
|
|
45683
|
+
pixelWidth: widthFrac * geometry.visiblePixelWidth,
|
|
45684
|
+
fullDurationMs: (seg.endFraction - seg.startFraction) * spanDurationMs
|
|
45685
|
+
}
|
|
45686
|
+
];
|
|
45687
|
+
});
|
|
45688
|
+
}
|
|
45689
|
+
function DurationLabel({ label }) {
|
|
45690
|
+
return jsxRuntimeExports.jsx("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-start overflow-hidden px-1 text-[10px] font-mono font-medium leading-none whitespace-nowrap text-left text-gray-1000 tabular-nums opacity-0 group-hover/timeline-row:opacity-100", children: label });
|
|
45691
|
+
}
|
|
45692
|
+
function BoundaryArrow({ direction }) {
|
|
45693
|
+
const Icon2 = direction === "right" ? ArrowRight : ArrowLeft;
|
|
45694
|
+
return jsxRuntimeExports.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-[0.25rem]", children: jsxRuntimeExports.jsx(Icon2, { className: "size-3 text-gray-900" }) });
|
|
45695
|
+
}
|
|
45696
|
+
function PlainBar({ bg, border, label }) {
|
|
45697
|
+
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 });
|
|
45698
|
+
}
|
|
45699
|
+
function SegmentBar({ segments }) {
|
|
45700
|
+
return jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full", children: segments.map((seg, i) => {
|
|
45701
|
+
const label = formatDuration(seg.fullDurationMs);
|
|
45702
|
+
const showLabel = seg.pixelWidth >= Math.max(40, label.length * 6 + 12);
|
|
45703
|
+
const isNarrowQueued = seg.status === "queued" && seg.pixelWidth < 20;
|
|
45704
|
+
const overrideBg = isNarrowQueued ? "var(--ds-gray-400)" : void 0;
|
|
45705
|
+
const overrideBorder = isNarrowQueued ? "var(--ds-gray-500)" : void 0;
|
|
45706
|
+
return jsxRuntimeExports.jsx("div", { className: cn$4("absolute h-full rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
45707
|
+
// 1px gap between adjacent segments, distributed equally.
|
|
45708
|
+
left: `calc(${seg.leftPct}% + 0.5px)`,
|
|
45709
|
+
width: `calc(${seg.widthPct}% - 1px)`,
|
|
45710
|
+
minWidth: 1,
|
|
45711
|
+
background: overrideBg,
|
|
45712
|
+
borderColor: overrideBorder
|
|
45713
|
+
}, children: showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null }, `${seg.status}-${i}`);
|
|
45714
|
+
}) });
|
|
45715
|
+
}
|
|
45716
|
+
const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, onSelect }) {
|
|
45515
45717
|
var _a3;
|
|
45516
|
-
const
|
|
45517
|
-
const
|
|
45718
|
+
const startMs = getHighResInMs(span.startTime);
|
|
45719
|
+
const endMs = getHighResInMs(span.endTime);
|
|
45518
45720
|
const totalDurationMs = getSpanDurationMs(span);
|
|
45519
|
-
const
|
|
45520
|
-
const
|
|
45521
|
-
const
|
|
45522
|
-
const leftPct = leftFracRaw * 100;
|
|
45523
|
-
const widthPct = widthFrac * 100;
|
|
45524
|
-
const pixelWidth = widthFrac * containerWidth;
|
|
45525
|
-
const visibleLeftFrac = Math.max(0, Math.min(1, leftFracRaw));
|
|
45526
|
-
const visibleRightFrac = Math.max(0, Math.min(1, rightFracRaw));
|
|
45527
|
-
const visiblePixelWidth = Math.max(0, visibleRightFrac - visibleLeftFrac) * containerWidth;
|
|
45528
|
-
const isTinyBar = containerWidth > 0 && visiblePixelWidth < TINY_BAR_BOX_SIZE_PX;
|
|
45529
|
-
const [isRowHovered, setIsRowHovered] = reactExports.useState(false);
|
|
45530
|
-
const segments = reactExports.useMemo(() => computeSpanSegments(span), [span]);
|
|
45721
|
+
const geometry = reactExports.useMemo(() => computeBarGeometry(startMs, endMs, viewStart, viewStart + viewDuration, containerWidth), [startMs, endMs, viewStart, viewDuration, containerWidth]);
|
|
45722
|
+
const baseSegments = reactExports.useMemo(() => computeSpanSegments(span), [span]);
|
|
45723
|
+
const segments = reactExports.useMemo(() => geometry.mode.kind === "full" ? projectSegments(baseSegments, startMs, totalDurationMs, geometry) : [], [geometry, baseSegments, startMs, totalDurationMs]);
|
|
45531
45724
|
const workflowStatus = (_a3 = span.attributes.data) == null ? void 0 : _a3.status;
|
|
45532
45725
|
const isErrored = span.status.code === 2 || workflowStatus === "failed";
|
|
45533
45726
|
const colors = getResourceColor(span.resource);
|
|
45534
|
-
const
|
|
45535
|
-
const
|
|
45536
|
-
const
|
|
45537
|
-
const
|
|
45538
|
-
const
|
|
45539
|
-
|
|
45540
|
-
|
|
45541
|
-
|
|
45542
|
-
|
|
45543
|
-
|
|
45544
|
-
|
|
45545
|
-
|
|
45546
|
-
|
|
45547
|
-
|
|
45548
|
-
|
|
45549
|
-
|
|
45550
|
-
|
|
45551
|
-
|
|
45552
|
-
|
|
45553
|
-
|
|
45554
|
-
minWidth: 4,
|
|
45555
|
-
background: fallbackColor
|
|
45556
|
-
}, children: showBarDurationLabel ? renderDurationLabel(totalDurationLabel) : null });
|
|
45557
|
-
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200"), onMouseEnter: () => setIsRowHovered(true), onMouseLeave: () => setIsRowHovered(false), onClick, children: jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0", style: {
|
|
45558
|
-
left: TIMELINE_PADDING_PX,
|
|
45559
|
-
right: TIMELINE_PADDING_PX
|
|
45560
|
-
}, children: jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 -translate-y-1/2", style: {
|
|
45561
|
-
left: showBoundaryArrow ? `min(max(${leftPct}%, 0px), calc(100% - ${TINY_BAR_BOX_SIZE_PX}px))` : isTinyBar ? `min(${leftPct}%, calc(100% - ${TINY_BAR_WIDTH_PX}px))` : `${leftPct}%`,
|
|
45562
|
-
width: showBoundaryArrow ? `${TINY_BAR_BOX_SIZE_PX}px` : isTinyBar ? `${TINY_BAR_WIDTH_PX}px` : `max(${widthPct}%, 4px)`,
|
|
45563
|
-
height: BAR_HEIGHT_PX
|
|
45564
|
-
}, children: barContent }) }) });
|
|
45727
|
+
const fallbackBg = isErrored ? colors.errorBg ?? "var(--ds-red-200)" : colors.bg;
|
|
45728
|
+
const fallbackBorder = isErrored ? colors.errorBorder ?? "var(--ds-red-500)" : colors.border;
|
|
45729
|
+
const totalLabel = formatDuration(totalDurationMs);
|
|
45730
|
+
const showTotalLabel = geometry.visiblePixelWidth >= Math.max(40, totalLabel.length * 6 + 12);
|
|
45731
|
+
const handleClick = reactExports.useCallback(() => {
|
|
45732
|
+
onSelect(span.spanId);
|
|
45733
|
+
}, [onSelect, span.spanId]);
|
|
45734
|
+
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: "group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200", onClick: handleClick, children: jsxRuntimeExports.jsx("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", 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 }) }) }) });
|
|
45735
|
+
});
|
|
45736
|
+
const DELTA_ROW_HEIGHT_PX = 40;
|
|
45737
|
+
const DELTA_CAP_HEIGHT_PX = 8;
|
|
45738
|
+
const DELTA_ROW_OFFSET_PX = 8;
|
|
45739
|
+
const DeltaIndicator = reactExports.memo(function DeltaIndicator2({ leftFrac, rightFrac, label, rowIndex }) {
|
|
45740
|
+
const centerY = DELTA_ROW_OFFSET_PX + (rowIndex + 1) * DELTA_ROW_HEIGHT_PX;
|
|
45741
|
+
return jsxRuntimeExports.jsxs("div", { className: "absolute pointer-events-none", style: {
|
|
45742
|
+
left: `${leftFrac * 100}%`,
|
|
45743
|
+
width: `${(rightFrac - leftFrac) * 100}%`,
|
|
45744
|
+
top: centerY - DELTA_CAP_HEIGHT_PX / 2,
|
|
45745
|
+
height: DELTA_CAP_HEIGHT_PX
|
|
45746
|
+
}, children: [jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 w-px h-full bg-amber-800" }), jsxRuntimeExports.jsx("div", { className: "absolute left-0 right-0 top-1/2 h-px bg-amber-800" }), jsxRuntimeExports.jsx("div", { className: "absolute right-0 top-0 w-px h-full bg-amber-800" }), jsxRuntimeExports.jsx("span", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-label-12 leading-none whitespace-nowrap rounded-xs px-1 py-0.5 text-gray-100 bg-amber-800", children: label })] });
|
|
45565
45747
|
});
|
|
45566
45748
|
function TimelineHeader({ markers: markers2, hoverInfo: hoverInfo2 }) {
|
|
45567
45749
|
return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, `${m2.position}-${m2.label}`)), hoverInfo2 && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo2.fraction * 100}%` }, children: hoverInfo2.label })] }) });
|
|
@@ -45582,16 +45764,10 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, on
|
|
|
45582
45764
|
return () => ro2.disconnect();
|
|
45583
45765
|
}, []);
|
|
45584
45766
|
const gaps = reactExports.useMemo(() => computeSpanGaps(spans, viewStart, viewEnd), [spans, viewStart, viewEnd]);
|
|
45585
|
-
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style:
|
|
45586
|
-
left
|
|
45587
|
-
|
|
45588
|
-
},
|
|
45589
|
-
left: TIMELINE_PADDING_PX,
|
|
45590
|
-
right: TIMELINE_PADDING_PX
|
|
45591
|
-
}, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-400", style: { left: `${hoverFraction * 100}%` } }) }), spans.map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, onClick: () => onSelect(span.spanId) }, span.spanId)), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: {
|
|
45592
|
-
left: TIMELINE_PADDING_PX,
|
|
45593
|
-
right: TIMELINE_PADDING_PX
|
|
45594
|
-
}, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
|
|
45767
|
+
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: markers2.map((marker2) => (
|
|
45768
|
+
// Skip the "0s" origin marker since the left edge already implies it.
|
|
45769
|
+
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}%` } }, `${marker2.position}-${marker2.label}`) : null
|
|
45770
|
+
)) }), 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}%` } }) }), spans.map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, 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)) })] });
|
|
45595
45771
|
}
|
|
45596
45772
|
const ActiveSpanContext = reactExports.createContext(null);
|
|
45597
45773
|
ActiveSpanContext.displayName = "ActiveSpanContext";
|
|
@@ -45793,46 +45969,6 @@ function getElementRef(element2) {
|
|
|
45793
45969
|
}
|
|
45794
45970
|
return element2.props.ref || element2.ref;
|
|
45795
45971
|
}
|
|
45796
|
-
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
45797
|
-
const cx = clsx;
|
|
45798
|
-
const cva = (base, config2) => (props) => {
|
|
45799
|
-
var _config_compoundVariants;
|
|
45800
|
-
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);
|
|
45801
|
-
const { variants, defaultVariants } = config2;
|
|
45802
|
-
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
45803
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
45804
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
45805
|
-
if (variantProp === null) return null;
|
|
45806
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
45807
|
-
return variants[variant][variantKey];
|
|
45808
|
-
});
|
|
45809
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
45810
|
-
let [key, value] = param;
|
|
45811
|
-
if (value === void 0) {
|
|
45812
|
-
return acc;
|
|
45813
|
-
}
|
|
45814
|
-
acc[key] = value;
|
|
45815
|
-
return acc;
|
|
45816
|
-
}, {});
|
|
45817
|
-
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) => {
|
|
45818
|
-
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
45819
|
-
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
45820
|
-
let [key, value] = param2;
|
|
45821
|
-
return Array.isArray(value) ? value.includes({
|
|
45822
|
-
...defaultVariants,
|
|
45823
|
-
...propsWithoutUndefined
|
|
45824
|
-
}[key]) : {
|
|
45825
|
-
...defaultVariants,
|
|
45826
|
-
...propsWithoutUndefined
|
|
45827
|
-
}[key] === value;
|
|
45828
|
-
}) ? [
|
|
45829
|
-
...acc,
|
|
45830
|
-
cvClass,
|
|
45831
|
-
cvClassName
|
|
45832
|
-
] : acc;
|
|
45833
|
-
}, []);
|
|
45834
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
45835
|
-
};
|
|
45836
45972
|
const buttonVariants = cva(
|
|
45837
45973
|
"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",
|
|
45838
45974
|
{
|
|
@@ -48178,7 +48314,7 @@ const mermaid3ZIDBTTL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
|
|
|
48178
48314
|
Mermaid: Nt
|
|
48179
48315
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
48180
48316
|
export {
|
|
48181
|
-
|
|
48317
|
+
Button$1 as $,
|
|
48182
48318
|
Anchor as A,
|
|
48183
48319
|
Button as B,
|
|
48184
48320
|
Content as C,
|
|
@@ -48192,70 +48328,71 @@ export {
|
|
|
48192
48328
|
Ks as K,
|
|
48193
48329
|
LoaderCircle as L,
|
|
48194
48330
|
Spinner as M,
|
|
48195
|
-
|
|
48196
|
-
|
|
48331
|
+
cn$4 as N,
|
|
48332
|
+
Skeleton$1 as O,
|
|
48197
48333
|
Primitive as P,
|
|
48198
48334
|
Qe as Q,
|
|
48199
48335
|
R,
|
|
48200
48336
|
ServerConfigProvider as S,
|
|
48201
48337
|
Tooltip as T,
|
|
48202
|
-
|
|
48338
|
+
DecryptClickContext as U,
|
|
48203
48339
|
VISUALLY_HIDDEN_STYLES as V,
|
|
48204
|
-
|
|
48205
|
-
|
|
48340
|
+
isEncryptedMarker as W,
|
|
48341
|
+
formatDuration as X,
|
|
48206
48342
|
Yr as Y,
|
|
48207
|
-
|
|
48343
|
+
DataInspector as Z,
|
|
48208
48344
|
_r as _,
|
|
48209
48345
|
TooltipTrigger as a,
|
|
48210
|
-
|
|
48211
|
-
|
|
48212
|
-
|
|
48213
|
-
|
|
48214
|
-
|
|
48215
|
-
|
|
48216
|
-
|
|
48217
|
-
|
|
48218
|
-
|
|
48219
|
-
|
|
48220
|
-
|
|
48221
|
-
|
|
48222
|
-
|
|
48223
|
-
|
|
48224
|
-
|
|
48225
|
-
|
|
48226
|
-
|
|
48227
|
-
|
|
48228
|
-
|
|
48229
|
-
|
|
48230
|
-
|
|
48231
|
-
|
|
48232
|
-
|
|
48233
|
-
|
|
48234
|
-
|
|
48235
|
-
|
|
48236
|
-
|
|
48237
|
-
|
|
48238
|
-
|
|
48239
|
-
|
|
48240
|
-
|
|
48241
|
-
|
|
48242
|
-
|
|
48243
|
-
|
|
48244
|
-
|
|
48245
|
-
|
|
48246
|
-
|
|
48247
|
-
|
|
48248
|
-
|
|
48249
|
-
|
|
48250
|
-
|
|
48251
|
-
|
|
48252
|
-
|
|
48253
|
-
|
|
48254
|
-
|
|
48255
|
-
|
|
48256
|
-
|
|
48257
|
-
|
|
48258
|
-
|
|
48346
|
+
Lock as a0,
|
|
48347
|
+
RunClickContext as a1,
|
|
48348
|
+
StreamClickContext as a2,
|
|
48349
|
+
isExpiredMarker as a3,
|
|
48350
|
+
isDoStreamStep as a4,
|
|
48351
|
+
extractConversation as a5,
|
|
48352
|
+
hasEncryptedFields as a6,
|
|
48353
|
+
EVENT_DATA_REF_FIELDS as a7,
|
|
48354
|
+
useSidebarDataOptional as a8,
|
|
48355
|
+
clsx as a9,
|
|
48356
|
+
useFloating as aA,
|
|
48357
|
+
offset as aB,
|
|
48358
|
+
shift as aC,
|
|
48359
|
+
limitShift as aD,
|
|
48360
|
+
flip as aE,
|
|
48361
|
+
size as aF,
|
|
48362
|
+
arrow as aG,
|
|
48363
|
+
hide as aH,
|
|
48364
|
+
autoUpdate as aI,
|
|
48365
|
+
cancelRun as aJ,
|
|
48366
|
+
reenqueueRun as aK,
|
|
48367
|
+
wakeUpRun as aL,
|
|
48368
|
+
resumeHook as aM,
|
|
48369
|
+
recreateRun as aN,
|
|
48370
|
+
getSpanDurationMs as aa,
|
|
48371
|
+
getHighResInMs as ab,
|
|
48372
|
+
ActiveSpanProvider as ac,
|
|
48373
|
+
useActiveSpan as ad,
|
|
48374
|
+
computeRootBounds as ae,
|
|
48375
|
+
computeTimeMarkers as af,
|
|
48376
|
+
TIMELINE_PADDING_PX as ag,
|
|
48377
|
+
Timeline as ah,
|
|
48378
|
+
TimelineHeader as ai,
|
|
48379
|
+
SidebarDataProvider as aj,
|
|
48380
|
+
hydrateResourceIOWithKey as ak,
|
|
48381
|
+
hydrateResourceIO as al,
|
|
48382
|
+
fetchHook as am,
|
|
48383
|
+
fetchStep as an,
|
|
48384
|
+
fetchStreams as ao,
|
|
48385
|
+
Slot as ap,
|
|
48386
|
+
Slottable as aq,
|
|
48387
|
+
buttonVariants as ar,
|
|
48388
|
+
isEncryptedData as as,
|
|
48389
|
+
hydrateData as at,
|
|
48390
|
+
getWebRevivers as au,
|
|
48391
|
+
LIVE_UPDATE_INTERVAL_MS as av,
|
|
48392
|
+
fetchEvent as aw,
|
|
48393
|
+
getEncryptionKeyForRun as ax,
|
|
48394
|
+
StreamViewer as ay,
|
|
48395
|
+
composeRefs as az,
|
|
48259
48396
|
TooltipContent as b,
|
|
48260
48397
|
createLucideIcon as c,
|
|
48261
48398
|
cn as d,
|