@medialane/ui 0.1.6 → 0.3.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/activity-feed-shell.cjs +90 -0
- package/dist/components/activity-feed-shell.cjs.map +1 -0
- package/dist/components/activity-feed-shell.d.cts +13 -0
- package/dist/components/activity-feed-shell.d.ts +13 -0
- package/dist/components/activity-feed-shell.js +56 -0
- package/dist/components/activity-feed-shell.js.map +1 -0
- package/dist/components/activity-row.cjs +95 -0
- package/dist/components/activity-row.cjs.map +1 -0
- package/dist/components/activity-row.d.cts +20 -0
- package/dist/components/activity-row.d.ts +20 -0
- package/dist/components/activity-row.js +61 -0
- package/dist/components/activity-row.js.map +1 -0
- package/dist/components/activity-ticker.cjs +92 -0
- package/dist/components/activity-ticker.cjs.map +1 -0
- package/dist/components/activity-ticker.d.cts +12 -0
- package/dist/components/activity-ticker.d.ts +12 -0
- package/dist/components/activity-ticker.js +58 -0
- package/dist/components/activity-ticker.js.map +1 -0
- package/dist/components/collection-card.cjs +124 -0
- package/dist/components/collection-card.cjs.map +1 -0
- package/dist/components/collection-card.d.cts +13 -0
- package/dist/components/collection-card.d.ts +13 -0
- package/dist/components/collection-card.js +89 -0
- package/dist/components/collection-card.js.map +1 -0
- package/dist/components/cta-card-grid.cjs +67 -0
- package/dist/components/cta-card-grid.cjs.map +1 -0
- package/dist/components/cta-card-grid.d.cts +23 -0
- package/dist/components/cta-card-grid.d.ts +23 -0
- package/dist/components/cta-card-grid.js +33 -0
- package/dist/components/cta-card-grid.js.map +1 -0
- package/dist/components/hero-slider.cjs +133 -0
- package/dist/components/hero-slider.cjs.map +1 -0
- package/dist/components/hero-slider.d.cts +12 -0
- package/dist/components/hero-slider.d.ts +12 -0
- package/dist/components/hero-slider.js +98 -0
- package/dist/components/hero-slider.js.map +1 -0
- package/dist/components/launchpad-grid.cjs +77 -0
- package/dist/components/launchpad-grid.cjs.map +1 -0
- package/dist/components/launchpad-grid.d.cts +20 -0
- package/dist/components/launchpad-grid.d.ts +20 -0
- package/dist/components/launchpad-grid.js +43 -0
- package/dist/components/launchpad-grid.js.map +1 -0
- package/dist/components/listing-card.cjs +146 -0
- package/dist/components/listing-card.cjs.map +1 -0
- package/dist/components/listing-card.d.cts +16 -0
- package/dist/components/listing-card.d.ts +16 -0
- package/dist/components/listing-card.js +111 -0
- package/dist/components/listing-card.js.map +1 -0
- package/dist/components/motion-primitives.cjs +126 -0
- package/dist/components/motion-primitives.cjs.map +1 -0
- package/dist/components/motion-primitives.d.cts +36 -0
- package/dist/components/motion-primitives.d.ts +36 -0
- package/dist/components/motion-primitives.js +96 -0
- package/dist/components/motion-primitives.js.map +1 -0
- package/dist/components/scroll-section.cjs +72 -0
- package/dist/components/scroll-section.cjs.map +1 -0
- package/dist/components/scroll-section.d.cts +18 -0
- package/dist/components/scroll-section.d.ts +18 -0
- package/dist/components/scroll-section.js +38 -0
- package/dist/components/scroll-section.js.map +1 -0
- package/dist/components/share-button.cjs +86 -0
- package/dist/components/share-button.cjs.map +1 -0
- package/dist/components/share-button.d.cts +12 -0
- package/dist/components/share-button.d.ts +12 -0
- package/dist/components/share-button.js +62 -0
- package/dist/components/share-button.js.map +1 -0
- package/dist/components/token-card.cjs +281 -0
- package/dist/components/token-card.cjs.map +1 -0
- package/dist/components/token-card.d.cts +31 -0
- package/dist/components/token-card.d.ts +31 -0
- package/dist/components/token-card.js +256 -0
- package/dist/components/token-card.js.map +1 -0
- package/dist/data/activity.cjs +48 -0
- package/dist/data/activity.cjs.map +1 -0
- package/dist/data/activity.d.cts +16 -0
- package/dist/data/activity.d.ts +16 -0
- package/dist/data/activity.js +23 -0
- package/dist/data/activity.js.map +1 -0
- package/dist/index.cjs +66 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +40 -1
- package/dist/index.js.map +1 -1
- package/dist/medialane.css +184 -0
- package/dist/utils/time.cjs +42 -0
- package/dist/utils/time.cjs.map +1 -0
- package/dist/utils/time.d.cts +7 -0
- package/dist/utils/time.d.ts +7 -0
- package/dist/utils/time.js +18 -0
- package/dist/utils/time.js.map +1 -0
- package/package.json +17 -10
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var time_exports = {};
|
|
20
|
+
__export(time_exports, {
|
|
21
|
+
timeAgo: () => timeAgo
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(time_exports);
|
|
24
|
+
function timeAgo(iso) {
|
|
25
|
+
const diff = Date.now() - new Date(iso).getTime();
|
|
26
|
+
const s = Math.floor(diff / 1e3);
|
|
27
|
+
if (s < 60) return "just now";
|
|
28
|
+
const m = Math.floor(s / 60);
|
|
29
|
+
if (m < 60) return `${m}m ago`;
|
|
30
|
+
const h = Math.floor(m / 60);
|
|
31
|
+
if (h < 24) return `${h}h ago`;
|
|
32
|
+
const d = Math.floor(h / 24);
|
|
33
|
+
if (d < 30) return `${d}d ago`;
|
|
34
|
+
const mo = Math.floor(d / 30);
|
|
35
|
+
if (mo < 12) return `${mo}mo ago`;
|
|
36
|
+
return `${Math.floor(mo / 12)}y ago`;
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
timeAgo
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=time.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/time.ts"],"sourcesContent":["/**\n * Returns a human-readable relative time string.\n * e.g. \"just now\", \"2m ago\", \"3h ago\", \"5d ago\"\n */\nexport function timeAgo(iso: string): string {\n const diff = Date.now() - new Date(iso).getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return \"just now\";\n const m = Math.floor(s / 60);\n if (m < 60) return `${m}m ago`;\n const h = Math.floor(m / 60);\n if (h < 24) return `${h}h ago`;\n const d = Math.floor(h / 24);\n if (d < 30) return `${d}d ago`;\n const mo = Math.floor(d / 30);\n if (mo < 12) return `${mo}mo ago`;\n return `${Math.floor(mo / 12)}y ago`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,QAAQ,KAAqB;AAC3C,QAAM,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,EAAE,QAAQ;AAChD,QAAM,IAAI,KAAK,MAAM,OAAO,GAAI;AAChC,MAAI,IAAI,GAAI,QAAO;AACnB,QAAM,IAAI,KAAK,MAAM,IAAI,EAAE;AAC3B,MAAI,IAAI,GAAI,QAAO,GAAG,CAAC;AACvB,QAAM,IAAI,KAAK,MAAM,IAAI,EAAE;AAC3B,MAAI,IAAI,GAAI,QAAO,GAAG,CAAC;AACvB,QAAM,IAAI,KAAK,MAAM,IAAI,EAAE;AAC3B,MAAI,IAAI,GAAI,QAAO,GAAG,CAAC;AACvB,QAAM,KAAK,KAAK,MAAM,IAAI,EAAE;AAC5B,MAAI,KAAK,GAAI,QAAO,GAAG,EAAE;AACzB,SAAO,GAAG,KAAK,MAAM,KAAK,EAAE,CAAC;AAC/B;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function timeAgo(iso) {
|
|
2
|
+
const diff = Date.now() - new Date(iso).getTime();
|
|
3
|
+
const s = Math.floor(diff / 1e3);
|
|
4
|
+
if (s < 60) return "just now";
|
|
5
|
+
const m = Math.floor(s / 60);
|
|
6
|
+
if (m < 60) return `${m}m ago`;
|
|
7
|
+
const h = Math.floor(m / 60);
|
|
8
|
+
if (h < 24) return `${h}h ago`;
|
|
9
|
+
const d = Math.floor(h / 24);
|
|
10
|
+
if (d < 30) return `${d}d ago`;
|
|
11
|
+
const mo = Math.floor(d / 30);
|
|
12
|
+
if (mo < 12) return `${mo}mo ago`;
|
|
13
|
+
return `${Math.floor(mo / 12)}y ago`;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
timeAgo
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/time.ts"],"sourcesContent":["/**\n * Returns a human-readable relative time string.\n * e.g. \"just now\", \"2m ago\", \"3h ago\", \"5d ago\"\n */\nexport function timeAgo(iso: string): string {\n const diff = Date.now() - new Date(iso).getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return \"just now\";\n const m = Math.floor(s / 60);\n if (m < 60) return `${m}m ago`;\n const h = Math.floor(m / 60);\n if (h < 24) return `${h}h ago`;\n const d = Math.floor(h / 24);\n if (d < 30) return `${d}d ago`;\n const mo = Math.floor(d / 30);\n if (mo < 12) return `${mo}mo ago`;\n return `${Math.floor(mo / 12)}y ago`;\n}\n"],"mappings":"AAIO,SAAS,QAAQ,KAAqB;AAC3C,QAAM,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,EAAE,QAAQ;AAChD,QAAM,IAAI,KAAK,MAAM,OAAO,GAAI;AAChC,MAAI,IAAI,GAAI,QAAO;AACnB,QAAM,IAAI,KAAK,MAAM,IAAI,EAAE;AAC3B,MAAI,IAAI,GAAI,QAAO,GAAG,CAAC;AACvB,QAAM,IAAI,KAAK,MAAM,IAAI,EAAE;AAC3B,MAAI,IAAI,GAAI,QAAO,GAAG,CAAC;AACvB,QAAM,IAAI,KAAK,MAAM,IAAI,EAAE;AAC3B,MAAI,IAAI,GAAI,QAAO,GAAG,CAAC;AACvB,QAAM,KAAK,KAAK,MAAM,IAAI,EAAE;AAC5B,MAAI,KAAK,GAAI,QAAO,GAAG,EAAE;AACzB,SAAO,GAAG,KAAK,MAAM,KAAK,EAAE,CAAC;AAC/B;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medialane/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Shared UI components for Medialane apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"types": "./dist/preset/tailwind.d.ts",
|
|
17
17
|
"import": "./dist/preset/tailwind.js",
|
|
18
18
|
"require": "./dist/preset/tailwind.cjs"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./styles": "./dist/medialane.css"
|
|
20
21
|
},
|
|
21
22
|
"license": "MIT",
|
|
22
23
|
"publishConfig": {
|
|
@@ -35,20 +36,26 @@
|
|
|
35
36
|
"next-themes": ">=0.3.0",
|
|
36
37
|
"lucide-react": ">=0.400.0",
|
|
37
38
|
"tailwind-merge": ">=2.0.0",
|
|
38
|
-
"clsx": ">=2.0.0"
|
|
39
|
+
"clsx": ">=2.0.0",
|
|
40
|
+
"framer-motion": ">=10.0.0",
|
|
41
|
+
"sonner": ">=1.0.0",
|
|
42
|
+
"@medialane/sdk": ">=0.6.0"
|
|
39
43
|
},
|
|
40
44
|
"devDependencies": {
|
|
41
|
-
"
|
|
42
|
-
"react
|
|
45
|
+
"@medialane/sdk": "^0.6.7",
|
|
46
|
+
"@types/react": "^19.0.0",
|
|
47
|
+
"@types/react-dom": "^19.0.0",
|
|
48
|
+
"clsx": "^2.0.0",
|
|
49
|
+
"framer-motion": "^11.0.0",
|
|
50
|
+
"lucide-react": "^0.400.0",
|
|
43
51
|
"next": "^15.0.0",
|
|
44
52
|
"next-themes": "^0.4.0",
|
|
45
|
-
"
|
|
53
|
+
"react": "^19.0.0",
|
|
54
|
+
"react-dom": "^19.0.0",
|
|
55
|
+
"sonner": "^1.5.0",
|
|
46
56
|
"tailwind-merge": "^2.0.0",
|
|
47
|
-
"clsx": "^2.0.0",
|
|
48
57
|
"tailwindcss": "^3.0.0",
|
|
49
58
|
"tsup": "^8.0.0",
|
|
50
|
-
"typescript": "^5.6.0"
|
|
51
|
-
"@types/react": "^19.0.0",
|
|
52
|
-
"@types/react-dom": "^19.0.0"
|
|
59
|
+
"typescript": "^5.6.0"
|
|
53
60
|
}
|
|
54
61
|
}
|