@medialane/ui 0.209.0 → 0.210.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.
- package/dist/components/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/article-body.cjs +151 -0
- package/dist/components/article-body.cjs.map +1 -0
- package/dist/components/article-body.d.cts +8 -0
- package/dist/components/article-body.d.ts +8 -0
- package/dist/components/article-body.js +127 -0
- package/dist/components/article-body.js.map +1 -0
- package/dist/components/asset-marketplace-panel.cjs +2 -2
- package/dist/components/asset-marketplace-panel.cjs.map +1 -1
- package/dist/components/asset-marketplace-panel.js +2 -2
- package/dist/components/asset-marketplace-panel.js.map +1 -1
- package/dist/components/asset-page.cjs +93 -56
- package/dist/components/asset-page.cjs.map +1 -1
- package/dist/components/asset-page.js +94 -57
- package/dist/components/asset-page.js.map +1 -1
- package/dist/components/asset-publication-header.cjs +74 -0
- package/dist/components/asset-publication-header.cjs.map +1 -0
- package/dist/components/asset-publication-header.d.cts +19 -0
- package/dist/components/asset-publication-header.d.ts +19 -0
- package/dist/components/asset-publication-header.js +40 -0
- package/dist/components/asset-publication-header.js.map +1 -0
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var asset_publication_header_exports = {};
|
|
31
|
+
__export(asset_publication_header_exports, {
|
|
32
|
+
AssetPublicationHeader: () => AssetPublicationHeader
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(asset_publication_header_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_link = __toESM(require("./link.js"), 1);
|
|
37
|
+
var import_ip_type_badge = require("./ip-type-badge.js");
|
|
38
|
+
function AssetPublicationHeader({
|
|
39
|
+
name,
|
|
40
|
+
ipType,
|
|
41
|
+
standfirst,
|
|
42
|
+
image,
|
|
43
|
+
imgError,
|
|
44
|
+
onImageError,
|
|
45
|
+
onZoom,
|
|
46
|
+
publisherName,
|
|
47
|
+
publisherImage,
|
|
48
|
+
publisherHref,
|
|
49
|
+
author,
|
|
50
|
+
publishedAt
|
|
51
|
+
}) {
|
|
52
|
+
const date = publishedAt ? new Date(publishedAt * 1e3).toLocaleDateString(void 0, { dateStyle: "long" }) : null;
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "space-y-6", children: [
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4 max-w-4xl", children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_badge.IpTypeBadge, { ipType, size: "md" }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-3xl lg:text-5xl font-bold tracking-tight leading-tight break-words", children: name }),
|
|
57
|
+
standfirst ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-lg lg:text-xl leading-relaxed text-muted-foreground", children: standfirst }) : null,
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2 text-sm text-muted-foreground", children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: publisherHref, className: "inline-flex items-center gap-2 font-medium text-foreground hover:text-primary transition-colors", children: [
|
|
60
|
+
publisherImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: publisherImage, alt: "", className: "h-7 w-7 rounded-full object-cover" }) : null,
|
|
61
|
+
publisherName
|
|
62
|
+
] }),
|
|
63
|
+
author ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: author }) : null,
|
|
64
|
+
date ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: date }) : null
|
|
65
|
+
] })
|
|
66
|
+
] }),
|
|
67
|
+
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-[28rem] object-cover" }) }) : null
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
AssetPublicationHeader
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=asset-publication-header.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-publication-header.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\n\nexport interface AssetPublicationHeaderProps {\n name: string;\n ipType: string;\n standfirst?: string | null;\n image: string | null;\n imgError: boolean;\n onImageError: () => void;\n onZoom: () => void;\n publisherName: string;\n publisherImage?: string | null;\n publisherHref: string;\n author?: string | null;\n publishedAt?: number | null;\n}\n\nexport function AssetPublicationHeader({\n name,\n ipType,\n standfirst,\n image,\n imgError,\n onImageError,\n onZoom,\n publisherName,\n publisherImage,\n publisherHref,\n author,\n publishedAt,\n}: AssetPublicationHeaderProps) {\n const date = publishedAt ? new Date(publishedAt * 1000).toLocaleDateString(undefined, { dateStyle: \"long\" }) : null;\n return (\n <header className=\"space-y-6\">\n <div className=\"space-y-4 max-w-4xl\">\n <IpTypeBadge ipType={ipType} size=\"md\" />\n <h1 className=\"text-3xl lg:text-5xl font-bold tracking-tight leading-tight break-words\">{name}</h1>\n {standfirst ? <p className=\"text-lg lg:text-xl leading-relaxed text-muted-foreground\">{standfirst}</p> : null}\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-2 text-sm text-muted-foreground\">\n <Link href={publisherHref} className=\"inline-flex items-center gap-2 font-medium text-foreground hover:text-primary transition-colors\">\n {publisherImage ? <img src={publisherImage} alt=\"\" className=\"h-7 w-7 rounded-full object-cover\" /> : null}\n {publisherName}\n </Link>\n {author ? <span>{author}</span> : null}\n {date ? <span>{date}</span> : null}\n </div>\n </div>\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-[28rem] object-cover\" />\n </button>\n ) : null}\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCQ;AApCR,kBAAiB;AACjB,2BAA4B;AAiBrB,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgC;AAC9B,QAAM,OAAO,cAAc,IAAI,KAAK,cAAc,GAAI,EAAE,mBAAmB,QAAW,EAAE,WAAW,OAAO,CAAC,IAAI;AAC/G,SACE,6CAAC,YAAO,WAAU,aAChB;AAAA,iDAAC,SAAI,WAAU,uBACb;AAAA,kDAAC,oCAAY,QAAgB,MAAK,MAAK;AAAA,MACvC,4CAAC,QAAG,WAAU,2EAA2E,gBAAK;AAAA,MAC7F,aAAa,4CAAC,OAAE,WAAU,4DAA4D,sBAAW,IAAO;AAAA,MACzG,6CAAC,SAAI,WAAU,6EACb;AAAA,qDAAC,YAAAA,SAAA,EAAK,MAAM,eAAe,WAAU,mGAClC;AAAA,2BAAiB,4CAAC,SAAI,KAAK,gBAAgB,KAAI,IAAG,WAAU,qCAAoC,IAAK;AAAA,UACrG;AAAA,WACH;AAAA,QACC,SAAS,4CAAC,UAAM,kBAAO,IAAU;AAAA,QACjC,OAAO,4CAAC,UAAM,gBAAK,IAAU;AAAA,SAChC;AAAA,OACF;AAAA,IACC,SAAS,CAAC,WACT,4CAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAW,mBAAkB,WAAU,8EAC5E,sDAAC,SAAI,KAAK,OAAO,KAAK,MAAM,SAAS,cAAc,WAAU,4CAA2C,GAC1G,IACE;AAAA,KACN;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface AssetPublicationHeaderProps {
|
|
4
|
+
name: string;
|
|
5
|
+
ipType: string;
|
|
6
|
+
standfirst?: string | null;
|
|
7
|
+
image: string | null;
|
|
8
|
+
imgError: boolean;
|
|
9
|
+
onImageError: () => void;
|
|
10
|
+
onZoom: () => void;
|
|
11
|
+
publisherName: string;
|
|
12
|
+
publisherImage?: string | null;
|
|
13
|
+
publisherHref: string;
|
|
14
|
+
author?: string | null;
|
|
15
|
+
publishedAt?: number | null;
|
|
16
|
+
}
|
|
17
|
+
declare function AssetPublicationHeader({ name, ipType, standfirst, image, imgError, onImageError, onZoom, publisherName, publisherImage, publisherHref, author, publishedAt, }: AssetPublicationHeaderProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { AssetPublicationHeader, type AssetPublicationHeaderProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface AssetPublicationHeaderProps {
|
|
4
|
+
name: string;
|
|
5
|
+
ipType: string;
|
|
6
|
+
standfirst?: string | null;
|
|
7
|
+
image: string | null;
|
|
8
|
+
imgError: boolean;
|
|
9
|
+
onImageError: () => void;
|
|
10
|
+
onZoom: () => void;
|
|
11
|
+
publisherName: string;
|
|
12
|
+
publisherImage?: string | null;
|
|
13
|
+
publisherHref: string;
|
|
14
|
+
author?: string | null;
|
|
15
|
+
publishedAt?: number | null;
|
|
16
|
+
}
|
|
17
|
+
declare function AssetPublicationHeader({ name, ipType, standfirst, image, imgError, onImageError, onZoom, publisherName, publisherImage, publisherHref, author, publishedAt, }: AssetPublicationHeaderProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { AssetPublicationHeader, type AssetPublicationHeaderProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "./link.js";
|
|
4
|
+
import { IpTypeBadge } from "./ip-type-badge.js";
|
|
5
|
+
function AssetPublicationHeader({
|
|
6
|
+
name,
|
|
7
|
+
ipType,
|
|
8
|
+
standfirst,
|
|
9
|
+
image,
|
|
10
|
+
imgError,
|
|
11
|
+
onImageError,
|
|
12
|
+
onZoom,
|
|
13
|
+
publisherName,
|
|
14
|
+
publisherImage,
|
|
15
|
+
publisherHref,
|
|
16
|
+
author,
|
|
17
|
+
publishedAt
|
|
18
|
+
}) {
|
|
19
|
+
const date = publishedAt ? new Date(publishedAt * 1e3).toLocaleDateString(void 0, { dateStyle: "long" }) : null;
|
|
20
|
+
return /* @__PURE__ */ jsxs("header", { className: "space-y-6", children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4 max-w-4xl", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(IpTypeBadge, { ipType, size: "md" }),
|
|
23
|
+
/* @__PURE__ */ jsx("h1", { className: "text-3xl lg:text-5xl font-bold tracking-tight leading-tight break-words", children: name }),
|
|
24
|
+
standfirst ? /* @__PURE__ */ jsx("p", { className: "text-lg lg:text-xl leading-relaxed text-muted-foreground", children: standfirst }) : null,
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2 text-sm text-muted-foreground", children: [
|
|
26
|
+
/* @__PURE__ */ jsxs(Link, { href: publisherHref, className: "inline-flex items-center gap-2 font-medium text-foreground hover:text-primary transition-colors", children: [
|
|
27
|
+
publisherImage ? /* @__PURE__ */ jsx("img", { src: publisherImage, alt: "", className: "h-7 w-7 rounded-full object-cover" }) : null,
|
|
28
|
+
publisherName
|
|
29
|
+
] }),
|
|
30
|
+
author ? /* @__PURE__ */ jsx("span", { children: author }) : null,
|
|
31
|
+
date ? /* @__PURE__ */ jsx("span", { children: date }) : null
|
|
32
|
+
] })
|
|
33
|
+
] }),
|
|
34
|
+
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-[28rem] object-cover" }) }) : null
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
AssetPublicationHeader
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=asset-publication-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-publication-header.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\n\nexport interface AssetPublicationHeaderProps {\n name: string;\n ipType: string;\n standfirst?: string | null;\n image: string | null;\n imgError: boolean;\n onImageError: () => void;\n onZoom: () => void;\n publisherName: string;\n publisherImage?: string | null;\n publisherHref: string;\n author?: string | null;\n publishedAt?: number | null;\n}\n\nexport function AssetPublicationHeader({\n name,\n ipType,\n standfirst,\n image,\n imgError,\n onImageError,\n onZoom,\n publisherName,\n publisherImage,\n publisherHref,\n author,\n publishedAt,\n}: AssetPublicationHeaderProps) {\n const date = publishedAt ? new Date(publishedAt * 1000).toLocaleDateString(undefined, { dateStyle: \"long\" }) : null;\n return (\n <header className=\"space-y-6\">\n <div className=\"space-y-4 max-w-4xl\">\n <IpTypeBadge ipType={ipType} size=\"md\" />\n <h1 className=\"text-3xl lg:text-5xl font-bold tracking-tight leading-tight break-words\">{name}</h1>\n {standfirst ? <p className=\"text-lg lg:text-xl leading-relaxed text-muted-foreground\">{standfirst}</p> : null}\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-2 text-sm text-muted-foreground\">\n <Link href={publisherHref} className=\"inline-flex items-center gap-2 font-medium text-foreground hover:text-primary transition-colors\">\n {publisherImage ? <img src={publisherImage} alt=\"\" className=\"h-7 w-7 rounded-full object-cover\" /> : null}\n {publisherName}\n </Link>\n {author ? <span>{author}</span> : null}\n {date ? <span>{date}</span> : null}\n </div>\n </div>\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-[28rem] object-cover\" />\n </button>\n ) : null}\n </header>\n );\n}\n"],"mappings":";AAsCQ,cAIE,YAJF;AApCR,OAAO,UAAU;AACjB,SAAS,mBAAmB;AAiBrB,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgC;AAC9B,QAAM,OAAO,cAAc,IAAI,KAAK,cAAc,GAAI,EAAE,mBAAmB,QAAW,EAAE,WAAW,OAAO,CAAC,IAAI;AAC/G,SACE,qBAAC,YAAO,WAAU,aAChB;AAAA,yBAAC,SAAI,WAAU,uBACb;AAAA,0BAAC,eAAY,QAAgB,MAAK,MAAK;AAAA,MACvC,oBAAC,QAAG,WAAU,2EAA2E,gBAAK;AAAA,MAC7F,aAAa,oBAAC,OAAE,WAAU,4DAA4D,sBAAW,IAAO;AAAA,MACzG,qBAAC,SAAI,WAAU,6EACb;AAAA,6BAAC,QAAK,MAAM,eAAe,WAAU,mGAClC;AAAA,2BAAiB,oBAAC,SAAI,KAAK,gBAAgB,KAAI,IAAG,WAAU,qCAAoC,IAAK;AAAA,UACrG;AAAA,WACH;AAAA,QACC,SAAS,oBAAC,UAAM,kBAAO,IAAU;AAAA,QACjC,OAAO,oBAAC,UAAM,gBAAK,IAAU;AAAA,SAChC;AAAA,OACF;AAAA,IACC,SAAS,CAAC,WACT,oBAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAW,mBAAkB,WAAU,8EAC5E,8BAAC,SAAI,KAAK,OAAO,KAAK,MAAM,SAAS,cAAc,WAAU,4CAA2C,GAC1G,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?: "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "link" | "default" | "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?: "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "link" | "default" | "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;
|