bootstrap-vue-next
Version:
BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.
1 lines • 1.42 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../src/composables/usePopoverController/index.ts"],"sourcesContent":["import {inject, ref} from 'vue'\nimport {popoverPluginKey} from '../../utils/keys'\nimport type {PromiseWithPopover} from '../../types'\n\nexport const usePopoverController = () => {\n const noopPromise = () => {\n // eslint-disable-next-line no-console\n console.warn(\n 'usePopoverController() was called outside of the setup() function! or the plugin is not provided.'\n )\n return Promise.resolve(null) as unknown as PromiseWithPopover\n }\n const popoverControllerPlugin = inject(popoverPluginKey, {\n popovers: ref(new Map()),\n popover: noopPromise,\n tooltip: noopPromise,\n _isOrchestratorInstalled: ref(false),\n })\n if (popoverControllerPlugin.popover === noopPromise) {\n throw new Error(\n 'usePopoverController() was called outside of the setup() function! or the plugin is not provided.'\n )\n }\n return {\n ...popoverControllerPlugin,\n }\n}\n"],"names":[],"mappings":";;AAIO,MAAM,uBAAuB,MAAM;AACxC,QAAM,cAAc,MAAM;AAEhB,YAAA;AAAA,MACN;AAAA,IACF;AACO,WAAA,QAAQ,QAAQ,IAAI;AAAA,EAC7B;AACM,QAAA,0BAA0B,OAAO,kBAAkB;AAAA,IACvD,UAAU,IAAQ,oBAAA,KAAK;AAAA,IACvB,SAAS;AAAA,IACT,SAAS;AAAA,IACT,0BAA0B,IAAI,KAAK;AAAA,EAAA,CACpC;AACG,MAAA,wBAAwB,YAAY,aAAa;AACnD,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EAAA;AAEK,SAAA;AAAA,IACL,GAAG;AAAA,EACL;AACF;"}