Browse Source

feat: export utility functions (#315)

* feat: exported normalizeColor

* chore: added normalizeVectorFlexibleParam to the module exports

---------

Co-authored-by: Tino Koch <tinoooo@users.noreply.github.com>
Tino Koch 1 year ago
parent
commit
7580c77482
3 changed files with 8 additions and 2 deletions
  1. 1 1
      playground/.eslintrc-auto-import.json
  2. 3 1
      playground/components.d.ts
  3. 4 0
      src/index.ts

+ 1 - 1
playground/.eslintrc-auto-import.json

@@ -60,4 +60,4 @@
     "watchSyncEffect": true,
     "toValue": true
   }
-}
+}

+ 3 - 1
playground/components.d.ts

@@ -3,9 +3,11 @@
 // @ts-nocheck
 // Generated by unplugin-vue-components
 // Read more: https://github.com/vuejs/core/pull/3399
+import '@vue/runtime-core'
+
 export {}
 
-declare module 'vue' {
+declare module '@vue/runtime-core' {
   export interface GlobalComponents {
     AnimatedModel: typeof import('./src/components/AnimatedModel.vue')['default']
     Cameras: typeof import('./src/components/Cameras.vue')['default']

+ 4 - 0
src/index.ts

@@ -5,6 +5,8 @@ export * from './core/catalogue'
 export * from './components'
 export * from './types'
 
+import { normalizeColor, normalizeVectorFlexibleParam } from './utils/normalize'
+
 export interface TresOptions {
   extends?: Record<string, unknown>
 }
@@ -21,3 +23,5 @@ const plugin: TresPlugin = {
 }
 
 export default plugin
+
+export { normalizeColor, normalizeVectorFlexibleParam }