@innertia-solutions/nuxt-theme-spark 0.1.33 → 0.1.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.
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { IconSearch, IconAdjustmentsHorizontal, IconLayoutColumns, IconGripVertical } from '@tabler/icons-vue'
2
+ import { IconSearch, IconAdjustmentsHorizontal, IconLayoutColumns, IconGripVertical, IconBolt, IconReload } from '@tabler/icons-vue'
3
3
 
4
4
  const props = defineProps({
5
5
  endpoint: { type: String, required: true },
@@ -126,6 +126,31 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
126
126
 
127
127
  <slot name="actions" />
128
128
 
129
+ <!-- Reload -->
130
+ <button
131
+ type="button"
132
+ @click="reload()"
133
+ class="py-1.5 px-2.5 inline-flex items-center gap-2 text-sm font-medium rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 text-slate-600 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors"
134
+ title="Recargar"
135
+ >
136
+ <IconReload class="size-4" />
137
+ </button>
138
+
139
+ <!-- Cache badge -->
140
+ <div v-if="tableRef?.isDataFromCache && tableRef?.cached" class="group relative flex items-center">
141
+ <div class="flex items-center gap-x-1.5 py-1.5 px-2.5 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 rounded-lg cursor-help hover:bg-emerald-500/20 transition-colors border border-emerald-200 dark:border-emerald-800">
142
+ <IconBolt class="size-3.5 fill-current" />
143
+ <span class="text-[10px] font-bold uppercase tracking-wider">Instant</span>
144
+ </div>
145
+ <div class="absolute top-full mt-2 right-0 hidden group-hover:block w-48 p-2.5 bg-slate-900 text-white text-[11px] leading-relaxed rounded-xl shadow-2xl z-50">
146
+ <div class="font-bold mb-1 flex items-center gap-x-1.5 text-emerald-400">
147
+ <IconBolt class="size-3" /> Datos en Caché
148
+ </div>
149
+ Cargados desde memoria local. Recarga para sincronizar.
150
+ <div class="absolute bottom-full right-4 mb-[-1px] border-4 border-transparent border-b-slate-900"></div>
151
+ </div>
152
+ </div>
153
+
129
154
  <!-- Column visibility toggle -->
130
155
  <button
131
156
  type="button"
@@ -412,6 +412,8 @@ defineExpose({
412
412
  clearCache,
413
413
  table,
414
414
  setColumnOrder,
415
+ isDataFromCache,
416
+ cached: computed(() => props.cached),
415
417
  })
416
418
  </script>
417
419
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/nuxt-theme-spark",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "Innertia Solutions — Spark theme: backoffice, landing and mobile components and layouts",
5
5
  "keywords": [
6
6
  "nuxt",