vuestic-ui
Version:
Vue 3 UI Framework
1 lines • 2.28 kB
Source Map (JSON)
{"version":3,"file":"create-vuestic.mjs","sources":["../../../../../../src/services/vue-plugin/create-vuestic/create-vuestic.ts"],"sourcesContent":["import type { PartialGlobalConfig } from '../../global-config/types'\nimport { defineVuesticPlugin, usePlugin } from '../utils'\nimport { GlobalConfigPlugin, VaDropdownPlugin, VaToastPlugin, VaModalPlugin, ColorConfigPlugin, BreakpointConfigPlugin, CachePlugin } from '../plugins'\nimport * as vuesticComponents from '../components'\nimport type { VuesticComponents } from '../types/components'\nimport { setCurrentApp } from '../../current-app'\nimport { ColorsClassesPlugin } from '../../colors-classes'\n\n// Declare all components globally\ndeclare module 'vue' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface GlobalComponents extends VuesticComponents {}\n}\n\n/**\n * Globally register all vuestic components and plugins\n * @notice using this method will bundle all vuestic components.\n * Use `createVuesticEssential` if you want tree shaking to work.\n */\nexport const createVuestic = defineVuesticPlugin((options: { config?: PartialGlobalConfig } = {}) => ({\n install (app) {\n const { config } = options\n\n setCurrentApp(app)\n\n Object.entries(vuesticComponents).forEach(([name, component]) => {\n app.component(name, component)\n })\n\n // These plugins have dependant plugins, so have to be registered first.\n usePlugin(app, GlobalConfigPlugin(config))\n usePlugin(app, CachePlugin)\n usePlugin(app, ColorConfigPlugin(config))\n usePlugin(app, ColorsClassesPlugin)\n\n usePlugin(app, BreakpointConfigPlugin)\n usePlugin(app, VaDropdownPlugin)\n usePlugin(app, VaToastPlugin)\n usePlugin(app, VaModalPlugin)\n\n setCurrentApp(null)\n },\n}))\n"],"names":[],"mappings":";;;;;;;;;;;;AAmBO,MAAM,gBAAgB,oBAAoB,CAAC,UAA4C,QAAQ;AAAA,EACpG,QAAS,KAAK;AACN,UAAA,EAAE,OAAW,IAAA;AAEnB,kBAAc,GAAG;AAEV,WAAA,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,MAAM,SAAS,MAAM;AAC3D,UAAA,UAAU,MAAM,SAAS;AAAA,IAAA,CAC9B;AAGS,cAAA,KAAK,mBAAmB,MAAM,CAAC;AACzC,cAAU,KAAK,WAAW;AAChB,cAAA,KAAK,kBAAkB,MAAM,CAAC;AACxC,cAAU,KAAK,mBAAmB;AAElC,cAAU,KAAK,sBAAsB;AACrC,cAAU,KAAK,gBAAgB;AAC/B,cAAU,KAAK,aAAa;AAC5B,cAAU,KAAK,aAAa;AAE5B,kBAAc,IAAI;AAAA,EACpB;AACF,EAAE;"}