@asteby/metacore-runtime-react 29.0.2 → 29.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @asteby/metacore-runtime-react
2
2
 
3
+ ## 29.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 14dcf25: Dashboard: el skeleton/empty del tablero (`DashboardEmptyMockup`) se veía
8
+ apretado y raro en móvil (3 columnas absolutas angostas en un teléfono). En
9
+ `<sm` ahora renderiza un stack vertical de cards a ancho completo; el reflow
10
+ animado de 3 columnas se conserva de `sm` hacia arriba. Toggle por CSS, sin JS.
11
+
3
12
  ## 29.0.2
4
13
 
5
14
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-empty-mockup.d.ts","sourceRoot":"","sources":["../src/dashboard-empty-mockup.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACvB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACZ;AAKD,UAAU,UAAU;IAChB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC;AAID,eAAO,MAAM,cAAc,EAAE,UAAU,EAKtC,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,UAAU,IAAI,CAAA;AAE3B;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAa,GAAG,UAAU,EAAE,CAerF;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,GAAG,SAAa,GAAG,UAAU,EAAE,EAAE,CAElE;AA4HD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBAuBzE"}
1
+ {"version":3,"file":"dashboard-empty-mockup.d.ts","sourceRoot":"","sources":["../src/dashboard-empty-mockup.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACvB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACZ;AAKD,UAAU,UAAU;IAChB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC;AAID,eAAO,MAAM,cAAc,EAAE,UAAU,EAKtC,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,UAAU,IAAI,CAAA;AAE3B;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAa,GAAG,UAAU,EAAE,CAerF;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,GAAG,SAAa,GAAG,UAAU,EAAE,EAAE,CAElE;AA4HD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qBAsCzE"}
@@ -139,8 +139,11 @@ const TILE_KINDS = ['stat', 'chart', 'chart', 'list', 'stat', 'bar'];
139
139
  export function DashboardEmptyMockup({ className }) {
140
140
  useMockupStyles();
141
141
  const layoutA = React.useMemo(() => computeLayoutRects(MOCKUP_LAYOUTS[0]), []);
142
- return (_jsx("div", { "aria-hidden": "true", "data-testid": "dashboard-empty-mockup", className: cn('mc-demock pointer-events-none select-none', className), children: layoutA.map((r, i) => (_jsx("div", { "data-mockup-tile": "tile", className: cn(tileBase, `mc-demock-t${i}`),
143
- // Base position = layout A, so reduced-motion (animation off)
144
- // shows the full static composition.
145
- style: { left: `${r.x}%`, top: `${r.y}%`, width: `${r.w}%`, height: `${r.h}%` }, children: _jsx(TileGlyph, { kind: TILE_KINDS[i] }) }, i))) }));
142
+ return (_jsxs("div", { "aria-hidden": "true", "data-testid": "dashboard-empty-mockup", className: cn('pointer-events-none select-none', className), children: [_jsx("div", { className: "flex h-full flex-col gap-3 sm:hidden", children: MOBILE_TILE_KINDS.map((kind, i) => (_jsx("div", { className: cn(tileBase, 'mc-demock-shimmer relative flex-1'), children: _jsx(TileGlyph, { kind: kind }) }, i))) }), _jsx("div", { className: "mc-demock hidden h-full sm:block", children: layoutA.map((r, i) => (_jsx("div", { "data-mockup-tile": "tile", className: cn(tileBase, `mc-demock-t${i}`),
143
+ // Base position = layout A, so reduced-motion (animation off)
144
+ // shows the full static composition.
145
+ style: { left: `${r.x}%`, top: `${r.y}%`, width: `${r.w}%`, height: `${r.h}%` }, children: _jsx(TileGlyph, { kind: TILE_KINDS[i] }) }, i))) })] }));
146
146
  }
147
+ // En móvil mostramos 3 cards apiladas (stat + chart + list) a ancho completo —
148
+ // suficiente para comunicar "tablero cargando/ vacío" sin apretar 6 tiles.
149
+ const MOBILE_TILE_KINDS = ['stat', 'chart', 'list'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "29.0.2",
3
+ "version": "29.0.3",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -230,20 +230,39 @@ export function DashboardEmptyMockup({ className }: { className?: string }) {
230
230
  <div
231
231
  aria-hidden="true"
232
232
  data-testid="dashboard-empty-mockup"
233
- className={cn('mc-demock pointer-events-none select-none', className)}
233
+ className={cn('pointer-events-none select-none', className)}
234
234
  >
235
- {layoutA.map((r, i) => (
236
- <div
237
- key={i}
238
- data-mockup-tile="tile"
239
- className={cn(tileBase, `mc-demock-t${i}`)}
240
- // Base position = layout A, so reduced-motion (animation off)
241
- // shows the full static composition.
242
- style={{ left: `${r.x}%`, top: `${r.y}%`, width: `${r.w}%`, height: `${r.h}%` }}
243
- >
244
- <TileGlyph kind={TILE_KINDS[i]} />
245
- </div>
246
- ))}
235
+ {/* Móvil (<sm): las 3 columnas absolutas quedan angostas y apretadas
236
+ en un teléfono. Un STACK vertical de cards a ancho completo se lee
237
+ claro. Toggle por CSS (sin JS, SSR-safe): el reflow animado sólo
238
+ aparece de sm hacia arriba, donde hay ancho para las 3 columnas. */}
239
+ <div className="flex h-full flex-col gap-3 sm:hidden">
240
+ {MOBILE_TILE_KINDS.map((kind, i) => (
241
+ <div key={i} className={cn(tileBase, 'mc-demock-shimmer relative flex-1')}>
242
+ <TileGlyph kind={kind} />
243
+ </div>
244
+ ))}
245
+ </div>
246
+
247
+ {/* Tablet/escritorio: el mockup de 3 columnas que reorganiza en bucle. */}
248
+ <div className="mc-demock hidden h-full sm:block">
249
+ {layoutA.map((r, i) => (
250
+ <div
251
+ key={i}
252
+ data-mockup-tile="tile"
253
+ className={cn(tileBase, `mc-demock-t${i}`)}
254
+ // Base position = layout A, so reduced-motion (animation off)
255
+ // shows the full static composition.
256
+ style={{ left: `${r.x}%`, top: `${r.y}%`, width: `${r.w}%`, height: `${r.h}%` }}
257
+ >
258
+ <TileGlyph kind={TILE_KINDS[i]} />
259
+ </div>
260
+ ))}
261
+ </div>
247
262
  </div>
248
263
  )
249
264
  }
265
+
266
+ // En móvil mostramos 3 cards apiladas (stat + chart + list) a ancho completo —
267
+ // suficiente para comunicar "tablero cargando/ vacío" sin apretar 6 tiles.
268
+ const MOBILE_TILE_KINDS: Glyph[] = ['stat', 'chart', 'list']