@skyservice-developers/vue-dev-kit 1.4.1 → 1.4.2

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": "@skyservice-developers/vue-dev-kit",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Vue 2 and Vue 3 developer toolkit - components and helpers",
5
5
  "type": "module",
6
6
  "main": "./dist/vue3/vue-dev-kit.cjs",
@@ -174,20 +174,26 @@ if (isInIframe()) {
174
174
 
175
175
  function loadComponentStats(raw) {
176
176
  try {
177
- if (!raw) return
177
+ if (!raw) { console.log('[Header] loadComponentStats: raw is empty'); return }
178
178
  const data = typeof raw === 'string' ? JSON.parse(raw) : raw
179
179
  if (data?.pages) {
180
180
  localStorageItems.value = Object.values(data.pages)
181
+ console.log('[Header] loadComponentStats: loaded', localStorageItems.value.length, 'items', localStorageItems.value.map(i => i.name))
182
+ } else {
183
+ console.log('[Header] loadComponentStats: no pages in data', data)
181
184
  }
182
- } catch {}
185
+ } catch (e) { console.error('[Header] loadComponentStats error:', e) }
183
186
  }
184
187
 
185
188
  // Load from local localStorage first
189
+ console.log('[Header] localStorage componentStats:', localStorage['componentStats'] ? 'exists' : 'empty')
186
190
  loadComponentStats(localStorage['componentStats'])
187
191
 
188
192
  // If in iframe, request from parent and update
189
193
  if (isInIframe()) {
194
+ console.log('[Header] requesting componentStats from parent...')
190
195
  getParentLocalStorage('componentStats').then((data) => {
196
+ console.log('[Header] componentStats from parent:', data != null ? 'received' : 'null', data)
191
197
  if (data != null) {
192
198
  localStorage.setItem('componentStats', JSON.stringify(data))
193
199
  loadComponentStats(data)
@@ -270,26 +276,37 @@ const findPreviousPage = () => {
270
276
  }
271
277
 
272
278
  const handleBack = async () => {
279
+ console.log('[Header] handleBack called')
280
+ console.log('[Header] backEvent:', !!props.backEvent)
273
281
  if (props.backEvent) return props.backEvent()
274
282
 
283
+ console.log('[Header] trackPageName:', props.trackPageName)
284
+ console.log('[Header] sortedItems:', sortedItems.value.length, 'items', sortedItems.value.map(i => ({ name: i.name, path: i.path?.substring(0, 50) })))
285
+
275
286
  // Navigate to the last visited page that isn't the current one
276
287
  let previousPage = findPreviousPage()
288
+ console.log('[Header] findPreviousPage (cached):', previousPage ? previousPage.name + ' → ' + previousPage.path?.substring(0, 50) : 'NOT FOUND')
277
289
 
278
290
  // If history not loaded yet, try fetching from parent
279
291
  if (!previousPage && isInIframe()) {
292
+ console.log('[Header] no cached history, fetching from parent...')
280
293
  const data = await getParentLocalStorage('componentStats')
294
+ console.log('[Header] fresh componentStats:', data)
281
295
  if (data) {
282
296
  loadComponentStats(data)
283
297
  previousPage = findPreviousPage()
298
+ console.log('[Header] findPreviousPage (fresh):', previousPage ? previousPage.name : 'NOT FOUND')
284
299
  }
285
300
  }
286
301
 
287
302
  if (previousPage) {
303
+ console.log('[Header] → NAVIGATE to', previousPage.path)
288
304
  restoreRocketMode()
289
305
  sendToParent({ type: 'navigate', path: previousPage.path })
290
306
  return
291
307
  }
292
308
 
309
+ console.log('[Header] → EXIT (no previous page found)')
293
310
  restoreRocketMode()
294
311
  sendToParent({ type: 'exit' })
295
312
  }