@lotte-innovate/ui-component-test 0.0.134 → 0.0.136

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,8 @@ export var useDarkMode = function (isRAxes) {
28
28
  linescale: {},
29
29
  }), defaultOptions = _b[0], setDefaultOptions = _b[1];
30
30
  function checkDarkMode() {
31
+ if (!document)
32
+ return null;
31
33
  return document.body.classList.contains('dark');
32
34
  }
33
35
  useEffect(function () {
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{slateA as r,slateDarkA as o}from"../color/alpha.mjs";import{useState as c,useEffect as t}from"react";var n=function(n){void 0===n&&(n=!1);var i={},e={};!0===n?(i={r:{grid:{color:r[8]}}},e={r:{grid:{color:o[8]},ticks:{backdropColor:"rgba(0, 0, 0, 0)"}}}):(i={x:{grid:{color:r[8]}},y:{grid:{color:r[8]}}},e={x:{grid:{color:o[8]}},y:{grid:{color:o[8]}}});var a=c(b()),l=a[0],s=a[1],d=c({linescale:{}}),u=d[0],f=d[1];function b(){return document.body.classList.contains("dark")}return t((function(){s(b()),f({linescale:b()?e:i});var r=new MutationObserver((function(r){r.forEach((function(r){"class"===r.attributeName&&(s(b()),f({linescale:b()?e:i}))}))}));return r.observe(document.body,{attributes:!0}),function(){r.disconnect()}}),[e,i,s]),[l,u]};export{n as useDarkMode};
2
+ import{slateA as r,slateDarkA as o}from"../color/alpha.mjs";import{useState as c,useEffect as n}from"react";var t=function(t){void 0===t&&(t=!1);var i={},e={};!0===t?(i={r:{grid:{color:r[8]}}},e={r:{grid:{color:o[8]},ticks:{backdropColor:"rgba(0, 0, 0, 0)"}}}):(i={x:{grid:{color:r[8]}},y:{grid:{color:r[8]}}},e={x:{grid:{color:o[8]}},y:{grid:{color:o[8]}}});var a=c(m()),l=a[0],u=a[1],d=c({linescale:{}}),s=d[0],f=d[1];function m(){return document?document.body.classList.contains("dark"):null}return n((function(){u(m()),f({linescale:m()?e:i});var r=new MutationObserver((function(r){r.forEach((function(r){"class"===r.attributeName&&(u(m()),f({linescale:m()?e:i}))}))}));return r.observe(document.body,{attributes:!0}),function(){r.disconnect()}}),[e,i,u]),[l,s]};export{t as useDarkMode};
3
3
  //# sourceMappingURL=useDarkMode.mjs.map