@myissue/vue-website-page-builder
Version:
Vue 3 page builder component with drag & drop functionality.
14 lines (10 loc) • 605 B
text/typescript
import { createPinia } from 'pinia'
import { usePageBuilderStateStore } from './page-builder-state'
import type { PageBuilderStateStore } from '../types'
// Create a shared Pinia instance that will be used across the entire package
export const sharedPageBuilderPinia = createPinia()
// Create and export a shared store instance with proper typing
export const sharedPageBuilderStore: ReturnType<typeof usePageBuilderStateStore> =
usePageBuilderStateStore(sharedPageBuilderPinia)
// Export the store and Pinia instance for external use
export { usePageBuilderStateStore } from './page-builder-state'