diff --git a/.github/workflows/build.libs-ui.yml b/.github/workflows/build.libs-ui.yml new file mode 100644 index 0000000000..7410cb17ea --- /dev/null +++ b/.github/workflows/build.libs-ui.yml @@ -0,0 +1,24 @@ +name: Build libs/ui package + +on: + push: + branches: [ main, beta, production, nuxt ] + paths: + - 'libs/ui/**' + pull_request: + branches: [ main, beta, production, nuxt ] + paths: + - 'libs/ui/**' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + uses: ./.github/actions/pnpm-install + - run: cd libs/ui && pnpm histoire build diff --git a/libs/ui/__mocks__/model-viewer.js b/libs/ui/__mocks__/model-viewer.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libs/ui/histoire.config.ts b/libs/ui/histoire.config.ts index ac4f1184f7..4db840c4d4 100644 --- a/libs/ui/histoire.config.ts +++ b/libs/ui/histoire.config.ts @@ -1,7 +1,6 @@ import { defineConfig } from 'histoire' import { HstVue } from '@histoire/plugin-vue' import vue from '@vitejs/plugin-vue' -// import vue from 'vue' import { resolve } from 'path' export default defineConfig({ @@ -14,6 +13,7 @@ export default defineConfig({ alias: { '@': resolve(__dirname, '../../'), '~': resolve(__dirname, '../../'), + '@google/model-viewer': './__mocks__/model-viewer.js', }, }, }, diff --git a/libs/ui/package.json b/libs/ui/package.json index e2c6025501..82f0f1fbe1 100644 --- a/libs/ui/package.json +++ b/libs/ui/package.json @@ -19,9 +19,10 @@ "vite": "^4.5.0" }, "dependencies": { - "@google/model-viewer": "^1.12.1", + "@google/model-viewer": "^3.3.0", "@vueuse/core": "^9.13.0", "bulma": "0.9.4", + "three": "^0.157.0", "vue": "^3.3.6", "vue-audio-visual": "2.5.0" } diff --git a/libs/ui/src/components/MediaItem/type/ModelMedia.vue b/libs/ui/src/components/MediaItem/type/ModelMedia.vue index 15d28d4a36..9118935af3 100644 --- a/libs/ui/src/components/MediaItem/type/ModelMedia.vue +++ b/libs/ui/src/components/MediaItem/type/ModelMedia.vue @@ -16,6 +16,7 @@