@actual-app/api 26.1.0-nightly.20251221 → 26.1.0-nightly.20251222

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.
@@ -55,7 +55,9 @@ export declare function getNumberFormat({ format, hideFraction, decimalPlaces, }
55
55
  value: "comma-dot" | "dot-comma" | "space-comma" | "apostrophe-dot" | "comma-dot-in";
56
56
  thousandsSeparator: any;
57
57
  decimalSeparator: any;
58
- formatter: Intl.NumberFormat;
58
+ formatter: {
59
+ format: (value: number) => string;
60
+ };
59
61
  };
60
62
  /**
61
63
  * The exact amount.
@@ -73,7 +75,9 @@ export type CurrencyAmount = string;
73
75
  export type IntegerAmount = number;
74
76
  export declare function safeNumber(value: number): number;
75
77
  export declare function toRelaxedNumber(currencyAmount: CurrencyAmount): Amount;
76
- export declare function integerToCurrency(integerAmount: IntegerAmount, formatter?: Intl.NumberFormat, decimalPlaces?: number): string;
78
+ export declare function integerToCurrency(integerAmount: IntegerAmount, formatter?: {
79
+ format: (value: number) => string;
80
+ }, decimalPlaces?: number): string;
77
81
  export declare function integerToCurrencyWithDecimal(integerAmount: IntegerAmount): string;
78
82
  export declare function amountToCurrency(amount: Amount): CurrencyAmount;
79
83
  export declare function amountToCurrencyNoDecimal(amount: Amount): CurrencyAmount;
@@ -9345,11 +9345,18 @@ function getNumberFormat({ format: format2 = numberFormatConfig.format, hideFrac
9345
9345
  minimumFractionDigits: currentHideFraction ? 0 : 2,
9346
9346
  maximumFractionDigits: currentHideFraction ? 0 : 2
9347
9347
  };
9348
+ const intlFormatter = new Intl.NumberFormat(locale, fractionDigitsOptions);
9349
+ const formatter = {
9350
+ format: (value) => {
9351
+ const formatted = intlFormatter.format(value);
9352
+ return formatted === "-0" ? "0" : formatted;
9353
+ }
9354
+ };
9348
9355
  return {
9349
9356
  value: currentFormat,
9350
9357
  thousandsSeparator,
9351
9358
  decimalSeparator,
9352
- formatter: new Intl.NumberFormat(locale, fractionDigitsOptions)
9359
+ formatter
9353
9360
  };
9354
9361
  }
9355
9362
  const MAX_SAFE_NUMBER = 2 ** 51 - 1;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "26.1.0-nightly.20251221",
3
+ "version": "26.1.0-nightly.20251222",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "26.1.0-nightly.20251221",
3
+ "version": "26.1.0-nightly.20251222",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {