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