laif-ds 0.2.87 → 0.2.89

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/dist/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable technical changes to the laif-ds core will be documented in this fil
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [laif-ds@0.2.89]
9
+
10
+ ### 🐛 Fixed
11
+
12
+ - **Button**: Press feedback now drops and squashes the button (1px down, an anisotropic squash that conserves area) instead of uniformly scaling it down, so it reads as compressed material rather than a resized image; also fixed the press animation not running at all for Tailwind v4 consumers, which needs `translate` and `scale` named explicitly in the transition instead of `transform`
13
+ - **Button**: Fixed press feedback animating in contradictory directions and outside its timing budget — the shadow now recedes instead of growing on press (and no longer appears out of nothing on `ghost`/`ghost-*`/`link`), the press/release transition is scoped to the properties that actually change with a snappy 100ms-in/160ms-out curve instead of inheriting a generic 200ms transition, and the button is no longer permanently promoted to its own compositing layer
14
+ - **Button**: Fixed the hover shimmer showing on variants where it read wrong — it's now limited to the `default` variant (previously invisible on light `outline`/`secondary` surfaces and a mismatched highlight on `destructive`), resets instantly instead of re-sweeping backwards on mouse-leave, and is gated to hover-capable, fine-pointer devices so a tap no longer triggers it on touch; press scale and shimmer are both dropped under `prefers-reduced-motion: reduce`
15
+ - **Button**: Fixed the loading spinner sitting off-center on icon-only buttons (`size="icon"`) — the spinner's spacing margins are now only applied when the button has label content
16
+
17
+ ## [laif-ds@0.2.88]
18
+
19
+ ### 🚀 Added
20
+
21
+ - **FilePreviewer**: Image previews now support zooming and panning — zoom in/out/reset buttons, wheel-to-zoom toward the cursor, drag-to-pan when zoomed, and pinch-to-zoom on touch. The overlay toolbar fades out after 2s of pointer inactivity. `PreviewOptions` gained an optional `alt`, falling back to the filename
22
+
8
23
  ## [laif-ds@0.2.87]
9
24
 
10
25
  ### 🔧 Changed
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
3
- import { __require as t } from "../node_modules/eventemitter3/index2.js";
4
- var r = t();
5
- const m = /* @__PURE__ */ e(r);
2
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
3
+ import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
4
+ var t = e();
5
+ const a = /* @__PURE__ */ r(t);
6
6
  export {
7
- m as default
7
+ a as default
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
3
- import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
4
- var t = e();
5
- const a = /* @__PURE__ */ r(t);
2
+ import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
3
+ import { __require as r } from "../node_modules/extend/index.js";
4
+ var t = r();
5
+ const x = /* @__PURE__ */ e(t);
6
6
  export {
7
- a as default
7
+ x as default
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
3
- import { __require as r } from "../node_modules/extend/index.js";
4
- var t = r();
5
- const x = /* @__PURE__ */ e(t);
3
+ import { __require as t } from "../node_modules/eventemitter3/index2.js";
4
+ var r = t();
5
+ const m = /* @__PURE__ */ e(r);
6
6
  export {
7
- x as default
7
+ m as default
8
8
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- var e = { exports: {} };
2
+ var e = {};
3
3
  export {
4
- e as __module
4
+ e as __exports
5
5
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- var e = {};
2
+ var e = { exports: {} };
3
3
  export {
4
- e as __exports
4
+ e as __module
5
5
  };
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-07-28T15:56:34.475Z",
3
+ "generatedAt": "2026-08-06T08:46:23.531Z",
4
4
  "package": {
5
5
  "name": "laif-ds",
6
- "version": "0.2.87"
6
+ "version": "0.2.89"
7
7
  },
8
8
  "summary": {
9
- "scannedFiles": 397,
9
+ "scannedFiles": 398,
10
10
  "deprecatedComponentsCount": 2,
11
11
  "deprecatedComponentsUsedCount": 0,
12
12
  "componentsWithoutExamplesCount": 5,
13
13
  "componentsWithoutPropsTableCount": 30,
14
14
  "repeatedClassPatternsCount": 25,
15
- "lowAiReadinessComponentsCount": 42,
16
- "componentsWithoutAccessibilityCoverageCount": 46,
15
+ "lowAiReadinessComponentsCount": 41,
16
+ "componentsWithoutAccessibilityCoverageCount": 45,
17
17
  "componentsWithWeakStateCoverageCount": 72,
18
- "averageAiReadinessScore": 55.38
18
+ "averageAiReadinessScore": 55.54
19
19
  },
20
20
  "deprecatedUsage": [],
21
21
  "documentationGaps": {
@@ -74,7 +74,6 @@
74
74
  "CopyButton",
75
75
  "DataCrossTable",
76
76
  "DropdownMenu",
77
- "FilePreviewer",
78
77
  "GanttChart",
79
78
  "HoverCard",
80
79
  "Icon",
@@ -323,10 +322,6 @@
323
322
  "name": "Toggle",
324
323
  "score": 40
325
324
  },
326
- {
327
- "name": "FilePreviewer",
328
- "score": 45
329
- },
330
325
  {
331
326
  "name": "GanttChart",
332
327
  "score": 45
@@ -480,6 +475,19 @@
480
475
  "src/components/stories/tabs.stories.tsx"
481
476
  ]
482
477
  },
478
+ {
479
+ "className": "text-d-muted-foreground text-xs",
480
+ "occurrences": 8,
481
+ "files": [
482
+ "src/components/editor/plugins/mention-plugin.tsx",
483
+ "src/components/stories/app-card.stories.tsx",
484
+ "src/components/stories/button.stories.tsx",
485
+ "src/components/stories/input.stories.tsx",
486
+ "src/components/ui/tables/data-cross-table/cell-editor-dialog.tsx",
487
+ "src/components/ui/tables/data-cross-table/data-cross-table.tsx",
488
+ "src/components/ui/tables/data-cross-table/editable-input.tsx"
489
+ ]
490
+ },
483
491
  {
484
492
  "className": "flex flex-col items-center gap-4",
485
493
  "occurrences": 8,
@@ -550,18 +558,6 @@
550
558
  "src/components/stories/spinner.stories.tsx"
551
559
  ]
552
560
  },
553
- {
554
- "className": "text-d-muted-foreground text-xs",
555
- "occurrences": 6,
556
- "files": [
557
- "src/components/editor/plugins/mention-plugin.tsx",
558
- "src/components/stories/app-card.stories.tsx",
559
- "src/components/stories/input.stories.tsx",
560
- "src/components/ui/tables/data-cross-table/cell-editor-dialog.tsx",
561
- "src/components/ui/tables/data-cross-table/data-cross-table.tsx",
562
- "src/components/ui/tables/data-cross-table/editable-input.tsx"
563
- ]
564
- },
565
561
  {
566
562
  "className": "flex items-center gap-1 font-normal",
567
563
  "occurrences": 6,
@@ -31,6 +31,9 @@ Versatile button with multiple variants and sizes, optional leading/trailing ico
31
31
  - **Icons**: Icon sizes adapt to the button size (`sm`, `default`, `lg`, `icon`).
32
32
  - **As Child**: Use `asChild` to render the button as a link or custom element while keeping button styles.
33
33
  - **Accessibility**: Keyboard-focus ring and proper semantics are included.
34
+ - **Press feedback**: On `:active` the button moves down `1px` and squashes against its base — `scaleY(0.98)` paid back as `scaleX(1.02)`, so the area is conserved and it reads as compressed material rather than a resized image — while its shadow drops, because it is pushed down onto the surface rather than lifted off it. The squash is anchored with `transform-origin: bottom`, whose x stays at 50% so the horizontal spread is symmetric. It is intentionally shallow: the scale is anisotropic, so it distorts the label's aspect ratio too, and much past 2% that becomes visible. The press snaps in over `100ms` and eases back over `160ms`; the asymmetry is deliberate, symmetric press/release feels mushy. Easing is `cubic-bezier(0.23, 1, 0.32, 1)`. Fires on pointer press and on keyboard `Space`/`Enter`. Note that `scale` is a paint-time transform: the widening never shifts adjacent layout.
35
+ - **Hover shimmer**: A light gradient sweeps across the button on hover, `700ms`, **on the `default` (primary) variant only** — on the outline/secondary variants the white gradient is invisible over a light surface, and on `destructive` a white highlight reads as an invitation on a dangerous action. The sweep resets instantly on pointer-leave (both end states are clipped out of view), so a quick hover never produces a second sweep running backwards. It is gated behind `@media (hover: hover) and (pointer: fine)` so a tap on touch does not trigger it.
36
+ - **Reduced motion**: Under `prefers-reduced-motion: reduce` the press scale and the hover shimmer are both removed; the colour transitions stay, so the button still gives feedback.
34
37
 
35
38
  ---
36
39
 
@@ -21,6 +21,7 @@ export type PreviewOptions = {
21
21
  filename?: string;
22
22
  mimeType?: string;
23
23
  title?: React.ReactNode;
24
+ alt?: string; // Alt text for image previews (a11y); falls back to filename
24
25
  readOnly?: boolean; // Enables SecurePdfViewer for PDFs
25
26
  page?: number; // Initial page for PDFs (1-based)
26
27
  };
@@ -35,7 +36,7 @@ export type PreviewOptions = {
35
36
  ## Behavior
36
37
 
37
38
  - **Kind detection**: Determines preview type from `mimeType`, `filename` or `url`.
38
- - **Image**: Responsive `<img>` with contain fit.
39
+ - **Image**: Zoomable preview (`ZoomableImage`) with contain fit. Supports zoom in/out/reset buttons, wheel-to-zoom toward the cursor, drag-to-pan when zoomed, and pinch-to-zoom on touch devices.
39
40
  - **PDF**:
40
41
  - `readOnly=true` uses `SecurePdfViewer` with `page` support.
41
42
  - Otherwise embedded via `<iframe>` (supports `#page=` parameter).
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "schemaVersion": "1.1.0",
3
- "generatedAt": "2026-07-28T15:56:33.991Z",
3
+ "generatedAt": "2026-08-06T08:46:23.047Z",
4
4
  "package": {
5
5
  "name": "laif-ds",
6
- "version": "0.2.87"
6
+ "version": "0.2.89"
7
7
  },
8
8
  "stats": {
9
9
  "documentedComponentCount": 93,
10
10
  "catalogedComponentCount": 92,
11
11
  "missingFromDocsCount": 1,
12
12
  "deprecatedComponentCount": 2,
13
- "averageAiReadinessScore": 55.38,
13
+ "averageAiReadinessScore": 55.54,
14
14
  "highAiReadinessCount": 37,
15
- "lowAiReadinessCount": 42
15
+ "lowAiReadinessCount": 41
16
16
  },
17
17
  "missingFromDocs": [
18
18
  "TruncatedCell"
@@ -1596,11 +1596,12 @@
1596
1596
  },
1597
1597
  "states": {
1598
1598
  "coveredStates": [
1599
+ "hover",
1599
1600
  "focus",
1600
1601
  "disabled",
1601
1602
  "loading"
1602
1603
  ],
1603
- "coveredStateCount": 3
1604
+ "coveredStateCount": 4
1604
1605
  }
1605
1606
  },
1606
1607
  "aiReadiness": {
@@ -3120,7 +3121,7 @@
3120
3121
  "describedPropsCount": 2
3121
3122
  },
3122
3123
  "accessibility": {
3123
- "hasCoverage": false
3124
+ "hasCoverage": true
3124
3125
  },
3125
3126
  "states": {
3126
3127
  "coveredStates": [],
@@ -3128,8 +3129,8 @@
3128
3129
  }
3129
3130
  },
3130
3131
  "aiReadiness": {
3131
- "score": 45,
3132
- "tier": "low"
3132
+ "score": 60,
3133
+ "tier": "medium"
3133
3134
  },
3134
3135
  "typeReferences": []
3135
3136
  },
@@ -6167,5 +6168,5 @@
6167
6168
  ]
6168
6169
  }
6169
6170
  ],
6170
- "checksum": "f2399fb883f49393798314db7867d7de0348288ae1f868f36ae5e1c71c6e4e95"
6171
+ "checksum": "1c104d906f38ef12dbbba087133ff4b937aac854df73a741a83da7eb2f58d3de"
6171
6172
  }
@@ -27,7 +27,18 @@ const e = {
27
27
  },
28
28
  // Common interactive behaviors
29
29
  interaction: {
30
- active: "active:scale-[0.98] active:shadow-sm transform-gpu",
30
+ // Press feedback: the element is pushed down onto the surface and squashes
31
+ // against it, so the shadow must shrink, never grow. Squash-and-stretch —
32
+ // the 2% vertical compression is paid back as 2% horizontal spread
33
+ // (1 / 0.98 = 1.0204), conserving area so it reads as compressed material
34
+ // rather than a resized image. The squash is anchored at the base
35
+ // (`origin-bottom`) — set unconditionally, not under `active:`, or the origin
36
+ // would snap back to centre while the release is still animating and the
37
+ // button would jump; its x is still 50%, so the spread stays symmetric.
38
+ // Press snaps in (100ms) and eases back out (160ms, set by the caller) —
39
+ // symmetric timing reads mushy. Do not deepen much past 2%: the scale is
40
+ // anisotropic, so it distorts the label's aspect ratio too.
41
+ active: "origin-bottom active:translate-y-[1px] active:scale-y-[0.98] active:scale-x-[1.02] active:shadow-none active:duration-[100ms] motion-reduce:active:translate-y-0 motion-reduce:active:scale-y-100 motion-reduce:active:scale-x-100",
31
42
  disabled: "disabled:cursor-not-allowed disabled:opacity-50"
32
43
  },
33
44
  // Input specific
@@ -1,17 +1,24 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
+ import { jsx as t, jsxs as u } from "react/jsx-runtime";
3
3
  import { Root as g } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
4
4
  import { cva as f } from "../../node_modules/class-variance-authority/dist/index.js";
5
5
  import { designTokens as r } from "../design-tokens.js";
6
6
  import { cn as d } from "../../lib/utils.js";
7
- import { Icon as h } from "./icon.js";
8
- const v = f(
7
+ import { Icon as v } from "./icon.js";
8
+ const h = f(
9
9
  d(
10
10
  r.text.base,
11
11
  r.radius.default,
12
12
  r.focusRing,
13
13
  r.interaction.active,
14
14
  r.interaction.disabled,
15
+ // `translate` and `scale` must be listed explicitly: Tailwind v4 compiles
16
+ // them to the individual CSS properties of the same name, not to `transform`,
17
+ // so a list naming only `transform` animates neither in the v4 bundle (v3
18
+ // still routes both through `transform`, hence keeping it too).
19
+ "transition-[transform,translate,scale,box-shadow,background-color,border-color,color] duration-[160ms] ease-[cubic-bezier(0.23,1,0.32,1)]",
20
+ // Reduced motion keeps the colour feedback and drops the movement.
21
+ "motion-reduce:transition-[background-color,border-color,color]",
15
22
  "cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap overflow-hidden relative group",
16
23
  "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0"
17
24
  ),
@@ -42,36 +49,36 @@ const v = f(
42
49
  }
43
50
  }
44
51
  );
45
- function N({
52
+ function _({
46
53
  className: a,
47
- variant: o,
54
+ variant: s,
48
55
  size: e,
49
56
  asChild: n = !1,
50
57
  iconLeft: i,
51
58
  iconRight: c,
52
59
  isLoading: m = !1,
53
- ...s
60
+ ...o
54
61
  }) {
55
- const u = n ? g : "button";
62
+ const l = n ? g : "button";
56
63
  return n ? /* @__PURE__ */ t(
57
- u,
64
+ l,
58
65
  {
59
66
  "data-slot": "button",
60
- className: d(v({ variant: o, size: e, className: a })),
61
- ...s
67
+ className: d(h({ variant: s, size: e, className: a })),
68
+ ...o
62
69
  }
63
- ) : /* @__PURE__ */ l(
64
- u,
70
+ ) : /* @__PURE__ */ u(
71
+ l,
65
72
  {
66
73
  "data-slot": "button",
67
- className: d("relative", v({ variant: o, size: e, className: a })),
68
- ...s,
74
+ className: d("relative", h({ variant: s, size: e, className: a })),
75
+ ...o,
69
76
  children: [
70
- o !== "ghost" && o !== "ghost-destructive" && o !== "ghost-accent" && o !== "link" && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-700 ease-out group-hover:translate-x-full" }) }),
71
- m ? /* @__PURE__ */ l(
77
+ (s ?? "default") === "default" && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit] motion-reduce:hidden", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-0 ease-out [@media(hover:hover)_and_(pointer:fine)]:group-hover:translate-x-full [@media(hover:hover)_and_(pointer:fine)]:group-hover:duration-700" }) }),
78
+ m ? /* @__PURE__ */ u(
72
79
  "svg",
73
80
  {
74
- className: "mr-1 -ml-1 animate-spin",
81
+ className: d("animate-spin", o.children && "mr-1 -ml-1"),
75
82
  xmlns: "http://www.w3.org/2000/svg",
76
83
  fill: "none",
77
84
  viewBox: "0 0 24 24",
@@ -100,15 +107,15 @@ function N({
100
107
  ]
101
108
  }
102
109
  ) : i && /* @__PURE__ */ t(
103
- h,
110
+ v,
104
111
  {
105
112
  name: i,
106
113
  size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
107
114
  }
108
115
  ),
109
- s.children,
116
+ o.children,
110
117
  c && /* @__PURE__ */ t(
111
- h,
118
+ v,
112
119
  {
113
120
  name: c,
114
121
  size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
@@ -119,6 +126,6 @@ function N({
119
126
  );
120
127
  }
121
128
  export {
122
- N as Button,
123
- v as buttonVariants
129
+ _ as Button,
130
+ h as buttonVariants
124
131
  };
@@ -1,77 +1,73 @@
1
1
  "use client";
2
2
  import { jsxs as h, jsx as r } from "react/jsx-runtime";
3
- import { useMemo as c } from "react";
3
+ import { useMemo as u } from "react";
4
4
  import { createAsk as v } from "../../node_modules/use-ask/dist/index.js";
5
- import { AppDialog as x } from "./app-dialog.js";
6
- import { Icon as g } from "./icon.js";
5
+ import { AppDialog as g } from "./app-dialog.js";
6
+ import { Icon as x } from "./icon.js";
7
7
  import { SecurePdfViewer as N } from "./secure-pdf-viewer.js";
8
- import { guessKind as y, isHttpUrl as P, getOfficeEmbedUrl as b } from "../../lib/file-preview.js";
9
- const [d, A] = v({});
8
+ import { ZoomableImage as y } from "./zoomable-image.js";
9
+ import { guessKind as P, isHttpUrl as b, getOfficeEmbedUrl as A } from "../../lib/file-preview.js";
10
+ const [d, O] = v({});
10
11
  function p(e) {
11
12
  return typeof e == "string" ? { url: e } : e || {};
12
13
  }
13
- async function S(e) {
14
+ async function _(e) {
14
15
  return d.ask(p(e));
15
16
  }
16
- function U(e) {
17
+ function I(e) {
17
18
  return d.safeAsk(p(e));
18
19
  }
19
- const _ = () => {
20
- const [{ payload: e }, { asking: l, ok: i }] = A(), n = e?.url, s = e?.readOnly, t = e?.page, o = c(() => e?.filename ? e?.filename : (e?.url || "").split(/[?#]/)[0].split("/").pop() || "" || "document", [e?.filename, e?.url]), u = c(() => {
20
+ const q = () => {
21
+ const [{ payload: e }, { asking: l, ok: n }] = O(), i = e?.url, a = e?.readOnly, s = e?.page, t = u(() => e?.filename ? e?.filename : (e?.url || "").split(/[?#]/)[0].split("/").pop() || "" || "document", [e?.filename, e?.url]), c = u(() => {
21
22
  if (!e?.url) return null;
22
- const a = new URL(e?.url), m = a.searchParams.get("response-content-type") || a.searchParams.get("content-type"), f = e?.mimeType || m || "";
23
- return y({
23
+ const o = new URL(e?.url), m = o.searchParams.get("response-content-type") || o.searchParams.get("content-type"), f = e?.mimeType || m || "";
24
+ return P({
24
25
  mimeType: f,
25
- filename: o,
26
+ filename: t,
26
27
  url: e?.url
27
28
  });
28
- }, [e?.mimeType, o, e?.url]), w = c(
29
+ }, [e?.mimeType, t, e?.url]), w = u(
29
30
  () => /* @__PURE__ */ h("span", { className: "flex items-center gap-2", children: [
30
- /* @__PURE__ */ r(g, { name: "File", className: "h-4 w-4" }),
31
- e?.title || o
31
+ /* @__PURE__ */ r(x, { name: "File", className: "h-4 w-4" }),
32
+ e?.title || t
32
33
  ] }),
33
- [e?.title, o]
34
+ [e?.title, t]
34
35
  );
35
36
  return /* @__PURE__ */ r(
36
- x,
37
+ g,
37
38
  {
38
39
  open: l,
39
- onOpenChange: (a) => !a && i(),
40
+ onOpenChange: (o) => !o && n(),
40
41
  title: w,
41
42
  size: e?.size ?? "xl",
42
- children: u && n ? /* @__PURE__ */ r(
43
- O,
43
+ children: c && i ? /* @__PURE__ */ r(
44
+ F,
44
45
  {
45
- kind: u,
46
- src: n,
47
- officeUrl: n,
48
- readOnly: s,
49
- page: t
46
+ kind: c,
47
+ src: i,
48
+ officeUrl: i,
49
+ alt: e?.alt ?? t,
50
+ readOnly: a,
51
+ page: s
50
52
  }
51
53
  ) : null
52
54
  }
53
55
  );
54
- }, O = ({
56
+ }, F = ({
55
57
  kind: e,
56
58
  src: l,
57
- officeUrl: i,
58
- readOnly: n = !1,
59
+ officeUrl: n,
60
+ alt: i,
61
+ readOnly: a = !1,
59
62
  page: s = 0
60
63
  }) => {
61
64
  if (!l && e !== "text" && e !== "office")
62
65
  return /* @__PURE__ */ r("div", { className: "text-d-secondary-foreground", children: "Nessuna sorgente disponibile" });
63
66
  switch (e) {
64
67
  case "image":
65
- return /* @__PURE__ */ r("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ r(
66
- "img",
67
- {
68
- src: l,
69
- alt: "preview",
70
- className: "max-h-full w-auto max-w-full object-contain"
71
- }
72
- ) });
68
+ return l ? /* @__PURE__ */ r(y, { src: l, alt: i }) : null;
73
69
  case "pdf": {
74
- if (n && l)
70
+ if (a && l)
75
71
  return /* @__PURE__ */ r(
76
72
  N,
77
73
  {
@@ -104,8 +100,8 @@ const _ = () => {
104
100
  }
105
101
  );
106
102
  case "office": {
107
- if (i && P(i)) {
108
- const t = b(i);
103
+ if (n && b(n)) {
104
+ const t = A(n);
109
105
  return /* @__PURE__ */ r(
110
106
  "iframe",
111
107
  {
@@ -122,7 +118,7 @@ const _ = () => {
122
118
  }
123
119
  };
124
120
  export {
125
- _ as FilePreviewer,
126
- S as previewFileModal,
127
- U as safePreviewFileModal
121
+ q as FilePreviewer,
122
+ _ as previewFileModal,
123
+ I as safePreviewFileModal
128
124
  };