@koehler8/cms 1.0.0-beta.8 → 1.0.0-beta.9
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 +5 -1
- package/src/components/Home.vue +19 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koehler8/cms",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.9",
|
|
4
4
|
"description": "Vertex CMS — lightweight, config-driven Vue 3 framework with theming, extensions, and SSG support",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -80,5 +80,9 @@
|
|
|
80
80
|
"@vue/test-utils": "^2.4.6",
|
|
81
81
|
"happy-dom": "^20.8.9",
|
|
82
82
|
"vitest": "^4.1.4"
|
|
83
|
+
},
|
|
84
|
+
"engines": {
|
|
85
|
+
"node": ">=20.19.0",
|
|
86
|
+
"npm": "^10.8.0"
|
|
83
87
|
}
|
|
84
88
|
}
|
package/src/components/Home.vue
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script setup>
|
|
38
|
-
import { computed, nextTick, provide, watch } from 'vue';
|
|
38
|
+
import { computed, nextTick, onMounted, provide, ref, watch } from 'vue';
|
|
39
39
|
|
|
40
40
|
import ComingSoonModal from '../components/ComingSoonModal.vue';
|
|
41
41
|
import IntroGate from '../components/IntroGate.vue';
|
|
@@ -106,7 +106,24 @@ provide('pageContent', pageContent);
|
|
|
106
106
|
provide('pageConfig', currentPage);
|
|
107
107
|
provide('currentPageId', computed(() => currentPage.value.id));
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
// Suppress the loading placeholder during the initial hydration tick
|
|
110
|
+
// so SSG-rendered pages don't flash "Loading…" while the client-side
|
|
111
|
+
// syncPage briefly resets componentKeys to []. After the first mount
|
|
112
|
+
// completes, genuine slow loads (real navigation) can still surface
|
|
113
|
+
// the placeholder.
|
|
114
|
+
const isHydrating = ref(true);
|
|
115
|
+
onMounted(() => {
|
|
116
|
+
nextTick().then(() => {
|
|
117
|
+
isHydrating.value = false;
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
const showLoadingIndicator = computed(() =>
|
|
122
|
+
!isHydrating.value &&
|
|
123
|
+
isLoading.value &&
|
|
124
|
+
componentKeys.value.length === 0 &&
|
|
125
|
+
!loadError.value
|
|
126
|
+
);
|
|
110
127
|
const loadErrorMessage = computed(() => loadError.value ? (loadError.value.message || 'Unable to load page content.') : '');
|
|
111
128
|
|
|
112
129
|
watch(componentKeys, async () => {
|