valaxy 0.8.1 → 0.9.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.
@@ -1,2 +1,3 @@
1
1
  export * from './twikoo'
2
- export * from './waline'
2
+ // import on demand
3
+ // export * from './waline'
package/client/config.ts CHANGED
@@ -63,6 +63,17 @@ export function useConfig<ThemeConfig = any>() {
63
63
  return config!
64
64
  }
65
65
 
66
+ /**
67
+ * You can use like this: import { useThemeConfig } from 'valaxy-theme-xxx'
68
+ * if you want to: import { useThemeConfig } from 'valaxy'
69
+ * you need pass themeConfig by yourself
70
+ * @returns
71
+ */
72
+ export function useThemeConfig<T = Record<string, any>>() {
73
+ const config = useConfig<T>()
74
+ return computed(() => config!.value.themeConfig)
75
+ }
76
+
66
77
  export interface ValaxyData<T = any> {
67
78
  page: Ref<PageData>
68
79
  theme: Ref<T>