@vellumlabs/cexplorer-sdk 1.1.8 → 1.1.9
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/index.es.js +1 -1
- package/dist/stories/dataDisplay/BlockCell.stories.d.ts +43 -0
- package/dist/stories/dataDisplay/BlockCell.stories.d.ts.map +1 -0
- package/dist/stories/dataDisplay/EpochCell.stories.d.ts +51 -0
- package/dist/stories/dataDisplay/EpochCell.stories.d.ts.map +1 -0
- package/dist/stories/feedback/SensitiveContentWarning.stories.d.ts +35 -0
- package/dist/stories/feedback/SensitiveContentWarning.stories.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/ui/blockCell/index.d.ts +111 -0
- package/dist/ui/blockCell/index.d.ts.map +1 -0
- package/dist/ui/epochCell/index.d.ts +156 -0
- package/dist/ui/epochCell/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/sensitiveContentWarning/index.d.ts +131 -0
- package/dist/ui/sensitiveContentWarning/index.d.ts.map +1 -0
- package/dist/ui/truncatedText/index.d.ts.map +1 -1
- package/dist/utils/format.d.ts +25 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/utils/format.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ export declare const toUtcDate: (input: string | Date | number) => Date;
|
|
|
103
103
|
* @param {string | Date | number} [input] - Date to format
|
|
104
104
|
* @param {boolean} [hideTime=false] - Hide time portion, show only date
|
|
105
105
|
* @param {boolean} [returnString=false] - Return ISO string instead of JSX
|
|
106
|
+
* @param {boolean} [showRelative=false] - Show relative time (e.g., "10 minutes ago") as main text
|
|
107
|
+
* @param {boolean} [showSecondary=false] - Show secondary date format below main text (small, muted)
|
|
106
108
|
* @returns {JSX.Element | string} Formatted date with tooltip or ISO string
|
|
107
109
|
*
|
|
108
110
|
* @example
|
|
@@ -116,8 +118,30 @@ export declare const toUtcDate: (input: string | Date | number) => Date;
|
|
|
116
118
|
* formatDate("2024-01-15T10:30:00Z", true)
|
|
117
119
|
* // Returns: <Tooltip>Jan 15 2024</Tooltip>
|
|
118
120
|
* ```
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```tsx
|
|
124
|
+
* // Withdrawals: relative time with absolute date below
|
|
125
|
+
* formatDate("2024-01-15T10:30:00Z", false, false, true, true)
|
|
126
|
+
* // Returns:
|
|
127
|
+
* // <div>
|
|
128
|
+
* // 10 minutes ago
|
|
129
|
+
* // <small class="text-muted">15.1.2024, 10:30:45</small>
|
|
130
|
+
* // </div>
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```tsx
|
|
135
|
+
* // Rewards: formatted date with alternative format below
|
|
136
|
+
* formatDate("2024-11-03T10:30:00Z", false, false, false, true)
|
|
137
|
+
* // Returns:
|
|
138
|
+
* // <div>
|
|
139
|
+
* // Nov 03 2024
|
|
140
|
+
* // <small class="text-muted">3.11.2024, 10:30:45</small>
|
|
141
|
+
* // </div>
|
|
142
|
+
* ```
|
|
119
143
|
*/
|
|
120
|
-
export declare const formatDate: (input?: string | Date | number, hideTime?: boolean, returnString?: boolean) => string | import("react/jsx-runtime").JSX.Element;
|
|
144
|
+
export declare const formatDate: (input?: string | Date | number, hideTime?: boolean, returnString?: boolean, showRelative?: boolean, showSecondary?: boolean) => string | import("react/jsx-runtime").JSX.Element;
|
|
121
145
|
/**
|
|
122
146
|
* Formats future timestamp as relative time ("in X time").
|
|
123
147
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,EAC7C,a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