jclib-ui 1.0.295 → 1.0.296

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.
@@ -3895,6 +3895,18 @@ if (process.env.NODE_ENV === "production") {
3895
3895
  jsxRuntime.exports = requireReactJsxRuntime_development();
3896
3896
  }
3897
3897
  var jsxRuntimeExports = jsxRuntime.exports;
3898
+ const BorderTestServer = styled.div`
3899
+ position: fixed;
3900
+ top: 0;
3901
+ right: 0;
3902
+ width: 15px;
3903
+ aspect-ratio: 1/1;
3904
+ box-sizing: border-box;
3905
+ background-color: #b92c2c;
3906
+ border-radius: 99px;
3907
+ pointer-events: none;
3908
+ z-index: 9999999;
3909
+ `;
3898
3910
  const MARCADOR_LOCALHOST = " 🔴 ";
3899
3911
  const MARCADOR_TESTE = " 🟢 ";
3900
3912
  function useLocalhostBadge() {
@@ -3906,13 +3918,18 @@ function useLocalhostBadge() {
3906
3918
  }, []);
3907
3919
  }
3908
3920
  function useTestDomainBadge(testDomain) {
3909
- useEffect(() => {
3921
+ function inTestServer() {
3910
3922
  const domains = testDomain ? [].concat(testDomain) : ["test.", "test-"];
3911
- const inTestServer = domains.some((domain) => window.location.hostname.includes(domain));
3912
- if (inTestServer && !document.title.includes(MARCADOR_TESTE)) {
3923
+ return Boolean(
3924
+ domains.some((domain) => window.location.hostname.includes(domain))
3925
+ );
3926
+ }
3927
+ useEffect(() => {
3928
+ if (inTestServer() && !document.title.includes(MARCADOR_TESTE)) {
3913
3929
  document.title = `${MARCADOR_TESTE}${document.title}`;
3914
3930
  }
3915
3931
  }, [testDomain]);
3932
+ return inTestServer() && /* @__PURE__ */ jsxRuntimeExports.jsx(BorderTestServer, {});
3916
3933
  }
3917
3934
  const LibContext = createContext({
3918
3935
  modalList: [],
@@ -3992,7 +4009,7 @@ const LibProvider = ({ apiConfig, children, versionApp, useTheme, testDomain })
3992
4009
  [modalList]
3993
4010
  );
3994
4011
  useLocalhostBadge();
3995
- useTestDomainBadge(testDomain);
4012
+ const borderTestServer = useTestDomainBadge(testDomain);
3996
4013
  useEffect(() => {
3997
4014
  if (canChangeTheme) {
3998
4015
  localStorage.setItem(cTheme, theme);
@@ -4003,7 +4020,7 @@ const LibProvider = ({ apiConfig, children, versionApp, useTheme, testDomain })
4003
4020
  window.addEventListener("keydown", handleKeyDown, false);
4004
4021
  return () => window.removeEventListener("keydown", handleKeyDown, false);
4005
4022
  }, [modalList]);
4006
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
4023
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
4007
4024
  LibContext.Provider,
4008
4025
  {
4009
4026
  value: {
@@ -4021,7 +4038,10 @@ const LibProvider = ({ apiConfig, children, versionApp, useTheme, testDomain })
4021
4038
  reportType,
4022
4039
  setReportType
4023
4040
  },
4024
- children
4041
+ children: [
4042
+ borderTestServer,
4043
+ children
4044
+ ]
4025
4045
  }
4026
4046
  );
4027
4047
  };