@cranberry-money/shared-utils 8.23.300 → 8.23.309
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, Instrument
|
|
1
|
+
import type { Asset, Instrument } from '@cranberry-money/shared-types';
|
|
2
2
|
/**
|
|
3
3
|
* Asset type labels (for traditional instruments)
|
|
4
4
|
*/
|
|
@@ -42,24 +42,24 @@ export declare function getInstrumentTypeVariant(instrument: Instrument): 'prima
|
|
|
42
42
|
* Get the type label for any asset (instruments, crypto, stablecoins).
|
|
43
43
|
* Handles Asset base type and all child types.
|
|
44
44
|
*
|
|
45
|
-
* @param asset - Any asset object (Asset
|
|
45
|
+
* @param asset - Any asset object (Asset or Instrument)
|
|
46
46
|
* @returns The asset type display label
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* const type = getAssetType(asset);
|
|
50
50
|
* // Returns: 'ETF' | 'Fund' | 'Stock' | 'Crypto' | 'Stablecoin'
|
|
51
51
|
*/
|
|
52
|
-
export declare function getAssetType(asset: Asset | Instrument
|
|
52
|
+
export declare function getAssetType(asset: Asset | Instrument): AllAssetTypes;
|
|
53
53
|
/**
|
|
54
54
|
* Get the color variant for any asset type.
|
|
55
55
|
* Useful for badge components and visual differentiation across all asset types.
|
|
56
56
|
*
|
|
57
|
-
* @param asset - Any asset object (Asset
|
|
57
|
+
* @param asset - Any asset object (Asset or Instrument)
|
|
58
58
|
* @returns A color variant identifier
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
61
|
* const variant = getAssetTypeVariant(asset);
|
|
62
62
|
* // Returns: 'primary' | 'warning' | 'success' | 'info' | 'neutral'
|
|
63
63
|
*/
|
|
64
|
-
export declare function getAssetTypeVariant(asset: Asset | Instrument
|
|
64
|
+
export declare function getAssetTypeVariant(asset: Asset | Instrument): 'primary' | 'warning' | 'success' | 'info' | 'neutral';
|
|
65
65
|
//# 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,UAAU,
|
|
1
|
+
{"version":3,"file":"instruments.d.ts","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAa,MAAM,+BAA+B,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AACzC,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,OAAO,mBAAmB,GAAG,OAAO,oBAAoB,GAAG,OAAO,qBAAqB,CAAC;AACrH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,OAAO,iBAAiB,GAAG,OAAO,qBAAqB,CAAC;AAErG;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CAIxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAIlG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,GAAG,aAAa,CA0BrE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,GAAG,UAAU,GACxB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA0BxD"}
|
package/dist/instruments.js
CHANGED
|
@@ -51,7 +51,7 @@ export function getInstrumentTypeVariant(instrument) {
|
|
|
51
51
|
* Get the type label for any asset (instruments, crypto, stablecoins).
|
|
52
52
|
* Handles Asset base type and all child types.
|
|
53
53
|
*
|
|
54
|
-
* @param asset - Any asset object (Asset
|
|
54
|
+
* @param asset - Any asset object (Asset or Instrument)
|
|
55
55
|
* @returns The asset type display label
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
@@ -89,7 +89,7 @@ export function getAssetType(asset) {
|
|
|
89
89
|
* Get the color variant for any asset type.
|
|
90
90
|
* Useful for badge components and visual differentiation across all asset types.
|
|
91
91
|
*
|
|
92
|
-
* @param asset - Any asset object (Asset
|
|
92
|
+
* @param asset - Any asset object (Asset or Instrument)
|
|
93
93
|
* @returns A color variant identifier
|
|
94
94
|
*
|
|
95
95
|
* @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,mBAAmB,GAAG,KAAK,CAAC;AACzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAKlD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,IAAI,UAAU,CAAC,KAAK;QAAE,OAAO,mBAAmB,CAAC;IACjD,IAAI,UAAU,CAAC,MAAM;QAAE,OAAO,oBAAoB,CAAC;IACnD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,UAAsB;IAC7D,IAAI,UAAU,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IACvC,IAAI,UAAU,CAA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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.309",
|
|
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.334",
|
|
33
|
+
"@cranberry-money/shared-types": "^8.22.309"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/jest": "^30.0.0",
|