@workflow/web 5.0.0-beta.21 → 5.0.0-beta.22
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-LmACipCR.js → highlighted-body-B3W2YXNL-pQbU-Oll.js} +1 -1
- package/build/client/assets/{home-B-QPEXVb.js → home-Dz43xne_.js} +2 -2
- package/build/client/assets/manifest-3f730581.js +1 -0
- package/build/client/assets/{mermaid-3ZIDBTTL-DndzaIEl.js → mermaid-3ZIDBTTL-C_xy8SxZ.js} +318 -928
- package/build/client/assets/root-61NXpLSs.css +1 -0
- package/build/client/assets/{root--Sg25-Lb.js → root-BlFmfRST.js} +1 -1
- package/build/client/assets/run-detail-CWoGxu_0.css +1 -0
- package/build/client/assets/{run-detail-Djwnox1v.js → run-detail-T4JlTgHs.js} +81 -11
- package/build/client/assets/server-build-B8TvrR_Z.css +1 -0
- package/build/client/assets/{workflow-graph-viewer-j7J3_oSH.js → workflow-graph-viewer-BlDVZ5AU.js} +1 -1
- package/build/client/assets/{zstd-browser-decoder-DGiXPDxR.js → zstd-browser-decoder-Biv4GTD9.js} +1 -1
- package/build/server/assets/{app-BKhDtt1l.js → app-DN3f8amN.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-Bbohhhvu.js → highlighted-body-B3W2YXNL-Bn21Jt9E.js} +2 -2
- package/build/server/assets/{index-CCVnYBh5.js → index-BAzmSj9V.js} +3 -3
- package/build/server/assets/{mermaid-3ZIDBTTL-GUOonG4P.js → mermaid-3ZIDBTTL-BDx4F1TF.js} +2 -2
- package/build/server/assets/{server-build-Bho0V9At.js → server-build-CbSfuKyC.js} +594 -1112
- package/build/server/assets/{token-DWlFlsmX.js → token-D-3FNfzy.js} +2 -2
- package/build/server/assets/{token-util-YVFsN8wA.js → token-util-6H5PWMXy.js} +2 -2
- package/build/server/assets/{zstd-browser-decoder-Bmj-2oQU.js → zstd-browser-decoder-C5Jfor_W.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +5 -5
- package/build/client/assets/manifest-225d97da.js +0 -1
- package/build/client/assets/root-1hd8ZXAx.css +0 -1
- package/build/client/assets/server-build-DixvNjKe.css +0 -1
|
@@ -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/zstd-browser-decoder-
|
|
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/zstd-browser-decoder-Biv4GTD9.js","assets/highlighted-body-B3W2YXNL-pQbU-Oll.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);
|
|
@@ -2360,7 +2360,7 @@ const arrow = (options, deps) => ({
|
|
|
2360
2360
|
options: [options, deps]
|
|
2361
2361
|
});
|
|
2362
2362
|
var NAME$1 = "Arrow";
|
|
2363
|
-
var Arrow$
|
|
2363
|
+
var Arrow$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
2364
2364
|
const { children: children2, width = 10, height = 5, ...arrowProps } = props;
|
|
2365
2365
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2366
2366
|
Primitive.svg,
|
|
@@ -2375,8 +2375,8 @@ var Arrow$2 = reactExports.forwardRef((props, forwardedRef) => {
|
|
|
2375
2375
|
}
|
|
2376
2376
|
);
|
|
2377
2377
|
});
|
|
2378
|
-
Arrow$
|
|
2379
|
-
var Root$2 = Arrow$
|
|
2378
|
+
Arrow$1.displayName = NAME$1;
|
|
2379
|
+
var Root$2 = Arrow$1;
|
|
2380
2380
|
function useSize(element2) {
|
|
2381
2381
|
const [size2, setSize] = reactExports.useState(void 0);
|
|
2382
2382
|
useLayoutEffect2(() => {
|
|
@@ -2681,7 +2681,7 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
2681
2681
|
var Root2 = Popper;
|
|
2682
2682
|
var Anchor = PopperAnchor;
|
|
2683
2683
|
var Content = PopperContent;
|
|
2684
|
-
var Arrow
|
|
2684
|
+
var Arrow = PopperArrow;
|
|
2685
2685
|
var PORTAL_NAME$1 = "Portal";
|
|
2686
2686
|
var Portal$1 = reactExports.forwardRef((props, forwardedRef) => {
|
|
2687
2687
|
var _a3;
|
|
@@ -3258,7 +3258,7 @@ var TooltipArrow = reactExports.forwardRef(
|
|
|
3258
3258
|
ARROW_NAME,
|
|
3259
3259
|
__scopeTooltip
|
|
3260
3260
|
);
|
|
3261
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Arrow
|
|
3261
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
3262
3262
|
}
|
|
3263
3263
|
);
|
|
3264
3264
|
TooltipArrow.displayName = ARROW_NAME;
|
|
@@ -3484,44 +3484,44 @@ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).ind
|
|
|
3484
3484
|
})();
|
|
3485
3485
|
const createClassMap = (config2) => {
|
|
3486
3486
|
const {
|
|
3487
|
-
theme
|
|
3487
|
+
theme,
|
|
3488
3488
|
classGroups
|
|
3489
3489
|
} = config2;
|
|
3490
|
-
return processClassGroups(classGroups,
|
|
3490
|
+
return processClassGroups(classGroups, theme);
|
|
3491
3491
|
};
|
|
3492
|
-
const processClassGroups = (classGroups,
|
|
3492
|
+
const processClassGroups = (classGroups, theme) => {
|
|
3493
3493
|
const classMap = createClassPartObject();
|
|
3494
3494
|
for (const classGroupId in classGroups) {
|
|
3495
3495
|
const group = classGroups[classGroupId];
|
|
3496
|
-
processClassesRecursively(group, classMap, classGroupId,
|
|
3496
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
3497
3497
|
}
|
|
3498
3498
|
return classMap;
|
|
3499
3499
|
};
|
|
3500
|
-
const processClassesRecursively = (classGroup, classPartObject, classGroupId,
|
|
3500
|
+
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
3501
3501
|
const len = classGroup.length;
|
|
3502
3502
|
for (let i = 0; i < len; i++) {
|
|
3503
3503
|
const classDefinition = classGroup[i];
|
|
3504
|
-
processClassDefinition(classDefinition, classPartObject, classGroupId,
|
|
3504
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
3505
3505
|
}
|
|
3506
3506
|
};
|
|
3507
|
-
const processClassDefinition = (classDefinition, classPartObject, classGroupId,
|
|
3507
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
3508
3508
|
if (typeof classDefinition === "string") {
|
|
3509
3509
|
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
3510
3510
|
return;
|
|
3511
3511
|
}
|
|
3512
3512
|
if (typeof classDefinition === "function") {
|
|
3513
|
-
processFunctionDefinition(classDefinition, classPartObject, classGroupId,
|
|
3513
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
3514
3514
|
return;
|
|
3515
3515
|
}
|
|
3516
|
-
processObjectDefinition(classDefinition, classPartObject, classGroupId,
|
|
3516
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
3517
3517
|
};
|
|
3518
3518
|
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
3519
3519
|
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
3520
3520
|
classPartObjectToEdit.classGroupId = classGroupId;
|
|
3521
3521
|
};
|
|
3522
|
-
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId,
|
|
3522
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
3523
3523
|
if (isThemeGetter(classDefinition)) {
|
|
3524
|
-
processClassesRecursively(classDefinition(
|
|
3524
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
3525
3525
|
return;
|
|
3526
3526
|
}
|
|
3527
3527
|
if (classPartObject.validators === null) {
|
|
@@ -3529,12 +3529,12 @@ const processFunctionDefinition = (classDefinition, classPartObject, classGroupI
|
|
|
3529
3529
|
}
|
|
3530
3530
|
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
3531
3531
|
};
|
|
3532
|
-
const processObjectDefinition = (classDefinition, classPartObject, classGroupId,
|
|
3532
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
3533
3533
|
const entries = Object.entries(classDefinition);
|
|
3534
3534
|
const len = entries.length;
|
|
3535
3535
|
for (let i = 0; i < len; i++) {
|
|
3536
3536
|
const [key, value] = entries[i];
|
|
3537
|
-
processClassesRecursively(value, getPart(classPartObject, key), classGroupId,
|
|
3537
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
3538
3538
|
}
|
|
3539
3539
|
};
|
|
3540
3540
|
const getPart = (classPartObject, path2) => {
|
|
@@ -3814,7 +3814,7 @@ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
|
3814
3814
|
};
|
|
3815
3815
|
const fallbackThemeArr = [];
|
|
3816
3816
|
const fromTheme = (key) => {
|
|
3817
|
-
const themeGetter = (
|
|
3817
|
+
const themeGetter = (theme) => theme[key] || fallbackThemeArr;
|
|
3818
3818
|
themeGetter.isThemeGetter = true;
|
|
3819
3819
|
return themeGetter;
|
|
3820
3820
|
};
|
|
@@ -15664,6 +15664,7 @@ AllEventsSchema.and(object({
|
|
|
15664
15664
|
runId: string$2(),
|
|
15665
15665
|
eventId: string$2(),
|
|
15666
15666
|
createdAt: date(),
|
|
15667
|
+
occurredAt: date().optional(),
|
|
15667
15668
|
specVersion: number$2().optional()
|
|
15668
15669
|
}));
|
|
15669
15670
|
object({
|
|
@@ -16116,7 +16117,7 @@ function getWebRevivers() {
|
|
|
16116
16117
|
URLSearchParams: (value) => new URLSearchParams(value === "." ? "" : value),
|
|
16117
16118
|
// Web-specific overrides for class instances.
|
|
16118
16119
|
// Create objects with a dynamically-named constructor so that
|
|
16119
|
-
//
|
|
16120
|
+
// the data inspector shows the class name (it reads constructor.name).
|
|
16120
16121
|
Class: (value) => `<class:${extractClassName(value.classId)}>`,
|
|
16121
16122
|
Instance: (value) => {
|
|
16122
16123
|
const runRef = serializedInstanceToRef(value);
|
|
@@ -16157,7 +16158,7 @@ function createEncryptedMarker(data) {
|
|
|
16157
16158
|
});
|
|
16158
16159
|
return obj;
|
|
16159
16160
|
}
|
|
16160
|
-
function isEncryptedMarker(value) {
|
|
16161
|
+
function isEncryptedMarker$1(value) {
|
|
16161
16162
|
var _a3;
|
|
16162
16163
|
return value !== null && typeof value === "object" && ((_a3 = value.constructor) == null ? void 0 : _a3.name) === ENCRYPTED_DISPLAY_NAME;
|
|
16163
16164
|
}
|
|
@@ -16209,14 +16210,14 @@ async function hydrateResourceIOWithKey(resource, key) {
|
|
|
16209
16210
|
return { importKey: importKey2 };
|
|
16210
16211
|
}, true ? __vite__mapDeps([0,1,2]) : void 0);
|
|
16211
16212
|
const { ensureZstdDecoderRegistered } = await __vitePreload(async () => {
|
|
16212
|
-
const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-
|
|
16213
|
+
const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-Biv4GTD9.js");
|
|
16213
16214
|
return { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 };
|
|
16214
16215
|
}, true ? __vite__mapDeps([3,2]) : void 0);
|
|
16215
16216
|
ensureZstdDecoderRegistered();
|
|
16216
16217
|
const cryptoKey = await importKey(key);
|
|
16217
16218
|
const revivers = getRevivers();
|
|
16218
16219
|
async function decryptField(value, rev, k2) {
|
|
16219
|
-
if (isEncryptedMarker(value)) {
|
|
16220
|
+
if (isEncryptedMarker$1(value)) {
|
|
16220
16221
|
const raw2 = value.__encryptedData;
|
|
16221
16222
|
return hydrateDataWithKey2(raw2, rev, k2);
|
|
16222
16223
|
}
|
|
@@ -16250,7 +16251,7 @@ function hasEncryptedFields(resource) {
|
|
|
16250
16251
|
return false;
|
|
16251
16252
|
const r2 = resource;
|
|
16252
16253
|
for (const key of ["input", "output", "metadata", "error"]) {
|
|
16253
|
-
if (isEncryptedMarker(r2[key]))
|
|
16254
|
+
if (isEncryptedMarker$1(r2[key]))
|
|
16254
16255
|
return true;
|
|
16255
16256
|
}
|
|
16256
16257
|
if (r2.eventData && typeof r2.eventData === "object") {
|
|
@@ -16258,7 +16259,7 @@ function hasEncryptedFields(resource) {
|
|
|
16258
16259
|
const refKeys = EVENT_DATA_REF_FIELDS[eventType] ?? [];
|
|
16259
16260
|
const ed = r2.eventData;
|
|
16260
16261
|
for (const key of refKeys) {
|
|
16261
|
-
if (key in ed && isEncryptedMarker(ed[key]))
|
|
16262
|
+
if (key in ed && isEncryptedMarker$1(ed[key]))
|
|
16262
16263
|
return true;
|
|
16263
16264
|
}
|
|
16264
16265
|
}
|
|
@@ -17095,7 +17096,7 @@ const Toaster = /* @__PURE__ */ ReactExports.forwardRef(function Toaster2(props,
|
|
|
17095
17096
|
const { id, invert, position: position2 = "bottom-right", hotkey = [
|
|
17096
17097
|
"altKey",
|
|
17097
17098
|
"KeyT"
|
|
17098
|
-
], expand, closeButton, className, offset: offset2, mobileOffset, theme
|
|
17099
|
+
], expand, closeButton, className, offset: offset2, mobileOffset, theme = "light", richColors, duration: duration2, style: style2, visibleToasts = VISIBLE_TOASTS_AMOUNT, toastOptions, dir = getDocumentDirection(), gap = GAP, icons, containerAriaLabel = "Notifications" } = props;
|
|
17099
17100
|
const [toasts, setToasts] = ReactExports.useState([]);
|
|
17100
17101
|
const filteredToasts = ReactExports.useMemo(() => {
|
|
17101
17102
|
if (id) {
|
|
@@ -17117,7 +17118,7 @@ const Toaster = /* @__PURE__ */ ReactExports.forwardRef(function Toaster2(props,
|
|
|
17117
17118
|
const [heights, setHeights] = ReactExports.useState([]);
|
|
17118
17119
|
const [expanded2, setExpanded] = ReactExports.useState(false);
|
|
17119
17120
|
const [interacting, setInteracting] = ReactExports.useState(false);
|
|
17120
|
-
const [actualTheme, setActualTheme] = ReactExports.useState(
|
|
17121
|
+
const [actualTheme, setActualTheme] = ReactExports.useState(theme !== "system" ? theme : typeof window !== "undefined" ? window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : "light");
|
|
17121
17122
|
const listRef = ReactExports.useRef(null);
|
|
17122
17123
|
const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
|
|
17123
17124
|
const lastFocusedElementRef = ReactExports.useRef(null);
|
|
@@ -17168,11 +17169,11 @@ const Toaster = /* @__PURE__ */ ReactExports.forwardRef(function Toaster2(props,
|
|
|
17168
17169
|
toasts
|
|
17169
17170
|
]);
|
|
17170
17171
|
ReactExports.useEffect(() => {
|
|
17171
|
-
if (
|
|
17172
|
-
setActualTheme(
|
|
17172
|
+
if (theme !== "system") {
|
|
17173
|
+
setActualTheme(theme);
|
|
17173
17174
|
return;
|
|
17174
17175
|
}
|
|
17175
|
-
if (
|
|
17176
|
+
if (theme === "system") {
|
|
17176
17177
|
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
17177
17178
|
setActualTheme("dark");
|
|
17178
17179
|
} else {
|
|
@@ -17203,7 +17204,7 @@ const Toaster = /* @__PURE__ */ ReactExports.forwardRef(function Toaster2(props,
|
|
|
17203
17204
|
});
|
|
17204
17205
|
}
|
|
17205
17206
|
}, [
|
|
17206
|
-
|
|
17207
|
+
theme
|
|
17207
17208
|
]);
|
|
17208
17209
|
ReactExports.useEffect(() => {
|
|
17209
17210
|
if (toasts.length <= 1) {
|
|
@@ -17434,792 +17435,6 @@ const buttonVariants$1 = cva([
|
|
|
17434
17435
|
function Button$1({ className, variant, size: size2, type = "button", ...props }) {
|
|
17435
17436
|
return jsxRuntimeExports.jsx("button", { type, className: cn$4(buttonVariants$1({ variant, size: size2, className })), ...props });
|
|
17436
17437
|
}
|
|
17437
|
-
var __create = Object.create;
|
|
17438
|
-
var __defProp2 = Object.defineProperty;
|
|
17439
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
17440
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17441
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
17442
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17443
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
17444
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17445
|
-
};
|
|
17446
|
-
var __export = (target2, all2) => {
|
|
17447
|
-
for (var name2 in all2)
|
|
17448
|
-
__defProp2(target2, name2, { get: all2[name2], enumerable: true });
|
|
17449
|
-
};
|
|
17450
|
-
var __copyProps = (to2, from, except, desc) => {
|
|
17451
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17452
|
-
for (let key of __getOwnPropNames(from))
|
|
17453
|
-
if (!__hasOwnProp.call(to2, key) && key !== except)
|
|
17454
|
-
__defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17455
|
-
}
|
|
17456
|
-
return to2;
|
|
17457
|
-
};
|
|
17458
|
-
var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17459
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17460
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
17461
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
17462
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17463
|
-
__defProp2(target2, "default", { value: mod, enumerable: true }),
|
|
17464
|
-
mod
|
|
17465
|
-
));
|
|
17466
|
-
var require_is_object = __commonJS({
|
|
17467
|
-
"node_modules/is-object/index.js"(exports$1, module) {
|
|
17468
|
-
module.exports = function isObject2(x2) {
|
|
17469
|
-
return typeof x2 === "object" && x2 !== null;
|
|
17470
|
-
};
|
|
17471
|
-
}
|
|
17472
|
-
});
|
|
17473
|
-
var require_is_window = __commonJS({
|
|
17474
|
-
"node_modules/is-window/index.js"(exports$1, module) {
|
|
17475
|
-
module.exports = function(obj) {
|
|
17476
|
-
if (obj == null) {
|
|
17477
|
-
return false;
|
|
17478
|
-
}
|
|
17479
|
-
var o = Object(obj);
|
|
17480
|
-
return o === o.window;
|
|
17481
|
-
};
|
|
17482
|
-
}
|
|
17483
|
-
});
|
|
17484
|
-
var require_is_dom = __commonJS({
|
|
17485
|
-
"node_modules/is-dom/index.js"(exports$1, module) {
|
|
17486
|
-
var isObject2 = require_is_object();
|
|
17487
|
-
var isWindow = require_is_window();
|
|
17488
|
-
function isNode2(val) {
|
|
17489
|
-
if (!isObject2(val) || !isWindow(window) || typeof window.Node !== "function") {
|
|
17490
|
-
return false;
|
|
17491
|
-
}
|
|
17492
|
-
return typeof val.nodeType === "number" && typeof val.nodeName === "string";
|
|
17493
|
-
}
|
|
17494
|
-
module.exports = isNode2;
|
|
17495
|
-
}
|
|
17496
|
-
});
|
|
17497
|
-
var themes_exports = {};
|
|
17498
|
-
__export(themes_exports, {
|
|
17499
|
-
chromeDark: () => theme,
|
|
17500
|
-
chromeLight: () => theme2
|
|
17501
|
-
});
|
|
17502
|
-
var theme = {
|
|
17503
|
-
BASE_FONT_FAMILY: "Menlo, monospace",
|
|
17504
|
-
BASE_FONT_SIZE: "11px",
|
|
17505
|
-
BASE_LINE_HEIGHT: 1.2,
|
|
17506
|
-
BASE_BACKGROUND_COLOR: "rgb(36, 36, 36)",
|
|
17507
|
-
BASE_COLOR: "rgb(213, 213, 213)",
|
|
17508
|
-
OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
|
|
17509
|
-
OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
|
|
17510
|
-
OBJECT_NAME_COLOR: "rgb(227, 110, 236)",
|
|
17511
|
-
OBJECT_VALUE_NULL_COLOR: "rgb(127, 127, 127)",
|
|
17512
|
-
OBJECT_VALUE_UNDEFINED_COLOR: "rgb(127, 127, 127)",
|
|
17513
|
-
OBJECT_VALUE_REGEXP_COLOR: "rgb(233, 63, 59)",
|
|
17514
|
-
OBJECT_VALUE_STRING_COLOR: "rgb(233, 63, 59)",
|
|
17515
|
-
OBJECT_VALUE_SYMBOL_COLOR: "rgb(233, 63, 59)",
|
|
17516
|
-
OBJECT_VALUE_NUMBER_COLOR: "hsl(252, 100%, 75%)",
|
|
17517
|
-
OBJECT_VALUE_BOOLEAN_COLOR: "hsl(252, 100%, 75%)",
|
|
17518
|
-
OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(85, 106, 242)",
|
|
17519
|
-
HTML_TAG_COLOR: "rgb(93, 176, 215)",
|
|
17520
|
-
HTML_TAGNAME_COLOR: "rgb(93, 176, 215)",
|
|
17521
|
-
HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
|
|
17522
|
-
HTML_ATTRIBUTE_NAME_COLOR: "rgb(155, 187, 220)",
|
|
17523
|
-
HTML_ATTRIBUTE_VALUE_COLOR: "rgb(242, 151, 102)",
|
|
17524
|
-
HTML_COMMENT_COLOR: "rgb(137, 137, 137)",
|
|
17525
|
-
HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
|
|
17526
|
-
ARROW_COLOR: "rgb(145, 145, 145)",
|
|
17527
|
-
ARROW_MARGIN_RIGHT: 3,
|
|
17528
|
-
ARROW_FONT_SIZE: 12,
|
|
17529
|
-
ARROW_ANIMATION_DURATION: "0",
|
|
17530
|
-
TREENODE_FONT_FAMILY: "Menlo, monospace",
|
|
17531
|
-
TREENODE_FONT_SIZE: "11px",
|
|
17532
|
-
TREENODE_LINE_HEIGHT: 1.2,
|
|
17533
|
-
TREENODE_PADDING_LEFT: 12,
|
|
17534
|
-
TABLE_BORDER_COLOR: "rgb(85, 85, 85)",
|
|
17535
|
-
TABLE_TH_BACKGROUND_COLOR: "rgb(44, 44, 44)",
|
|
17536
|
-
TABLE_TH_HOVER_COLOR: "rgb(48, 48, 48)",
|
|
17537
|
-
TABLE_SORT_ICON_COLOR: "black",
|
|
17538
|
-
//'rgb(48, 57, 66)',
|
|
17539
|
-
TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",
|
|
17540
|
-
TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
|
|
17541
|
-
};
|
|
17542
|
-
var theme2 = {
|
|
17543
|
-
BASE_FONT_FAMILY: "Menlo, monospace",
|
|
17544
|
-
BASE_FONT_SIZE: "11px",
|
|
17545
|
-
BASE_LINE_HEIGHT: 1.2,
|
|
17546
|
-
BASE_BACKGROUND_COLOR: "white",
|
|
17547
|
-
BASE_COLOR: "black",
|
|
17548
|
-
OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
|
|
17549
|
-
OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
|
|
17550
|
-
OBJECT_NAME_COLOR: "rgb(136, 19, 145)",
|
|
17551
|
-
OBJECT_VALUE_NULL_COLOR: "rgb(128, 128, 128)",
|
|
17552
|
-
OBJECT_VALUE_UNDEFINED_COLOR: "rgb(128, 128, 128)",
|
|
17553
|
-
OBJECT_VALUE_REGEXP_COLOR: "rgb(196, 26, 22)",
|
|
17554
|
-
OBJECT_VALUE_STRING_COLOR: "rgb(196, 26, 22)",
|
|
17555
|
-
OBJECT_VALUE_SYMBOL_COLOR: "rgb(196, 26, 22)",
|
|
17556
|
-
OBJECT_VALUE_NUMBER_COLOR: "rgb(28, 0, 207)",
|
|
17557
|
-
OBJECT_VALUE_BOOLEAN_COLOR: "rgb(28, 0, 207)",
|
|
17558
|
-
OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(13, 34, 170)",
|
|
17559
|
-
HTML_TAG_COLOR: "rgb(168, 148, 166)",
|
|
17560
|
-
HTML_TAGNAME_COLOR: "rgb(136, 18, 128)",
|
|
17561
|
-
HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
|
|
17562
|
-
HTML_ATTRIBUTE_NAME_COLOR: "rgb(153, 69, 0)",
|
|
17563
|
-
HTML_ATTRIBUTE_VALUE_COLOR: "rgb(26, 26, 166)",
|
|
17564
|
-
HTML_COMMENT_COLOR: "rgb(35, 110, 37)",
|
|
17565
|
-
HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
|
|
17566
|
-
ARROW_COLOR: "#6e6e6e",
|
|
17567
|
-
ARROW_MARGIN_RIGHT: 3,
|
|
17568
|
-
ARROW_FONT_SIZE: 12,
|
|
17569
|
-
ARROW_ANIMATION_DURATION: "0",
|
|
17570
|
-
TREENODE_FONT_FAMILY: "Menlo, monospace",
|
|
17571
|
-
TREENODE_FONT_SIZE: "11px",
|
|
17572
|
-
TREENODE_LINE_HEIGHT: 1.2,
|
|
17573
|
-
TREENODE_PADDING_LEFT: 12,
|
|
17574
|
-
TABLE_BORDER_COLOR: "#aaa",
|
|
17575
|
-
TABLE_TH_BACKGROUND_COLOR: "#eee",
|
|
17576
|
-
TABLE_TH_HOVER_COLOR: "hsla(0, 0%, 90%, 1)",
|
|
17577
|
-
TABLE_SORT_ICON_COLOR: "#6e6e6e",
|
|
17578
|
-
TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",
|
|
17579
|
-
TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
|
|
17580
|
-
};
|
|
17581
|
-
var ExpandedPathsContext = reactExports.createContext([{}, () => {
|
|
17582
|
-
}]);
|
|
17583
|
-
var unselectable = {
|
|
17584
|
-
WebkitTouchCallout: "none",
|
|
17585
|
-
WebkitUserSelect: "none",
|
|
17586
|
-
KhtmlUserSelect: "none",
|
|
17587
|
-
MozUserSelect: "none",
|
|
17588
|
-
msUserSelect: "none",
|
|
17589
|
-
OUserSelect: "none",
|
|
17590
|
-
userSelect: "none"
|
|
17591
|
-
};
|
|
17592
|
-
var createTheme = (theme3) => ({
|
|
17593
|
-
DOMNodePreview: {
|
|
17594
|
-
htmlOpenTag: {
|
|
17595
|
-
base: {
|
|
17596
|
-
color: theme3.HTML_TAG_COLOR
|
|
17597
|
-
},
|
|
17598
|
-
tagName: {
|
|
17599
|
-
color: theme3.HTML_TAGNAME_COLOR,
|
|
17600
|
-
textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
|
|
17601
|
-
},
|
|
17602
|
-
htmlAttributeName: {
|
|
17603
|
-
color: theme3.HTML_ATTRIBUTE_NAME_COLOR
|
|
17604
|
-
},
|
|
17605
|
-
htmlAttributeValue: {
|
|
17606
|
-
color: theme3.HTML_ATTRIBUTE_VALUE_COLOR
|
|
17607
|
-
}
|
|
17608
|
-
},
|
|
17609
|
-
htmlCloseTag: {
|
|
17610
|
-
base: {
|
|
17611
|
-
color: theme3.HTML_TAG_COLOR
|
|
17612
|
-
},
|
|
17613
|
-
offsetLeft: {
|
|
17614
|
-
/* hack: offset placeholder */
|
|
17615
|
-
marginLeft: -theme3.TREENODE_PADDING_LEFT
|
|
17616
|
-
},
|
|
17617
|
-
tagName: {
|
|
17618
|
-
color: theme3.HTML_TAGNAME_COLOR,
|
|
17619
|
-
textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
|
|
17620
|
-
}
|
|
17621
|
-
},
|
|
17622
|
-
htmlComment: {
|
|
17623
|
-
color: theme3.HTML_COMMENT_COLOR
|
|
17624
|
-
},
|
|
17625
|
-
htmlDoctype: {
|
|
17626
|
-
color: theme3.HTML_DOCTYPE_COLOR
|
|
17627
|
-
}
|
|
17628
|
-
},
|
|
17629
|
-
ObjectPreview: {
|
|
17630
|
-
objectDescription: {
|
|
17631
|
-
fontStyle: "italic"
|
|
17632
|
-
},
|
|
17633
|
-
preview: {
|
|
17634
|
-
fontStyle: "italic"
|
|
17635
|
-
},
|
|
17636
|
-
arrayMaxProperties: theme3.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,
|
|
17637
|
-
objectMaxProperties: theme3.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES
|
|
17638
|
-
},
|
|
17639
|
-
ObjectName: {
|
|
17640
|
-
base: {
|
|
17641
|
-
color: theme3.OBJECT_NAME_COLOR
|
|
17642
|
-
},
|
|
17643
|
-
dimmed: {
|
|
17644
|
-
opacity: 0.6
|
|
17645
|
-
}
|
|
17646
|
-
},
|
|
17647
|
-
ObjectValue: {
|
|
17648
|
-
objectValueNull: {
|
|
17649
|
-
color: theme3.OBJECT_VALUE_NULL_COLOR
|
|
17650
|
-
},
|
|
17651
|
-
objectValueUndefined: {
|
|
17652
|
-
color: theme3.OBJECT_VALUE_UNDEFINED_COLOR
|
|
17653
|
-
},
|
|
17654
|
-
objectValueRegExp: {
|
|
17655
|
-
color: theme3.OBJECT_VALUE_REGEXP_COLOR
|
|
17656
|
-
},
|
|
17657
|
-
objectValueString: {
|
|
17658
|
-
color: theme3.OBJECT_VALUE_STRING_COLOR
|
|
17659
|
-
},
|
|
17660
|
-
objectValueSymbol: {
|
|
17661
|
-
color: theme3.OBJECT_VALUE_SYMBOL_COLOR
|
|
17662
|
-
},
|
|
17663
|
-
objectValueNumber: {
|
|
17664
|
-
color: theme3.OBJECT_VALUE_NUMBER_COLOR
|
|
17665
|
-
},
|
|
17666
|
-
objectValueBoolean: {
|
|
17667
|
-
color: theme3.OBJECT_VALUE_BOOLEAN_COLOR
|
|
17668
|
-
},
|
|
17669
|
-
objectValueFunctionPrefix: {
|
|
17670
|
-
color: theme3.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,
|
|
17671
|
-
fontStyle: "italic"
|
|
17672
|
-
},
|
|
17673
|
-
objectValueFunctionName: {
|
|
17674
|
-
fontStyle: "italic"
|
|
17675
|
-
}
|
|
17676
|
-
},
|
|
17677
|
-
TreeView: {
|
|
17678
|
-
treeViewOutline: {
|
|
17679
|
-
padding: 0,
|
|
17680
|
-
margin: 0,
|
|
17681
|
-
listStyleType: "none"
|
|
17682
|
-
}
|
|
17683
|
-
},
|
|
17684
|
-
TreeNode: {
|
|
17685
|
-
treeNodeBase: {
|
|
17686
|
-
color: theme3.BASE_COLOR,
|
|
17687
|
-
backgroundColor: theme3.BASE_BACKGROUND_COLOR,
|
|
17688
|
-
lineHeight: theme3.TREENODE_LINE_HEIGHT,
|
|
17689
|
-
cursor: "default",
|
|
17690
|
-
boxSizing: "border-box",
|
|
17691
|
-
listStyle: "none",
|
|
17692
|
-
fontFamily: theme3.TREENODE_FONT_FAMILY,
|
|
17693
|
-
fontSize: theme3.TREENODE_FONT_SIZE
|
|
17694
|
-
},
|
|
17695
|
-
treeNodePreviewContainer: {},
|
|
17696
|
-
treeNodePlaceholder: {
|
|
17697
|
-
whiteSpace: "pre",
|
|
17698
|
-
fontSize: theme3.ARROW_FONT_SIZE,
|
|
17699
|
-
marginRight: theme3.ARROW_MARGIN_RIGHT,
|
|
17700
|
-
...unselectable
|
|
17701
|
-
},
|
|
17702
|
-
treeNodeArrow: {
|
|
17703
|
-
base: {
|
|
17704
|
-
color: theme3.ARROW_COLOR,
|
|
17705
|
-
display: "inline-block",
|
|
17706
|
-
// lineHeight: '14px',
|
|
17707
|
-
fontSize: theme3.ARROW_FONT_SIZE,
|
|
17708
|
-
marginRight: theme3.ARROW_MARGIN_RIGHT,
|
|
17709
|
-
...parseFloat(theme3.ARROW_ANIMATION_DURATION) > 0 ? {
|
|
17710
|
-
transition: `transform ${theme3.ARROW_ANIMATION_DURATION} ease 0s`
|
|
17711
|
-
} : {},
|
|
17712
|
-
...unselectable
|
|
17713
|
-
},
|
|
17714
|
-
expanded: {
|
|
17715
|
-
WebkitTransform: "rotateZ(90deg)",
|
|
17716
|
-
MozTransform: "rotateZ(90deg)",
|
|
17717
|
-
transform: "rotateZ(90deg)"
|
|
17718
|
-
},
|
|
17719
|
-
collapsed: {
|
|
17720
|
-
WebkitTransform: "rotateZ(0deg)",
|
|
17721
|
-
MozTransform: "rotateZ(0deg)",
|
|
17722
|
-
transform: "rotateZ(0deg)"
|
|
17723
|
-
}
|
|
17724
|
-
},
|
|
17725
|
-
treeNodeChildNodesContainer: {
|
|
17726
|
-
margin: 0,
|
|
17727
|
-
// reset user-agent style
|
|
17728
|
-
paddingLeft: theme3.TREENODE_PADDING_LEFT
|
|
17729
|
-
}
|
|
17730
|
-
},
|
|
17731
|
-
TableInspector: {
|
|
17732
|
-
base: {
|
|
17733
|
-
color: theme3.BASE_COLOR,
|
|
17734
|
-
position: "relative",
|
|
17735
|
-
border: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
|
|
17736
|
-
fontFamily: theme3.BASE_FONT_FAMILY,
|
|
17737
|
-
fontSize: theme3.BASE_FONT_SIZE,
|
|
17738
|
-
lineHeight: "120%",
|
|
17739
|
-
boxSizing: "border-box",
|
|
17740
|
-
cursor: "default"
|
|
17741
|
-
}
|
|
17742
|
-
},
|
|
17743
|
-
TableInspectorHeaderContainer: {
|
|
17744
|
-
base: {
|
|
17745
|
-
top: 0,
|
|
17746
|
-
height: "17px",
|
|
17747
|
-
left: 0,
|
|
17748
|
-
right: 0,
|
|
17749
|
-
overflowX: "hidden"
|
|
17750
|
-
},
|
|
17751
|
-
table: {
|
|
17752
|
-
tableLayout: "fixed",
|
|
17753
|
-
borderSpacing: 0,
|
|
17754
|
-
borderCollapse: "separate",
|
|
17755
|
-
height: "100%",
|
|
17756
|
-
width: "100%",
|
|
17757
|
-
margin: 0
|
|
17758
|
-
}
|
|
17759
|
-
},
|
|
17760
|
-
TableInspectorDataContainer: {
|
|
17761
|
-
tr: {
|
|
17762
|
-
display: "table-row"
|
|
17763
|
-
},
|
|
17764
|
-
td: {
|
|
17765
|
-
boxSizing: "border-box",
|
|
17766
|
-
border: "none",
|
|
17767
|
-
// prevent overrides
|
|
17768
|
-
height: "16px",
|
|
17769
|
-
// /* 0.5 * table.background-size height */
|
|
17770
|
-
verticalAlign: "top",
|
|
17771
|
-
padding: "1px 4px",
|
|
17772
|
-
WebkitUserSelect: "text",
|
|
17773
|
-
whiteSpace: "nowrap",
|
|
17774
|
-
textOverflow: "ellipsis",
|
|
17775
|
-
overflow: "hidden",
|
|
17776
|
-
lineHeight: "14px"
|
|
17777
|
-
},
|
|
17778
|
-
div: {
|
|
17779
|
-
position: "static",
|
|
17780
|
-
top: "17px",
|
|
17781
|
-
bottom: 0,
|
|
17782
|
-
overflowY: "overlay",
|
|
17783
|
-
transform: "translateZ(0)",
|
|
17784
|
-
left: 0,
|
|
17785
|
-
right: 0,
|
|
17786
|
-
overflowX: "hidden"
|
|
17787
|
-
},
|
|
17788
|
-
table: {
|
|
17789
|
-
positon: "static",
|
|
17790
|
-
left: 0,
|
|
17791
|
-
top: 0,
|
|
17792
|
-
right: 0,
|
|
17793
|
-
bottom: 0,
|
|
17794
|
-
borderTop: "0 none transparent",
|
|
17795
|
-
margin: 0,
|
|
17796
|
-
// prevent user agent stylesheet overrides
|
|
17797
|
-
backgroundImage: theme3.TABLE_DATA_BACKGROUND_IMAGE,
|
|
17798
|
-
backgroundSize: theme3.TABLE_DATA_BACKGROUND_SIZE,
|
|
17799
|
-
tableLayout: "fixed",
|
|
17800
|
-
// table
|
|
17801
|
-
borderSpacing: 0,
|
|
17802
|
-
borderCollapse: "separate",
|
|
17803
|
-
// height: '100%',
|
|
17804
|
-
width: "100%",
|
|
17805
|
-
fontSize: theme3.BASE_FONT_SIZE,
|
|
17806
|
-
lineHeight: "120%"
|
|
17807
|
-
}
|
|
17808
|
-
},
|
|
17809
|
-
TableInspectorTH: {
|
|
17810
|
-
base: {
|
|
17811
|
-
position: "relative",
|
|
17812
|
-
// anchor for sort icon container
|
|
17813
|
-
height: "auto",
|
|
17814
|
-
textAlign: "left",
|
|
17815
|
-
backgroundColor: theme3.TABLE_TH_BACKGROUND_COLOR,
|
|
17816
|
-
borderBottom: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
|
|
17817
|
-
fontWeight: "normal",
|
|
17818
|
-
verticalAlign: "middle",
|
|
17819
|
-
padding: "0 4px",
|
|
17820
|
-
whiteSpace: "nowrap",
|
|
17821
|
-
textOverflow: "ellipsis",
|
|
17822
|
-
overflow: "hidden",
|
|
17823
|
-
lineHeight: "14px",
|
|
17824
|
-
":hover": {
|
|
17825
|
-
backgroundColor: theme3.TABLE_TH_HOVER_COLOR
|
|
17826
|
-
}
|
|
17827
|
-
},
|
|
17828
|
-
div: {
|
|
17829
|
-
whiteSpace: "nowrap",
|
|
17830
|
-
textOverflow: "ellipsis",
|
|
17831
|
-
overflow: "hidden",
|
|
17832
|
-
// prevent user agent stylesheet overrides
|
|
17833
|
-
fontSize: theme3.BASE_FONT_SIZE,
|
|
17834
|
-
lineHeight: "120%"
|
|
17835
|
-
}
|
|
17836
|
-
},
|
|
17837
|
-
TableInspectorLeftBorder: {
|
|
17838
|
-
none: {
|
|
17839
|
-
borderLeft: "none"
|
|
17840
|
-
},
|
|
17841
|
-
solid: {
|
|
17842
|
-
borderLeft: `1px solid ${theme3.TABLE_BORDER_COLOR}`
|
|
17843
|
-
}
|
|
17844
|
-
},
|
|
17845
|
-
TableInspectorSortIcon: {
|
|
17846
|
-
display: "block",
|
|
17847
|
-
marginRight: 3,
|
|
17848
|
-
// 4,
|
|
17849
|
-
width: 8,
|
|
17850
|
-
height: 7,
|
|
17851
|
-
marginTop: -7,
|
|
17852
|
-
color: theme3.TABLE_SORT_ICON_COLOR,
|
|
17853
|
-
fontSize: 12,
|
|
17854
|
-
// lineHeight: 14
|
|
17855
|
-
...unselectable
|
|
17856
|
-
}
|
|
17857
|
-
});
|
|
17858
|
-
var DEFAULT_THEME_NAME = "chromeLight";
|
|
17859
|
-
var ThemeContext = reactExports.createContext(createTheme(themes_exports[DEFAULT_THEME_NAME]));
|
|
17860
|
-
var useStyles = (baseStylesKey) => {
|
|
17861
|
-
const themeStyles = reactExports.useContext(ThemeContext);
|
|
17862
|
-
return themeStyles[baseStylesKey];
|
|
17863
|
-
};
|
|
17864
|
-
var themeAcceptor = (WrappedComponent) => {
|
|
17865
|
-
const ThemeAcceptor = ({ theme: theme3 = DEFAULT_THEME_NAME, ...restProps }) => {
|
|
17866
|
-
const themeStyles = reactExports.useMemo(() => {
|
|
17867
|
-
switch (Object.prototype.toString.call(theme3)) {
|
|
17868
|
-
case "[object String]":
|
|
17869
|
-
return createTheme(themes_exports[theme3]);
|
|
17870
|
-
case "[object Object]":
|
|
17871
|
-
return createTheme(theme3);
|
|
17872
|
-
default:
|
|
17873
|
-
return createTheme(themes_exports[DEFAULT_THEME_NAME]);
|
|
17874
|
-
}
|
|
17875
|
-
}, [theme3]);
|
|
17876
|
-
return /* @__PURE__ */ ReactExports.createElement(ThemeContext.Provider, { value: themeStyles }, /* @__PURE__ */ ReactExports.createElement(WrappedComponent, { ...restProps }));
|
|
17877
|
-
};
|
|
17878
|
-
return ThemeAcceptor;
|
|
17879
|
-
};
|
|
17880
|
-
var Arrow = ({ expanded: expanded2, styles: styles2 }) => /* @__PURE__ */ ReactExports.createElement(
|
|
17881
|
-
"span",
|
|
17882
|
-
{
|
|
17883
|
-
style: {
|
|
17884
|
-
...styles2.base,
|
|
17885
|
-
...expanded2 ? styles2.expanded : styles2.collapsed
|
|
17886
|
-
}
|
|
17887
|
-
},
|
|
17888
|
-
"▶"
|
|
17889
|
-
);
|
|
17890
|
-
var TreeNode = reactExports.memo((props) => {
|
|
17891
|
-
props = {
|
|
17892
|
-
expanded: true,
|
|
17893
|
-
nodeRenderer: ({ name: name2 }) => /* @__PURE__ */ ReactExports.createElement("span", null, name2),
|
|
17894
|
-
onClick: () => {
|
|
17895
|
-
},
|
|
17896
|
-
shouldShowArrow: false,
|
|
17897
|
-
shouldShowPlaceholder: true,
|
|
17898
|
-
...props
|
|
17899
|
-
};
|
|
17900
|
-
const { expanded: expanded2, onClick, children: children2, nodeRenderer, title, shouldShowArrow, shouldShowPlaceholder } = props;
|
|
17901
|
-
const styles2 = useStyles("TreeNode");
|
|
17902
|
-
const NodeRenderer2 = nodeRenderer;
|
|
17903
|
-
return /* @__PURE__ */ ReactExports.createElement("li", { "aria-expanded": expanded2, role: "treeitem", style: styles2.treeNodeBase, title }, /* @__PURE__ */ ReactExports.createElement("div", { style: styles2.treeNodePreviewContainer, onClick }, shouldShowArrow || reactExports.Children.count(children2) > 0 ? /* @__PURE__ */ ReactExports.createElement(Arrow, { expanded: expanded2, styles: styles2.treeNodeArrow }) : shouldShowPlaceholder && /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.treeNodePlaceholder }, " "), /* @__PURE__ */ ReactExports.createElement(NodeRenderer2, { ...props })), /* @__PURE__ */ ReactExports.createElement("ol", { role: "group", style: styles2.treeNodeChildNodesContainer }, expanded2 ? children2 : void 0));
|
|
17904
|
-
});
|
|
17905
|
-
var DEFAULT_ROOT_PATH = "$";
|
|
17906
|
-
var WILDCARD = "*";
|
|
17907
|
-
function hasChildNodes(data, dataIterator) {
|
|
17908
|
-
return !dataIterator(data).next().done;
|
|
17909
|
-
}
|
|
17910
|
-
var wildcardPathsFromLevel = (level) => {
|
|
17911
|
-
return Array.from(
|
|
17912
|
-
{ length: level },
|
|
17913
|
-
(_2, i) => [DEFAULT_ROOT_PATH].concat(Array.from({ length: i }, () => "*")).join(".")
|
|
17914
|
-
);
|
|
17915
|
-
};
|
|
17916
|
-
var getExpandedPaths = (data, dataIterator, expandPaths, expandLevel, prevExpandedPaths) => {
|
|
17917
|
-
const wildcardPaths = [].concat(wildcardPathsFromLevel(expandLevel)).concat(expandPaths).filter((path2) => typeof path2 === "string");
|
|
17918
|
-
const expandedPaths = [];
|
|
17919
|
-
wildcardPaths.forEach((wildcardPath) => {
|
|
17920
|
-
const keyPaths = wildcardPath.split(".");
|
|
17921
|
-
const populatePaths = (curData, curPath, depth) => {
|
|
17922
|
-
if (depth === keyPaths.length) {
|
|
17923
|
-
expandedPaths.push(curPath);
|
|
17924
|
-
return;
|
|
17925
|
-
}
|
|
17926
|
-
const key = keyPaths[depth];
|
|
17927
|
-
if (depth === 0) {
|
|
17928
|
-
if (hasChildNodes(curData, dataIterator) && (key === DEFAULT_ROOT_PATH || key === WILDCARD)) {
|
|
17929
|
-
populatePaths(curData, DEFAULT_ROOT_PATH, depth + 1);
|
|
17930
|
-
}
|
|
17931
|
-
} else {
|
|
17932
|
-
if (key === WILDCARD) {
|
|
17933
|
-
for (const { name: name2, data: data2 } of dataIterator(curData)) {
|
|
17934
|
-
if (hasChildNodes(data2, dataIterator)) {
|
|
17935
|
-
populatePaths(data2, `${curPath}.${name2}`, depth + 1);
|
|
17936
|
-
}
|
|
17937
|
-
}
|
|
17938
|
-
} else {
|
|
17939
|
-
const value = curData[key];
|
|
17940
|
-
if (hasChildNodes(value, dataIterator)) {
|
|
17941
|
-
populatePaths(value, `${curPath}.${key}`, depth + 1);
|
|
17942
|
-
}
|
|
17943
|
-
}
|
|
17944
|
-
}
|
|
17945
|
-
};
|
|
17946
|
-
populatePaths(data, "", 0);
|
|
17947
|
-
});
|
|
17948
|
-
return expandedPaths.reduce(
|
|
17949
|
-
(obj, path2) => {
|
|
17950
|
-
obj[path2] = true;
|
|
17951
|
-
return obj;
|
|
17952
|
-
},
|
|
17953
|
-
{ ...prevExpandedPaths }
|
|
17954
|
-
);
|
|
17955
|
-
};
|
|
17956
|
-
var ConnectedTreeNode = reactExports.memo((props) => {
|
|
17957
|
-
const { data, dataIterator, path: path2, depth, nodeRenderer } = props;
|
|
17958
|
-
const [expandedPaths, setExpandedPaths] = reactExports.useContext(ExpandedPathsContext);
|
|
17959
|
-
const nodeHasChildNodes = hasChildNodes(data, dataIterator);
|
|
17960
|
-
const expanded2 = !!expandedPaths[path2];
|
|
17961
|
-
const handleClick = reactExports.useCallback(
|
|
17962
|
-
() => nodeHasChildNodes && setExpandedPaths((prevExpandedPaths) => ({
|
|
17963
|
-
...prevExpandedPaths,
|
|
17964
|
-
[path2]: !expanded2
|
|
17965
|
-
})),
|
|
17966
|
-
[nodeHasChildNodes, setExpandedPaths, path2, expanded2]
|
|
17967
|
-
);
|
|
17968
|
-
return /* @__PURE__ */ ReactExports.createElement(
|
|
17969
|
-
TreeNode,
|
|
17970
|
-
{
|
|
17971
|
-
expanded: expanded2,
|
|
17972
|
-
onClick: handleClick,
|
|
17973
|
-
shouldShowArrow: nodeHasChildNodes,
|
|
17974
|
-
shouldShowPlaceholder: depth > 0,
|
|
17975
|
-
nodeRenderer,
|
|
17976
|
-
...props
|
|
17977
|
-
},
|
|
17978
|
-
// only render if the node is expanded
|
|
17979
|
-
expanded2 ? [...dataIterator(data)].map(({ name: name2, data: data2, ...renderNodeProps }) => {
|
|
17980
|
-
return /* @__PURE__ */ ReactExports.createElement(
|
|
17981
|
-
ConnectedTreeNode,
|
|
17982
|
-
{
|
|
17983
|
-
name: name2,
|
|
17984
|
-
data: data2,
|
|
17985
|
-
depth: depth + 1,
|
|
17986
|
-
path: `${path2}.${name2}`,
|
|
17987
|
-
key: name2,
|
|
17988
|
-
dataIterator,
|
|
17989
|
-
nodeRenderer,
|
|
17990
|
-
...renderNodeProps
|
|
17991
|
-
}
|
|
17992
|
-
);
|
|
17993
|
-
}) : null
|
|
17994
|
-
);
|
|
17995
|
-
});
|
|
17996
|
-
var TreeView = reactExports.memo(({ name: name2, data, dataIterator, nodeRenderer, expandPaths, expandLevel }) => {
|
|
17997
|
-
const styles2 = useStyles("TreeView");
|
|
17998
|
-
const stateAndSetter = reactExports.useState({});
|
|
17999
|
-
const [, setExpandedPaths] = stateAndSetter;
|
|
18000
|
-
reactExports.useLayoutEffect(
|
|
18001
|
-
() => setExpandedPaths(
|
|
18002
|
-
(prevExpandedPaths) => getExpandedPaths(data, dataIterator, expandPaths, expandLevel, prevExpandedPaths)
|
|
18003
|
-
),
|
|
18004
|
-
[data, dataIterator, expandPaths, expandLevel]
|
|
18005
|
-
);
|
|
18006
|
-
return /* @__PURE__ */ ReactExports.createElement(ExpandedPathsContext.Provider, { value: stateAndSetter }, /* @__PURE__ */ ReactExports.createElement("ol", { role: "tree", style: styles2.treeViewOutline }, /* @__PURE__ */ ReactExports.createElement(
|
|
18007
|
-
ConnectedTreeNode,
|
|
18008
|
-
{
|
|
18009
|
-
name: name2,
|
|
18010
|
-
data,
|
|
18011
|
-
dataIterator,
|
|
18012
|
-
depth: 0,
|
|
18013
|
-
path: DEFAULT_ROOT_PATH,
|
|
18014
|
-
nodeRenderer
|
|
18015
|
-
}
|
|
18016
|
-
)));
|
|
18017
|
-
});
|
|
18018
|
-
var ObjectName = ({ name: name2, dimmed = false, styles: styles2 = {} }) => {
|
|
18019
|
-
const themeStyles = useStyles("ObjectName");
|
|
18020
|
-
const appliedStyles = {
|
|
18021
|
-
...themeStyles.base,
|
|
18022
|
-
...dimmed ? themeStyles["dimmed"] : {},
|
|
18023
|
-
...styles2
|
|
18024
|
-
};
|
|
18025
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: appliedStyles }, name2);
|
|
18026
|
-
};
|
|
18027
|
-
var ObjectValue = ({ object: object2, styles: styles2 }) => {
|
|
18028
|
-
const themeStyles = useStyles("ObjectValue");
|
|
18029
|
-
const mkStyle = (key) => ({ ...themeStyles[key], ...styles2 });
|
|
18030
|
-
switch (typeof object2) {
|
|
18031
|
-
case "bigint":
|
|
18032
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNumber") }, String(object2), "n");
|
|
18033
|
-
case "number":
|
|
18034
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNumber") }, String(object2));
|
|
18035
|
-
case "string":
|
|
18036
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueString") }, '"', object2, '"');
|
|
18037
|
-
case "boolean":
|
|
18038
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueBoolean") }, String(object2));
|
|
18039
|
-
case "undefined":
|
|
18040
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueUndefined") }, "undefined");
|
|
18041
|
-
case "object":
|
|
18042
|
-
if (object2 === null) {
|
|
18043
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNull") }, "null");
|
|
18044
|
-
}
|
|
18045
|
-
if (object2 instanceof Date) {
|
|
18046
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, object2.toString());
|
|
18047
|
-
}
|
|
18048
|
-
if (object2 instanceof RegExp) {
|
|
18049
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueRegExp") }, object2.toString());
|
|
18050
|
-
}
|
|
18051
|
-
if (Array.isArray(object2)) {
|
|
18052
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, `Array(${object2.length})`);
|
|
18053
|
-
}
|
|
18054
|
-
if (!object2.constructor) {
|
|
18055
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, "Object");
|
|
18056
|
-
}
|
|
18057
|
-
if (typeof object2.constructor.isBuffer === "function" && object2.constructor.isBuffer(object2)) {
|
|
18058
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, `Buffer[${object2.length}]`);
|
|
18059
|
-
}
|
|
18060
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, object2.constructor.name);
|
|
18061
|
-
case "function":
|
|
18062
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueFunctionPrefix") }, "ƒ "), /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueFunctionName") }, object2.name, "()"));
|
|
18063
|
-
case "symbol":
|
|
18064
|
-
return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueSymbol") }, object2.toString());
|
|
18065
|
-
default:
|
|
18066
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null);
|
|
18067
|
-
}
|
|
18068
|
-
};
|
|
18069
|
-
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
18070
|
-
var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
18071
|
-
function getPropertyValue(object2, propertyName) {
|
|
18072
|
-
const propertyDescriptor = Object.getOwnPropertyDescriptor(object2, propertyName);
|
|
18073
|
-
if (propertyDescriptor.get) {
|
|
18074
|
-
try {
|
|
18075
|
-
return propertyDescriptor.get();
|
|
18076
|
-
} catch {
|
|
18077
|
-
return propertyDescriptor.get;
|
|
18078
|
-
}
|
|
18079
|
-
}
|
|
18080
|
-
return object2[propertyName];
|
|
18081
|
-
}
|
|
18082
|
-
function intersperse(arr, sep) {
|
|
18083
|
-
if (arr.length === 0) {
|
|
18084
|
-
return [];
|
|
18085
|
-
}
|
|
18086
|
-
return arr.slice(1).reduce((xs, x2) => xs.concat([sep, x2]), [arr[0]]);
|
|
18087
|
-
}
|
|
18088
|
-
var ObjectPreview = ({ data }) => {
|
|
18089
|
-
const styles2 = useStyles("ObjectPreview");
|
|
18090
|
-
const object2 = data;
|
|
18091
|
-
if (typeof object2 !== "object" || object2 === null || object2 instanceof Date || object2 instanceof RegExp) {
|
|
18092
|
-
return /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: object2 });
|
|
18093
|
-
}
|
|
18094
|
-
if (Array.isArray(object2)) {
|
|
18095
|
-
const maxProperties = styles2.arrayMaxProperties;
|
|
18096
|
-
const previewArray = object2.slice(0, maxProperties).map((element2, index2) => /* @__PURE__ */ ReactExports.createElement(ObjectValue, { key: index2, object: element2 }));
|
|
18097
|
-
if (object2.length > maxProperties) {
|
|
18098
|
-
previewArray.push(/* @__PURE__ */ ReactExports.createElement("span", { key: "ellipsis" }, "…"));
|
|
18099
|
-
}
|
|
18100
|
-
const arrayLength = object2.length;
|
|
18101
|
-
return /* @__PURE__ */ ReactExports.createElement(ReactExports.Fragment, null, /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.objectDescription }, arrayLength === 0 ? `` : `(${arrayLength}) `), /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.preview }, "[", intersperse(previewArray, ", "), "]"));
|
|
18102
|
-
} else {
|
|
18103
|
-
const maxProperties = styles2.objectMaxProperties;
|
|
18104
|
-
const propertyNodes = [];
|
|
18105
|
-
for (const propertyName in object2) {
|
|
18106
|
-
if (hasOwnProperty$1.call(object2, propertyName)) {
|
|
18107
|
-
let ellipsis;
|
|
18108
|
-
if (propertyNodes.length === maxProperties - 1 && Object.keys(object2).length > maxProperties) {
|
|
18109
|
-
ellipsis = /* @__PURE__ */ ReactExports.createElement("span", { key: "ellipsis" }, "…");
|
|
18110
|
-
}
|
|
18111
|
-
const propertyValue2 = getPropertyValue(object2, propertyName);
|
|
18112
|
-
propertyNodes.push(
|
|
18113
|
-
/* @__PURE__ */ ReactExports.createElement("span", { key: propertyName }, /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: propertyName || `""` }), ": ", /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: propertyValue2 }), ellipsis)
|
|
18114
|
-
);
|
|
18115
|
-
if (ellipsis) break;
|
|
18116
|
-
}
|
|
18117
|
-
}
|
|
18118
|
-
const objectConstructorName = object2.constructor ? object2.constructor.name : "Object";
|
|
18119
|
-
return /* @__PURE__ */ ReactExports.createElement(ReactExports.Fragment, null, /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.objectDescription }, objectConstructorName === "Object" ? "" : `${objectConstructorName} `), /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.preview }, "{", intersperse(propertyNodes, ", "), "}"));
|
|
18120
|
-
}
|
|
18121
|
-
};
|
|
18122
|
-
var ObjectRootLabel = ({ name: name2, data }) => {
|
|
18123
|
-
if (typeof name2 === "string") {
|
|
18124
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: name2 }), /* @__PURE__ */ ReactExports.createElement("span", null, ": "), /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data }));
|
|
18125
|
-
} else {
|
|
18126
|
-
return /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data });
|
|
18127
|
-
}
|
|
18128
|
-
};
|
|
18129
|
-
var ObjectLabel = ({ name: name2, data, isNonenumerable = false }) => {
|
|
18130
|
-
const object2 = data;
|
|
18131
|
-
return /* @__PURE__ */ ReactExports.createElement("span", null, typeof name2 === "string" ? /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: name2, dimmed: isNonenumerable }) : /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data: name2 }), /* @__PURE__ */ ReactExports.createElement("span", null, ": "), /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: object2 }));
|
|
18132
|
-
};
|
|
18133
|
-
var createIterator = (showNonenumerable, sortObjectKeys) => {
|
|
18134
|
-
const objectIterator = function* (data) {
|
|
18135
|
-
const shouldIterate = typeof data === "object" && data !== null || typeof data === "function";
|
|
18136
|
-
if (!shouldIterate) return;
|
|
18137
|
-
const dataIsArray = Array.isArray(data);
|
|
18138
|
-
if (!dataIsArray && data[Symbol.iterator]) {
|
|
18139
|
-
let i = 0;
|
|
18140
|
-
for (const entry of data) {
|
|
18141
|
-
if (Array.isArray(entry) && entry.length === 2) {
|
|
18142
|
-
const [k2, v2] = entry;
|
|
18143
|
-
yield {
|
|
18144
|
-
name: k2,
|
|
18145
|
-
data: v2
|
|
18146
|
-
};
|
|
18147
|
-
} else {
|
|
18148
|
-
yield {
|
|
18149
|
-
name: i.toString(),
|
|
18150
|
-
data: entry
|
|
18151
|
-
};
|
|
18152
|
-
}
|
|
18153
|
-
i++;
|
|
18154
|
-
}
|
|
18155
|
-
} else {
|
|
18156
|
-
const keys2 = Object.getOwnPropertyNames(data);
|
|
18157
|
-
if (sortObjectKeys === true && !dataIsArray) {
|
|
18158
|
-
keys2.sort();
|
|
18159
|
-
} else if (typeof sortObjectKeys === "function") {
|
|
18160
|
-
keys2.sort(sortObjectKeys);
|
|
18161
|
-
}
|
|
18162
|
-
for (const propertyName of keys2) {
|
|
18163
|
-
if (propertyIsEnumerable.call(data, propertyName)) {
|
|
18164
|
-
const propertyValue2 = getPropertyValue(data, propertyName);
|
|
18165
|
-
yield {
|
|
18166
|
-
name: propertyName || `""`,
|
|
18167
|
-
data: propertyValue2
|
|
18168
|
-
};
|
|
18169
|
-
} else if (showNonenumerable) {
|
|
18170
|
-
let propertyValue2;
|
|
18171
|
-
try {
|
|
18172
|
-
propertyValue2 = getPropertyValue(data, propertyName);
|
|
18173
|
-
} catch (e) {
|
|
18174
|
-
}
|
|
18175
|
-
if (propertyValue2 !== void 0) {
|
|
18176
|
-
yield {
|
|
18177
|
-
name: propertyName,
|
|
18178
|
-
data: propertyValue2,
|
|
18179
|
-
isNonenumerable: true
|
|
18180
|
-
};
|
|
18181
|
-
}
|
|
18182
|
-
}
|
|
18183
|
-
}
|
|
18184
|
-
if (showNonenumerable && data !== Object.prototype) {
|
|
18185
|
-
yield {
|
|
18186
|
-
name: "__proto__",
|
|
18187
|
-
data: Object.getPrototypeOf(data),
|
|
18188
|
-
isNonenumerable: true
|
|
18189
|
-
};
|
|
18190
|
-
}
|
|
18191
|
-
}
|
|
18192
|
-
};
|
|
18193
|
-
return objectIterator;
|
|
18194
|
-
};
|
|
18195
|
-
var defaultNodeRenderer = ({ depth, name: name2, data, isNonenumerable }) => depth === 0 ? /* @__PURE__ */ ReactExports.createElement(ObjectRootLabel, { name: name2, data }) : /* @__PURE__ */ ReactExports.createElement(ObjectLabel, { name: name2, data, isNonenumerable });
|
|
18196
|
-
var ObjectInspector = ({ showNonenumerable = false, sortObjectKeys, nodeRenderer, ...treeViewProps }) => {
|
|
18197
|
-
const dataIterator = createIterator(showNonenumerable, sortObjectKeys);
|
|
18198
|
-
const renderer = nodeRenderer ? nodeRenderer : defaultNodeRenderer;
|
|
18199
|
-
return /* @__PURE__ */ ReactExports.createElement(TreeView, { nodeRenderer: renderer, dataIterator, ...treeViewProps });
|
|
18200
|
-
};
|
|
18201
|
-
var themedObjectInspector = themeAcceptor(ObjectInspector);
|
|
18202
|
-
__toESM(require_is_dom());
|
|
18203
|
-
const useDarkMode = () => {
|
|
18204
|
-
const [isDark, setIsDark] = reactExports.useState(() => {
|
|
18205
|
-
if (typeof document === "undefined")
|
|
18206
|
-
return false;
|
|
18207
|
-
return document.documentElement.classList.contains("dark");
|
|
18208
|
-
});
|
|
18209
|
-
reactExports.useEffect(() => {
|
|
18210
|
-
if (typeof document === "undefined")
|
|
18211
|
-
return;
|
|
18212
|
-
const observer = new MutationObserver(() => {
|
|
18213
|
-
setIsDark(document.documentElement.classList.contains("dark"));
|
|
18214
|
-
});
|
|
18215
|
-
observer.observe(document.documentElement, {
|
|
18216
|
-
attributes: true,
|
|
18217
|
-
attributeFilter: ["class"]
|
|
18218
|
-
});
|
|
18219
|
-
return () => observer.disconnect();
|
|
18220
|
-
}, []);
|
|
18221
|
-
return isDark;
|
|
18222
|
-
};
|
|
18223
17438
|
function summarizeArrayBufferView(value) {
|
|
18224
17439
|
const ta = value;
|
|
18225
17440
|
const name2 = ta.constructor.name;
|
|
@@ -18242,64 +17457,92 @@ function formatArrayBufferViewForDisplay(value) {
|
|
|
18242
17457
|
return { text: summarizeArrayBufferView(value) };
|
|
18243
17458
|
}
|
|
18244
17459
|
}
|
|
18245
|
-
const
|
|
18246
|
-
|
|
18247
|
-
|
|
18248
|
-
|
|
18249
|
-
|
|
18250
|
-
|
|
18251
|
-
|
|
18252
|
-
|
|
18253
|
-
|
|
18254
|
-
|
|
18255
|
-
|
|
18256
|
-
|
|
18257
|
-
|
|
18258
|
-
|
|
18259
|
-
|
|
18260
|
-
|
|
18261
|
-
|
|
18262
|
-
|
|
18263
|
-
|
|
18264
|
-
|
|
18265
|
-
|
|
18266
|
-
|
|
18267
|
-
|
|
18268
|
-
|
|
18269
|
-
|
|
18270
|
-
|
|
18271
|
-
|
|
18272
|
-
|
|
18273
|
-
|
|
18274
|
-
|
|
18275
|
-
|
|
18276
|
-
|
|
18277
|
-
|
|
18278
|
-
|
|
18279
|
-
|
|
18280
|
-
|
|
18281
|
-
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
18288
|
-
|
|
18289
|
-
|
|
18290
|
-
|
|
18291
|
-
|
|
18292
|
-
|
|
18293
|
-
|
|
18294
|
-
|
|
18295
|
-
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
};
|
|
18301
|
-
|
|
18302
|
-
|
|
17460
|
+
const CLS = {
|
|
17461
|
+
container: "wf-json-view",
|
|
17462
|
+
child: "wf-json-child",
|
|
17463
|
+
childFields: "wf-json-child-fields",
|
|
17464
|
+
label: "wf-json-label",
|
|
17465
|
+
clickableLabel: "wf-json-clickable-label",
|
|
17466
|
+
punctuation: "wf-json-punctuation",
|
|
17467
|
+
className: "wf-json-classname",
|
|
17468
|
+
expandIcon: "wf-json-expand-icon",
|
|
17469
|
+
collapseIcon: "wf-json-collapse-icon",
|
|
17470
|
+
collapsedContent: "wf-json-collapsed-content",
|
|
17471
|
+
string: "wf-json-string",
|
|
17472
|
+
number: "wf-json-number",
|
|
17473
|
+
boolean: "wf-json-boolean",
|
|
17474
|
+
null: "wf-json-null",
|
|
17475
|
+
undefined: "wf-json-undefined",
|
|
17476
|
+
date: "wf-json-date",
|
|
17477
|
+
regexp: "wf-json-regexp"
|
|
17478
|
+
};
|
|
17479
|
+
const JSON_VIEW_STYLES = `
|
|
17480
|
+
.${CLS.container} {
|
|
17481
|
+
display: inline;
|
|
17482
|
+
font-family: var(--font-mono);
|
|
17483
|
+
font-size: 13px;
|
|
17484
|
+
line-height: 20px;
|
|
17485
|
+
margin: 0;
|
|
17486
|
+
padding: 0;
|
|
17487
|
+
background: transparent;
|
|
17488
|
+
color: var(--ds-gray-1000);
|
|
17489
|
+
white-space: pre-wrap;
|
|
17490
|
+
word-wrap: break-word;
|
|
17491
|
+
}
|
|
17492
|
+
.${CLS.container} > .${CLS.child} > ul { padding-left: 0ch; }
|
|
17493
|
+
.${CLS.container} > .${CLS.child} { padding-left: 1.5ch; }
|
|
17494
|
+
.${CLS.child} { display: block; margin: 0; padding: 0 0 0 2ch; }
|
|
17495
|
+
.${CLS.child}:hover:not(:has(.${CLS.child}:hover)):not(:has(.${CLS.child} ~ .${CLS.child})) {
|
|
17496
|
+
background-color: var(--ds-gray-alpha-100);
|
|
17497
|
+
border-radius: 4px;
|
|
17498
|
+
}
|
|
17499
|
+
.${CLS.childFields} { margin: 0; padding: 0; list-style: none; }
|
|
17500
|
+
.${CLS.label}, .${CLS.clickableLabel} {
|
|
17501
|
+
color: var(--ds-pink-900);
|
|
17502
|
+
font-weight: 400;
|
|
17503
|
+
margin-right: 1ch;
|
|
17504
|
+
}
|
|
17505
|
+
.${CLS.clickableLabel} { cursor: pointer; }
|
|
17506
|
+
.${CLS.punctuation} { color: var(--ds-gray-1000); }
|
|
17507
|
+
.${CLS.className} { font-style: italic; color: var(--ds-gray-900); margin-right: 1ch; }
|
|
17508
|
+
.${CLS.string} { color: var(--ds-green-900); }
|
|
17509
|
+
.${CLS.number} { color: var(--ds-blue-900); }
|
|
17510
|
+
.${CLS.boolean} { color: var(--ds-amber-900); }
|
|
17511
|
+
.${CLS.null}, .${CLS.undefined} { color: var(--ds-gray-900); }
|
|
17512
|
+
.${CLS.date} { color: var(--ds-pink-900); }
|
|
17513
|
+
.${CLS.regexp} { color: var(--ds-purple-900); }
|
|
17514
|
+
.${CLS.container} > .${CLS.child} > .${CLS.expandIcon},
|
|
17515
|
+
.${CLS.container} > .${CLS.child} > .${CLS.collapseIcon} { margin-left: -1.5ch; }
|
|
17516
|
+
.${CLS.expandIcon}, .${CLS.collapseIcon} {
|
|
17517
|
+
appearance: none;
|
|
17518
|
+
background: none;
|
|
17519
|
+
border: 0;
|
|
17520
|
+
padding: 0;
|
|
17521
|
+
font: inherit;
|
|
17522
|
+
vertical-align: baseline;
|
|
17523
|
+
cursor: pointer;
|
|
17524
|
+
display: inline-block;
|
|
17525
|
+
margin-right: 0ch;
|
|
17526
|
+
margin-left: -1.5ch;
|
|
17527
|
+
color: var(--ds-gray-500);
|
|
17528
|
+
user-select: none;
|
|
17529
|
+
outline: none;
|
|
17530
|
+
}
|
|
17531
|
+
.${CLS.expandIcon}::after {
|
|
17532
|
+
content: '\\25B8';
|
|
17533
|
+
margin-right: 0.5ch;
|
|
17534
|
+
transform: translateY(-0.5px);
|
|
17535
|
+
display: block;
|
|
17536
|
+
}
|
|
17537
|
+
.${CLS.collapseIcon}::after { content: '\\25BE'; margin-right: 0.5ch; }
|
|
17538
|
+
.${CLS.expandIcon}:hover, .${CLS.collapseIcon}:hover,
|
|
17539
|
+
.${CLS.child}:has(> .${CLS.clickableLabel}:hover) > .${CLS.expandIcon},
|
|
17540
|
+
.${CLS.child}:has(> .${CLS.clickableLabel}:hover) > .${CLS.collapseIcon} {
|
|
17541
|
+
color: var(--ds-gray-1000);
|
|
17542
|
+
}
|
|
17543
|
+
.${CLS.collapsedContent} { color: var(--ds-gray-900); }
|
|
17544
|
+
.${CLS.collapsedContent}::after { content: '...'; }
|
|
17545
|
+
`;
|
|
18303
17546
|
const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
|
|
18304
17547
|
function Spinner({ size: size2 = 14, color: color5 }) {
|
|
18305
17548
|
const config2 = size2 <= 12 ? {
|
|
@@ -18397,6 +17640,10 @@ function isBytesDisplay(value) {
|
|
|
18397
17640
|
function isClassInstanceRef(value) {
|
|
18398
17641
|
return value !== null && typeof value === "object" && "__type" in value && value.__type === CLASS_INSTANCE_REF_TYPE;
|
|
18399
17642
|
}
|
|
17643
|
+
function isEncryptedMarker(value) {
|
|
17644
|
+
var _a3;
|
|
17645
|
+
return value !== null && typeof value === "object" && ((_a3 = value.constructor) == null ? void 0 : _a3.name) === ENCRYPTED_DISPLAY_NAME;
|
|
17646
|
+
}
|
|
18400
17647
|
const StreamClickContext = reactExports.createContext(void 0);
|
|
18401
17648
|
const DecryptClickContext = reactExports.createContext(void 0);
|
|
18402
17649
|
const RunClickContext = reactExports.createContext(void 0);
|
|
@@ -18439,7 +17686,6 @@ function RunRefInline({ runRef }) {
|
|
|
18439
17686
|
onRunClick == null ? void 0 : onRunClick(runRef.runId);
|
|
18440
17687
|
}, title: `View run: ${runRef.runId}`, children: jsxRuntimeExports.jsx("span", { children: runRef.runId }) });
|
|
18441
17688
|
}
|
|
18442
|
-
const ExtendedThemeContext = reactExports.createContext(inspectorThemeExtendedLight);
|
|
18443
17689
|
function DecodedBytesChunk({ decodedText, source }) {
|
|
18444
17690
|
const [selectedView, setSelectedView] = reactExports.useState("decoded");
|
|
18445
17691
|
const parsed = parseChunkData(decodedText);
|
|
@@ -18456,45 +17702,204 @@ function DecodedBytesInspector({ decodedText, source }) {
|
|
|
18456
17702
|
const [expanded2, setExpanded] = reactExports.useState(false);
|
|
18457
17703
|
return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left", style: { color: "var(--ds-gray-1000)" }, onClick: () => setExpanded((value) => !value), title: `${source.type} decoded as ${source.encoding.toUpperCase()} text`, children: [jsxRuntimeExports.jsx("span", { className: "select-none", style: { color: "var(--ds-gray-700)" }, children: expanded2 ? "▼" : "▶" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 break-words", children: source.rawSummary })] }), expanded2 && jsxRuntimeExports.jsxs("div", { className: "mt-1 pl-5", children: [jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-gray-700)" }, children: "decoded: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", style: { color: "var(--ds-green-900)" }, children: JSON.stringify(decodedText) })] })] });
|
|
18458
17704
|
}
|
|
18459
|
-
function
|
|
18460
|
-
|
|
17705
|
+
function BytesDisplayValue({ display }) {
|
|
17706
|
+
if (display.decodedFrom) {
|
|
17707
|
+
return jsxRuntimeExports.jsx(DecodedBytesChunk, { decodedText: display.text, source: display.decodedFrom });
|
|
17708
|
+
}
|
|
17709
|
+
return jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", style: { color: "var(--ds-gray-1000)" }, children: display.text });
|
|
17710
|
+
}
|
|
17711
|
+
function formatField(field) {
|
|
17712
|
+
return field === "" ? '""' : field;
|
|
18461
17713
|
}
|
|
18462
|
-
function
|
|
17714
|
+
function describeContainer(value) {
|
|
18463
17715
|
var _a3;
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
|
|
17716
|
+
if (Array.isArray(value)) {
|
|
17717
|
+
return {
|
|
17718
|
+
entries: value.map((item) => [void 0, item]),
|
|
17719
|
+
open: "[",
|
|
17720
|
+
close: "]"
|
|
17721
|
+
};
|
|
18467
17722
|
}
|
|
18468
|
-
if (
|
|
18469
|
-
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
17723
|
+
if (value instanceof Map) {
|
|
17724
|
+
return {
|
|
17725
|
+
entries: Array.from(value.entries(), ([key, val]) => [
|
|
17726
|
+
String(key),
|
|
17727
|
+
val
|
|
17728
|
+
]),
|
|
17729
|
+
open: "{",
|
|
17730
|
+
close: "}",
|
|
17731
|
+
prefix: "Map"
|
|
17732
|
+
};
|
|
17733
|
+
}
|
|
17734
|
+
if (value instanceof Set) {
|
|
17735
|
+
return {
|
|
17736
|
+
entries: Array.from(value.values(), (item) => [void 0, item]),
|
|
17737
|
+
open: "[",
|
|
17738
|
+
close: "]",
|
|
17739
|
+
prefix: "Set"
|
|
17740
|
+
};
|
|
18474
17741
|
}
|
|
18475
|
-
if (
|
|
18476
|
-
|
|
17742
|
+
if (value !== null && typeof value === "object") {
|
|
17743
|
+
const name2 = (_a3 = value.constructor) == null ? void 0 : _a3.name;
|
|
17744
|
+
return {
|
|
17745
|
+
entries: Object.entries(value),
|
|
17746
|
+
open: "{",
|
|
17747
|
+
close: "}",
|
|
17748
|
+
prefix: name2 && name2 !== "Object" ? name2 : void 0
|
|
17749
|
+
};
|
|
18477
17750
|
}
|
|
18478
|
-
|
|
18479
|
-
|
|
17751
|
+
return null;
|
|
17752
|
+
}
|
|
17753
|
+
function describePrimitive(value) {
|
|
17754
|
+
if (value === null)
|
|
17755
|
+
return { text: "null", cls: CLS.null };
|
|
17756
|
+
if (value === void 0)
|
|
17757
|
+
return { text: "undefined", cls: CLS.undefined };
|
|
17758
|
+
if (typeof value === "string" || value instanceof String) {
|
|
17759
|
+
return { text: `"${String(value)}"`, cls: CLS.string };
|
|
18480
17760
|
}
|
|
18481
|
-
if (
|
|
18482
|
-
|
|
18483
|
-
|
|
17761
|
+
if (typeof value === "boolean" || value instanceof Boolean) {
|
|
17762
|
+
return { text: String(value), cls: CLS.boolean };
|
|
17763
|
+
}
|
|
17764
|
+
if (typeof value === "number" || value instanceof Number) {
|
|
17765
|
+
return { text: String(value), cls: CLS.number };
|
|
17766
|
+
}
|
|
17767
|
+
if (typeof value === "bigint") {
|
|
17768
|
+
return { text: `${value.toString()}n`, cls: CLS.number };
|
|
17769
|
+
}
|
|
17770
|
+
return { text: String(value), cls: CLS.punctuation };
|
|
17771
|
+
}
|
|
17772
|
+
function Label({ field, clickable }) {
|
|
17773
|
+
if (field === void 0)
|
|
17774
|
+
return null;
|
|
17775
|
+
return jsxRuntimeExports.jsx("span", { className: clickable ? CLS.clickableLabel : CLS.label, children: `${formatField(field)}:` });
|
|
17776
|
+
}
|
|
17777
|
+
function Comma({ isLast }) {
|
|
17778
|
+
if (isLast)
|
|
17779
|
+
return null;
|
|
17780
|
+
return jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: "," });
|
|
17781
|
+
}
|
|
17782
|
+
function LeafRow({ field, isLast, children: children2 }) {
|
|
17783
|
+
return jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", tabIndex: -1, children: [jsxRuntimeExports.jsx(Label, { field }), children2, jsxRuntimeExports.jsx(Comma, { isLast })] });
|
|
17784
|
+
}
|
|
17785
|
+
function PrimitiveValue({ field, value, isLast }) {
|
|
17786
|
+
const { text: text2, cls } = describePrimitive(value);
|
|
17787
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx("span", { className: cls, children: text2 }) });
|
|
17788
|
+
}
|
|
17789
|
+
function EmptyContainer({ field, prefix, open, close, isLast }) {
|
|
17790
|
+
return jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", tabIndex: -1, children: [jsxRuntimeExports.jsx(Label, { field }), prefix ? jsxRuntimeExports.jsx("span", { className: CLS.className, children: prefix }) : null, jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: open }), jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: close }), jsxRuntimeExports.jsx(Comma, { isLast })] });
|
|
17791
|
+
}
|
|
17792
|
+
function focusExpander(button, outerRef) {
|
|
17793
|
+
var _a3;
|
|
17794
|
+
const previous2 = (_a3 = outerRef.current) == null ? void 0 : _a3.querySelector('[data-json-expander][tabindex="0"]');
|
|
17795
|
+
if (previous2)
|
|
17796
|
+
previous2.tabIndex = -1;
|
|
17797
|
+
button.tabIndex = 0;
|
|
17798
|
+
button.focus();
|
|
17799
|
+
}
|
|
17800
|
+
function moveExpanderFocus(outerRef, direction) {
|
|
17801
|
+
const root2 = outerRef.current;
|
|
17802
|
+
if (!root2)
|
|
17803
|
+
return;
|
|
17804
|
+
const buttons = root2.querySelectorAll("[data-json-expander]");
|
|
17805
|
+
let current = -1;
|
|
17806
|
+
for (let i = 0; i < buttons.length; i += 1) {
|
|
17807
|
+
if (buttons[i].tabIndex === 0) {
|
|
17808
|
+
current = i;
|
|
17809
|
+
break;
|
|
18484
17810
|
}
|
|
18485
|
-
return jsxRuntimeExports.jsxs("span", { children: [name2 != null && jsxRuntimeExports.jsx(ObjectName, { name: name2 }), name2 != null && jsxRuntimeExports.jsx("span", { children: ": " }), jsxRuntimeExports.jsxs("span", { style: { fontStyle: "italic" }, children: [data.className, " "] }), jsxRuntimeExports.jsx(ObjectValue, { object: data.data })] });
|
|
18486
17811
|
}
|
|
18487
|
-
if (
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
17812
|
+
if (current < 0)
|
|
17813
|
+
return;
|
|
17814
|
+
const next2 = (current + direction + buttons.length) % buttons.length;
|
|
17815
|
+
buttons[current].tabIndex = -1;
|
|
17816
|
+
buttons[next2].tabIndex = 0;
|
|
17817
|
+
buttons[next2].focus();
|
|
17818
|
+
}
|
|
17819
|
+
function ExpandableContainer({ field, entries, open, close, prefix, ctx, isLast }) {
|
|
17820
|
+
const { level, shouldExpand, outerRef } = ctx;
|
|
17821
|
+
const [expanded2, setExpanded] = reactExports.useState(() => shouldExpand(level));
|
|
17822
|
+
const rowRef = reactExports.useRef(null);
|
|
17823
|
+
const contentsId = reactExports.useId();
|
|
17824
|
+
if (entries.length === 0) {
|
|
17825
|
+
return jsxRuntimeExports.jsx(EmptyContainer, { field, prefix, open, close, isLast });
|
|
17826
|
+
}
|
|
17827
|
+
const toggle = () => {
|
|
17828
|
+
setExpanded((value) => !value);
|
|
17829
|
+
if (rowRef.current)
|
|
17830
|
+
focusExpander(rowRef.current, outerRef);
|
|
17831
|
+
};
|
|
17832
|
+
const onClick = (event) => {
|
|
17833
|
+
if (event.target.closest('[role="treeitem"]') !== event.currentTarget) {
|
|
17834
|
+
return;
|
|
18491
17835
|
}
|
|
18492
|
-
|
|
17836
|
+
toggle();
|
|
17837
|
+
};
|
|
17838
|
+
const onKeyDown = (event) => {
|
|
17839
|
+
if (event.key === "ArrowRight") {
|
|
17840
|
+
event.preventDefault();
|
|
17841
|
+
setExpanded(true);
|
|
17842
|
+
} else if (event.key === "ArrowLeft") {
|
|
17843
|
+
event.preventDefault();
|
|
17844
|
+
setExpanded(false);
|
|
17845
|
+
} else if (event.key === "ArrowUp") {
|
|
17846
|
+
event.preventDefault();
|
|
17847
|
+
moveExpanderFocus(outerRef, -1);
|
|
17848
|
+
} else if (event.key === "ArrowDown") {
|
|
17849
|
+
event.preventDefault();
|
|
17850
|
+
moveExpanderFocus(outerRef, 1);
|
|
17851
|
+
}
|
|
17852
|
+
};
|
|
17853
|
+
const lastIndex = entries.length - 1;
|
|
17854
|
+
return (
|
|
17855
|
+
// The treeitem row is the focusable, keyboard-operable control (roving
|
|
17856
|
+
// tabindex + arrow keys); the disclosure marker below is purely decorative.
|
|
17857
|
+
jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", "aria-expanded": expanded2, "aria-controls": expanded2 ? contentsId : void 0, "data-json-expander": true, ref: rowRef, tabIndex: level === 0 ? 0 : -1, onClick, onKeyDown, children: [jsxRuntimeExports.jsx("span", { className: expanded2 ? CLS.collapseIcon : CLS.expandIcon, "aria-hidden": "true" }), field !== void 0 && jsxRuntimeExports.jsx("span", { className: CLS.clickableLabel, children: `${formatField(field)}:` }), prefix ? jsxRuntimeExports.jsx("span", { className: CLS.className, children: prefix }) : null, jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: open }), expanded2 ? (
|
|
17858
|
+
// biome-ignore lint/a11y/useSemanticElements: ARIA tree group is the correct role here
|
|
17859
|
+
jsxRuntimeExports.jsx("ul", { id: contentsId, className: CLS.childFields, role: "group", children: entries.map(([childField, childValue], index2) => jsxRuntimeExports.jsx(DataRender, { field: childField, value: childValue, isLast: index2 === lastIndex, ctx: { ...ctx, level: level + 1 } }, childField ?? index2)) })
|
|
17860
|
+
) : jsxRuntimeExports.jsx("span", { className: CLS.collapsedContent, "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: close }), jsxRuntimeExports.jsx(Comma, { isLast })] })
|
|
17861
|
+
);
|
|
17862
|
+
}
|
|
17863
|
+
function DataRender({ field, value, isLast, ctx }) {
|
|
17864
|
+
if (isBytesDisplay(value)) {
|
|
17865
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx(BytesDisplayValue, { display: value }) });
|
|
17866
|
+
}
|
|
17867
|
+
if (isEncryptedMarker(value)) {
|
|
17868
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx(EncryptedInlineLabel, {}) });
|
|
17869
|
+
}
|
|
17870
|
+
if (isStreamRef(value)) {
|
|
17871
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx(StreamRefInline, { streamRef: value }) });
|
|
17872
|
+
}
|
|
17873
|
+
if (isRunRef(value)) {
|
|
17874
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx(RunRefInline, { runRef: value }) });
|
|
17875
|
+
}
|
|
17876
|
+
if (value instanceof Date) {
|
|
17877
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx("span", { className: CLS.date, children: value.toISOString() }) });
|
|
17878
|
+
}
|
|
17879
|
+
if (value instanceof RegExp) {
|
|
17880
|
+
return jsxRuntimeExports.jsx(LeafRow, { field, isLast, children: jsxRuntimeExports.jsx("span", { className: CLS.regexp, children: value.toString() }) });
|
|
17881
|
+
}
|
|
17882
|
+
if (isClassInstanceRef(value)) {
|
|
17883
|
+
return jsxRuntimeExports.jsx(ClassInstanceNode, { field, instance: value, isLast, ctx });
|
|
18493
17884
|
}
|
|
18494
|
-
|
|
18495
|
-
|
|
17885
|
+
const container = describeContainer(value);
|
|
17886
|
+
if (container) {
|
|
17887
|
+
return jsxRuntimeExports.jsx(ExpandableContainer, { field, entries: container.entries, open: container.open, close: container.close, prefix: container.prefix, ctx, isLast });
|
|
18496
17888
|
}
|
|
18497
|
-
return jsxRuntimeExports.jsx(
|
|
17889
|
+
return jsxRuntimeExports.jsx(PrimitiveValue, { field, value, isLast, ctx });
|
|
17890
|
+
}
|
|
17891
|
+
function ClassInstanceNode({ field, instance, isLast, ctx }) {
|
|
17892
|
+
const container = describeContainer(instance.data);
|
|
17893
|
+
if (container) {
|
|
17894
|
+
return jsxRuntimeExports.jsx(ExpandableContainer, { field, entries: container.entries, open: container.open, close: container.close, prefix: instance.className, ctx, isLast });
|
|
17895
|
+
}
|
|
17896
|
+
const { text: text2, cls } = describePrimitive(instance.data);
|
|
17897
|
+
return jsxRuntimeExports.jsxs(LeafRow, { field, isLast, children: [jsxRuntimeExports.jsx("span", { className: CLS.className, children: instance.className }), jsxRuntimeExports.jsx("span", { className: cls, children: text2 })] });
|
|
17898
|
+
}
|
|
17899
|
+
function JsonTree({ data, name: name2, expandLevel }) {
|
|
17900
|
+
const outerRef = reactExports.useRef(null);
|
|
17901
|
+
const shouldExpand = reactExports.useMemo(() => (level) => level < expandLevel, [expandLevel]);
|
|
17902
|
+
return jsxRuntimeExports.jsx("div", { ref: outerRef, className: CLS.container, role: "tree", "aria-label": "JSON view", children: jsxRuntimeExports.jsx(DataRender, { field: name2, value: data, isLast: true, ctx: { level: 0, shouldExpand, outerRef } }) });
|
|
18498
17903
|
}
|
|
18499
17904
|
function makeOpaqueRef(ref) {
|
|
18500
17905
|
const opaque = /* @__PURE__ */ Object.create(null);
|
|
@@ -18550,32 +17955,17 @@ function collapseRefs(data) {
|
|
|
18550
17955
|
function DataInspector({ data, expandLevel = 2, name: name2, onStreamClick, onRunClick, onDecrypt, isDecrypting = false }) {
|
|
18551
17956
|
const collapsedData = reactExports.useMemo(() => collapseRefs(data), [data]);
|
|
18552
17957
|
const stableData = useStableInspectorData(collapsedData);
|
|
18553
|
-
|
|
18554
|
-
const isDark = useDarkMode();
|
|
18555
|
-
const extendedTheme = isDark ? inspectorThemeExtendedDark : inspectorThemeExtendedLight;
|
|
18556
|
-
reactExports.useEffect(() => {
|
|
18557
|
-
setInitialExpandLevel(0);
|
|
18558
|
-
}, []);
|
|
18559
|
-
const content2 = jsxRuntimeExports.jsx(ExtendedThemeContext.Provider, { value: extendedTheme, children: jsxRuntimeExports.jsx(themedObjectInspector, {
|
|
18560
|
-
data: stableData,
|
|
18561
|
-
name: name2,
|
|
18562
|
-
// @ts-expect-error react-inspector accepts theme objects at runtime despite
|
|
18563
|
-
// types declaring string only — see https://github.com/storybookjs/react-inspector/blob/main/README.md#theme
|
|
18564
|
-
theme: isDark ? inspectorThemeDark : inspectorThemeLight,
|
|
18565
|
-
expandLevel: initialExpandLevel,
|
|
18566
|
-
nodeRenderer: NodeRenderer
|
|
18567
|
-
}) });
|
|
18568
|
-
let wrapped = content2;
|
|
17958
|
+
let content2 = jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { href: "wf-json-view", precedence: "default", children: JSON_VIEW_STYLES }), jsxRuntimeExports.jsx(JsonTree, { data: stableData, name: name2, expandLevel })] });
|
|
18569
17959
|
if (onStreamClick) {
|
|
18570
|
-
|
|
17960
|
+
content2 = jsxRuntimeExports.jsx(StreamClickContext.Provider, { value: onStreamClick, children: content2 });
|
|
18571
17961
|
}
|
|
18572
17962
|
if (onRunClick) {
|
|
18573
|
-
|
|
17963
|
+
content2 = jsxRuntimeExports.jsx(RunClickContext.Provider, { value: onRunClick, children: content2 });
|
|
18574
17964
|
}
|
|
18575
17965
|
if (onDecrypt) {
|
|
18576
|
-
|
|
17966
|
+
content2 = jsxRuntimeExports.jsx(DecryptClickContext.Provider, { value: { onDecrypt, isDecrypting }, children: content2 });
|
|
18577
17967
|
}
|
|
18578
|
-
return
|
|
17968
|
+
return content2;
|
|
18579
17969
|
}
|
|
18580
17970
|
function useStableInspectorData(next2) {
|
|
18581
17971
|
const previousRef = reactExports.useRef(next2);
|
|
@@ -44254,7 +43644,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
44254
43644
|
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 });
|
|
44255
43645
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
44256
43646
|
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 }) });
|
|
44257
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-
|
|
43647
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-pQbU-Oll.js"), true ? __vite__mapDeps([4,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
44258
43648
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
44259
43649
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
44260
43650
|
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 }) })] }) });
|
|
@@ -49548,7 +48938,7 @@ export {
|
|
|
49548
48938
|
Content as C,
|
|
49549
48939
|
DEFAULT_PAGE_SIZE as D,
|
|
49550
48940
|
Root2 as E,
|
|
49551
|
-
Arrow
|
|
48941
|
+
Arrow as F,
|
|
49552
48942
|
useComposedRefs as G,
|
|
49553
48943
|
fetchRun as H,
|
|
49554
48944
|
cva as I,
|
|
@@ -49575,7 +48965,7 @@ export {
|
|
|
49575
48965
|
ContextCardProvider as a0,
|
|
49576
48966
|
Skeleton$1 as a1,
|
|
49577
48967
|
Yr as a2,
|
|
49578
|
-
isEncryptedMarker as a3,
|
|
48968
|
+
isEncryptedMarker$1 as a3,
|
|
49579
48969
|
TimestampTooltip as a4,
|
|
49580
48970
|
formatDuration as a5,
|
|
49581
48971
|
_r as a6,
|