@cosmicdrift/kumiko-renderer-web 0.186.3 → 0.188.0

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.
@@ -14,10 +14,15 @@
14
14
  // Klick — also 100 cents bei EUR/USD, 1 yen bei JPY). User der nur
15
15
  // Cent-genaue Steps will tippt halt im Focus-Modus.
16
16
 
17
+ import { currencyDecimals } from "@cosmicdrift/kumiko-headless";
17
18
  import { Minus, Plus } from "lucide-react";
18
19
  import { type ReactNode, useEffect, useRef, useState } from "react";
19
20
  import { cn } from "../lib/cn";
20
21
 
22
+ // Re-exported for backward compat — callers used to import this from here
23
+ // before it moved to headless (shared with RenderField, kumiko-framework#1923).
24
+ export { currencyDecimals };
25
+
21
26
  export type MoneyInputProps = {
22
27
  readonly id: string;
23
28
  readonly name: string;
@@ -165,15 +170,6 @@ export function MoneyInput({
165
170
  );
166
171
  }
167
172
 
168
- // Currency-Decimal-Stellen — überdeckt die wichtigsten Welt-Währungen.
169
- // Default 2 wenn Code unbekannt.
170
- export function currencyDecimals(code: string): number {
171
- if (code === "JPY" || code === "KRW" || code === "VND" || code === "ISK") return 0;
172
- if (code === "BHD" || code === "JOD" || code === "KWD" || code === "OMR" || code === "TND")
173
- return 3;
174
- return 2;
175
- }
176
-
177
173
  function guessLocale(): string {
178
174
  if (typeof navigator !== "undefined" && navigator.language) return navigator.language;
179
175
  return "en-US";