@fluenti/solid 0.2.1 → 0.3.1

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.
Files changed (53) hide show
  1. package/README.md +5 -5
  2. package/dist/context.d.ts +15 -24
  3. package/dist/context.d.ts.map +1 -1
  4. package/dist/hooks/__useI18n.d.ts +2 -2
  5. package/dist/hooks/__useI18n.d.ts.map +1 -1
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.ts +6 -6
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +129 -167
  11. package/dist/index.js.map +1 -1
  12. package/dist/plural.d.ts +3 -3
  13. package/dist/plural.d.ts.map +1 -1
  14. package/dist/provider.d.ts +3 -3
  15. package/dist/provider.d.ts.map +1 -1
  16. package/dist/rich-dom.d.ts +0 -6
  17. package/dist/rich-dom.d.ts.map +1 -1
  18. package/dist/select.d.ts +3 -3
  19. package/dist/select.d.ts.map +1 -1
  20. package/dist/server.cjs +2 -0
  21. package/dist/server.cjs.map +1 -0
  22. package/dist/server.d.ts +33 -17
  23. package/dist/server.d.ts.map +1 -1
  24. package/dist/server.js +54 -0
  25. package/dist/server.js.map +1 -0
  26. package/dist/solid-runtime.d.ts.map +1 -1
  27. package/dist/trans.d.ts +3 -3
  28. package/dist/trans.d.ts.map +1 -1
  29. package/dist/types.d.ts +8 -8
  30. package/dist/types.d.ts.map +1 -1
  31. package/dist/use-i18n.d.ts +4 -8
  32. package/dist/use-i18n.d.ts.map +1 -1
  33. package/dist/vite-plugin.cjs +2 -113
  34. package/dist/vite-plugin.cjs.map +1 -1
  35. package/dist/vite-plugin.js +14 -123
  36. package/dist/vite-plugin.js.map +1 -1
  37. package/llms-full.txt +186 -0
  38. package/llms-migration.txt +176 -0
  39. package/llms.txt +64 -0
  40. package/package.json +17 -5
  41. package/src/context.ts +56 -77
  42. package/src/hooks/__useI18n.ts +2 -2
  43. package/src/index.ts +6 -6
  44. package/src/plural.tsx +9 -38
  45. package/src/provider.tsx +5 -5
  46. package/src/rich-dom.tsx +25 -47
  47. package/src/select.tsx +11 -8
  48. package/src/server.ts +94 -49
  49. package/src/solid-runtime.ts +15 -134
  50. package/src/trans.tsx +7 -4
  51. package/src/types.ts +9 -8
  52. package/src/use-i18n.ts +5 -16
  53. package/src/vite-plugin.ts +1 -1
package/dist/index.js CHANGED
@@ -1,22 +1,23 @@
1
- import { children as e, createContext as t, createMemo as n, createRoot as r, createSignal as i, useContext as a } from "solid-js";
2
- import { buildICUMessage as o, formatDate as s, formatNumber as c, hashMessage as l, interpolate as u, msg as d, resolveDescriptorId as f } from "@fluenti/core";
3
- import { Dynamic as p, createComponent as m, memo as h } from "solid-js/web";
1
+ import { children as e, createContext as t, createMemo as n, createSignal as r, useContext as i } from "solid-js";
2
+ import { createDiagnostics as a, formatDate as o, formatNumber as s, msg as c } from "@fluenti/core";
3
+ import { PLURAL_CATEGORIES as l, buildICUMessage as u, buildICUPluralMessage as d, buildICUSelectMessage as f, hashMessage as p, interpolate as m, normalizeSelectForms as h, offsetIndices as g, resolveDescriptorId as _ } from "@fluenti/core/internal";
4
+ import { Dynamic as v, createComponent as y, memo as b } from "solid-js/web";
4
5
  //#region src/context.ts
5
- var g = Symbol.for("fluenti.runtime.solid");
6
- function _() {
7
- let e = globalThis[g];
6
+ var x = Symbol.for("fluenti.runtime.solid.v1");
7
+ function S() {
8
+ let e = globalThis[x];
8
9
  return typeof e == "object" && e ? e : null;
9
10
  }
10
- function v(e) {
11
+ function C(e) {
11
12
  return typeof e == "object" && e && "default" in e ? e.default : e;
12
13
  }
13
- function y(e) {
14
- let [t, n] = i(e.locale), [r, a] = i(!1), l = new Set([e.locale]), [d, p] = i(new Set(l)), m = { ...e.messages }, h = e, g = h.lazyLocaleLoading ?? e.splitting ?? !1;
14
+ function w(e) {
15
+ let [t, n] = r(e.locale), [i, c] = r(!1), l = new Set([e.locale]), [d, f] = r(new Set(l)), p = { ...e.messages }, h = e, g = h.diagnostics ? a(h.diagnostics) : void 0, v = h.lazyLocaleLoading ?? e.splitting ?? !1;
15
16
  function y(e, t, n) {
16
- let r = m[t];
17
+ let r = p[t];
17
18
  if (!r) return;
18
19
  let i = r[e];
19
- if (i !== void 0) return typeof i == "function" ? i(n) : typeof i == "string" && n ? u(i, n, t) : String(i);
20
+ if (i !== void 0) return typeof i == "function" ? i(n) : typeof i == "string" && n ? m(i, n, t) : String(i);
20
21
  }
21
22
  function b(t, n, r) {
22
23
  let i = [n], a = new Set(i);
@@ -24,8 +25,8 @@ function y(e) {
24
25
  let o = h.fallbackChain?.[n] ?? h.fallbackChain?.["*"];
25
26
  if (o) for (let e of o) a.has(e) || (i.push(e), a.add(e));
26
27
  for (let e of i) {
27
- let n = y(t, e, r);
28
- if (n !== void 0) return n;
28
+ let i = y(t, e, r);
29
+ if (i !== void 0) return e !== n && g?.fallbackUsed(n, e, t), i;
29
30
  }
30
31
  }
31
32
  function x(t, n) {
@@ -33,91 +34,92 @@ function y(e) {
33
34
  let r = e.missing(n, t);
34
35
  if (r !== void 0) return r;
35
36
  }
36
- function S(e, t, n) {
37
+ function w(e, t, n) {
37
38
  let r = b(e, t, n);
38
39
  if (r !== void 0) return r;
40
+ g?.missingKey(t, e);
39
41
  let i = x(e, t);
40
- return i === void 0 ? e.includes("{") ? u(e, n, t) : e : i;
42
+ return i === void 0 ? e.includes("{") ? m(e, n, t) : e : i;
41
43
  }
42
- function C(e, ...n) {
43
- if (Array.isArray(e) && "raw" in e) return C(o(e, n), Object.fromEntries(n.map((e, t) => [String(t), e])));
44
+ function T(e, ...n) {
45
+ if (Array.isArray(e) && "raw" in e) return T(u(e, n), Object.fromEntries(n.map((e, t) => [String(t), e])));
44
46
  let r = e, i = n[0], a = t();
45
47
  if (typeof r == "object" && r) {
46
- let e = f(r);
48
+ let e = _(r);
47
49
  if (e) {
48
50
  let t = b(e, a, i);
49
51
  if (t !== void 0) return t;
50
52
  let n = x(e, a);
51
53
  if (n !== void 0) return n;
52
54
  }
53
- return r.message === void 0 ? e ?? "" : u(r.message, i, a);
55
+ return r.message === void 0 ? e ?? "" : m(r.message, i, a);
54
56
  }
55
- return S(r, a, i);
57
+ return w(r, a, i);
56
58
  }
57
59
  return {
58
60
  locale: t,
59
61
  setLocale: async (e) => {
60
- if (!g || !h.chunkLoader) {
62
+ if (!v || !h.chunkLoader) {
61
63
  n(e);
62
64
  return;
63
65
  }
64
- let t = _();
66
+ let t = S();
65
67
  if (l.has(e)) {
66
68
  t?.__switchLocale && await t.__switchLocale(e), n(e);
67
69
  return;
68
70
  }
69
- a(!0);
71
+ c(!0);
70
72
  try {
71
- let r = v(await h.chunkLoader(e));
72
- m[e] = {
73
- ...m[e],
73
+ let r = C(await h.chunkLoader(e));
74
+ p[e] = {
75
+ ...p[e],
74
76
  ...r
75
- }, l.add(e), p(new Set(l)), t?.__switchLocale && await t.__switchLocale(e), n(e);
77
+ }, l.add(e), f(new Set(l)), t?.__switchLocale && await t.__switchLocale(e), n(e);
76
78
  } finally {
77
- a(!1);
79
+ c(!1);
78
80
  }
79
81
  },
80
- t: C,
82
+ t: T,
81
83
  loadMessages: (e, t) => {
82
- m[e] = {
83
- ...m[e],
84
+ p[e] = {
85
+ ...p[e],
84
86
  ...t
85
- }, l.add(e), p(new Set(l));
87
+ }, l.add(e), f(new Set(l));
86
88
  },
87
- getLocales: () => Object.keys(m),
88
- d: (e, n) => s(e, t(), n, h.dateFormats),
89
- n: (e, n) => c(e, t(), n, h.numberFormats),
90
- format: (e, n) => u(e, n, t()),
91
- isLoading: r,
89
+ getLocales: () => Object.keys(p),
90
+ d: (e, n) => o(e, t(), n, h.dateFormats),
91
+ n: (e, n) => s(e, t(), n, h.numberFormats),
92
+ format: (e, n) => m(e, n, t()),
93
+ isLoading: i,
92
94
  loadedLocales: d,
93
95
  preloadLocale: (e) => {
94
- if (!g || l.has(e) || !h.chunkLoader) return;
95
- let t = _();
96
+ if (!v || l.has(e) || !h.chunkLoader) return;
97
+ let t = S();
96
98
  h.chunkLoader(e).then(async (n) => {
97
- let r = v(n);
98
- m[e] = {
99
- ...m[e],
99
+ let r = C(n);
100
+ p[e] = {
101
+ ...p[e],
100
102
  ...r
101
- }, l.add(e), p(new Set(l)), t?.__preloadLocale && await t.__preloadLocale(e);
103
+ }, l.add(e), f(new Set(l)), t?.__preloadLocale && await t.__preloadLocale(e);
102
104
  }).catch((t) => {
103
105
  console.warn("[fluenti] preload failed:", e, t);
104
106
  });
107
+ },
108
+ te: (e, n) => {
109
+ let r = p[n ?? t()];
110
+ return r !== void 0 && e in r;
111
+ },
112
+ tm: (e, n) => {
113
+ let r = p[n ?? t()];
114
+ return r ? r[e] : void 0;
105
115
  }
106
116
  };
107
117
  }
108
- var b;
109
- function x(e) {
110
- let t = r(() => y(e));
111
- return typeof window < "u" ? b = t : console.warn("[fluenti] createI18n() detected SSR environment. Use <I18nProvider> for per-request isolation in SSR."), t;
112
- }
113
- function S() {
114
- return b;
115
- }
116
118
  //#endregion
117
119
  //#region src/provider.tsx
118
- var C = t(), w = (e) => {
119
- let t = y(e);
120
- return m(C.Provider, {
120
+ var T = t(), E = (e) => {
121
+ let t = w(e);
122
+ return y(T.Provider, {
121
123
  value: t,
122
124
  get children() {
123
125
  return e.children;
@@ -126,33 +128,28 @@ var C = t(), w = (e) => {
126
128
  };
127
129
  //#endregion
128
130
  //#region src/use-i18n.ts
129
- function T() {
130
- let e = a(C);
131
+ function D() {
132
+ let e = i(T);
131
133
  if (e) return e;
132
- let t = S();
133
- if (t) return t;
134
- throw Error("useI18n requires either createI18n() to be called at startup, or the component to be inside an <I18nProvider>.");
134
+ throw Error("useI18n() must be used inside an <I18nProvider>.");
135
135
  }
136
136
  //#endregion
137
137
  //#region src/compile-time-t.ts
138
- var E = ((...e) => {
138
+ var O = ((...e) => {
139
139
  throw Error("[fluenti] `t` imported from '@fluenti/solid' is a compile-time API. Use it only with the Fluenti build transform inside a component or custom hook. For runtime lookups, use useI18n().t(...).");
140
140
  });
141
141
  //#endregion
142
142
  //#region src/rich-dom.tsx
143
- function D(e) {
143
+ function k(e) {
144
144
  return typeof Node < "u" && e instanceof Node;
145
145
  }
146
- function O(e) {
146
+ function A(e) {
147
147
  return typeof e == "function" && !e.length ? e() : e;
148
148
  }
149
- function k(e, t) {
150
- return t === 0 ? e : e.replace(/<(\d+)(\/?>)/g, (e, n, r) => `<${Number(n) + t}${r}`).replace(/<\/(\d+)>/g, (e, n) => `</${Number(n) + t}>`);
151
- }
152
- function A(e) {
149
+ function j(e) {
153
150
  let t = [], n = "";
154
151
  function r(e) {
155
- let i = O(e);
152
+ let i = A(e);
156
153
  if (i == null || typeof i == "boolean") return;
157
154
  if (Array.isArray(i)) {
158
155
  for (let e of i) r(e);
@@ -162,7 +159,7 @@ function A(e) {
162
159
  n += String(i);
163
160
  return;
164
161
  }
165
- if (!D(i)) return;
162
+ if (!k(i)) return;
166
163
  if (i.nodeType === Node.TEXT_NODE) {
167
164
  n += i.textContent ?? "";
168
165
  return;
@@ -171,80 +168,66 @@ function A(e) {
171
168
  r(Array.from(i.childNodes));
172
169
  return;
173
170
  }
174
- let a = t.length, o = A(Array.from(i.childNodes));
175
- t.push(i.cloneNode(!1)), t.push(...o.components), n += `<${a}>${k(o.message, a + 1)}</${a}>`;
171
+ let a = t.length, o = j(Array.from(i.childNodes));
172
+ t.push(i.cloneNode(!1)), t.push(...o.components), o.message === "" && o.components.length === 0 ? n += `<${a}/>` : n += `<${a}>${g(o.message, a + 1)}</${a}>`;
176
173
  }
177
174
  return r(e), {
178
175
  message: n,
179
176
  components: t
180
177
  };
181
178
  }
182
- function j(e, t) {
183
- let n = O(t);
179
+ function M(e, t) {
180
+ let n = A(t);
184
181
  if (!(n == null || typeof n == "boolean")) {
185
182
  if (Array.isArray(n)) {
186
- for (let t of n) j(e, t);
183
+ for (let t of n) M(e, t);
187
184
  return;
188
185
  }
189
186
  if (typeof n == "string" || typeof n == "number") {
190
187
  e.appendChild(document.createTextNode(String(n)));
191
188
  return;
192
189
  }
193
- D(n) && e.appendChild(n);
190
+ k(n) && e.appendChild(n);
194
191
  }
195
192
  }
196
- function M(e, t) {
197
- let n = /<(\d+)>([\s\S]*?)<\/\1>/g, r = [], i = 0, a;
193
+ function N(e, t) {
194
+ let n = /<(\d+)(?:\/>|(>)([\s\S]*?)<\/\1>)/g, r = [], i = 0, a;
198
195
  for (n.lastIndex = 0, a = n.exec(e); a !== null;) {
199
196
  a.index > i && r.push(e.slice(i, a.index));
200
- let o = t[Number(a[1])], s = M(a[2], t);
201
- if (o) {
202
- let e = o.cloneNode(!1);
203
- j(e, s), r.push(e);
204
- } else r.push(a[2]);
197
+ let o = Number(a[1]), s = a[2] === void 0, c = t[o];
198
+ if (s) c && r.push(c.cloneNode(!1));
199
+ else {
200
+ let e = N(a[2] === void 0 ? "" : a[3], t);
201
+ if (c) {
202
+ let t = c.cloneNode(!1);
203
+ M(t, e), r.push(t);
204
+ } else r.push(a[3] ?? "");
205
+ }
205
206
  i = n.lastIndex, a = n.exec(e);
206
207
  }
207
208
  return i < e.length && r.push(e.slice(i)), r.length <= 1 ? r[0] ?? "" : r;
208
209
  }
209
- function N(e, t) {
210
+ function P(e, t) {
210
211
  let n = {}, r = [];
211
212
  for (let i of e) {
212
213
  let e = t[i];
213
214
  if (e === void 0) continue;
214
- let a = A(e);
215
- n[i] = k(a.message, r.length), r.push(...a.components);
215
+ let a = j(e);
216
+ n[i] = g(a.message, r.length), r.push(...a.components);
216
217
  }
217
218
  for (let [i, a] of Object.entries(t)) {
218
219
  if (e.includes(i) || a === void 0) continue;
219
- let t = A(a);
220
- n[i] = k(t.message, r.length), r.push(...t.components);
220
+ let t = j(a);
221
+ n[i] = g(t.message, r.length), r.push(...t.components);
221
222
  }
222
223
  return {
223
224
  messages: n,
224
225
  components: r
225
226
  };
226
227
  }
227
- function P(e) {
228
- return `{value, select, ${Object.entries(e).map(([e, t]) => `${e} {${t}}`).join(" ")}}`;
229
- }
230
- function F(e) {
231
- let t = {}, n = {}, r = 0;
232
- for (let [i, a] of Object.entries(e)) {
233
- if (i === "other") {
234
- t.other = a;
235
- continue;
236
- }
237
- let e = /^[A-Za-z0-9_]+$/.test(i) ? i : `case_${r++}`;
238
- t[e] = a, n[i] = e;
239
- }
240
- return t.other === void 0 && (t.other = ""), {
241
- forms: t,
242
- valueMap: n
243
- };
244
- }
245
228
  //#endregion
246
229
  //#region src/trans.tsx
247
- function I(e) {
230
+ function F(e) {
248
231
  let t = [], n = 0;
249
232
  for (; n < e.length;) {
250
233
  let r = e.indexOf("<", n);
@@ -276,7 +259,7 @@ function I(e) {
276
259
  }), n = r + 1;
277
260
  continue;
278
261
  }
279
- let o = a[1], s = r + a[0].length, c = L(e, o, s);
262
+ let o = a[1], s = r + a[0].length, c = I(e, o, s);
280
263
  if (c === -1) {
281
264
  t.push({
282
265
  type: "text",
@@ -288,12 +271,12 @@ function I(e) {
288
271
  t.push({
289
272
  type: "tag",
290
273
  name: o,
291
- children: I(l)
274
+ children: F(l)
292
275
  }), n = c + u.length;
293
276
  }
294
277
  return t;
295
278
  }
296
- function L(e, t, n) {
279
+ function I(e, t, n) {
297
280
  let r = `<${t}>`, i = `</${t}>`, a = 1, o = n;
298
281
  for (; o < e.length && a > 0;) {
299
282
  let t = e.indexOf(r, o), n = e.indexOf(i, o);
@@ -306,25 +289,25 @@ function L(e, t, n) {
306
289
  }
307
290
  return -1;
308
291
  }
309
- function R(e, t) {
292
+ function L(e, t) {
310
293
  let n = e.map((e) => {
311
294
  if (e.type === "text") return e.value;
312
295
  let n = t[e.name];
313
- return n ? m(p, {
296
+ return n ? y(v, {
314
297
  component: n,
315
- children: e.children.length > 0 ? R(e.children, t) : void 0
316
- }) : R(e.children, t);
298
+ children: e.children.length > 0 ? L(e.children, t) : void 0
299
+ }) : L(e.children, t);
317
300
  });
318
301
  return n.length === 1 ? n[0] : n;
319
302
  }
320
- var z = (t) => {
321
- let { t: r } = T(), i = e(() => t.children), a = n(() => {
303
+ var R = (t) => {
304
+ let { t: r } = D(), i = e(() => t.children), a = n(() => {
322
305
  let e = t.__message ?? t.message;
323
306
  return typeof e == "function" ? e() : e;
324
307
  }), o = n(() => t.__components ?? t.components);
325
308
  return (() => {
326
309
  let e = a(), n = o();
327
- if (e !== void 0 && n) return R(I(r({
310
+ if (e !== void 0 && n) return L(F(r({
328
311
  ...t.id === void 0 ? {} : { id: t.id },
329
312
  message: e,
330
313
  ...t.context === void 0 ? {} : { context: t.context },
@@ -332,50 +315,31 @@ var z = (t) => {
332
315
  })), n);
333
316
  let s = i.toArray();
334
317
  if (s.length === 0) return null;
335
- let c = A(s), l = r({
318
+ let c = j(s), l = r({
336
319
  ...t.id === void 0 ? {} : { id: t.id },
337
320
  message: c.message,
338
321
  ...t.context === void 0 ? {} : { context: t.context },
339
322
  ...t.comment === void 0 ? {} : { comment: t.comment }
340
- }), u = c.components.length > 0 ? M(l, c.components) : l;
341
- return Array.isArray(u) && u.length > 1 ? m(p, {
323
+ }), u = c.components.length > 0 ? N(l, c.components) : l;
324
+ return Array.isArray(u) && u.length > 1 && t.tag ? y(v, {
342
325
  get component() {
343
- return t.tag ?? "span";
326
+ return t.tag;
344
327
  },
345
328
  children: u
346
329
  }) : u;
347
330
  });
348
- }, B = [
349
- "zero",
350
- "one",
351
- "two",
352
- "few",
353
- "many",
354
- "other"
355
- ];
356
- function V(e, t) {
357
- let n = [];
358
- for (let t of B) {
359
- let r = e[t];
360
- if (r !== void 0) {
361
- let e = t === "zero" ? "=0" : t;
362
- n.push(`${e} {${r}}`);
363
- }
364
- }
365
- return `{count, plural, ${t ? `offset:${t} ` : ""}${n.join(" ")}}`;
366
- }
367
- var H = (e) => {
368
- let { t } = T();
331
+ }, z = (e) => {
332
+ let { t } = D();
369
333
  function n(e) {
370
334
  return typeof e == "function" ? e() : e;
371
335
  }
372
336
  return (() => {
373
337
  let r = {};
374
- for (let t of B) {
338
+ for (let t of l) {
375
339
  let i = n(e[t]);
376
340
  i !== void 0 && (r[t] = i);
377
341
  }
378
- let { messages: i, components: a } = N(B, r), o = V({
342
+ let { messages: i, components: a } = P(l, r), o = d({
379
343
  ...i.zero !== void 0 && { zero: i.zero },
380
344
  ...i.one !== void 0 && { one: i.one },
381
345
  ...i.two !== void 0 && { two: i.two },
@@ -383,22 +347,20 @@ var H = (e) => {
383
347
  ...i.many !== void 0 && { many: i.many },
384
348
  other: i.other ?? ""
385
349
  }, e.offset), s = t({
386
- id: e.id ?? (e.context === void 0 ? o : l(o, e.context)),
350
+ id: e.id ?? (e.context === void 0 ? o : p(o, e.context)),
387
351
  message: o,
388
352
  ...e.context === void 0 ? {} : { context: e.context },
389
353
  ...e.comment === void 0 ? {} : { comment: e.comment }
390
- }, { count: e.value });
391
- return m(p, {
354
+ }, { count: e.value }), c = a.length > 0 ? N(s, a) : s;
355
+ return e.tag ? y(v, {
392
356
  get component() {
393
- return e.tag ?? "span";
357
+ return e.tag;
394
358
  },
395
- get children() {
396
- return h(() => a.length > 0)() ? M(s, a) : s;
397
- }
398
- });
359
+ children: c
360
+ }) : c;
399
361
  });
400
- }, U = (e) => {
401
- let { t } = T(), n = () => e.tag ?? "span", r = () => {
362
+ }, B = (e) => {
363
+ let { t } = D(), n = () => {
402
364
  let n = e.options === void 0 ? {
403
365
  ...Object.fromEntries(Object.entries(e).filter(([e]) => ![
404
366
  "value",
@@ -413,36 +375,36 @@ var H = (e) => {
413
375
  } : {
414
376
  ...e.options,
415
377
  other: e.other
416
- }, r = [...Object.keys(n).filter((e) => e !== "other"), "other"], { messages: i, components: a } = N(r, n), o = F(Object.fromEntries([...r].map((e) => [e, i[e] ?? ""]))), s = t({
417
- id: e.id ?? (e.context === void 0 ? P(o.forms) : l(P(o.forms), e.context)),
418
- message: P(o.forms),
378
+ }, r = [...Object.keys(n).filter((e) => e !== "other"), "other"], { messages: i, components: a } = P(r, n), o = h(Object.fromEntries([...r].map((e) => [e, i[e] ?? ""]))), s = t({
379
+ id: e.id ?? (e.context === void 0 ? f(o.forms) : p(f(o.forms), e.context)),
380
+ message: f(o.forms),
419
381
  ...e.context === void 0 ? {} : { context: e.context },
420
382
  ...e.comment === void 0 ? {} : { comment: e.comment }
421
383
  }, { value: o.valueMap[e.value] ?? "other" });
422
- return a.length > 0 ? M(s, a) : s;
384
+ return a.length > 0 ? N(s, a) : s;
423
385
  };
424
- return m(p, {
386
+ return (() => e.tag ? y(v, {
425
387
  get component() {
426
- return n();
388
+ return e.tag;
427
389
  },
428
390
  get children() {
429
- return r();
391
+ return n();
430
392
  }
431
- });
393
+ }) : b(n));
432
394
  };
433
395
  //#endregion
434
396
  //#region src/components/DateTime.tsx
435
- function W(e) {
436
- let { d: t } = T();
437
- return h(() => t(e.value, e.style));
397
+ function V(e) {
398
+ let { d: t } = D();
399
+ return b(() => t(e.value, e.style));
438
400
  }
439
401
  //#endregion
440
402
  //#region src/components/NumberFormat.tsx
441
- function G(e) {
442
- let { n: t } = T();
443
- return h(() => t(e.value, e.style));
403
+ function H(e) {
404
+ let { n: t } = D();
405
+ return b(() => t(e.value, e.style));
444
406
  }
445
407
  //#endregion
446
- export { W as DateTime, C as I18nCtx, w as I18nProvider, G as NumberFormat, H as Plural, U as Select, z as Trans, x as createI18n, y as createI18nContext, d as msg, E as t, T as useI18n };
408
+ export { V as DateTime, E as I18nProvider, H as NumberFormat, z as Plural, B as Select, R as Trans, w as createFluentiContext, c as msg, O as t, D as useI18n };
447
409
 
448
410
  //# sourceMappingURL=index.js.map