@ninebone/util 1.0.26 → 1.0.28

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/nine-util.js CHANGED
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _name, _color, _Trace_instances, isTraceEnabled_fn, _a, _timer, _queue, _delay, _TaskDebouncer_instances, flush_fn, _request, _shift, _dialog, _init, _onMouseDown, _onTouchStart, _NineUxUtil_instances, prepare_fn, _mode, _isSiblingOnly, _detectMode, _startDrag, _init2, _prepareLayout;
12
+ var _name, _color, _Trace_instances, isTraceEnabled_fn, _a, _timer, _queue, _delay, _TaskDebouncer_instances, flush_fn, _request, _shift, _dialog, _init, _onMouseDown, _onTouchStart, _NineUxUtil_instances, prepare_fn, _mode, _isSiblingOnly, _detectMode, _startDrag, _init2, _prepareLayout, _requestLogin;
13
13
  import React from "react";
14
14
  import { createRoot } from "react-dom/client";
15
15
  const listeners = /* @__PURE__ */ new Set();
@@ -706,7 +706,7 @@ const dialogStyles = `
706
706
  padding: 0;
707
707
  }
708
708
  :host(.rgb) div.contents {
709
- height: calc(100% - 4px);
709
+ --height: calc(100% - 4px);
710
710
  }
711
711
 
712
712
  :host(.rgb) div.head ng-sphere,
@@ -1301,7 +1301,7 @@ class UxSplitter extends HTMLElement {
1301
1301
  const htmlTmpl = document.createElement("template");
1302
1302
  htmlTmpl.innerHTML = `
1303
1303
  <style>
1304
- @import "https://cdn.jsdelivr.net/npm/@ninebone/util@${"1.0.26"}/dist/css/nine-util.css";
1304
+ @import "https://cdn.jsdelivr.net/npm/@ninebone/util@${"1.0.28"}/dist/css/nine-util.css";
1305
1305
  ${customImport}
1306
1306
  </style>
1307
1307
  ${gripTmpl}
@@ -1829,9 +1829,30 @@ class NineUtil {
1829
1829
  }
1830
1830
  return null;
1831
1831
  });
1832
+ /**
1833
+ login = (provider) => {
1834
+ window.location.href = `${window.__API_BASE_URL__ || ""}/accounts/auth/${provider}/login`;
1835
+ }; */
1832
1836
  __publicField(this, "login", (provider) => {
1833
- window.location.href = `${window.__API_BASE_URL__ || ""}/accounts/auth/${provider}/login`;
1837
+ const currentFrontendUrl = window.location.origin;
1838
+ const apiBase = window.__API_BASE_URL__ || "";
1839
+ window.location.href = `${apiBase}/accounts/auth/${provider}/login?frontendUrl=${encodeURIComponent(currentFrontendUrl)}`;
1840
+ });
1841
+ __privateAdd(this, _requestLogin, (provider) => {
1842
+ const currentFrontendUrl = window.location.origin;
1843
+ const apiBase = window.__API_BASE_URL__ || "";
1844
+ window.location.href = `${apiBase}/accounts/auth/${provider}/login?frontendUrl=${encodeURIComponent(currentFrontendUrl)}`;
1834
1845
  });
1846
+ // 🎯 provider별 메서드 체인 구성
1847
+ __publicField(this, "google", () => ({
1848
+ login: () => __privateGet(this, _requestLogin).call(this, "google")
1849
+ }));
1850
+ __publicField(this, "kakao", () => ({
1851
+ login: () => __privateGet(this, _requestLogin).call(this, "kakao")
1852
+ }));
1853
+ __publicField(this, "naver", () => ({
1854
+ login: () => __privateGet(this, _requestLogin).call(this, "naver")
1855
+ }));
1835
1856
  __publicField(this, "randomUUID", (num) => {
1836
1857
  if (!num) num = 10;
1837
1858
  const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
@@ -1847,6 +1868,7 @@ class NineUtil {
1847
1868
  });
1848
1869
  }
1849
1870
  }
1871
+ _requestLogin = new WeakMap();
1850
1872
  const utilInstance = new NineUtil();
1851
1873
  Object.assign(nine$1, utilInstance);
1852
1874
  nine$1.safe = safe;