@medialane/ui 0.201.7 → 0.201.8

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,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "ghost" | "link" | "default" | "destructive" | "outline" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "icon" | "default" | "sm" | "lg" | null | undefined;
6
+ variant?: "default" | "link" | "destructive" | "outline" | "ghost" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "ghost" | "link" | "default" | "destructive" | "outline" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "icon" | "default" | "sm" | "lg" | null | undefined;
6
+ variant?: "default" | "link" | "destructive" | "outline" | "ghost" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -1,10 +1,10 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { FastMintProps } from './types.cjs';
4
4
  import 'starknet';
5
5
  import '@medialane/sdk';
6
6
  import '@medialane/sdk/starknet';
7
7
 
8
- declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
8
+ declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
9
9
 
10
10
  export { FastMint };
@@ -1,10 +1,10 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { FastMintProps } from './types.js';
4
4
  import 'starknet';
5
5
  import '@medialane/sdk';
6
6
  import '@medialane/sdk/starknet';
7
7
 
8
- declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
8
+ declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
9
9
 
10
10
  export { FastMint };
@@ -41,12 +41,12 @@ function PageBackdrop({ image }) {
41
41
  }
42
42
  ) });
43
43
  }
44
- const THUMB = "w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted";
44
+ const FRAME = "w-full sm:w-44 lg:w-56 shrink-0 rounded-2xl overflow-hidden bg-muted";
45
45
  function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }) {
46
46
  const [imgError, setImgError] = (0, import_react.useState)(false);
47
47
  if (loading) {
48
48
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto", children: [
49
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: THUMB }),
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: `${FRAME} aspect-square` }),
50
50
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 w-full space-y-3", children: [
51
51
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-6 w-40" }),
52
52
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-10 w-2/3" }),
@@ -56,7 +56,7 @@ function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = fa
56
56
  }
57
57
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto", children: [
58
58
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageBackdrop, { image }),
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: THUMB, children: image && !imgError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: image, alt: imageAlt, onError: () => setImgError(true), className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FallbackIcon, { className: "h-1/3 w-1/3 text-muted-foreground/40" }) }) }),
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: FRAME, children: image && !imgError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: image, alt: imageAlt, onError: () => setImgError(true), className: "block w-full h-auto max-h-[80vh] object-contain sm:aspect-square sm:h-full sm:object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "aspect-square w-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FallbackIcon, { className: "h-1/3 w-1/3 text-muted-foreground/40" }) }) }),
60
60
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 space-y-5 min-w-0 w-full", children })
61
61
  ] });
62
62
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst THUMB = \"w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted\";\n\nexport function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }: MediaHeaderProps) {\n const [imgError, setImgError] = useState(false);\n\n if (loading) {\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <Skeleton className={THUMB} />\n <div className=\"flex-1 w-full space-y-3\">\n <Skeleton className=\"h-6 w-40\" />\n <Skeleton className=\"h-10 w-2/3\" />\n <Skeleton className=\"h-16 w-full\" />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <PageBackdrop image={image} />\n\n <div className={THUMB}>\n {image && !imgError ? (\n <img src={image} alt={imageAlt} onError={() => setImgError(true)} className=\"h-full w-full object-cover\" />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <FallbackIcon className=\"h-1/3 w-1/3 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 space-y-5 min-w-0 w-full\">{children}</div>\n </div>\n );\n}\n\nexport function HeaderStats({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground\">{children}</div>;\n}\n\nexport function HeaderStat({ label, children }: { label: string; children: ReactNode }) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n <span>{label}</span>\n <span className=\"font-semibold text-foreground tabular-nums\">{children}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBM;AAfN,mBAA2D;AAC3D,sBAAyB;AAUlB,SAAS,aAAa,EAAE,MAAM,GAA6B;AAChE,MAAI,CAAC,MAAO,QAAO;AACnB,SACE,4CAAC,SAAI,WAAU,2DACb;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAI;AAAA,MACJ,eAAW;AAAA,MACX,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,2BAA2B;AAAA;AAAA,EAC9C,GACF;AAEJ;AAEA,MAAM,QAAQ;AAEP,SAAS,YAAY,EAAE,OAAO,UAAU,cAAc,cAAc,UAAU,OAAO,SAAS,GAAqB;AACxH,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAE9C,MAAI,SAAS;AACX,WACE,6CAAC,SAAI,WAAU,gFACb;AAAA,kDAAC,4BAAS,WAAW,OAAO;AAAA,MAC5B,6CAAC,SAAI,WAAU,2BACb;AAAA,oDAAC,4BAAS,WAAU,YAAW;AAAA,QAC/B,4CAAC,4BAAS,WAAU,cAAa;AAAA,QACjC,4CAAC,4BAAS,WAAU,eAAc;AAAA,SACpC;AAAA,OACF;AAAA,EAEJ;AAEA,SACE,6CAAC,SAAI,WAAU,gFACb;AAAA,gDAAC,gBAAa,OAAc;AAAA,IAE5B,4CAAC,SAAI,WAAW,OACb,mBAAS,CAAC,WACT,4CAAC,SAAI,KAAK,OAAO,KAAK,UAAU,SAAS,MAAM,YAAY,IAAI,GAAG,WAAU,8BAA6B,IAEzG,4CAAC,SAAI,WAAU,kDACb,sDAAC,gBAAa,WAAU,wCAAuC,GACjE,GAEJ;AAAA,IAEA,4CAAC,SAAI,WAAU,mCAAmC,UAAS;AAAA,KAC7D;AAEJ;AAEO,SAAS,YAAY,EAAE,SAAS,GAA4B;AACjE,SAAO,4CAAC,SAAI,WAAU,6EAA6E,UAAS;AAC9G;AAEO,SAAS,WAAW,EAAE,OAAO,SAAS,GAA2C;AACtF,SACE,6CAAC,UAAK,WAAU,oCACd;AAAA,gDAAC,UAAM,iBAAM;AAAA,IACb,4CAAC,UAAK,WAAU,8CAA8C,UAAS;AAAA,KACzE;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst FRAME = \"w-full sm:w-44 lg:w-56 shrink-0 rounded-2xl overflow-hidden bg-muted\";\n\nexport function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }: MediaHeaderProps) {\n const [imgError, setImgError] = useState(false);\n\n if (loading) {\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <Skeleton className={`${FRAME} aspect-square`} />\n <div className=\"flex-1 w-full space-y-3\">\n <Skeleton className=\"h-6 w-40\" />\n <Skeleton className=\"h-10 w-2/3\" />\n <Skeleton className=\"h-16 w-full\" />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <PageBackdrop image={image} />\n\n <div className={FRAME}>\n {image && !imgError ? (\n <img src={image} alt={imageAlt} onError={() => setImgError(true)} className=\"block w-full h-auto max-h-[80vh] object-contain sm:aspect-square sm:h-full sm:object-cover\" />\n ) : (\n <div className=\"aspect-square w-full flex items-center justify-center\">\n <FallbackIcon className=\"h-1/3 w-1/3 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 space-y-5 min-w-0 w-full\">{children}</div>\n </div>\n );\n}\n\nexport function HeaderStats({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground\">{children}</div>;\n}\n\nexport function HeaderStat({ label, children }: { label: string; children: ReactNode }) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n <span>{label}</span>\n <span className=\"font-semibold text-foreground tabular-nums\">{children}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBM;AAfN,mBAA2D;AAC3D,sBAAyB;AAUlB,SAAS,aAAa,EAAE,MAAM,GAA6B;AAChE,MAAI,CAAC,MAAO,QAAO;AACnB,SACE,4CAAC,SAAI,WAAU,2DACb;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAI;AAAA,MACJ,eAAW;AAAA,MACX,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,2BAA2B;AAAA;AAAA,EAC9C,GACF;AAEJ;AAEA,MAAM,QAAQ;AAEP,SAAS,YAAY,EAAE,OAAO,UAAU,cAAc,cAAc,UAAU,OAAO,SAAS,GAAqB;AACxH,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAE9C,MAAI,SAAS;AACX,WACE,6CAAC,SAAI,WAAU,gFACb;AAAA,kDAAC,4BAAS,WAAW,GAAG,KAAK,kBAAkB;AAAA,MAC/C,6CAAC,SAAI,WAAU,2BACb;AAAA,oDAAC,4BAAS,WAAU,YAAW;AAAA,QAC/B,4CAAC,4BAAS,WAAU,cAAa;AAAA,QACjC,4CAAC,4BAAS,WAAU,eAAc;AAAA,SACpC;AAAA,OACF;AAAA,EAEJ;AAEA,SACE,6CAAC,SAAI,WAAU,gFACb;AAAA,gDAAC,gBAAa,OAAc;AAAA,IAE5B,4CAAC,SAAI,WAAW,OACb,mBAAS,CAAC,WACT,4CAAC,SAAI,KAAK,OAAO,KAAK,UAAU,SAAS,MAAM,YAAY,IAAI,GAAG,WAAU,8FAA6F,IAEzK,4CAAC,SAAI,WAAU,yDACb,sDAAC,gBAAa,WAAU,wCAAuC,GACjE,GAEJ;AAAA,IAEA,4CAAC,SAAI,WAAU,mCAAmC,UAAS;AAAA,KAC7D;AAEJ;AAEO,SAAS,YAAY,EAAE,SAAS,GAA4B;AACjE,SAAO,4CAAC,SAAI,WAAU,6EAA6E,UAAS;AAC9G;AAEO,SAAS,WAAW,EAAE,OAAO,SAAS,GAA2C;AACtF,SACE,6CAAC,UAAK,WAAU,oCACd;AAAA,gDAAC,UAAM,iBAAM;AAAA,IACb,4CAAC,UAAK,WAAU,8CAA8C,UAAS;AAAA,KACzE;AAEJ;","names":[]}
@@ -15,12 +15,12 @@ function PageBackdrop({ image }) {
15
15
  }
16
16
  ) });
17
17
  }
18
- const THUMB = "w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted";
18
+ const FRAME = "w-full sm:w-44 lg:w-56 shrink-0 rounded-2xl overflow-hidden bg-muted";
19
19
  function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }) {
20
20
  const [imgError, setImgError] = useState(false);
21
21
  if (loading) {
22
22
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto", children: [
23
- /* @__PURE__ */ jsx(Skeleton, { className: THUMB }),
23
+ /* @__PURE__ */ jsx(Skeleton, { className: `${FRAME} aspect-square` }),
24
24
  /* @__PURE__ */ jsxs("div", { className: "flex-1 w-full space-y-3", children: [
25
25
  /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-40" }),
26
26
  /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-2/3" }),
@@ -30,7 +30,7 @@ function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = fa
30
30
  }
31
31
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto", children: [
32
32
  /* @__PURE__ */ jsx(PageBackdrop, { image }),
33
- /* @__PURE__ */ jsx("div", { className: THUMB, children: image && !imgError ? /* @__PURE__ */ jsx("img", { src: image, alt: imageAlt, onError: () => setImgError(true), className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "h-full w-full flex items-center justify-center", children: /* @__PURE__ */ jsx(FallbackIcon, { className: "h-1/3 w-1/3 text-muted-foreground/40" }) }) }),
33
+ /* @__PURE__ */ jsx("div", { className: FRAME, children: image && !imgError ? /* @__PURE__ */ jsx("img", { src: image, alt: imageAlt, onError: () => setImgError(true), className: "block w-full h-auto max-h-[80vh] object-contain sm:aspect-square sm:h-full sm:object-cover" }) : /* @__PURE__ */ jsx("div", { className: "aspect-square w-full flex items-center justify-center", children: /* @__PURE__ */ jsx(FallbackIcon, { className: "h-1/3 w-1/3 text-muted-foreground/40" }) }) }),
34
34
  /* @__PURE__ */ jsx("div", { className: "flex-1 space-y-5 min-w-0 w-full", children })
35
35
  ] });
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst THUMB = \"w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted\";\n\nexport function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }: MediaHeaderProps) {\n const [imgError, setImgError] = useState(false);\n\n if (loading) {\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <Skeleton className={THUMB} />\n <div className=\"flex-1 w-full space-y-3\">\n <Skeleton className=\"h-6 w-40\" />\n <Skeleton className=\"h-10 w-2/3\" />\n <Skeleton className=\"h-16 w-full\" />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <PageBackdrop image={image} />\n\n <div className={THUMB}>\n {image && !imgError ? (\n <img src={image} alt={imageAlt} onError={() => setImgError(true)} className=\"h-full w-full object-cover\" />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <FallbackIcon className=\"h-1/3 w-1/3 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 space-y-5 min-w-0 w-full\">{children}</div>\n </div>\n );\n}\n\nexport function HeaderStats({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground\">{children}</div>;\n}\n\nexport function HeaderStat({ label, children }: { label: string; children: ReactNode }) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n <span>{label}</span>\n <span className=\"font-semibold text-foreground tabular-nums\">{children}</span>\n </span>\n );\n}\n"],"mappings":";AAiBM,cAoBE,YApBF;AAfN,SAAS,gBAAkD;AAC3D,SAAS,gBAAgB;AAUlB,SAAS,aAAa,EAAE,MAAM,GAA6B;AAChE,MAAI,CAAC,MAAO,QAAO;AACnB,SACE,oBAAC,SAAI,WAAU,2DACb;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAI;AAAA,MACJ,eAAW;AAAA,MACX,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,2BAA2B;AAAA;AAAA,EAC9C,GACF;AAEJ;AAEA,MAAM,QAAQ;AAEP,SAAS,YAAY,EAAE,OAAO,UAAU,cAAc,cAAc,UAAU,OAAO,SAAS,GAAqB;AACxH,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,MAAI,SAAS;AACX,WACE,qBAAC,SAAI,WAAU,gFACb;AAAA,0BAAC,YAAS,WAAW,OAAO;AAAA,MAC5B,qBAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,YAAS,WAAU,YAAW;AAAA,QAC/B,oBAAC,YAAS,WAAU,cAAa;AAAA,QACjC,oBAAC,YAAS,WAAU,eAAc;AAAA,SACpC;AAAA,OACF;AAAA,EAEJ;AAEA,SACE,qBAAC,SAAI,WAAU,gFACb;AAAA,wBAAC,gBAAa,OAAc;AAAA,IAE5B,oBAAC,SAAI,WAAW,OACb,mBAAS,CAAC,WACT,oBAAC,SAAI,KAAK,OAAO,KAAK,UAAU,SAAS,MAAM,YAAY,IAAI,GAAG,WAAU,8BAA6B,IAEzG,oBAAC,SAAI,WAAU,kDACb,8BAAC,gBAAa,WAAU,wCAAuC,GACjE,GAEJ;AAAA,IAEA,oBAAC,SAAI,WAAU,mCAAmC,UAAS;AAAA,KAC7D;AAEJ;AAEO,SAAS,YAAY,EAAE,SAAS,GAA4B;AACjE,SAAO,oBAAC,SAAI,WAAU,6EAA6E,UAAS;AAC9G;AAEO,SAAS,WAAW,EAAE,OAAO,SAAS,GAA2C;AACtF,SACE,qBAAC,UAAK,WAAU,oCACd;AAAA,wBAAC,UAAM,iBAAM;AAAA,IACb,oBAAC,UAAK,WAAU,8CAA8C,UAAS;AAAA,KACzE;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst FRAME = \"w-full sm:w-44 lg:w-56 shrink-0 rounded-2xl overflow-hidden bg-muted\";\n\nexport function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }: MediaHeaderProps) {\n const [imgError, setImgError] = useState(false);\n\n if (loading) {\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <Skeleton className={`${FRAME} aspect-square`} />\n <div className=\"flex-1 w-full space-y-3\">\n <Skeleton className=\"h-6 w-40\" />\n <Skeleton className=\"h-10 w-2/3\" />\n <Skeleton className=\"h-16 w-full\" />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <PageBackdrop image={image} />\n\n <div className={FRAME}>\n {image && !imgError ? (\n <img src={image} alt={imageAlt} onError={() => setImgError(true)} className=\"block w-full h-auto max-h-[80vh] object-contain sm:aspect-square sm:h-full sm:object-cover\" />\n ) : (\n <div className=\"aspect-square w-full flex items-center justify-center\">\n <FallbackIcon className=\"h-1/3 w-1/3 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 space-y-5 min-w-0 w-full\">{children}</div>\n </div>\n );\n}\n\nexport function HeaderStats({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground\">{children}</div>;\n}\n\nexport function HeaderStat({ label, children }: { label: string; children: ReactNode }) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n <span>{label}</span>\n <span className=\"font-semibold text-foreground tabular-nums\">{children}</span>\n </span>\n );\n}\n"],"mappings":";AAiBM,cAoBE,YApBF;AAfN,SAAS,gBAAkD;AAC3D,SAAS,gBAAgB;AAUlB,SAAS,aAAa,EAAE,MAAM,GAA6B;AAChE,MAAI,CAAC,MAAO,QAAO;AACnB,SACE,oBAAC,SAAI,WAAU,2DACb;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAI;AAAA,MACJ,eAAW;AAAA,MACX,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,2BAA2B;AAAA;AAAA,EAC9C,GACF;AAEJ;AAEA,MAAM,QAAQ;AAEP,SAAS,YAAY,EAAE,OAAO,UAAU,cAAc,cAAc,UAAU,OAAO,SAAS,GAAqB;AACxH,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,MAAI,SAAS;AACX,WACE,qBAAC,SAAI,WAAU,gFACb;AAAA,0BAAC,YAAS,WAAW,GAAG,KAAK,kBAAkB;AAAA,MAC/C,qBAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,YAAS,WAAU,YAAW;AAAA,QAC/B,oBAAC,YAAS,WAAU,cAAa;AAAA,QACjC,oBAAC,YAAS,WAAU,eAAc;AAAA,SACpC;AAAA,OACF;AAAA,EAEJ;AAEA,SACE,qBAAC,SAAI,WAAU,gFACb;AAAA,wBAAC,gBAAa,OAAc;AAAA,IAE5B,oBAAC,SAAI,WAAW,OACb,mBAAS,CAAC,WACT,oBAAC,SAAI,KAAK,OAAO,KAAK,UAAU,SAAS,MAAM,YAAY,IAAI,GAAG,WAAU,8FAA6F,IAEzK,oBAAC,SAAI,WAAU,yDACb,8BAAC,gBAAa,WAAU,wCAAuC,GACjE,GAEJ;AAAA,IAEA,oBAAC,SAAI,WAAU,mCAAmC,UAAS;AAAA,KAC7D;AAEJ;AAEO,SAAS,YAAY,EAAE,SAAS,GAA4B;AACjE,SAAO,oBAAC,SAAI,WAAU,6EAA6E,UAAS;AAC9G;AAEO,SAAS,WAAW,EAAE,OAAO,SAAS,GAA2C;AACtF,SACE,qBAAC,UAAK,WAAU,oCACd;AAAA,wBAAC,UAAM,iBAAM;AAAA,IACb,oBAAC,UAAK,WAAU,8CAA8C,UAAS;AAAA,KACzE;AAEJ;","names":[]}
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
10
10
  declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
11
11
  declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  declare const sheetVariants: (props?: ({
13
- side?: "left" | "right" | "bottom" | "top" | null | undefined;
13
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
16
16
  overlayClassName?: string;
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
10
10
  declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
11
11
  declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  declare const sheetVariants: (props?: ({
13
- side?: "left" | "right" | "bottom" | "top" | null | undefined;
13
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
16
16
  overlayClassName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medialane/ui",
3
- "version": "0.201.7",
3
+ "version": "0.201.8",
4
4
  "description": "Shared UI components for Medialane apps",
5
5
  "type": "module",
6
6
  "sideEffects": false,