@antcde/vue-utils 0.1.6 → 0.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.
@@ -2,4 +2,4 @@ export { useAntColorMode, type UseAntColorModeOptions, type UseAntColorModeRetur
2
2
  export { useAntI18n, type UseAntI18nReturn } from './useAntI18n';
3
3
  export { type UseCommsClient, useCommsClient } from './useCommsClient';
4
4
  export { type CommsHostArgs, type UseCommsHost, useCommsHost } from './useCommsHost';
5
- export { type AnyUseApiReturn, type CommsToolbar, useApi, type UseApiReturn, useCommsInjection, useSingleton } from './utils';
5
+ export { type AnyUseApiReturn, type CommsToolbar, signalRef, useApi, type UseApiReturn, useCommsInjection, useSingleton, watchSignal, } from './utils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antcde/vue-utils",
3
3
  "type": "module",
4
- "version": "0.1.6",
4
+ "version": "0.2.0",
5
5
  "description": "Helper to use ANT Comms in Vue 3",
6
6
  "author": "CollaborAll",
7
7
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "rxjs": "^7.8.1",
35
- "@antcde/connect-ts": "0.1.6"
35
+ "@antcde/connect-ts": "0.2.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@vitejs/plugin-vue": "^5.0.3",
@@ -1,32 +0,0 @@
1
- import { ToolbarItem } from '@antcde/connect-ts';
2
- import { UseAsyncStateOptions, UseAsyncStateReturn } from '@vueuse/core';
3
- import { FunctionPlugin, Ref, UnwrapRef } from 'vue';
4
- import { UseCommsClient } from './useCommsClient';
5
-
6
- type RefObject<T> = {
7
- [K in keyof T]: T[K];
8
- };
9
- export declare function unrefObject<T extends object>(obj: RefObject<T>): UnwrapRef<T>;
10
- export interface CommsToolbar {
11
- title: Ref<string | undefined>;
12
- searchEnabled: Ref<boolean>;
13
- search: Ref<string>;
14
- menu: Ref<ToolbarItem[]>;
15
- isLoading: Ref<boolean>;
16
- }
17
- interface UseCommsFactoryResult {
18
- provideComms: FunctionPlugin;
19
- injectComms: () => UseCommsClient;
20
- }
21
- export declare function useCommsInjection(name?: string): UseCommsFactoryResult;
22
- export declare function useSingleton<T extends object>(name: string, factory: () => T, dispose?: (value: T) => void): [provide: FunctionPlugin, inject: () => T];
23
- export declare function useApi<Data, Params extends any[] = [], Shallow extends boolean = true>(promise: Promise<Data> | ((...args: Params) => Promise<Data>), initialState: Data, options?: UseAsyncStateOptions<Shallow, Data>): UseApiReturn<Data, Params, Shallow>;
24
- export interface UseApiReturn<Data, Params extends any[], Shallow extends boolean> extends Omit<UseAsyncStateReturn<Data, Params, Shallow>, 'execute'> {
25
- execute: (...args: Params) => Promise<Data>;
26
- executeDelayed: (delay: number, ...args: Params) => void;
27
- }
28
- /**
29
- * A shorthand that implies all the generics to be any
30
- */
31
- export type AnyUseApiReturn = UseApiReturn<any, any, any>;
32
- export {};