@jasonshimmy/vite-plugin-cer-app 0.27.0 → 0.27.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.
@@ -1 +1 @@
1
- {"version":3,"file":"app-template.d.ts","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,CAqkBtF"}
1
+ {"version":3,"file":"app-template.d.ts","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,CAmlBtF"}
@@ -180,8 +180,13 @@ let _navigationIntent = 0
180
180
  router.push = async (path) => {
181
181
  const navigationIntent = ++_navigationIntent
182
182
  isNavigating.value = true
183
- _activateClientRouteRendering()
184
183
  currentError.value = null
184
+ // A loading component is an explicit request to replace the current tree
185
+ // while the destination is prepared. Without one, retain an initial
186
+ // SSR/SSG tree until both the loader and router commit are complete. This
187
+ // prevents loader-backed catch-all pages from rendering their not-found
188
+ // state during the temporary gap where __CER_DATA__ is intentionally empty.
189
+ if (hasLoading && loadingTag) _activateClientRouteRendering()
185
190
  try {
186
191
  // Clear stale loader data from the previous route before loading the new one.
187
192
  // If the new route has no loader, __CER_DATA__ stays undefined so usePageData()
@@ -193,15 +198,18 @@ router.push = async (path) => {
193
198
  } catch (err) {
194
199
  currentError.value = err instanceof Error ? err.message : String(err)
195
200
  } finally {
196
- if (navigationIntent === _navigationIntent) isNavigating.value = false
201
+ if (navigationIntent === _navigationIntent) {
202
+ _activateClientRouteRendering()
203
+ isNavigating.value = false
204
+ }
197
205
  }
198
206
  }
199
207
 
200
208
  router.replace = async (path) => {
201
209
  const navigationIntent = ++_navigationIntent
202
210
  isNavigating.value = true
203
- _activateClientRouteRendering()
204
211
  currentError.value = null
212
+ if (hasLoading && loadingTag) _activateClientRouteRendering()
205
213
  try {
206
214
  // Clear stale loader data from the previous route before loading the new one.
207
215
  delete (globalThis).__CER_DATA__
@@ -211,7 +219,10 @@ router.replace = async (path) => {
211
219
  } catch (err) {
212
220
  currentError.value = err instanceof Error ? err.message : String(err)
213
221
  } finally {
214
- if (navigationIntent === _navigationIntent) isNavigating.value = false
222
+ if (navigationIntent === _navigationIntent) {
223
+ _activateClientRouteRendering()
224
+ isNavigating.value = false
225
+ }
215
226
  }
216
227
  }
217
228
 
@@ -232,8 +243,8 @@ window.addEventListener('popstate', () => {
232
243
 
233
244
  const navigationIntent = ++_navigationIntent
234
245
  isNavigating.value = true
235
- _activateClientRouteRendering()
236
246
  currentError.value = null
247
+ if (hasLoading && loadingTag) _activateClientRouteRendering()
237
248
 
238
249
  void (async () => {
239
250
  try {
@@ -244,7 +255,10 @@ window.addEventListener('popstate', () => {
244
255
  currentError.value = err instanceof Error ? err.message : String(err)
245
256
  }
246
257
  } finally {
247
- if (navigationIntent === _navigationIntent) isNavigating.value = false
258
+ if (navigationIntent === _navigationIntent) {
259
+ _activateClientRouteRendering()
260
+ isNavigating.value = false
261
+ }
248
262
  }
249
263
  })()
250
264
  })
@@ -1 +1 @@
1
- {"version":3,"file":"app-template.js","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,gBAAmC,EAAE;IAC5E,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;SACnD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,WAAW,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;SACvF,IAAI,CAAC,IAAI,CAAC,CAAA;IACb,OAAO;;;;EAIP,kBAAkB,GAAG,kBAAkB,CAAC,C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C,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0kBpD,CAAA;AACD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jasonshimmy/vite-plugin-cer-app",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "Nuxt-style meta-framework for @jasonshimmy/custom-elements-runtime",
5
5
  "type": "module",
6
6
  "keywords": [