@cryptlex/web-components 6.6.6-alpha01 → 6.6.6-alpha02

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.
@@ -1 +1,5 @@
1
1
  export declare function formatNumber(num: number | bigint): string;
2
+ /**
3
+ * @returns A formatted string for the number of bytes
4
+ */
5
+ export declare function formatFilesize(bytes: number): string;
@@ -1,2 +1,2 @@
1
- function t(r){return Intl.NumberFormat().format(r)}export{t as formatNumber};
1
+ function e(r){return Intl.NumberFormat(navigator.language).format(r)}function n(r){return r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(2)} MB`:`${(r/(1024*1024*1024)).toFixed(2)} GB`}export{n as formatFilesize,e as formatNumber};
2
2
  //# sourceMappingURL=numbers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"numbers.js","sources":["../../lib/utilities/numbers.ts"],"sourcesContent":["export function formatNumber(num: number | bigint) {\n return Intl.NumberFormat().format(num);\n}\n"],"names":["formatNumber","num"],"mappings":"AAAO,SAASA,EAAaC,EAAsB,CAC/C,OAAO,KAAK,eAAe,OAAOA,CAAG,CACzC"}
1
+ {"version":3,"file":"numbers.js","sources":["../../lib/utilities/numbers.ts"],"sourcesContent":["export function formatNumber(num: number | bigint) {\n return Intl.NumberFormat(navigator.language).format(num);\n}\n\n/**\n * @returns A formatted string for the number of bytes\n */\nexport function formatFilesize(bytes: number): string {\n if (bytes < 1024) {\n return `${bytes} B`;\n } else if (bytes < 1024 * 1024) {\n return `${(bytes / 1024).toFixed(1)} KB`;\n } else if (bytes < 1024 * 1024 * 1024) {\n return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;\n } else {\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;\n }\n}\n"],"names":["formatNumber","num","formatFilesize","bytes"],"mappings":"AAAO,SAASA,EAAaC,EAAsB,CAC/C,OAAO,KAAK,aAAa,UAAU,QAAQ,EAAE,OAAOA,CAAG,CAC3D,CAKO,SAASC,EAAeC,EAAuB,CAClD,OAAIA,EAAQ,KACD,GAAGA,CAAK,KACRA,EAAQ,KAAO,KACf,IAAIA,EAAQ,MAAM,QAAQ,CAAC,CAAC,MAC5BA,EAAQ,KAAO,KAAO,KACtB,IAAIA,GAAS,KAAO,OAAO,QAAQ,CAAC,CAAC,MAErC,IAAIA,GAAS,KAAO,KAAO,OAAO,QAAQ,CAAC,CAAC,KAE3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptlex/web-components",
3
- "version": "6.6.6-alpha01",
3
+ "version": "6.6.6-alpha02",
4
4
  "description": "React component library for Cryptlex web applications",
5
5
  "author": "Cryptlex",
6
6
  "type": "module",