vim-web 0.3.44-dev.76 → 0.3.44-dev.78

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/vim-web.js CHANGED
@@ -75669,16 +75669,16 @@ function InputNumber(props) {
75669
75669
  );
75670
75670
  }
75671
75671
  function GenericEntry(field) {
75672
- var _a3;
75672
+ var _a3, _b2;
75673
75673
  if (((_a3 = field.visible) == null ? void 0 : _a3.call(field)) === false) return null;
75674
+ const isEnabled = ((_b2 = field.enabled) == null ? void 0 : _b2.call(field)) !== false;
75674
75675
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
75675
75676
  "div",
75676
75677
  {
75677
- style: {},
75678
- className: "vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-between vc-my-2",
75678
+ className: `vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-between vc-my-2 ${isEnabled ? "" : "vc-opacity-50 vc-pointer-events-none"}`,
75679
75679
  children: [
75680
75680
  /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: field.label }),
75681
- /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GenericField, { field }) })
75681
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GenericField, { field, disabled: !isEnabled }) })
75682
75682
  ]
75683
75683
  },
75684
75684
  field.id
@@ -75690,9 +75690,9 @@ function GenericField(props) {
75690
75690
  case "number":
75691
75691
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state, disabled: ((_b2 = (_a3 = props.field).enabled) == null ? void 0 : _b2.call(_a3)) === false });
75692
75692
  case "text":
75693
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: !((_d = (_c = props.field).enabled) == null ? void 0 : _d.call(_c)) === false });
75693
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: ((_d = (_c = props.field).enabled) == null ? void 0 : _d.call(_c)) === false });
75694
75694
  case "bool":
75695
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: !((_f = (_e = props.field).enabled) == null ? void 0 : _f.call(_e)) === false });
75695
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: ((_f = (_e = props.field).enabled) == null ? void 0 : _f.call(_e)) === false });
75696
75696
  default:
75697
75697
  return null;
75698
75698
  }
@@ -75971,7 +75971,7 @@ const IsolationPanel = forwardRef(
75971
75971
  entries: [
75972
75972
  { type: "bool", id: "showGhost", label: "Show Ghost", state: props.state.showGhost },
75973
75973
  // { type: "bool", id: "showRooms", label: "Show Rooms", state: props.state.showRooms },
75974
- { type: "number", id: "ghostOpacity", label: "Ghost Opacity", state: props.state.ghostOpacity }
75974
+ { type: "number", id: "ghostOpacity", label: "Ghost Opacity", state: props.state.ghostOpacity, enabled: () => props.state.showGhost.get() }
75975
75975
  ]
75976
75976
  }
75977
75977
  );