@cranberry-money/shared-utils 8.23.353 → 8.23.361
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/instruments.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Asset
|
|
1
|
+
import type { Asset } from '@cranberry-money/shared-types';
|
|
2
2
|
/**
|
|
3
3
|
* Phase 7 Asset type display labels
|
|
4
4
|
*/
|
|
@@ -12,24 +12,24 @@ export type AllAssetTypes = typeof ASSET_TYPE_NATIVE_CRYPTO | typeof ASSET_TYPE_
|
|
|
12
12
|
* Get the type label for any asset (Phase 7)
|
|
13
13
|
* Maps backend AssetType enum to display labels
|
|
14
14
|
*
|
|
15
|
-
* @param asset - Any asset object
|
|
15
|
+
* @param asset - Any asset object
|
|
16
16
|
* @returns The asset type display label
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* const type = getAssetType(asset);
|
|
20
20
|
* // Returns: 'Crypto' | 'Stablecoin' | 'Tokenized Security' | 'Real-World Asset' | 'Synthetic'
|
|
21
21
|
*/
|
|
22
|
-
export declare function getAssetType(asset: Asset
|
|
22
|
+
export declare function getAssetType(asset: Asset): AllAssetTypes;
|
|
23
23
|
/**
|
|
24
24
|
* Get the color variant for any asset type (Phase 7)
|
|
25
25
|
* Useful for badge components and visual differentiation
|
|
26
26
|
*
|
|
27
|
-
* @param asset - Any asset object
|
|
27
|
+
* @param asset - Any asset object
|
|
28
28
|
* @returns A color variant identifier
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* const variant = getAssetTypeVariant(asset);
|
|
32
32
|
* // Returns: 'primary' | 'warning' | 'success' | 'info' | 'neutral'
|
|
33
33
|
*/
|
|
34
|
-
export declare function getAssetTypeVariant(asset: Asset
|
|
34
|
+
export declare function getAssetTypeVariant(asset: Asset): 'primary' | 'warning' | 'success' | 'info' | 'neutral';
|
|
35
35
|
//# sourceMappingURL=instruments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruments.d.ts","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"instruments.d.ts","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,wBAAwB,WAAW,CAAC;AACjD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,6BAA6B,uBAAuB,CAAC;AAClE,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,MAAM,MAAM,aAAa,GACrB,OAAO,wBAAwB,GAC/B,OAAO,qBAAqB,GAC5B,OAAO,6BAA6B,GACpC,OAAO,wBAAwB,GAC/B,OAAO,oBAAoB,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAqBxD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAqBxG"}
|
package/dist/instruments.js
CHANGED
|
@@ -10,7 +10,7 @@ export const ASSET_TYPE_SYNTHETIC = 'Synthetic';
|
|
|
10
10
|
* Get the type label for any asset (Phase 7)
|
|
11
11
|
* Maps backend AssetType enum to display labels
|
|
12
12
|
*
|
|
13
|
-
* @param asset - Any asset object
|
|
13
|
+
* @param asset - Any asset object
|
|
14
14
|
* @returns The asset type display label
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
@@ -41,7 +41,7 @@ export function getAssetType(asset) {
|
|
|
41
41
|
* Get the color variant for any asset type (Phase 7)
|
|
42
42
|
* Useful for badge components and visual differentiation
|
|
43
43
|
*
|
|
44
|
-
* @param asset - Any asset object
|
|
44
|
+
* @param asset - Any asset object
|
|
45
45
|
* @returns A color variant identifier
|
|
46
46
|
*
|
|
47
47
|
* @example
|
package/dist/instruments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruments.js","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAShD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"instruments.js","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAShD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,IAAI,WAAW,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAElC,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,eAAe;gBAClB,OAAO,wBAAwB,CAAC;YAClC,KAAK,YAAY;gBACf,OAAO,qBAAqB,CAAC;YAC/B,KAAK,oBAAoB;gBACvB,OAAO,6BAA6B,CAAC;YACvC,KAAK,eAAe;gBAClB,OAAO,wBAAwB,CAAC;YAClC,KAAK,WAAW;gBACd,OAAO,oBAAoB,CAAC;YAC9B;gBACE,OAAO,oBAAoB,CAAC,CAAC,WAAW;QAC5C,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,CAAC,CAAC,WAAW;AAC1C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAY;IAC9C,IAAI,WAAW,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAElC,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,eAAe;gBAClB,OAAO,SAAS,CAAC,CAAC,qCAAqC;YACzD,KAAK,YAAY;gBACf,OAAO,MAAM,CAAC,CAAC,0CAA0C;YAC3D,KAAK,oBAAoB;gBACvB,OAAO,SAAS,CAAC,CAAC,yCAAyC;YAC7D,KAAK,eAAe;gBAClB,OAAO,SAAS,CAAC,CAAC,4CAA4C;YAChE,KAAK,WAAW;gBACd,OAAO,SAAS,CAAC,CAAC,4BAA4B;YAChD;gBACE,OAAO,SAAS,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cranberry-money/shared-utils",
|
|
3
|
-
"version": "8.23.
|
|
3
|
+
"version": "8.23.361",
|
|
4
4
|
"description": "Shared utility functions for Blueberry platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"prepublishOnly": "npm run clean && npm run typecheck && npm test && npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cranberry-money/shared-constants": "^8.15.
|
|
33
|
-
"@cranberry-money/shared-types": "^8.22.
|
|
32
|
+
"@cranberry-money/shared-constants": "^8.15.386",
|
|
33
|
+
"@cranberry-money/shared-types": "^8.22.361"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/jest": "^30.0.0",
|