@pinegrow/vite-plugin 3.0.0-beta.33 → 3.0.0-beta.34
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/dist/vue-plugin.js +12 -0
- package/package.json +1 -1
package/dist/vue-plugin.js
CHANGED
|
@@ -61,6 +61,17 @@ export function usePinegrow() {
|
|
|
61
61
|
return localComponents
|
|
62
62
|
})
|
|
63
63
|
|
|
64
|
+
const appTree = computed(() => {
|
|
65
|
+
const appTreeNodes = Object.values(localComponentToElComputed.value).reduce(
|
|
66
|
+
(acc, localComponent) => [...acc, ...localComponent],
|
|
67
|
+
[]
|
|
68
|
+
)
|
|
69
|
+
const appTreeNodesSorted = appTreeNodes.sort((a, b) =>
|
|
70
|
+
a.el.compareDocumentPosition(b.el) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1
|
|
71
|
+
)
|
|
72
|
+
return appTreeNodesSorted
|
|
73
|
+
})
|
|
74
|
+
|
|
64
75
|
winObj.pinegrow = {
|
|
65
76
|
elCache,
|
|
66
77
|
// // Uncomment these two to test locally
|
|
@@ -69,6 +80,7 @@ export function usePinegrow() {
|
|
|
69
80
|
rootFragmentToPgIdComputed,
|
|
70
81
|
pgIdToElComputed,
|
|
71
82
|
localComponentToElComputed,
|
|
83
|
+
appTree,
|
|
72
84
|
}
|
|
73
85
|
}
|
|
74
86
|
}
|