@hyve-sdk/js 2.10.0-canary.0 → 2.10.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react.js +27 -27
- package/dist/react.mjs +27 -27
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -2363,49 +2363,49 @@ function MachineViewDialog({
|
|
|
2363
2363
|
dialogWidth,
|
|
2364
2364
|
viewHeight
|
|
2365
2365
|
}) {
|
|
2366
|
-
const panelRef = (0, import_react.useRef)(null);
|
|
2367
2366
|
(0, import_react.useEffect)(() => {
|
|
2368
2367
|
if (!open) return;
|
|
2369
2368
|
const onKeyDown = (e) => {
|
|
2370
2369
|
if (e.key === "Escape") onClose();
|
|
2371
2370
|
};
|
|
2372
|
-
const onMouseDown = (e) => {
|
|
2373
|
-
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
2374
|
-
onClose();
|
|
2375
|
-
}
|
|
2376
|
-
};
|
|
2377
2371
|
window.addEventListener("keydown", onKeyDown);
|
|
2378
|
-
document.addEventListener("mousedown", onMouseDown);
|
|
2379
2372
|
return () => {
|
|
2380
2373
|
window.removeEventListener("keydown", onKeyDown);
|
|
2381
|
-
document.removeEventListener("mousedown", onMouseDown);
|
|
2382
2374
|
};
|
|
2383
2375
|
}, [open, onClose]);
|
|
2384
2376
|
if (!open) return null;
|
|
2385
2377
|
const panelWidth = typeof dialogWidth === "number" ? `${dialogWidth}px` : dialogWidth;
|
|
2386
2378
|
const iframeHeight = typeof viewHeight === "number" ? `${viewHeight}px` : viewHeight;
|
|
2387
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2388
2380
|
"div",
|
|
2389
2381
|
{
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2382
|
+
style: OVERLAY_STYLE,
|
|
2383
|
+
onMouseDown: (e) => {
|
|
2384
|
+
if (e.target === e.currentTarget) onClose();
|
|
2385
|
+
},
|
|
2386
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2387
|
+
"div",
|
|
2388
|
+
{
|
|
2389
|
+
style: { ...PANEL_STYLE, maxWidth: panelWidth },
|
|
2390
|
+
children: [
|
|
2391
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: HEADER_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: TITLE_STYLE, children: title }) }),
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2393
|
+
MachineView,
|
|
2394
|
+
{
|
|
2395
|
+
machineId,
|
|
2396
|
+
style: {
|
|
2397
|
+
width: "100%",
|
|
2398
|
+
height: iframeHeight,
|
|
2399
|
+
border: "none",
|
|
2400
|
+
display: "block"
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
)
|
|
2404
|
+
]
|
|
2405
|
+
}
|
|
2406
|
+
)
|
|
2407
2407
|
}
|
|
2408
|
-
)
|
|
2408
|
+
);
|
|
2409
2409
|
}
|
|
2410
2410
|
function MachineViewButton({
|
|
2411
2411
|
machineId,
|
package/dist/react.mjs
CHANGED
|
@@ -2341,49 +2341,49 @@ function MachineViewDialog({
|
|
|
2341
2341
|
dialogWidth,
|
|
2342
2342
|
viewHeight
|
|
2343
2343
|
}) {
|
|
2344
|
-
const panelRef = useRef(null);
|
|
2345
2344
|
useEffect(() => {
|
|
2346
2345
|
if (!open) return;
|
|
2347
2346
|
const onKeyDown = (e) => {
|
|
2348
2347
|
if (e.key === "Escape") onClose();
|
|
2349
2348
|
};
|
|
2350
|
-
const onMouseDown = (e) => {
|
|
2351
|
-
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
2352
|
-
onClose();
|
|
2353
|
-
}
|
|
2354
|
-
};
|
|
2355
2349
|
window.addEventListener("keydown", onKeyDown);
|
|
2356
|
-
document.addEventListener("mousedown", onMouseDown);
|
|
2357
2350
|
return () => {
|
|
2358
2351
|
window.removeEventListener("keydown", onKeyDown);
|
|
2359
|
-
document.removeEventListener("mousedown", onMouseDown);
|
|
2360
2352
|
};
|
|
2361
2353
|
}, [open, onClose]);
|
|
2362
2354
|
if (!open) return null;
|
|
2363
2355
|
const panelWidth = typeof dialogWidth === "number" ? `${dialogWidth}px` : dialogWidth;
|
|
2364
2356
|
const iframeHeight = typeof viewHeight === "number" ? `${viewHeight}px` : viewHeight;
|
|
2365
|
-
return /* @__PURE__ */ jsx(
|
|
2357
|
+
return /* @__PURE__ */ jsx(
|
|
2366
2358
|
"div",
|
|
2367
2359
|
{
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2360
|
+
style: OVERLAY_STYLE,
|
|
2361
|
+
onMouseDown: (e) => {
|
|
2362
|
+
if (e.target === e.currentTarget) onClose();
|
|
2363
|
+
},
|
|
2364
|
+
children: /* @__PURE__ */ jsxs(
|
|
2365
|
+
"div",
|
|
2366
|
+
{
|
|
2367
|
+
style: { ...PANEL_STYLE, maxWidth: panelWidth },
|
|
2368
|
+
children: [
|
|
2369
|
+
title && /* @__PURE__ */ jsx("div", { style: HEADER_STYLE, children: /* @__PURE__ */ jsx("p", { style: TITLE_STYLE, children: title }) }),
|
|
2370
|
+
/* @__PURE__ */ jsx(
|
|
2371
|
+
MachineView,
|
|
2372
|
+
{
|
|
2373
|
+
machineId,
|
|
2374
|
+
style: {
|
|
2375
|
+
width: "100%",
|
|
2376
|
+
height: iframeHeight,
|
|
2377
|
+
border: "none",
|
|
2378
|
+
display: "block"
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
)
|
|
2382
|
+
]
|
|
2383
|
+
}
|
|
2384
|
+
)
|
|
2385
2385
|
}
|
|
2386
|
-
)
|
|
2386
|
+
);
|
|
2387
2387
|
}
|
|
2388
2388
|
function MachineViewButton({
|
|
2389
2389
|
machineId,
|