@kirby-tools/licensing 0.6.5 → 0.6.6

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.
Files changed (2) hide show
  1. package/dist/license.js +9 -3
  2. package/package.json +1 -1
package/dist/license.js CHANGED
@@ -48,11 +48,17 @@ function useLicense(licenseOptions) {
48
48
  const assertActivationIntegrity = ({ component, licenseStatus }) => {
49
49
  if (unref(licenseStatus) === "active") return;
50
50
  const element = unref(component)?.$el;
51
- if (!element) throw new Error(INTEGRITY_ERROR);
51
+ if (!element) {
52
+ panel.notification.error(INTEGRITY_ERROR);
53
+ return;
54
+ }
52
55
  const style = window.getComputedStyle(element);
53
- if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0" || style.clipPath === "inset(100%)" || style.transform.includes("scale(0")) throw new Error(INTEGRITY_ERROR);
56
+ if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0" || style.clipPath === "inset(100%)" || style.transform.includes("scale(0")) {
57
+ panel.notification.error(INTEGRITY_ERROR);
58
+ return;
59
+ }
54
60
  const rect = element.getBoundingClientRect();
55
- if (rect.width === 0 || rect.height === 0 || rect.right < 0 || rect.bottom < 0 || rect.left > window.innerWidth || rect.top > window.innerHeight) throw new Error(INTEGRITY_ERROR);
61
+ if (rect.width === 0 || rect.height === 0 || rect.right < 0 || rect.bottom < 0 || rect.left > window.innerWidth || rect.top > window.innerHeight) panel.notification.error(INTEGRITY_ERROR);
56
62
  };
57
63
  return {
58
64
  isLocalhost,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirby-tools/licensing",
3
3
  "type": "module",
4
- "version": "0.6.5",
4
+ "version": "0.6.6",
5
5
  "packageManager": "pnpm@10.28.0",
6
6
  "description": "License system for Kirby Tools plugins within the Kirby Panel",
7
7
  "author": "Johann Schopplich <hello@johannschopplich.com>",