@medialane/ui 0.11.0 → 0.11.2

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.
Files changed (85) hide show
  1. package/dist/components/activity-card.cjs +2 -1
  2. package/dist/components/activity-card.cjs.map +1 -1
  3. package/dist/components/activity-card.d.cts +15 -0
  4. package/dist/components/activity-card.d.ts +15 -0
  5. package/dist/components/activity-card.js +2 -1
  6. package/dist/components/activity-card.js.map +1 -1
  7. package/dist/components/activity-feed-shell.d.cts +13 -0
  8. package/dist/components/activity-feed-shell.d.ts +13 -0
  9. package/dist/components/activity-row.d.cts +20 -0
  10. package/dist/components/activity-row.d.ts +20 -0
  11. package/dist/components/activity-ticker.d.cts +13 -0
  12. package/dist/components/activity-ticker.d.ts +13 -0
  13. package/dist/components/address-display.d.cts +12 -0
  14. package/dist/components/address-display.d.ts +12 -0
  15. package/dist/components/brand-icon.d.cts +10 -0
  16. package/dist/components/brand-icon.d.ts +10 -0
  17. package/dist/components/brand-logo.d.cts +11 -0
  18. package/dist/components/brand-logo.d.ts +11 -0
  19. package/dist/components/collection-card.d.cts +13 -0
  20. package/dist/components/collection-card.d.ts +13 -0
  21. package/dist/components/cta-card-grid.d.cts +23 -0
  22. package/dist/components/cta-card-grid.d.ts +23 -0
  23. package/dist/components/currency-icon.d.cts +25 -0
  24. package/dist/components/currency-icon.d.ts +25 -0
  25. package/dist/components/discover-collections-strip.d.cts +14 -0
  26. package/dist/components/discover-collections-strip.d.ts +14 -0
  27. package/dist/components/discover-creators-strip.d.cts +14 -0
  28. package/dist/components/discover-creators-strip.d.ts +14 -0
  29. package/dist/components/discover-feed-section.d.cts +24 -0
  30. package/dist/components/discover-feed-section.d.ts +24 -0
  31. package/dist/components/discover-hero.d.cts +17 -0
  32. package/dist/components/discover-hero.d.ts +17 -0
  33. package/dist/components/featured-carousel.d.cts +13 -0
  34. package/dist/components/featured-carousel.d.ts +13 -0
  35. package/dist/components/hero-slider.d.cts +17 -0
  36. package/dist/components/hero-slider.d.ts +17 -0
  37. package/dist/components/ip-type-badge.d.cts +21 -0
  38. package/dist/components/ip-type-badge.d.ts +21 -0
  39. package/dist/components/launchpad-services.d.cts +43 -0
  40. package/dist/components/launchpad-services.d.ts +43 -0
  41. package/dist/components/listing-card.d.cts +16 -0
  42. package/dist/components/listing-card.d.ts +16 -0
  43. package/dist/components/motion-primitives.d.cts +36 -0
  44. package/dist/components/motion-primitives.d.ts +36 -0
  45. package/dist/components/nav-command-menu.d.cts +51 -0
  46. package/dist/components/nav-command-menu.d.ts +51 -0
  47. package/dist/components/page-container.d.cts +15 -0
  48. package/dist/components/page-container.d.ts +15 -0
  49. package/dist/components/portfolio-subnav.d.cts +27 -0
  50. package/dist/components/portfolio-subnav.d.ts +27 -0
  51. package/dist/components/scroll-section.d.cts +18 -0
  52. package/dist/components/scroll-section.d.ts +18 -0
  53. package/dist/components/share-button.d.cts +12 -0
  54. package/dist/components/share-button.d.ts +12 -0
  55. package/dist/components/token-card.d.cts +31 -0
  56. package/dist/components/token-card.d.ts +31 -0
  57. package/dist/data/activity.d.cts +16 -0
  58. package/dist/data/activity.d.ts +16 -0
  59. package/dist/data/brand.d.cts +44 -0
  60. package/dist/data/brand.d.ts +44 -0
  61. package/dist/data/ip-types.d.cts +13 -0
  62. package/dist/data/ip-types.d.ts +13 -0
  63. package/dist/data/launchpad-services.cjs +3 -3
  64. package/dist/data/launchpad-services.cjs.map +1 -1
  65. package/dist/data/launchpad-services.d.cts +42 -0
  66. package/dist/data/launchpad-services.d.ts +42 -0
  67. package/dist/data/launchpad-services.js +3 -3
  68. package/dist/data/launchpad-services.js.map +1 -1
  69. package/dist/index.d.cts +42 -0
  70. package/dist/index.d.ts +42 -0
  71. package/dist/preset/tailwind.d.cts +5 -0
  72. package/dist/preset/tailwind.d.ts +5 -0
  73. package/dist/utils/address.d.cts +7 -0
  74. package/dist/utils/address.d.ts +7 -0
  75. package/dist/utils/cn.d.cts +5 -0
  76. package/dist/utils/cn.d.ts +5 -0
  77. package/dist/utils/format.d.cts +7 -0
  78. package/dist/utils/format.d.ts +7 -0
  79. package/dist/utils/ipfs.d.cts +11 -0
  80. package/dist/utils/ipfs.d.ts +11 -0
  81. package/dist/utils/portfolio-counts.d.cts +33 -0
  82. package/dist/utils/portfolio-counts.d.ts +33 -0
  83. package/dist/utils/time.d.cts +7 -0
  84. package/dist/utils/time.d.ts +7 -0
  85. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ export { cn };
@@ -0,0 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ export { cn };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Format a display price string with adaptive decimal places.
3
+ * Handles "1.234 USDC" format — reformats the numeric part, preserves the symbol.
4
+ */
5
+ declare function formatDisplayPrice(price: string | number | null | undefined): string;
6
+
7
+ export { formatDisplayPrice };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Format a display price string with adaptive decimal places.
3
+ * Handles "1.234 USDC" format — reformats the numeric part, preserves the symbol.
4
+ */
5
+ declare function formatDisplayPrice(price: string | number | null | undefined): string;
6
+
7
+ export { formatDisplayPrice };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Convert an IPFS URI to an HTTP URL.
3
+ * Accepts ipfs://<cid>, ipfs://<cid>/<path>, or plain HTTP/HTTPS URLs.
4
+ * Rejects javascript:, data:, blob:, and any other non-allowlisted protocols.
5
+ *
6
+ * @param uri - The IPFS URI or HTTP URL to convert.
7
+ * @param gateway - Gateway base URL (default: ipfs.io). Should end without a trailing slash.
8
+ */
9
+ declare function ipfsToHttp(uri: string | null | undefined, gateway?: string): string;
10
+
11
+ export { ipfsToHttp };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Convert an IPFS URI to an HTTP URL.
3
+ * Accepts ipfs://<cid>, ipfs://<cid>/<path>, or plain HTTP/HTTPS URLs.
4
+ * Rejects javascript:, data:, blob:, and any other non-allowlisted protocols.
5
+ *
6
+ * @param uri - The IPFS URI or HTTP URL to convert.
7
+ * @param gateway - Gateway base URL (default: ipfs.io). Should end without a trailing slash.
8
+ */
9
+ declare function ipfsToHttp(uri: string | null | undefined, gateway?: string): string;
10
+
11
+ export { ipfsToHttp };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Minimal structural shape of a marketplace order needed to derive portfolio
3
+ * counts. `ApiOrder` from `@medialane/sdk` is structurally assignable to this,
4
+ * so callers pass their `ApiOrder[]` directly and the package stays decoupled
5
+ * from any specific SDK version.
6
+ */
7
+ interface CountableOrder {
8
+ status: string;
9
+ offerer: string;
10
+ offer: {
11
+ itemType: string;
12
+ };
13
+ hasActiveCounterOffer?: boolean;
14
+ }
15
+ interface PortfolioCounts {
16
+ /** Active ERC-20 offers made by others on the user's assets. */
17
+ received: number;
18
+ /** Active ERC-721/ERC-1155 listings the user is selling. */
19
+ listings: number;
20
+ /** Pending remix offers awaiting the user's action. */
21
+ remix: number;
22
+ /** The user's bids that a seller has countered. */
23
+ counter: number;
24
+ }
25
+ /**
26
+ * Derive the portfolio header/subnav counts from the user's orders and remix
27
+ * offers. Pure and server-safe (no React). Guards nullish inputs.
28
+ */
29
+ declare function derivePortfolioCounts(orders: ReadonlyArray<CountableOrder> | null | undefined, remixOffers: ReadonlyArray<{
30
+ status: string;
31
+ }> | null | undefined, address: string | null | undefined): PortfolioCounts;
32
+
33
+ export { type CountableOrder, type PortfolioCounts, derivePortfolioCounts };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Minimal structural shape of a marketplace order needed to derive portfolio
3
+ * counts. `ApiOrder` from `@medialane/sdk` is structurally assignable to this,
4
+ * so callers pass their `ApiOrder[]` directly and the package stays decoupled
5
+ * from any specific SDK version.
6
+ */
7
+ interface CountableOrder {
8
+ status: string;
9
+ offerer: string;
10
+ offer: {
11
+ itemType: string;
12
+ };
13
+ hasActiveCounterOffer?: boolean;
14
+ }
15
+ interface PortfolioCounts {
16
+ /** Active ERC-20 offers made by others on the user's assets. */
17
+ received: number;
18
+ /** Active ERC-721/ERC-1155 listings the user is selling. */
19
+ listings: number;
20
+ /** Pending remix offers awaiting the user's action. */
21
+ remix: number;
22
+ /** The user's bids that a seller has countered. */
23
+ counter: number;
24
+ }
25
+ /**
26
+ * Derive the portfolio header/subnav counts from the user's orders and remix
27
+ * offers. Pure and server-safe (no React). Guards nullish inputs.
28
+ */
29
+ declare function derivePortfolioCounts(orders: ReadonlyArray<CountableOrder> | null | undefined, remixOffers: ReadonlyArray<{
30
+ status: string;
31
+ }> | null | undefined, address: string | null | undefined): PortfolioCounts;
32
+
33
+ export { type CountableOrder, type PortfolioCounts, derivePortfolioCounts };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns a human-readable relative time string.
3
+ * e.g. "just now", "2m ago", "3h ago", "5d ago"
4
+ */
5
+ declare function timeAgo(iso: string): string;
6
+
7
+ export { timeAgo };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns a human-readable relative time string.
3
+ * e.g. "just now", "2m ago", "3h ago", "5d ago"
4
+ */
5
+ declare function timeAgo(iso: string): string;
6
+
7
+ export { timeAgo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medialane/ui",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "Shared UI components for Medialane apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",