index.d.ts 1.3 KB

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