From 2eb8dce56ca4cb25bedb2507492c7b7398a6d168 Mon Sep 17 00:00:00 2001 From: Mehmet Date: Thu, 21 Nov 2024 18:05:26 +0300 Subject: [PATCH] fix: build and preview (#71) * fix: build and preview * fix: update configKey for motion module --- .docs/package.json | 2 +- packages/core/package.json | 2 +- .../src/composables/usePrimitiveElement.ts | 12 +----------- packages/core/src/share/context.ts | 2 +- packages/plugins/src/nuxt/index.ts | 2 +- pnpm-lock.yaml | 19 +++++++++---------- 6 files changed, 14 insertions(+), 25 deletions(-) diff --git a/.docs/package.json b/.docs/package.json index dfeed42..bf43cba 100644 --- a/.docs/package.json +++ b/.docs/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@oku-ui/motion": "workspace:^", - "@oku-ui/primitives": "^0.7.3", + "@oku-ui/primitives": "^0.7.5", "@shikijs/vitepress-twoslash": "^1.23.1", "@stackblitz/sdk": "^1.11.0", "@vueuse/core": "^11.2.0", diff --git a/packages/core/package.json b/packages/core/package.json index 009e27b..459ea21 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -90,7 +90,7 @@ "@vue/shared": "^3.4.31" }, "dependencies": { - "@oku-ui/primitives": "^0.7.3", + "@oku-ui/primitives": "^0.7.5", "defu": "^6.1.4", "framer-motion": "^11.11.17", "hey-listen": "^1.0.8", diff --git a/packages/core/src/composables/usePrimitiveElement.ts b/packages/core/src/composables/usePrimitiveElement.ts index 4a8a777..21ec18e 100644 --- a/packages/core/src/composables/usePrimitiveElement.ts +++ b/packages/core/src/composables/usePrimitiveElement.ts @@ -1,17 +1,7 @@ import { computed, ref } from 'vue' import type { ComponentPublicInstance } from 'vue' -// TODO: error handling -// import { getElFromTemplateRef } from '@oku-ui/primitives/shared' - -export function getElFromTemplateRef(nodeRef: any) { - let node: T | undefined = (nodeRef as ComponentPublicInstance)?.$el ?? nodeRef - - if (node && node.nodeType !== 1) - node = undefined - - return node -} +import { getElFromTemplateRef } from '@oku-ui/primitives' export function usePrimitiveElement() { const primitiveElement = ref() diff --git a/packages/core/src/share/context.ts b/packages/core/src/share/context.ts index b3fc2e0..4c88e5f 100644 --- a/packages/core/src/share/context.ts +++ b/packages/core/src/share/context.ts @@ -1,4 +1,4 @@ -import { createContext } from '@oku-ui/primitives/hooks' +import { createContext } from '@oku-ui/primitives' import type { Ref } from 'vue' import { ref } from 'vue' import type { MotionState } from '@/state/motion-state' diff --git a/packages/plugins/src/nuxt/index.ts b/packages/plugins/src/nuxt/index.ts index c551a71..e691436 100644 --- a/packages/plugins/src/nuxt/index.ts +++ b/packages/plugins/src/nuxt/index.ts @@ -10,7 +10,7 @@ export interface ModuleOptions { export default defineNuxtModule({ meta: { name: '@oku-ui/motion', - configKey: 'motion', + configKey: 'okuMotion', compatibility: { nuxt: '>=3.14', }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 62c7fda..44ab143 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,8 +123,8 @@ importers: specifier: workspace:^ version: link:../packages/core '@oku-ui/primitives': - specifier: ^0.7.3 - version: 0.7.3(@vue/shared@3.5.13)(vue@3.5.13(typescript@5.6.3)) + specifier: ^0.7.5 + version: 0.7.5(vue@3.5.13(typescript@5.6.3)) '@shikijs/vitepress-twoslash': specifier: ^1.23.1 version: 1.23.1(@nuxt/kit@3.14.1592(magicast@0.3.5)(rollup@4.27.3))(typescript@5.6.3) @@ -199,8 +199,8 @@ importers: packages/core: dependencies: '@oku-ui/primitives': - specifier: ^0.7.3 - version: 0.7.3(@vue/shared@3.5.13)(vue@3.5.13(typescript@5.6.3)) + specifier: ^0.7.5 + version: 0.7.5(vue@3.5.13(typescript@5.6.3)) '@vue/shared': specifier: ^3.4.31 version: 3.5.13 @@ -1412,10 +1412,10 @@ packages: peerDependencies: vue: ^3.3.4 - '@oku-ui/primitives@0.7.3': - resolution: {integrity: sha512-KF1I1sHql05G38ZKjAgxUH7FNdeMySSGLAtJgLu2MXNDjLUVZYZOfL0lP8dvMOhWeBwA6Jy2uUBmo6HkappIzA==} + '@oku-ui/primitives@0.7.5': + resolution: {integrity: sha512-VE92PAc3L7JfKgLqNgFzzBVT1o5oghdqPXUFsle0sEPg434B59hcHaOj6fskgDSmy49OPl3TrMCh/VgjYmOQXA==} peerDependencies: - '@vue/shared': ^3.4.31 + vue: '>= 3.5.0' '@one-ini/wasm@0.1.1': resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} @@ -9281,16 +9281,15 @@ snapshots: - vti - vue-tsc - '@oku-ui/primitives@0.7.3(@vue/shared@3.5.13)(vue@3.5.13(typescript@5.6.3))': + '@oku-ui/primitives@0.7.5(vue@3.5.13(typescript@5.6.3))': dependencies: '@floating-ui/dom': 1.6.12 '@floating-ui/utils': 0.2.8 '@floating-ui/vue': 1.1.5(vue@3.5.13(typescript@5.6.3)) - '@vue/shared': 3.5.13 aria-hidden: 1.2.4 + vue: 3.5.13(typescript@5.6.3) transitivePeerDependencies: - '@vue/composition-api' - - vue '@one-ini/wasm@0.1.1': {}