@medialane/ui 0.230.0 → 0.231.0

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>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "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>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "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>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "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>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -39,17 +39,17 @@ function AssetPublication({ name, text, image, imgError, onImageError, onZoom, a
39
39
  const paragraphs = text.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean);
40
40
  const [lead, ...body] = paragraphs.length > 1 ? paragraphs : [null, ...paragraphs];
41
41
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: "min-w-0 space-y-6", children: [
42
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "space-y-3", children: [
43
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-2xl lg:text-4xl font-bold leading-tight break-words", children: name }),
44
- author ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: author }) : null
45
- ] }),
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("header", { className: "space-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-2xl lg:text-4xl font-bold leading-tight break-words", children: name }) }),
46
43
  lead ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "max-w-3xl text-base leading-relaxed text-foreground whitespace-pre-line", children: lead }) : null,
47
44
  image && !imgError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: onZoom, "aria-label": "View full image", className: "block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: image, alt: name, onError: onImageError, className: "w-full h-auto max-h-[80vh] object-contain" }) }) : null,
48
45
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "max-w-3xl space-y-4 text-sm leading-relaxed text-foreground/85 break-words", children: body.map((paragraph, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "whitespace-pre-line", children: paragraph }, i)) }),
49
- website ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: website, target: "_blank", rel: "noopener noreferrer", children: [
50
- "Read more",
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, {})
52
- ] }) }) : null
46
+ author || website ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-4", children: [
47
+ author ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "min-w-0 break-words text-sm text-muted-foreground", children: author }) : null,
48
+ website ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: website, target: "_blank", rel: "noopener noreferrer", children: [
49
+ "Read more",
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, {})
51
+ ] }) }) : null
52
+ ] }) : null
53
53
  ] });
54
54
  }
55
55
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-publication.tsx"],"sourcesContent":["\"use client\";\n\nimport { ExternalLink } from \"lucide-react\";\nimport { Button } from \"./button.js\";\n\nexport interface AssetPublicationProps {\n name: string;\n text: string;\n image: string | null;\n imgError: boolean;\n onImageError: () => void;\n onZoom: () => void;\n author?: string | null;\n websiteUrl?: string | null;\n}\n\nfunction webAddress(url?: string | null) {\n if (!url) return null;\n try {\n const parsed = new URL(url);\n return parsed.protocol === \"https:\" || parsed.protocol === \"http:\" ? parsed.href : null;\n } catch {\n return null;\n }\n}\n\nexport function AssetPublication({ name, text, image, imgError, onImageError, onZoom, author, websiteUrl }: AssetPublicationProps) {\n const website = webAddress(websiteUrl);\n const paragraphs = text.split(/\\n{2,}/).map((p) => p.trim()).filter(Boolean);\n const [lead, ...body] = paragraphs.length > 1 ? paragraphs : [null, ...paragraphs];\n\n return (\n <article className=\"min-w-0 space-y-6\">\n <header className=\"space-y-3\">\n <h1 className=\"text-2xl lg:text-4xl font-bold leading-tight break-words\">{name}</h1>\n {author ? <p className=\"text-sm text-muted-foreground\">{author}</p> : null}\n </header>\n\n {lead ? <p className=\"max-w-3xl text-base leading-relaxed text-foreground whitespace-pre-line\">{lead}</p> : null}\n\n {image && !imgError ? (\n <button type=\"button\" onClick={onZoom} aria-label=\"View full image\" className=\"block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\">\n <img src={image} alt={name} onError={onImageError} className=\"w-full h-auto max-h-[80vh] object-contain\" />\n </button>\n ) : null}\n\n <div className=\"max-w-3xl space-y-4 text-sm leading-relaxed text-foreground/85 break-words\">\n {body.map((paragraph, i) => (\n <p key={i} className=\"whitespace-pre-line\">{paragraph}</p>\n ))}\n </div>\n\n {website ? (\n <Button asChild variant=\"outline\">\n <a href={website} target=\"_blank\" rel=\"noopener noreferrer\">\n Read more\n <ExternalLink />\n </a>\n </Button>\n ) : null}\n </article>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCM;AA/BN,0BAA6B;AAC7B,oBAAuB;AAavB,SAAS,WAAW,KAAqB;AACvC,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,WAAO,OAAO,aAAa,YAAY,OAAO,aAAa,UAAU,OAAO,OAAO;AAAA,EACrF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,iBAAiB,EAAE,MAAM,MAAM,OAAO,UAAU,cAAc,QAAQ,QAAQ,WAAW,GAA0B;AACjI,QAAM,UAAU,WAAW,UAAU;AACrC,QAAM,aAAa,KAAK,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,OAAO;AAC3E,QAAM,CAAC,MAAM,GAAG,IAAI,IAAI,WAAW,SAAS,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU;AAEjF,SACE,6CAAC,aAAQ,WAAU,qBACjB;AAAA,iDAAC,YAAO,WAAU,aAChB;AAAA,kDAAC,QAAG,WAAU,4DAA4D,gBAAK;AAAA,MAC9E,SAAS,4CAAC,OAAE,WAAU,iCAAiC,kBAAO,IAAO;AAAA,OACxE;AAAA,IAEC,OAAO,4CAAC,OAAE,WAAU,2EAA2E,gBAAK,IAAO;AAAA,IAE3G,SAAS,CAAC,WACT,4CAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAW,mBAAkB,WAAU,8EAC5E,sDAAC,SAAI,KAAK,OAAO,KAAK,MAAM,SAAS,cAAc,WAAU,6CAA4C,GAC3G,IACE;AAAA,IAEJ,4CAAC,SAAI,WAAU,8EACZ,eAAK,IAAI,CAAC,WAAW,MACpB,4CAAC,OAAU,WAAU,uBAAuB,uBAApC,CAA8C,CACvD,GACH;AAAA,IAEC,UACC,4CAAC,wBAAO,SAAO,MAAC,SAAQ,WACtB,uDAAC,OAAE,MAAM,SAAS,QAAO,UAAS,KAAI,uBAAsB;AAAA;AAAA,MAE1D,4CAAC,oCAAa;AAAA,OAChB,GACF,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-publication.tsx"],"sourcesContent":["\"use client\";\n\nimport { ExternalLink } from \"lucide-react\";\nimport { Button } from \"./button.js\";\n\nexport interface AssetPublicationProps {\n name: string;\n text: string;\n image: string | null;\n imgError: boolean;\n onImageError: () => void;\n onZoom: () => void;\n author?: string | null;\n websiteUrl?: string | null;\n}\n\nfunction webAddress(url?: string | null) {\n if (!url) return null;\n try {\n const parsed = new URL(url);\n return parsed.protocol === \"https:\" || parsed.protocol === \"http:\" ? parsed.href : null;\n } catch {\n return null;\n }\n}\n\nexport function AssetPublication({ name, text, image, imgError, onImageError, onZoom, author, websiteUrl }: AssetPublicationProps) {\n const website = webAddress(websiteUrl);\n const paragraphs = text.split(/\\n{2,}/).map((p) => p.trim()).filter(Boolean);\n const [lead, ...body] = paragraphs.length > 1 ? paragraphs : [null, ...paragraphs];\n\n return (\n <article className=\"min-w-0 space-y-6\">\n <header className=\"space-y-3\">\n <h1 className=\"text-2xl lg:text-4xl font-bold leading-tight break-words\">{name}</h1>\n </header>\n\n {lead ? <p className=\"max-w-3xl text-base leading-relaxed text-foreground whitespace-pre-line\">{lead}</p> : null}\n\n {image && !imgError ? (\n <button type=\"button\" onClick={onZoom} aria-label=\"View full image\" className=\"block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\">\n <img src={image} alt={name} onError={onImageError} className=\"w-full h-auto max-h-[80vh] object-contain\" />\n </button>\n ) : null}\n\n <div className=\"max-w-3xl space-y-4 text-sm leading-relaxed text-foreground/85 break-words\">\n {body.map((paragraph, i) => (\n <p key={i} className=\"whitespace-pre-line\">{paragraph}</p>\n ))}\n </div>\n\n {author || website ? (\n <div className=\"flex flex-wrap items-center gap-4\">\n {author ? <p className=\"min-w-0 break-words text-sm text-muted-foreground\">{author}</p> : null}\n {website ? (\n <Button asChild variant=\"outline\">\n <a href={website} target=\"_blank\" rel=\"noopener noreferrer\">\n Read more\n <ExternalLink />\n </a>\n </Button>\n ) : null}\n </div>\n ) : null}\n </article>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCQ;AAhCR,0BAA6B;AAC7B,oBAAuB;AAavB,SAAS,WAAW,KAAqB;AACvC,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,WAAO,OAAO,aAAa,YAAY,OAAO,aAAa,UAAU,OAAO,OAAO;AAAA,EACrF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,iBAAiB,EAAE,MAAM,MAAM,OAAO,UAAU,cAAc,QAAQ,QAAQ,WAAW,GAA0B;AACjI,QAAM,UAAU,WAAW,UAAU;AACrC,QAAM,aAAa,KAAK,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,OAAO;AAC3E,QAAM,CAAC,MAAM,GAAG,IAAI,IAAI,WAAW,SAAS,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU;AAEjF,SACE,6CAAC,aAAQ,WAAU,qBACjB;AAAA,gDAAC,YAAO,WAAU,aAChB,sDAAC,QAAG,WAAU,4DAA4D,gBAAK,GACjF;AAAA,IAEC,OAAO,4CAAC,OAAE,WAAU,2EAA2E,gBAAK,IAAO;AAAA,IAE3G,SAAS,CAAC,WACT,4CAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAW,mBAAkB,WAAU,8EAC5E,sDAAC,SAAI,KAAK,OAAO,KAAK,MAAM,SAAS,cAAc,WAAU,6CAA4C,GAC3G,IACE;AAAA,IAEJ,4CAAC,SAAI,WAAU,8EACZ,eAAK,IAAI,CAAC,WAAW,MACpB,4CAAC,OAAU,WAAU,uBAAuB,uBAApC,CAA8C,CACvD,GACH;AAAA,IAEC,UAAU,UACT,6CAAC,SAAI,WAAU,qCACZ;AAAA,eAAS,4CAAC,OAAE,WAAU,qDAAqD,kBAAO,IAAO;AAAA,MACzF,UACC,4CAAC,wBAAO,SAAO,MAAC,SAAQ,WACtB,uDAAC,OAAE,MAAM,SAAS,QAAO,UAAS,KAAI,uBAAsB;AAAA;AAAA,QAE1D,4CAAC,oCAAa;AAAA,SAChB,GACF,IACE;AAAA,OACN,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -16,17 +16,17 @@ function AssetPublication({ name, text, image, imgError, onImageError, onZoom, a
16
16
  const paragraphs = text.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean);
17
17
  const [lead, ...body] = paragraphs.length > 1 ? paragraphs : [null, ...paragraphs];
18
18
  return /* @__PURE__ */ jsxs("article", { className: "min-w-0 space-y-6", children: [
19
- /* @__PURE__ */ jsxs("header", { className: "space-y-3", children: [
20
- /* @__PURE__ */ jsx("h1", { className: "text-2xl lg:text-4xl font-bold leading-tight break-words", children: name }),
21
- author ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: author }) : null
22
- ] }),
19
+ /* @__PURE__ */ jsx("header", { className: "space-y-3", children: /* @__PURE__ */ jsx("h1", { className: "text-2xl lg:text-4xl font-bold leading-tight break-words", children: name }) }),
23
20
  lead ? /* @__PURE__ */ jsx("p", { className: "max-w-3xl text-base leading-relaxed text-foreground whitespace-pre-line", children: lead }) : null,
24
21
  image && !imgError ? /* @__PURE__ */ jsx("button", { type: "button", onClick: onZoom, "aria-label": "View full image", className: "block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none", children: /* @__PURE__ */ jsx("img", { src: image, alt: name, onError: onImageError, className: "w-full h-auto max-h-[80vh] object-contain" }) }) : null,
25
22
  /* @__PURE__ */ jsx("div", { className: "max-w-3xl space-y-4 text-sm leading-relaxed text-foreground/85 break-words", children: body.map((paragraph, i) => /* @__PURE__ */ jsx("p", { className: "whitespace-pre-line", children: paragraph }, i)) }),
26
- website ? /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ jsxs("a", { href: website, target: "_blank", rel: "noopener noreferrer", children: [
27
- "Read more",
28
- /* @__PURE__ */ jsx(ExternalLink, {})
29
- ] }) }) : null
23
+ author || website ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
24
+ author ? /* @__PURE__ */ jsx("p", { className: "min-w-0 break-words text-sm text-muted-foreground", children: author }) : null,
25
+ website ? /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ jsxs("a", { href: website, target: "_blank", rel: "noopener noreferrer", children: [
26
+ "Read more",
27
+ /* @__PURE__ */ jsx(ExternalLink, {})
28
+ ] }) }) : null
29
+ ] }) : null
30
30
  ] });
31
31
  }
32
32
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-publication.tsx"],"sourcesContent":["\"use client\";\n\nimport { ExternalLink } from \"lucide-react\";\nimport { Button } from \"./button.js\";\n\nexport interface AssetPublicationProps {\n name: string;\n text: string;\n image: string | null;\n imgError: boolean;\n onImageError: () => void;\n onZoom: () => void;\n author?: string | null;\n websiteUrl?: string | null;\n}\n\nfunction webAddress(url?: string | null) {\n if (!url) return null;\n try {\n const parsed = new URL(url);\n return parsed.protocol === \"https:\" || parsed.protocol === \"http:\" ? parsed.href : null;\n } catch {\n return null;\n }\n}\n\nexport function AssetPublication({ name, text, image, imgError, onImageError, onZoom, author, websiteUrl }: AssetPublicationProps) {\n const website = webAddress(websiteUrl);\n const paragraphs = text.split(/\\n{2,}/).map((p) => p.trim()).filter(Boolean);\n const [lead, ...body] = paragraphs.length > 1 ? paragraphs : [null, ...paragraphs];\n\n return (\n <article className=\"min-w-0 space-y-6\">\n <header className=\"space-y-3\">\n <h1 className=\"text-2xl lg:text-4xl font-bold leading-tight break-words\">{name}</h1>\n {author ? <p className=\"text-sm text-muted-foreground\">{author}</p> : null}\n </header>\n\n {lead ? <p className=\"max-w-3xl text-base leading-relaxed text-foreground whitespace-pre-line\">{lead}</p> : null}\n\n {image && !imgError ? (\n <button type=\"button\" onClick={onZoom} aria-label=\"View full image\" className=\"block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\">\n <img src={image} alt={name} onError={onImageError} className=\"w-full h-auto max-h-[80vh] object-contain\" />\n </button>\n ) : null}\n\n <div className=\"max-w-3xl space-y-4 text-sm leading-relaxed text-foreground/85 break-words\">\n {body.map((paragraph, i) => (\n <p key={i} className=\"whitespace-pre-line\">{paragraph}</p>\n ))}\n </div>\n\n {website ? (\n <Button asChild variant=\"outline\">\n <a href={website} target=\"_blank\" rel=\"noopener noreferrer\">\n Read more\n <ExternalLink />\n </a>\n </Button>\n ) : null}\n </article>\n );\n}\n"],"mappings":";AAiCM,SACE,KADF;AA/BN,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAavB,SAAS,WAAW,KAAqB;AACvC,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,WAAO,OAAO,aAAa,YAAY,OAAO,aAAa,UAAU,OAAO,OAAO;AAAA,EACrF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,iBAAiB,EAAE,MAAM,MAAM,OAAO,UAAU,cAAc,QAAQ,QAAQ,WAAW,GAA0B;AACjI,QAAM,UAAU,WAAW,UAAU;AACrC,QAAM,aAAa,KAAK,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,OAAO;AAC3E,QAAM,CAAC,MAAM,GAAG,IAAI,IAAI,WAAW,SAAS,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU;AAEjF,SACE,qBAAC,aAAQ,WAAU,qBACjB;AAAA,yBAAC,YAAO,WAAU,aAChB;AAAA,0BAAC,QAAG,WAAU,4DAA4D,gBAAK;AAAA,MAC9E,SAAS,oBAAC,OAAE,WAAU,iCAAiC,kBAAO,IAAO;AAAA,OACxE;AAAA,IAEC,OAAO,oBAAC,OAAE,WAAU,2EAA2E,gBAAK,IAAO;AAAA,IAE3G,SAAS,CAAC,WACT,oBAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAW,mBAAkB,WAAU,8EAC5E,8BAAC,SAAI,KAAK,OAAO,KAAK,MAAM,SAAS,cAAc,WAAU,6CAA4C,GAC3G,IACE;AAAA,IAEJ,oBAAC,SAAI,WAAU,8EACZ,eAAK,IAAI,CAAC,WAAW,MACpB,oBAAC,OAAU,WAAU,uBAAuB,uBAApC,CAA8C,CACvD,GACH;AAAA,IAEC,UACC,oBAAC,UAAO,SAAO,MAAC,SAAQ,WACtB,+BAAC,OAAE,MAAM,SAAS,QAAO,UAAS,KAAI,uBAAsB;AAAA;AAAA,MAE1D,oBAAC,gBAAa;AAAA,OAChB,GACF,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-publication.tsx"],"sourcesContent":["\"use client\";\n\nimport { ExternalLink } from \"lucide-react\";\nimport { Button } from \"./button.js\";\n\nexport interface AssetPublicationProps {\n name: string;\n text: string;\n image: string | null;\n imgError: boolean;\n onImageError: () => void;\n onZoom: () => void;\n author?: string | null;\n websiteUrl?: string | null;\n}\n\nfunction webAddress(url?: string | null) {\n if (!url) return null;\n try {\n const parsed = new URL(url);\n return parsed.protocol === \"https:\" || parsed.protocol === \"http:\" ? parsed.href : null;\n } catch {\n return null;\n }\n}\n\nexport function AssetPublication({ name, text, image, imgError, onImageError, onZoom, author, websiteUrl }: AssetPublicationProps) {\n const website = webAddress(websiteUrl);\n const paragraphs = text.split(/\\n{2,}/).map((p) => p.trim()).filter(Boolean);\n const [lead, ...body] = paragraphs.length > 1 ? paragraphs : [null, ...paragraphs];\n\n return (\n <article className=\"min-w-0 space-y-6\">\n <header className=\"space-y-3\">\n <h1 className=\"text-2xl lg:text-4xl font-bold leading-tight break-words\">{name}</h1>\n </header>\n\n {lead ? <p className=\"max-w-3xl text-base leading-relaxed text-foreground whitespace-pre-line\">{lead}</p> : null}\n\n {image && !imgError ? (\n <button type=\"button\" onClick={onZoom} aria-label=\"View full image\" className=\"block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\">\n <img src={image} alt={name} onError={onImageError} className=\"w-full h-auto max-h-[80vh] object-contain\" />\n </button>\n ) : null}\n\n <div className=\"max-w-3xl space-y-4 text-sm leading-relaxed text-foreground/85 break-words\">\n {body.map((paragraph, i) => (\n <p key={i} className=\"whitespace-pre-line\">{paragraph}</p>\n ))}\n </div>\n\n {author || website ? (\n <div className=\"flex flex-wrap items-center gap-4\">\n {author ? <p className=\"min-w-0 break-words text-sm text-muted-foreground\">{author}</p> : null}\n {website ? (\n <Button asChild variant=\"outline\">\n <a href={website} target=\"_blank\" rel=\"noopener noreferrer\">\n Read more\n <ExternalLink />\n </a>\n </Button>\n ) : null}\n </div>\n ) : null}\n </article>\n );\n}\n"],"mappings":";AAkCQ,cAsBM,YAtBN;AAhCR,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAavB,SAAS,WAAW,KAAqB;AACvC,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,WAAO,OAAO,aAAa,YAAY,OAAO,aAAa,UAAU,OAAO,OAAO;AAAA,EACrF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,iBAAiB,EAAE,MAAM,MAAM,OAAO,UAAU,cAAc,QAAQ,QAAQ,WAAW,GAA0B;AACjI,QAAM,UAAU,WAAW,UAAU;AACrC,QAAM,aAAa,KAAK,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,OAAO;AAC3E,QAAM,CAAC,MAAM,GAAG,IAAI,IAAI,WAAW,SAAS,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU;AAEjF,SACE,qBAAC,aAAQ,WAAU,qBACjB;AAAA,wBAAC,YAAO,WAAU,aAChB,8BAAC,QAAG,WAAU,4DAA4D,gBAAK,GACjF;AAAA,IAEC,OAAO,oBAAC,OAAE,WAAU,2EAA2E,gBAAK,IAAO;AAAA,IAE3G,SAAS,CAAC,WACT,oBAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAW,mBAAkB,WAAU,8EAC5E,8BAAC,SAAI,KAAK,OAAO,KAAK,MAAM,SAAS,cAAc,WAAU,6CAA4C,GAC3G,IACE;AAAA,IAEJ,oBAAC,SAAI,WAAU,8EACZ,eAAK,IAAI,CAAC,WAAW,MACpB,oBAAC,OAAU,WAAU,uBAAuB,uBAApC,CAA8C,CACvD,GACH;AAAA,IAEC,UAAU,UACT,qBAAC,SAAI,WAAU,qCACZ;AAAA,eAAS,oBAAC,OAAE,WAAU,qDAAqD,kBAAO,IAAO;AAAA,MACzF,UACC,oBAAC,UAAO,SAAO,MAAC,SAAQ,WACtB,+BAAC,OAAE,MAAM,SAAS,QAAO,UAAS,KAAI,uBAAsB;AAAA;AAAA,QAE1D,oBAAC,gBAAa;AAAA,SAChB,GACF,IACE;AAAA,OACN,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -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?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
6
+ variant?: "ghost" | "link" | "default" | "destructive" | "outline" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "icon" | "default" | "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?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
6
+ variant?: "ghost" | "link" | "default" | "destructive" | "outline" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "icon" | "default" | "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 from 'react';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
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 | 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;
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;
9
9
 
10
10
  export { FastMint };
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
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 | 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;
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;
9
9
 
10
10
  export { FastMint };
@@ -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?: "bottom" | "left" | "right" | "top" | null | undefined;
13
+ side?: "left" | "right" | "bottom" | "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?: "bottom" | "left" | "right" | "top" | null | undefined;
13
+ side?: "left" | "right" | "bottom" | "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.230.0",
3
+ "version": "0.231.0",
4
4
  "description": "Shared UI components for Medialane apps",
5
5
  "type": "module",
6
6
  "sideEffects": false,