@i18n-micro/astro 1.3.13 → 1.3.18

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i18n-micro/astro",
3
- "version": "1.3.13",
3
+ "version": "1.3.18",
4
4
  "description": "Astro integration for i18n-micro — translations, routing, and islands.",
5
5
  "keywords": [
6
6
  "astro",
@@ -80,28 +80,28 @@
80
80
  "access": "public"
81
81
  },
82
82
  "dependencies": {
83
- "@i18n-micro/core": "^1.3.15",
84
- "@i18n-micro/node": "^1.2.9",
85
- "@i18n-micro/utils": "^1.0.15",
86
- "@i18n-micro/types": "^1.2.12"
83
+ "@i18n-micro/node": "^1.2.14",
84
+ "@i18n-micro/core": "^1.3.16",
85
+ "@i18n-micro/types": "^1.2.13",
86
+ "@i18n-micro/utils": "^1.0.21"
87
87
  },
88
88
  "devDependencies": {
89
89
  "astro": "^5.0.0 || ^6.0.0 || ^7.0.0",
90
90
  "preact": "^10.0.0",
91
- "publint": "^0.3.17",
91
+ "publint": "^0.3.24",
92
92
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
93
93
  "svelte": "^4.0.0 || ^5.0.0",
94
- "vite": "^7.3.6",
95
- "vite-plugin-dts": "^4.5.4",
96
- "vitest": "^4.1.10",
97
- "vue": "^3.5.25"
94
+ "vite": "^8.2.2",
95
+ "vite-plugin-dts": "^5.1.0",
96
+ "vitest": "^4.1.11",
97
+ "vue": "^3.5.42"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "astro": "^5.0.0 || ^6.0.0 || ^7.0.0",
101
101
  "preact": "^10.0.0",
102
102
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
103
103
  "svelte": "^4.0.0 || ^5.0.0",
104
- "vue": "^3.5.25"
104
+ "vue": "^3.5.42"
105
105
  },
106
106
  "peerDependenciesMeta": {
107
107
  "svelte": {
@@ -1 +0,0 @@
1
- "use strict";const s=require("@i18n-micro/core");function l(r,t){if(r===null||typeof t!="string")return null;let n=r;if(r[t])n=r[t];else{const o=t.toString().split(".");for(const u of o)if(n&&typeof n=="object"&&n!==null&&u in n)n=n[u];else return null}return n??null}function f(r,t,n,o,u){if(!t)return o||t||"";const i=u||r.currentRoute;let e=null;return r.translations[i]&&(e=l(r.translations[i],t)),e||(e=o===void 0?t:o||t),typeof e=="string"&&n?s.interpolate(e,n):e}function c(r,t,n){const o=n||r.currentRoute,u=r.translations[o];if(u){const i=l(u,t);if(i!==null&&typeof i!="object")return!0}return!1}exports.hasTranslation=c;exports.translate=f;
@@ -1,37 +0,0 @@
1
- import { interpolate as f } from "@i18n-micro/core";
2
- function e(r, t) {
3
- if (r === null || typeof t != "string")
4
- return null;
5
- let n = r;
6
- if (r[t])
7
- n = r[t];
8
- else {
9
- const o = t.toString().split(".");
10
- for (const u of o)
11
- if (n && typeof n == "object" && n !== null && u in n)
12
- n = n[u];
13
- else
14
- return null;
15
- }
16
- return n ?? null;
17
- }
18
- function c(r, t, n, o, u) {
19
- if (!t)
20
- return o || t || "";
21
- const l = u || r.currentRoute;
22
- let i = null;
23
- return r.translations[l] && (i = e(r.translations[l], t)), i || (i = o === void 0 ? t : o || t), typeof i == "string" && n ? f(i, n) : i;
24
- }
25
- function a(r, t, n) {
26
- const o = n || r.currentRoute, u = r.translations[o];
27
- if (u) {
28
- const l = e(u, t);
29
- if (l !== null && typeof l != "object")
30
- return !0;
31
- }
32
- return !1;
33
- }
34
- export {
35
- a as h,
36
- c as t
37
- };