nuxt-callapp 1.1.2 → 1.2.0

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "nuxt-callapp",
3
3
  "configKey": "callapp",
4
- "version": "1.1.2"
4
+ "version": "1.2.0"
5
5
  }
package/dist/module.mjs CHANGED
@@ -19,7 +19,10 @@ const module = defineNuxtModule({
19
19
  nuxt.options.runtimeConfig.public.callapp = defu(options, {
20
20
  timeout: 2e3
21
21
  });
22
- addPlugin(resolver.resolve("./runtime/call-app.client"));
22
+ addPlugin({
23
+ src: resolver.resolve("./runtime/call-app"),
24
+ mode: "client"
25
+ });
23
26
  }
24
27
  });
25
28
 
@@ -0,0 +1,10 @@
1
+ import CallApp from 'callapp-lib';
2
+ import type { CallappConfig, CallappOptions } from 'callapp-lib/dist/type/types';
3
+ declare const _default: any;
4
+ export default _default;
5
+ declare module '#app' {
6
+ interface NuxtApp {
7
+ createCallApp(options: CallappOptions): CallApp;
8
+ useCallApp(params: CallappConfig, callback?: () => void): void;
9
+ }
10
+ }
@@ -14,9 +14,14 @@ function useCallApp(params, callback) {
14
14
  }
15
15
  callApp.open(params);
16
16
  }
17
- export default defineNuxtPlugin(() => ({
18
- provide: {
19
- createCallApp,
20
- useCallApp
17
+ export default defineNuxtPlugin({
18
+ name: "callapp-plugin",
19
+ setup() {
20
+ return {
21
+ provide: {
22
+ createCallApp,
23
+ useCallApp
24
+ }
25
+ };
21
26
  }
22
- }));
27
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-callapp",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "A Nuxt module for callapp-lib",
5
5
  "author": {
6
6
  "name": "xjccc",
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;