@myissue/vue-website-page-builder 3.1.0 → 3.1.1

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.1.0",
3
+ "version": "v3.1.1",
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",
@@ -16,6 +16,7 @@ const pageBuilderClass = new PageBuilderClass(pageBuilderStateStore)
16
16
  const getElement = computed(() => {
17
17
  return pageBuilderStateStore.getElement
18
18
  })
19
+
19
20
  const getShowModalTipTap = computed(() => {
20
21
  const result = pageBuilderStateStore.getShowModalTipTap
21
22
 
@@ -330,7 +331,7 @@ const handleModalIframeSrc = function () {
330
331
  <template
331
332
  v-if="
332
333
  getElement &&
333
- Object.keys(getElement).length !== 0 &&
334
+ getElement.nodeType === 1 &&
334
335
  !getBasePrimaryImage &&
335
336
  !pageBuilderClass.ElOrFirstChildIsIframe()
336
337
  "
@@ -99,7 +99,6 @@ const updateCurrentTab = function (tab) {
99
99
  </div>
100
100
  <div class="px-4 pb-8 pt-4 text-white text-xs break-all">
101
101
  <div v-if="current === 'element'">
102
- <p>eeeer: {{ getElement }}</p>
103
102
  <div v-if="!getComponent">
104
103
  <p class="pb-2">
105
104
  {{ getComponent === null ? 'NULL' : typeof getComponent }}
@@ -107,7 +106,7 @@ const updateCurrentTab = function (tab) {
107
106
  </div>
108
107
  <div v-if="getElement">
109
108
  <div class="flex flex-col gap-4 border-b border-white mb-4 pb-4">
110
- <p>Selected element outerHTML:</p>
109
+ <p>Selected HTML:</p>
111
110
  <p class="whitespace-pre-line leading-5">
112
111
  {{ getElement?.outerHTML }}
113
112
  </p>
@@ -132,16 +131,6 @@ const updateCurrentTab = function (tab) {
132
131
  }}
133
132
  </p>
134
133
  </div>
135
- <div class="flex flex-col gap-2 mt-4">
136
- <p>Selected element style:</p>
137
- <p class="whitespace-pre-line leading-5">
138
- {{
139
- getElement?.style
140
- ? JSON.stringify(getElement?.style)
141
- : typeof getElement?.style
142
- }}
143
- </p>
144
- </div>
145
134
  </div>
146
135
  </div>
147
136
  <div v-if="current === 'component'">
@@ -486,26 +486,28 @@ export const usePageBuilderStateStore = defineStore('pageBuilderState', {
486
486
  this.textColor = payload
487
487
  },
488
488
  setElement(payload: HTMLElement | null): void {
489
- this.element = {} as HTMLElement
489
+ // Force reactivity by setting to null first, then the actual value
490
+ this.element = null
490
491
  nextTick(() => {
491
492
  this.element = payload
492
493
  })
493
494
  },
494
495
  setComponent(payload: ComponentObject | null): void {
495
- console.log('setComponent called:', payload)
496
496
  if (!payload) {
497
497
  this.element = null
498
498
  this.component = null
499
499
  return
500
500
  }
501
- this.component = {} as ComponentObject
501
+ // Force reactivity by setting to null first, then the actual value
502
+ this.component = null
502
503
  nextTick(() => {
503
504
  this.component = payload
504
505
  })
505
506
  },
506
507
 
507
508
  setComponents(payload: ComponentObject[] | null): void {
508
- this.components = {} as ComponentObject[]
509
+ // Force reactivity by setting to empty array first, then the actual value
510
+ this.components = []
509
511
  nextTick(() => {
510
512
  this.components = payload || []
511
513
  })