wave-ui 2.41.0 → 2.42.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-ui",
3
- "version": "2.41.0",
3
+ "version": "2.42.0",
4
4
  "description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- import { reactive } from 'vue'
1
+ import { reactive, inject } from 'vue'
2
2
  import config, { mergeConfig } from './utils/config'
3
3
  import NotificationManager from './utils/notification-manager'
4
4
  import colors from './utils/colors'
@@ -116,6 +116,7 @@ export default class WaveUI {
116
116
 
117
117
  // Make waveui reactive and expose the single instance in Vue.
118
118
  app.config.globalProperties.$waveui = reactive(this)
119
+ app.provide('$waveui', WaveUI.instance)
119
120
  }
120
121
  }
121
122
 
@@ -124,4 +125,7 @@ export default class WaveUI {
124
125
  }
125
126
  }
126
127
 
127
- WaveUI.version = '__VERSION__'
128
+ /**
129
+ * Returns the WaveUI instance. Equivalent to using `$waveui` inside templates.
130
+ */
131
+ export const useWaveUI = () => inject('$waveui')
@@ -4,4 +4,4 @@ import * as components from './components'
4
4
  const install = WaveUI.install
5
5
  WaveUI.install = (app, options = {}) => install.call(WaveUI, app, { components, ...options })
6
6
 
7
- export default WaveUI
7
+ export { default, useWaveUI } from './core'