@atscript/ui 0.1.108 → 0.1.110
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.cjs +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2074,7 +2074,7 @@ function joinDecimalString(parts) {
|
|
|
2074
2074
|
return `${parts.sign}${body}`;
|
|
2075
2075
|
}
|
|
2076
2076
|
function formatDecimalForDisplay(opts) {
|
|
2077
|
-
const { value, scale, locale, currency, unit, useGrouping =
|
|
2077
|
+
const { value, scale, locale, currency, unit, useGrouping = currency !== void 0 || unit !== void 0 || scale !== void 0 } = opts;
|
|
2078
2078
|
if (value === null || value === void 0 || value === "") return "";
|
|
2079
2079
|
let canonical;
|
|
2080
2080
|
if (typeof value === "number") {
|
package/dist/index.d.cts
CHANGED
|
@@ -897,7 +897,11 @@ interface FormatDecimalOptions {
|
|
|
897
897
|
currency?: string;
|
|
898
898
|
/** When set (and no currency) → "<formatted> <unit>". */
|
|
899
899
|
unit?: string;
|
|
900
|
-
/**
|
|
900
|
+
/**
|
|
901
|
+
* Whether to group thousands. Grouping is reserved for measured values, so
|
|
902
|
+
* the default is derived: true when `currency`, `unit`, or `scale` is set,
|
|
903
|
+
* false for plain numbers. Pass explicitly to override.
|
|
904
|
+
*/
|
|
901
905
|
useGrouping?: boolean;
|
|
902
906
|
}
|
|
903
907
|
/** "." in en-US, "," in fr-FR. Returns "." when locale is undefined. */
|
package/dist/index.d.mts
CHANGED
|
@@ -897,7 +897,11 @@ interface FormatDecimalOptions {
|
|
|
897
897
|
currency?: string;
|
|
898
898
|
/** When set (and no currency) → "<formatted> <unit>". */
|
|
899
899
|
unit?: string;
|
|
900
|
-
/**
|
|
900
|
+
/**
|
|
901
|
+
* Whether to group thousands. Grouping is reserved for measured values, so
|
|
902
|
+
* the default is derived: true when `currency`, `unit`, or `scale` is set,
|
|
903
|
+
* false for plain numbers. Pass explicitly to override.
|
|
904
|
+
*/
|
|
901
905
|
useGrouping?: boolean;
|
|
902
906
|
}
|
|
903
907
|
/** "." in en-US, "," in fr-FR. Returns "." when locale is undefined. */
|
package/dist/index.mjs
CHANGED
|
@@ -2073,7 +2073,7 @@ function joinDecimalString(parts) {
|
|
|
2073
2073
|
return `${parts.sign}${body}`;
|
|
2074
2074
|
}
|
|
2075
2075
|
function formatDecimalForDisplay(opts) {
|
|
2076
|
-
const { value, scale, locale, currency, unit, useGrouping =
|
|
2076
|
+
const { value, scale, locale, currency, unit, useGrouping = currency !== void 0 || unit !== void 0 || scale !== void 0 } = opts;
|
|
2077
2077
|
if (value === null || value === void 0 || value === "") return "";
|
|
2078
2078
|
let canonical;
|
|
2079
2079
|
if (typeof value === "number") {
|