@hyve-sdk/js 2.9.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 CHANGED
@@ -2369,33 +2369,43 @@ function MachineViewDialog({
2369
2369
  if (e.key === "Escape") onClose();
2370
2370
  };
2371
2371
  window.addEventListener("keydown", onKeyDown);
2372
- return () => window.removeEventListener("keydown", onKeyDown);
2372
+ return () => {
2373
+ window.removeEventListener("keydown", onKeyDown);
2374
+ };
2373
2375
  }, [open, onClose]);
2374
2376
  if (!open) return null;
2375
2377
  const panelWidth = typeof dialogWidth === "number" ? `${dialogWidth}px` : dialogWidth;
2376
2378
  const iframeHeight = typeof viewHeight === "number" ? `${viewHeight}px` : viewHeight;
2377
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: OVERLAY_STYLE, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2379
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2378
2380
  "div",
2379
2381
  {
2380
- style: { ...PANEL_STYLE, maxWidth: panelWidth },
2381
- onClick: (e) => e.stopPropagation(),
2382
- children: [
2383
- title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: HEADER_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: TITLE_STYLE, children: title }) }),
2384
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2385
- MachineView,
2386
- {
2387
- machineId,
2388
- style: {
2389
- width: "100%",
2390
- height: iframeHeight,
2391
- border: "none",
2392
- display: "block"
2393
- }
2394
- }
2395
- )
2396
- ]
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
+ )
2397
2407
  }
2398
- ) });
2408
+ );
2399
2409
  }
2400
2410
  function MachineViewButton({
2401
2411
  machineId,
package/dist/react.mjs CHANGED
@@ -2347,33 +2347,43 @@ function MachineViewDialog({
2347
2347
  if (e.key === "Escape") onClose();
2348
2348
  };
2349
2349
  window.addEventListener("keydown", onKeyDown);
2350
- return () => window.removeEventListener("keydown", onKeyDown);
2350
+ return () => {
2351
+ window.removeEventListener("keydown", onKeyDown);
2352
+ };
2351
2353
  }, [open, onClose]);
2352
2354
  if (!open) return null;
2353
2355
  const panelWidth = typeof dialogWidth === "number" ? `${dialogWidth}px` : dialogWidth;
2354
2356
  const iframeHeight = typeof viewHeight === "number" ? `${viewHeight}px` : viewHeight;
2355
- return /* @__PURE__ */ jsx("div", { style: OVERLAY_STYLE, onClick: onClose, children: /* @__PURE__ */ jsxs(
2357
+ return /* @__PURE__ */ jsx(
2356
2358
  "div",
2357
2359
  {
2358
- style: { ...PANEL_STYLE, maxWidth: panelWidth },
2359
- onClick: (e) => e.stopPropagation(),
2360
- children: [
2361
- title && /* @__PURE__ */ jsx("div", { style: HEADER_STYLE, children: /* @__PURE__ */ jsx("p", { style: TITLE_STYLE, children: title }) }),
2362
- /* @__PURE__ */ jsx(
2363
- MachineView,
2364
- {
2365
- machineId,
2366
- style: {
2367
- width: "100%",
2368
- height: iframeHeight,
2369
- border: "none",
2370
- display: "block"
2371
- }
2372
- }
2373
- )
2374
- ]
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
+ )
2375
2385
  }
2376
- ) });
2386
+ );
2377
2387
  }
2378
2388
  function MachineViewButton({
2379
2389
  machineId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyve-sdk/js",
3
- "version": "2.9.0-canary.0",
3
+ "version": "2.10.0-canary.1",
4
4
  "description": "Hyve SDK - TypeScript wrapper for Hyve game server integration",
5
5
  "private": false,
6
6
  "publishConfig": {