@paroicms/tiny-modal 0.7.5 → 0.7.7

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.
@@ -1,5 +1,5 @@
1
1
  @charset "UTF-8";
2
- .TinyModal {
2
+ .TinyModal:modal {
3
3
  background: transparent;
4
4
  border: none;
5
5
  display: flex;
@@ -91,10 +91,12 @@ function loadCssFromModuleUrl() {
91
91
  if (!moduleUrl)
92
92
  throw new Error("import.meta.url not available");
93
93
  // Derive CSS URL from the module URL by extracting the package root
94
- // CDNs like esm.sh may transform JS paths (e.g., add /es2022/), but CSS stays in /dist/
95
- // e.g., https://esm.sh/@paroicms/tiny-modal@0.7.3/es2022/tiny-modal.mjs
96
- // -> https://esm.sh/@paroicms/tiny-modal@0.7.3/dist/tiny-modal.css
97
- const packageRootUrl = moduleUrl.replace(/\/(?:es\d{4}|esnext|deno|denonext|node|dist)\/.*$/, "");
94
+ // CDNs like cdn.jsdelivr.net may transform JS paths (e.g., add /+esm, /es2022/), but CSS stays in /dist/
95
+ // e.g., https://cdn.jsdelivr.net/npm/@paroicms/tiny-modal@0.0.0/+esm
96
+ // -> https://cdn.jsdelivr.net/npm/@paroicms/tiny-modal@0.0.0/dist/tiny-modal.css
97
+ const packageRootUrl = moduleUrl
98
+ .replace(/\/(?:\+esm|es\d{4}|esnext|deno|denonext|node|dist)\/.*$/, "")
99
+ .replace(/\/\+esm$/, "");
98
100
  const cssUrl = `${packageRootUrl}/dist/tiny-modal.css`;
99
101
  // Check if CSS is already loaded
100
102
  if (document.querySelector(`link[href="${cssUrl}"]`)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/tiny-modal",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "Tiny modal library for creating modal dialogs",
5
5
  "author": "Paroi Team",
6
6
  "repository": {