Files
speckle-server/packages/frontend-2/components/viewer/StateSetup.vue
T
Kristaps Fabians Geikins b4a8518aaf feat(fe2): presentation route viewer support (#5473)
* injectable projectId/resourceIdString

* WIP presentation viewer wrapper

* WIP new viewer core

* loading bar styling fix

* resize fix

* presentation state

* minor cleanup

* working view load

* some optimization

* minor adjustment

* resourceIdString fix

* viewer debug flag
2025-09-17 15:00:44 +03:00

27 lines
738 B
Vue

<template>
<div class="viewer-state-setup">
<ViewerStatePostSetup><slot /></ViewerStatePostSetup>
</div>
</template>
<script setup lang="ts">
import {
useSetupViewer,
type UseSetupViewerParams
} from '~/lib/viewer/composables/setup'
import type { InjectableViewerState } from '~/lib/viewer/composables/setup/core'
const emit = defineEmits<{
setup: [InjectableViewerState]
}>()
const props = defineProps<{
// Passing in a wrapper object so that the refs don't get unwrapped. We want the full
// AsyncWritableComputed objects here
initParams: UseSetupViewerParams
}>()
// initParams isnt reactive, but the refs inside of it definitely are
const state = useSetupViewer(props.initParams)
emit('setup', state)
</script>