index.d.ts 1.2 KB

1234567891011121314151617181920212223
  1. import type { InjectionKey, Ref } from 'vue';
  2. export declare const defaultNamespace = "el";
  3. export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
  4. export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => import("vue").ComputedRef<string>;
  5. export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
  6. namespace: import("vue").ComputedRef<string>;
  7. b: (blockSuffix?: string) => string;
  8. e: (element?: string) => string;
  9. m: (modifier?: string) => string;
  10. be: (blockSuffix?: string, element?: string) => string;
  11. em: (element?: string, modifier?: string) => string;
  12. bm: (blockSuffix?: string, modifier?: string) => string;
  13. bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
  14. is: {
  15. (name: string, state: boolean | undefined): string;
  16. (name: string): string;
  17. };
  18. cssVar: (object: Record<string, string>) => Record<string, string>;
  19. cssVarName: (name: string) => string;
  20. cssVarBlock: (object: Record<string, string>) => Record<string, string>;
  21. cssVarBlockName: (name: string) => string;
  22. };
  23. export type UseNamespaceReturn = ReturnType<typeof useNamespace>;