@lani.ground/react-image-viewer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -67,12 +67,12 @@ "use strict"; | ||
return undefined; | ||
var $body = document.querySelector('body'); | ||
if (!$body) | ||
return undefined; | ||
if (document.querySelector("#".concat(exports.GROUND_IMAGE_VIEWER_ROOT))) | ||
return undefined; | ||
var $imageViewerRoot = document.createElement('div'); | ||
$imageViewerRoot.setAttribute('id', exports.GROUND_IMAGE_VIEWER_ROOT); | ||
$body.appendChild($imageViewerRoot); | ||
var $imageViewerRoot = document.querySelector("#".concat(exports.GROUND_IMAGE_VIEWER_ROOT)); | ||
if (!$imageViewerRoot) { | ||
$imageViewerRoot = document.createElement('div'); | ||
$imageViewerRoot.setAttribute('id', exports.GROUND_IMAGE_VIEWER_ROOT); | ||
document.body.append($imageViewerRoot); | ||
} | ||
setModalRoot($imageViewerRoot); | ||
return function () { | ||
if (!$imageViewerRoot) | ||
return; | ||
$imageViewerRoot.remove(); | ||
@@ -79,0 +79,0 @@ }; |
@@ -61,12 +61,12 @@ 'use client'; | ||
return undefined; | ||
var $body = document.querySelector('body'); | ||
if (!$body) | ||
return undefined; | ||
if (document.querySelector("#".concat(GROUND_IMAGE_VIEWER_ROOT))) | ||
return undefined; | ||
var $imageViewerRoot = document.createElement('div'); | ||
$imageViewerRoot.setAttribute('id', GROUND_IMAGE_VIEWER_ROOT); | ||
$body.appendChild($imageViewerRoot); | ||
var $imageViewerRoot = document.querySelector("#".concat(GROUND_IMAGE_VIEWER_ROOT)); | ||
if (!$imageViewerRoot) { | ||
$imageViewerRoot = document.createElement('div'); | ||
$imageViewerRoot.setAttribute('id', GROUND_IMAGE_VIEWER_ROOT); | ||
document.body.append($imageViewerRoot); | ||
} | ||
setModalRoot($imageViewerRoot); | ||
return function () { | ||
if (!$imageViewerRoot) | ||
return; | ||
$imageViewerRoot.remove(); | ||
@@ -73,0 +73,0 @@ }; |
{ | ||
"name": "@lani.ground/react-image-viewer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -42,3 +42,3 @@ "keywords": [ | ||
}, | ||
"./css": "./dist/assets/css/react-image-viewer.css" | ||
"./css": "./dist/assets/css/ground-react-image-viewer.css" | ||
}, | ||
@@ -71,20 +71,12 @@ "sideEffects": [ | ||
"devDependencies": { | ||
"@lani.ground/react-outside-click-handler": "^0.2.5", | ||
"@lani.ground/react-outside-click-handler": "^1.0.1", | ||
"@types/node": "^16.18.53", | ||
"@types/react": "^18.2.22", | ||
"@types/react-dom": "^18.2.7", | ||
"@typescript-eslint/eslint-plugin": "^6.7.2", | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"chokidar": "^3.5.3", | ||
"concurrently": "^8.2.2", | ||
"eslint": "^8.49.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"eslint-plugin-react": "^7.33.2", | ||
"prettier": "^3.0.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-scripts": "5.0.1", | ||
"typescript": "^5.2.2" | ||
} | ||
"react-scripts": "5.0.1" | ||
}, | ||
"gitHead": "cf60d8dace1145b5c8cb6d5745e139aa32f9dc3f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44315
8
21
834