boottent-design 0.1.212 → 0.1.213

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/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./use-metadata-CZiZDN9j.cjs");require("react/jsx-runtime");const t=require("react"),o=require("./portal-manager-CyWNKHmr.cjs");require("./preview-9QZ5P9LT.cjs");require("./index-Cv4pTXfv.cjs");const s=require("./use-toastmodal-B1QxDevT.cjs"),q=()=>{const[u,r]=t.useState([]);t.useEffect(()=>{const e=(c,p)=>{r(n=>p?[...new Set([...n,c.id])]:n.filter(k=>k!==c.id))},l=o.portalManager.subscribe(e);return r(o.portalManager.getOpenPortals()),()=>l()},[]);const a=t.useCallback((e,l)=>o.portalManager.openPortal(e,{...l,onClose:l.onClose??(()=>{})}),[]),d=t.useCallback(e=>a("modal",e),[a]),i=t.useCallback(e=>typeof e=="string"?a("alert",{description:e}):a("alert",e),[a]),g=t.useCallback(e=>a("dialog",e),[a]),M=t.useCallback(e=>a("custom",e),[a]),b=t.useCallback(e=>o.portalManager.getIsPortalOpen(e),[]),P=t.useCallback(e=>o.portalManager.closePortal(e),[]),C=t.useCallback(()=>o.portalManager.closeAllPortals(),[]);return{open:a,confirm:d,alert:i,dialog:g,custom:M,getIsOpen:b,closePortal:P,closeAllPortals:C,openPortals:u}};exports.useMetadata=m.useMetadata;exports.modalReducer=s.modalReducer;exports.toast=s.toast;exports.toastModal=s.toastModal;exports.toastReducer=s.toastReducer;exports.useToast=s.useToast;exports.useToastModal=s.useToastModal;exports.usePortal=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./use-metadata-CZiZDN9j.cjs");require("react/jsx-runtime");const a=require("react"),o=require("./portal-manager-CyWNKHmr.cjs");require("./preview-9QZ5P9LT.cjs");require("./index-Cv4pTXfv.cjs");const s=require("./use-toastmodal-B1QxDevT.cjs"),q=()=>{const[u,r]=a.useState([]);a.useEffect(()=>{const e=(c,k)=>{r(n=>k?[...new Set([...n,c.id])]:n.filter(f=>f!==c.id))},l=o.portalManager.subscribe(e);return r(o.portalManager.getOpenPortals()),()=>l()},[]);const t=a.useCallback((e,l)=>o.portalManager.openPortal(e,{...l,onClose:l.onClose??(()=>{})}),[]),d=a.useCallback(e=>t("modal",e),[t]),i=a.useCallback(e=>typeof e=="string"?t("alert",{description:e}):t("alert",e),[t]),g=a.useCallback(e=>t("dialog",e),[t]),M=a.useCallback(e=>t("custom",e),[t]),b=a.useCallback(e=>o.portalManager.getIsPortalOpen(e),[]),P=a.useCallback(e=>o.portalManager.closePortal(e),[]),C=a.useCallback(e=>o.portalManager.forceClosePortal(e),[]),p=a.useCallback(()=>o.portalManager.closeAllPortals(),[]);return{open:t,confirm:d,alert:i,dialog:g,custom:M,getIsOpen:b,closePortal:P,forceClosePortal:C,closeAllPortals:p,openPortals:u}};exports.useMetadata=m.useMetadata;exports.modalReducer=s.modalReducer;exports.toast=s.toast;exports.toastModal=s.toastModal;exports.toastReducer=s.toastReducer;exports.useToast=s.useToast;exports.useToastModal=s.useToastModal;exports.usePortal=q;
package/dist/hooks.es.js CHANGED
@@ -1,15 +1,15 @@
1
- import { u as w } from "./use-metadata-BrY8rtWx.js";
1
+ import { u as y } from "./use-metadata-BrY8rtWx.js";
2
2
  import "react/jsx-runtime";
3
3
  import { useState as M, useEffect as O, useCallback as s } from "react";
4
4
  import { p as e } from "./portal-manager-fk0biCEh.js";
5
5
  import "./preview-Cocn_vDi.js";
6
6
  import "./index-DT339AZp.js";
7
- import { m as E, a as h, b as j, t as q, u as z, c as B } from "./use-toastmodal-BpqFNqCw.js";
8
- const S = () => {
7
+ import { m as h, a as j, b as q, t as z, u as B, c as D } from "./use-toastmodal-BpqFNqCw.js";
8
+ const T = () => {
9
9
  const [c, r] = M([]);
10
10
  O(() => {
11
- const t = (l, g) => {
12
- r((n) => g ? [.../* @__PURE__ */ new Set([...n, l.id])] : n.filter((b) => b !== l.id));
11
+ const t = (l, b) => {
12
+ r((n) => b ? [.../* @__PURE__ */ new Set([...n, l.id])] : n.filter((C) => C !== l.id));
13
13
  }, a = e.subscribe(t);
14
14
  return r(e.getOpenPortals()), () => a();
15
15
  }, []);
@@ -23,16 +23,27 @@ const S = () => {
23
23
  ), u = s((t) => o("modal", t), [o]), i = s(
24
24
  (t) => typeof t == "string" ? o("alert", { description: t }) : o("alert", t),
25
25
  [o]
26
- ), m = s((t) => o("dialog", t), [o]), d = s((t) => o("custom", t), [o]), p = s((t) => e.getIsPortalOpen(t), []), P = s((t) => e.closePortal(t), []), f = s(() => e.closeAllPortals(), []);
27
- return { open: o, confirm: u, alert: i, dialog: m, custom: d, getIsOpen: p, closePortal: P, closeAllPortals: f, openPortals: c };
26
+ ), m = s((t) => o("dialog", t), [o]), d = s((t) => o("custom", t), [o]), P = s((t) => e.getIsPortalOpen(t), []), f = s((t) => e.closePortal(t), []), p = s((t) => e.forceClosePortal(t), []), g = s(() => e.closeAllPortals(), []);
27
+ return {
28
+ open: o,
29
+ confirm: u,
30
+ alert: i,
31
+ dialog: m,
32
+ custom: d,
33
+ getIsOpen: P,
34
+ closePortal: f,
35
+ forceClosePortal: p,
36
+ closeAllPortals: g,
37
+ openPortals: c
38
+ };
28
39
  };
29
40
  export {
30
- E as modalReducer,
31
- h as toast,
32
- j as toastModal,
33
- q as toastReducer,
34
- w as useMetadata,
35
- S as usePortal,
36
- z as useToast,
37
- B as useToastModal
41
+ h as modalReducer,
42
+ j as toast,
43
+ q as toastModal,
44
+ z as toastReducer,
45
+ y as useMetadata,
46
+ T as usePortal,
47
+ B as useToast,
48
+ D as useToastModal
38
49
  };
@@ -219,6 +219,7 @@ export declare const usePortal: () => {
219
219
  custom: (props: FreeFormProps) => string;
220
220
  getIsOpen: (id: string) => boolean;
221
221
  closePortal: (id: string) => void;
222
+ forceClosePortal: (id: string) => void;
222
223
  closeAllPortals: () => void;
223
224
  openPortals: string[];
224
225
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "boottent-design",
3
3
  "private": false,
4
- "version": "0.1.212",
4
+ "version": "0.1.213",
5
5
  "description": "부트텐트 디자인시스템 라이브러리",
6
6
  "repository": {
7
7
  "type": "git",