@t007/dialog 0.0.28 → 0.0.30

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/index.css CHANGED
@@ -83,10 +83,11 @@
83
83
  cursor: pointer;
84
84
  filter: brightness(1.15);
85
85
  }
86
- :is(html, body):has(.t007-dialog) {
86
+ html:has(> body > .t007-dialog),
87
+ body:has(> .t007-dialog) {
87
88
  overflow: hidden;
88
89
  }
89
- body:has(.t007-dialog) {
90
+ body:has(> .t007-dialog) {
90
91
  overflow-y: visible;
91
92
  }
92
93
  *:where(:has(> .t007-dialog.t007-dialog-scoped)) {
@@ -44,7 +44,7 @@
44
44
  });
45
45
  }
46
46
 
47
- // ../../../sia-reactor/dist/chunk-EZ4VRGYI.js
47
+ // ../../../sia-reactor/dist/chunk-4PLMBUCP.js
48
48
  var CTX = {
49
49
  /** Flag indicating whether the application is running in development mode. */
50
50
  isDevEnv: "undefined" !== typeof process ? process.env.NODE_ENV !== "production" : true,
@@ -59,7 +59,7 @@
59
59
  var NOOP = () => {
60
60
  };
61
61
 
62
- // ../utils/dist/chunk-Y5YJMRXD.js
62
+ // ../utils/dist/chunk-4O76EZJ4.js
63
63
  var INTERACTIVE_SELECTOR = ":is(button,[href],input:not([type='hidden']),select,textarea,details>summary,[contenteditable='true'],iframe,audio[controls],video[controls],[tabindex]):not([disabled],[tabindex='-1'],[data-focus-guard],[inert],[inert] *)";
64
64
  var isInteractive = (target) => target instanceof HTMLElement && target.matches(INTERACTIVE_SELECTOR);
65
65
  var VIRTUAL_RESOURCE = /* @__PURE__ */ Symbol.for("T007_VIRTUAL_RESOURCE");
@@ -105,15 +105,18 @@
105
105
  function parseCSSTime(time) {
106
106
  return time?.endsWith?.("ms") ? parseFloat(time) : parseFloat(time) * 1e3;
107
107
  }
108
- function isSameURL(src1, src2) {
109
- if (!isStr(src1) || !isStr(src2) || !src1 || !src2) return false;
108
+ function cleanURL(url) {
110
109
  try {
111
- const u1 = new URL(src1, window.location.href), u2 = new URL(src2, window.location.href);
112
- return decodeURIComponent(u1.origin + u1.pathname) === decodeURIComponent(u2.origin + u2.pathname);
110
+ const u = new URL(url, window.location.href);
111
+ return decodeURIComponent(u.origin + u.pathname);
113
112
  } catch {
114
- return src1.replace(/\\/g, "/").split("?")[0].trim() === src2.replace(/\\/g, "/").split("?")[0].trim();
113
+ return url.replace(/\\/g, "/").split("?")[0].trim();
115
114
  }
116
115
  }
116
+ function isSameURL(url1, url2) {
117
+ if (!isStr(url1) || !isStr(url2) || !url1 || !url2) return false;
118
+ return cleanURL(url1) === cleanURL(url2);
119
+ }
117
120
  if ("undefined" !== typeof window) {
118
121
  (window.t007 ??= {}).VIRTUAL_RESOURCE = VIRTUAL_RESOURCE;
119
122
  window.T007_TOAST_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest`;
@@ -124,7 +127,7 @@
124
127
  window.T007_DIALOG_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest/dist/index.min.css`;
125
128
  }
126
129
 
127
- // ../utils/dist/chunk-LBDWVTYF.js
130
+ // ../utils/dist/chunk-QJ72EQCJ.js
128
131
  function initOutsideClick(el, { enabled = false, onOutside = NOOP, outOnClick = true, outOnEscape = true, outOnFocusOut = false, allowBounds = false, allowInputs = false, root = window, scoped = true, capture = true } = NIL) {
129
132
  const stacks = t007._outsiders_stacks ??= /* @__PURE__ */ new WeakMap(), existing = (t007._outsiders ??= /* @__PURE__ */ new WeakMap()).get(el);
130
133
  if (!enabled || existing) return existing ? existing : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t007/dialog",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "description": "A lightweight, pure JS dialog system.",
5
5
  "author": "Oketade Oluwatobiloba <tobioketade007@gmail.com>",
6
6
  "license": "MIT",
@@ -56,7 +56,7 @@
56
56
  "accessible"
57
57
  ],
58
58
  "dependencies": {
59
- "@t007/utils": "^0.0.31"
59
+ "@t007/utils": "^0.0.33"
60
60
  },
61
61
  "devDependencies": {
62
62
  "esbuild-sass-plugin": "^3.7.0"