@manyducks.co/dolla 2.0.0-alpha.10 → 2.0.0-alpha.11

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,5 +1,5 @@
1
- import { r as s } from "./passthrough-9kwwjgWk.js";
2
- import { P as m } from "./passthrough-9kwwjgWk.js";
1
+ import { q as s } from "./passthrough-Bu7iYKPr.js";
2
+ import { P as m } from "./passthrough-Bu7iYKPr.js";
3
3
  function d(n, r, t, e, a, l) {
4
4
  const i = { ...o(["children", "key"], r) }, c = Array.isArray(r.children) ? r.children : [r.children];
5
5
  return s(n, i, ...c);
@@ -1,5 +1,5 @@
1
- import { r as t } from "./passthrough-9kwwjgWk.js";
2
- import { P as l } from "./passthrough-9kwwjgWk.js";
1
+ import { q as t } from "./passthrough-Bu7iYKPr.js";
2
+ import { P as l } from "./passthrough-Bu7iYKPr.js";
3
3
  function d(n, e, r) {
4
4
  return t(n, e ? { ...u(["children", "key"], e) } : void 0, e.children);
5
5
  }
@@ -1,5 +1,4 @@
1
1
  import { MaybeState, type State } from "../state.js";
2
- import type { Stringable } from "../types.js";
3
2
  import type { Dolla } from "./dolla.js";
4
3
  /**
5
4
  * An object where values are either a translated string or another nested Translation object.
@@ -26,6 +25,17 @@ export type I18nSetupOptions = {
26
25
  locale?: string | null;
27
26
  translations: TranslationConfig[];
28
27
  };
28
+ export type TOptions = {
29
+ /**
30
+ *
31
+ */
32
+ count?: MaybeState<number>;
33
+ /**
34
+ *
35
+ */
36
+ context?: MaybeState<string>;
37
+ [value: string]: MaybeState<any>;
38
+ };
29
39
  /**
30
40
  * Dolla's I(nternationalizatio)n module. Manages language translations and locale-based formatting.
31
41
  */
@@ -40,15 +50,15 @@ export declare class I18n {
40
50
  * Returns a State containing the value at `key`.
41
51
 
42
52
  * @param key - Key to the translated value.
43
- * @param values - A map of {{placeholder}} names and the values to replace them with.
53
+ * @param options - A map of {{placeholder}} names and the values to replace them with.
44
54
  *
45
55
  * @example
46
56
  * const $value = t("your.key.here");
47
57
  */
48
- t(key: string, values?: Record<string, Stringable | State<Stringable>>): State<string>;
58
+ t(key: string, options?: TOptions): State<string>;
49
59
  /**
50
- * Creates a wrapped `Intl.Collator` configured for the current locale.
51
- * NOTE: The Collator remains bound to the locale it was created with.
60
+ * Creates an `Intl.Collator` configured for the current locale.
61
+ * NOTE: The Collator remains bound to the locale it was created with, even when the app's locale changes.
52
62
  *
53
63
  * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options
54
64
  */
@@ -1244,36 +1244,35 @@ function ze(t, e) {
1244
1244
  return e.outlet();
1245
1245
  }
1246
1246
  export {
1247
- S as A,
1248
- _e as B,
1249
- We as C,
1250
- Ke as D,
1247
+ _e as A,
1248
+ We as B,
1249
+ Ke as C,
1251
1250
  ze as P,
1252
- w as a,
1253
- I as b,
1251
+ I as a,
1252
+ A as b,
1254
1253
  Re as c,
1255
1254
  ge as d,
1256
- A as e,
1257
- O as f,
1258
- V as g,
1255
+ O as e,
1256
+ V as f,
1257
+ Pe as g,
1259
1258
  Be as h,
1260
1259
  L as i,
1261
- Pe as j,
1262
- Fe as k,
1263
- Le as l,
1264
- qe as m,
1265
- Ge as n,
1266
- He as o,
1267
- ne as p,
1268
- je as q,
1269
- x as r,
1270
- Ue as s,
1260
+ Fe as j,
1261
+ Le as k,
1262
+ qe as l,
1263
+ Ge as m,
1264
+ He as n,
1265
+ ne as o,
1266
+ je as p,
1267
+ x as q,
1268
+ Ue as r,
1269
+ pe as s,
1271
1270
  q as t,
1272
- pe as u,
1271
+ Ie as u,
1273
1272
  T as v,
1274
1273
  G as w,
1275
- Ie as x,
1276
- K as y,
1277
- M as z
1274
+ K as x,
1275
+ M as y,
1276
+ S as z
1278
1277
  };
1279
- //# sourceMappingURL=passthrough-9kwwjgWk.js.map
1278
+ //# sourceMappingURL=passthrough-Bu7iYKPr.js.map