@kirby-tools/licensing 0.1.11 → 0.1.12

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.d.mts CHANGED
@@ -1,5 +1,8 @@
1
- import { Ref } from 'vue';
1
+ import { Ref, ComponentPublicInstance } from 'vue';
2
2
 
3
+ interface License {
4
+ [key: string]: string;
5
+ }
3
6
  interface LicenseOptions {
4
7
  label: string;
5
8
  apiNamespace: string;
@@ -10,8 +13,8 @@ interface LicenseModalResult {
10
13
  declare function useLicense({ label, apiNamespace, }: LicenseOptions): {
11
14
  isLocalhost: boolean;
12
15
  assertActivationIntegrity: ({ templateRef, license }: {
13
- templateRef: Ref<HTMLElement | null | undefined>;
14
- license: boolean | string;
16
+ templateRef: Ref<ComponentPublicInstance | null | undefined>;
17
+ license: boolean | string | License;
15
18
  }) => Promise<boolean>;
16
19
  openLicenseModal: () => Promise<LicenseModalResult>;
17
20
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
- import { Ref } from 'vue';
1
+ import { Ref, ComponentPublicInstance } from 'vue';
2
2
 
3
+ interface License {
4
+ [key: string]: string;
5
+ }
3
6
  interface LicenseOptions {
4
7
  label: string;
5
8
  apiNamespace: string;
@@ -10,8 +13,8 @@ interface LicenseModalResult {
10
13
  declare function useLicense({ label, apiNamespace, }: LicenseOptions): {
11
14
  isLocalhost: boolean;
12
15
  assertActivationIntegrity: ({ templateRef, license }: {
13
- templateRef: Ref<HTMLElement | null | undefined>;
14
- license: boolean | string;
16
+ templateRef: Ref<ComponentPublicInstance | null | undefined>;
17
+ license: boolean | string | License;
15
18
  }) => Promise<boolean>;
16
19
  openLicenseModal: () => Promise<LicenseModalResult>;
17
20
  };
package/dist/index.mjs CHANGED
@@ -128,7 +128,7 @@ function useLicense({
128
128
  }
129
129
  await nextTick();
130
130
  if (!templateRef.value) {
131
- panel.notification.error("No license key found, but licensing action buttons are missing");
131
+ panel.notification.error("Are you trying to hide the activation buttons? Please buy a license.");
132
132
  return false;
133
133
  }
134
134
  return true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirby-tools/licensing",
3
3
  "type": "module",
4
- "version": "0.1.11",
4
+ "version": "0.1.12",
5
5
  "packageManager": "pnpm@9.4.0",
6
6
  "description": "Shared tooling for licensing in the Panel",
7
7
  "author": "Johann Schopplich <hello@johannschopplich.com>",