@myissue/vue-website-page-builder 3.0.32 → 3.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myissue/vue-website-page-builder",
3
- "version": "v3.0.32",
3
+ "version": "v3.0.33",
4
4
  "description": "🚧 DEVELOPMENT VERSION - Vue.js page builder component with drag & drop functionality. Not ready for production use.",
5
5
  "type": "module",
6
6
  "main": "./dist/vue-website-page-builder.umd.cjs",
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
- import { ref, computed, onMounted, inject } from 'vue'
2
+ import { computed } from 'vue'
3
+ import { usePageBuilderStateStore } from '@/stores/page-builder-state'
3
4
 
4
- // Get consolidated store from parent PageBuilder component
5
- const pageBuilderStateStore = inject('pageBuilderStateStore')
5
+ const pageBuilderStateStore = usePageBuilderStateStore(internalPinia)
6
6
 
7
7
  const getCurrentImage = computed(() => {
8
8
  return pageBuilderStateStore.getCurrentImage
@@ -23,6 +23,7 @@ defineProps({
23
23
  },
24
24
  })
25
25
 
26
+ const pageBuilderStateStore = usePageBuilderStateStore(internalPinia)
26
27
  const emit = defineEmits(['firstPageBuilderPreviewModalButton'])
27
28
 
28
29
  // first button function
@@ -38,8 +39,6 @@ const handleEscapeKey = function () {
38
39
  firstButton()
39
40
  }
40
41
 
41
- const pageBuilderStateStore = usePageBuilderStateStore(internalPinia)
42
-
43
42
  const getPageBuilderLogo = computed(() => {
44
43
  return pageBuilderStateStore.getPageBuilderLogo
45
44
  })
@@ -4,20 +4,21 @@ import components from '../../utils/html-elements/component'
4
4
  import PageBuilderClass from '../../composables/PageBuilderClass'
5
5
  import { usePageBuilderModal } from '../../composables/usePageBuilderModal'
6
6
  import { generateComponentPreview } from '../../utils/componentPreviews'
7
- import type { ComponentObject, PageBuilderStateStore } from '../../types'
7
+ import type { ComponentObject } from '../../types'
8
+ import { usePageBuilderStateStore } from '../../stores/page-builder-state'
9
+ import type { Pinia } from 'pinia'
8
10
 
9
- import { inject, ref } from 'vue'
11
+ import { inject } from 'vue'
10
12
 
11
- // Get stores from parent PageBuilder component
12
- const pageBuilderStateStore = inject<PageBuilderStateStore>('pageBuilderStateStore')
13
+ // Get store from parent PageBuilder component
14
+ const internalPinia = inject('internalPinia') as Pinia
13
15
 
14
16
  // Get modal close function
15
17
  const { closeAddComponentModal } = usePageBuilderModal()
16
18
 
17
- const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore!)
19
+ const pageBuilderStateStore = usePageBuilderStateStore(internalPinia)
18
20
 
19
- // Track image loading states
20
- const imageLoadingStates = ref<Record<string, boolean>>({})
21
+ const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
21
22
 
22
23
  // Super simple component addition with professional modal closing!
23
24
  const handleDropComponent = function (componentObject: ComponentObject) {
@@ -400,7 +400,7 @@ onMounted(async () => {
400
400
  >
401
401
  <div class="flex items-center justify-center gap-2">
402
402
  <span class="lg:block hidden">
403
- <div>Add new Elements</div>
403
+ <div>Add new Components</div>
404
404
  </span>
405
405
  <span
406
406
  class="h-10 w-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white focus-visible:ring-0"
@@ -482,7 +482,7 @@ onMounted(async () => {
482
482
  >
483
483
  <div class="flex items-center justify-center gap-2 font-medium cursor-pointer">
484
484
  <span class="lg:block hidden">
485
- <div>Add new Elements</div>
485
+ <div>Add new Components</div>
486
486
  </span>
487
487
  </div>
488
488
 
@@ -492,7 +492,7 @@ onMounted(async () => {
492
492
  class="myPrimaryButton flex items-center gap-2 justify-center"
493
493
  >
494
494
  <span class="myMediumIcon material-symbols-outlined"> interests </span>
495
- Add new Elements
495
+ Add new Components
496
496
  </button>
497
497
  </div>
498
498
  </div>
@@ -92,7 +92,7 @@ const componentHelpers: ComponentHelper[] = [
92
92
  title: 'Link',
93
93
  icon: `
94
94
  <span class="material-symbols-outlined">
95
- horizontal_rule
95
+ link
96
96
  </span>
97
97
  `,
98
98
  },