nuxt-i18n-micro 1.64.0 → 1.65.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.
- package/dist/client/200.html +8 -8
- package/dist/client/404.html +8 -8
- package/dist/client/_nuxt/{AXE8DZQI.js → CcDaBmcC.js} +1 -1
- package/dist/client/_nuxt/{Ddb0iCRU.js → ClTsZsex.js} +59 -59
- package/dist/client/_nuxt/{Deg2o1hP.js → DT0mZaxo.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/df1c78bc-6716-4577-9ccf-979f682f9a9c.json +1 -0
- package/dist/client/_nuxt/error-404.DCBEmQSD.css +1 -0
- package/dist/client/_nuxt/error-500.D1x2GrnM.css +1 -0
- package/dist/client/_nuxt/{D9gx-VEt.js → rqhqIC0Q.js} +1 -1
- package/dist/client/index.html +8 -8
- package/dist/module.d.mts +3 -3
- package/dist/module.d.ts +3 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +13 -12
- package/dist/runtime/components/i18n-t.vue.d.ts +1 -1
- package/dist/runtime/components/locale-redirect.vue +20 -4
- package/dist/runtime/composables/useLocaleHead.js +2 -2
- package/dist/runtime/plugins/01.plugin.d.ts +7 -8
- package/dist/runtime/plugins/01.plugin.js +77 -336
- package/dist/runtime/plugins/03.define.d.ts +2 -2
- package/dist/runtime/plugins/03.define.js +26 -28
- package/dist/runtime/plugins/04.auto-detect.js +1 -1
- package/dist/runtime/translation-server-middleware.d.ts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +8 -5
- package/dist/client/_nuxt/builds/meta/17ca5a6a-83c6-4759-8a74-a56490050218.json +0 -1
- package/dist/client/_nuxt/error-404.vh32VtAd.css +0 -1
- package/dist/client/_nuxt/error-500.EgQ3RNLZ.css +0 -1
- package/dist/runtime/helpers.d.ts +0 -6
- package/dist/runtime/helpers.js +0 -5
- package/dist/shared/nuxt-i18n-micro.4b19b717.d.mts +0 -57
- package/dist/shared/nuxt-i18n-micro.4b19b717.d.ts +0 -57
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.65.1",
|
|
4
4
|
"description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
|
|
5
5
|
"repository": "s00d/nuxt-i18n-micro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,8 +53,9 @@
|
|
|
53
53
|
"globby": "^14.0.2",
|
|
54
54
|
"sirv": "^2.0.4",
|
|
55
55
|
"ufo": "^1.5.4",
|
|
56
|
-
"nuxt-i18n-micro-core": "1.0.
|
|
57
|
-
"nuxt-i18n-micro-test-utils": "1.0.6"
|
|
56
|
+
"nuxt-i18n-micro-core": "1.0.14",
|
|
57
|
+
"nuxt-i18n-micro-test-utils": "1.0.6",
|
|
58
|
+
"nuxt-i18n-micro-types": "1.0.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@nuxt/devtools": "^1.7.0",
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"ts-jest": "^29.2.5",
|
|
74
75
|
"typescript": "5.6.3",
|
|
75
76
|
"vitepress": "^1.5.0",
|
|
76
|
-
"vitest": "^
|
|
77
|
+
"vitest": "^3.0.2",
|
|
77
78
|
"vue-tsc": "2.1.10"
|
|
78
79
|
},
|
|
79
80
|
"optionalDependencies": {
|
|
@@ -90,11 +91,12 @@
|
|
|
90
91
|
]
|
|
91
92
|
},
|
|
92
93
|
"scripts": {
|
|
94
|
+
"postinstall": "pnpm --filter \"./packages/**\" run build && nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build && pnpm run client:build",
|
|
93
95
|
"dev": "nuxi dev playground",
|
|
94
96
|
"dev:build": "nuxi build playground",
|
|
95
97
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
96
98
|
"dev:generate": "nuxi generate playground",
|
|
97
|
-
"release": "pnpm run lint && pnpm run typecheck && pnpm run test:types && pnpm run test && pnpm run test:workspaces && pnpm run
|
|
99
|
+
"release": "pnpm run lint && pnpm run typecheck && pnpm run test:types && pnpm run test && pnpm run test:workspaces && pnpm run postinstall && changelogen --release && pnpm publish -r && git push --follow-tags",
|
|
98
100
|
"lint": "eslint .",
|
|
99
101
|
"lint:fix": "eslint . --fix",
|
|
100
102
|
"test": "playwright test",
|
|
@@ -102,6 +104,7 @@
|
|
|
102
104
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
103
105
|
"test:workspaces": "pnpm recursive run test",
|
|
104
106
|
"client:build": "nuxi generate client",
|
|
107
|
+
"client:prepare": "nuxi client:prepare client",
|
|
105
108
|
"client:dev": "nuxi dev client --port 3300",
|
|
106
109
|
"clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
|
|
107
110
|
"typecheck": "tsc --noEmit",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"17ca5a6a-83c6-4759-8a74-a56490050218","timestamp":1737052992903,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spotlight[data-v-c1463376]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-c1463376]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-c1463376]{background-color:#ffffff4d}.gradient-border[data-v-c1463376]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-c1463376]{background-color:#1414144d}.gradient-border[data-v-c1463376]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-c1463376]:before{background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-c1463376]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-c1463376]{position:fixed}.left-0[data-v-c1463376]{left:0}.right-0[data-v-c1463376]{right:0}.z-10[data-v-c1463376]{z-index:10}.z-20[data-v-c1463376]{z-index:20}.grid[data-v-c1463376]{display:grid}.mb-16[data-v-c1463376]{margin-bottom:4rem}.mb-8[data-v-c1463376]{margin-bottom:2rem}.max-w-520px[data-v-c1463376]{max-width:520px}.min-h-screen[data-v-c1463376]{min-height:100vh}.w-full[data-v-c1463376]{width:100%}.flex[data-v-c1463376]{display:flex}.cursor-pointer[data-v-c1463376]{cursor:pointer}.place-content-center[data-v-c1463376]{place-content:center}.items-center[data-v-c1463376]{align-items:center}.justify-center[data-v-c1463376]{justify-content:center}.overflow-hidden[data-v-c1463376]{overflow:hidden}.bg-white[data-v-c1463376]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-c1463376]{padding-left:1rem;padding-right:1rem}.px-8[data-v-c1463376]{padding-left:2rem;padding-right:2rem}.py-2[data-v-c1463376]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-c1463376]{text-align:center}.text-8xl[data-v-c1463376]{font-size:6rem;line-height:1}.text-xl[data-v-c1463376]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-c1463376]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-c1463376]{font-weight:300}.font-medium[data-v-c1463376]{font-weight:500}.leading-tight[data-v-c1463376]{line-height:1.25}.font-sans[data-v-c1463376]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-c1463376]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-c1463376]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-c1463376]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-c1463376]{padding-left:0;padding-right:0}.sm\:px-6[data-v-c1463376]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-c1463376]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-c1463376]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-c1463376]{font-size:1.25rem;line-height:1.75rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spotlight[data-v-05ddf355]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-05ddf355]{position:fixed}.-bottom-1\/2[data-v-05ddf355]{bottom:-50%}.left-0[data-v-05ddf355]{left:0}.right-0[data-v-05ddf355]{right:0}.grid[data-v-05ddf355]{display:grid}.mb-16[data-v-05ddf355]{margin-bottom:4rem}.mb-8[data-v-05ddf355]{margin-bottom:2rem}.h-1\/2[data-v-05ddf355]{height:50%}.max-w-520px[data-v-05ddf355]{max-width:520px}.min-h-screen[data-v-05ddf355]{min-height:100vh}.place-content-center[data-v-05ddf355]{place-content:center}.overflow-hidden[data-v-05ddf355]{overflow:hidden}.bg-white[data-v-05ddf355]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-05ddf355]{padding-left:2rem;padding-right:2rem}.text-center[data-v-05ddf355]{text-align:center}.text-8xl[data-v-05ddf355]{font-size:6rem;line-height:1}.text-xl[data-v-05ddf355]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-05ddf355]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-05ddf355]{font-weight:300}.font-medium[data-v-05ddf355]{font-weight:500}.leading-tight[data-v-05ddf355]{line-height:1.25}.font-sans[data-v-05ddf355]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-05ddf355]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-05ddf355]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-05ddf355]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-05ddf355]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-05ddf355]{font-size:2.25rem;line-height:2.5rem}}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Strategies } from '../types.js';
|
|
2
|
-
export declare const withPrefixStrategy: (strategy: Strategies) => strategy is "prefix" | "prefix_and_default";
|
|
3
|
-
export declare const isNoPrefixStrategy: (strategy: Strategies) => strategy is "no_prefix";
|
|
4
|
-
export declare const isPrefixStrategy: (strategy: Strategies) => strategy is "prefix";
|
|
5
|
-
export declare const isPrefixExceptDefaultStrategy: (strategy: Strategies) => strategy is "prefix_except_default";
|
|
6
|
-
export declare const isPrefixAndDefaultStrategy: (strategy: Strategies) => strategy is "prefix_and_default";
|
package/dist/runtime/helpers.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const withPrefixStrategy = (strategy) => strategy === "prefix" || strategy === "prefix_and_default";
|
|
2
|
-
export const isNoPrefixStrategy = (strategy) => strategy === "no_prefix";
|
|
3
|
-
export const isPrefixStrategy = (strategy) => strategy === "prefix";
|
|
4
|
-
export const isPrefixExceptDefaultStrategy = (strategy) => strategy === "prefix_except_default";
|
|
5
|
-
export const isPrefixAndDefaultStrategy = (strategy) => strategy === "prefix_and_default";
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
type LocaleCode = string;
|
|
2
|
-
interface Locale {
|
|
3
|
-
code: LocaleCode;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
iso?: string;
|
|
6
|
-
dir?: 'ltr' | 'rtl' | 'auto';
|
|
7
|
-
displayName?: string;
|
|
8
|
-
baseUrl?: string;
|
|
9
|
-
baseDefault?: boolean;
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
type Params = Record<string, string | number | boolean>;
|
|
13
|
-
type Getter = (key: string, params?: Record<string, string | number | boolean>, defaultValue?: string) => unknown;
|
|
14
|
-
type PluralFunc = (key: string, count: number, params: Params, locale: string, getter: Getter) => string | null;
|
|
15
|
-
type GlobalLocaleRoutes = Record<string, Record<LocaleCode, string> | false | boolean> | null | undefined;
|
|
16
|
-
type Strategies = 'no_prefix' | 'prefix_except_default' | 'prefix' | 'prefix_and_default';
|
|
17
|
-
interface ModuleOptions {
|
|
18
|
-
locales?: Locale[];
|
|
19
|
-
meta?: boolean;
|
|
20
|
-
strategy?: Strategies;
|
|
21
|
-
metaBaseUrl?: string;
|
|
22
|
-
define?: boolean;
|
|
23
|
-
plugin?: boolean;
|
|
24
|
-
defaultLocale?: string;
|
|
25
|
-
apiBaseUrl?: string;
|
|
26
|
-
translationDir?: string;
|
|
27
|
-
autoDetectLanguage?: boolean;
|
|
28
|
-
autoDetectPath?: string;
|
|
29
|
-
disableWatcher?: boolean;
|
|
30
|
-
disableUpdater?: boolean;
|
|
31
|
-
types?: boolean;
|
|
32
|
-
includeDefaultLocaleRoute?: boolean;
|
|
33
|
-
routesLocaleLinks?: {
|
|
34
|
-
[key: string]: string;
|
|
35
|
-
};
|
|
36
|
-
plural?: string | PluralFunc;
|
|
37
|
-
disablePageLocales?: boolean;
|
|
38
|
-
fallbackLocale?: string;
|
|
39
|
-
localeCookie?: string;
|
|
40
|
-
debug?: boolean;
|
|
41
|
-
globalLocaleRoutes?: GlobalLocaleRoutes;
|
|
42
|
-
customRegexMatcher?: string | RegExp;
|
|
43
|
-
}
|
|
44
|
-
interface ModuleOptionsExtend extends ModuleOptions {
|
|
45
|
-
dateBuild: number;
|
|
46
|
-
hashMode: boolean;
|
|
47
|
-
isSSG: boolean;
|
|
48
|
-
apiBaseUrl: string;
|
|
49
|
-
disablePageLocales: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface ModulePrivateOptionsExtend extends ModuleOptions {
|
|
52
|
-
rootDir: string;
|
|
53
|
-
rootDirs: string[];
|
|
54
|
-
debug: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type { GlobalLocaleRoutes as G, LocaleCode as L, ModulePrivateOptionsExtend as M, PluralFunc as P, Locale as a, ModuleOptionsExtend as b, ModuleOptions as c, Getter as d };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
type LocaleCode = string;
|
|
2
|
-
interface Locale {
|
|
3
|
-
code: LocaleCode;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
iso?: string;
|
|
6
|
-
dir?: 'ltr' | 'rtl' | 'auto';
|
|
7
|
-
displayName?: string;
|
|
8
|
-
baseUrl?: string;
|
|
9
|
-
baseDefault?: boolean;
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
type Params = Record<string, string | number | boolean>;
|
|
13
|
-
type Getter = (key: string, params?: Record<string, string | number | boolean>, defaultValue?: string) => unknown;
|
|
14
|
-
type PluralFunc = (key: string, count: number, params: Params, locale: string, getter: Getter) => string | null;
|
|
15
|
-
type GlobalLocaleRoutes = Record<string, Record<LocaleCode, string> | false | boolean> | null | undefined;
|
|
16
|
-
type Strategies = 'no_prefix' | 'prefix_except_default' | 'prefix' | 'prefix_and_default';
|
|
17
|
-
interface ModuleOptions {
|
|
18
|
-
locales?: Locale[];
|
|
19
|
-
meta?: boolean;
|
|
20
|
-
strategy?: Strategies;
|
|
21
|
-
metaBaseUrl?: string;
|
|
22
|
-
define?: boolean;
|
|
23
|
-
plugin?: boolean;
|
|
24
|
-
defaultLocale?: string;
|
|
25
|
-
apiBaseUrl?: string;
|
|
26
|
-
translationDir?: string;
|
|
27
|
-
autoDetectLanguage?: boolean;
|
|
28
|
-
autoDetectPath?: string;
|
|
29
|
-
disableWatcher?: boolean;
|
|
30
|
-
disableUpdater?: boolean;
|
|
31
|
-
types?: boolean;
|
|
32
|
-
includeDefaultLocaleRoute?: boolean;
|
|
33
|
-
routesLocaleLinks?: {
|
|
34
|
-
[key: string]: string;
|
|
35
|
-
};
|
|
36
|
-
plural?: string | PluralFunc;
|
|
37
|
-
disablePageLocales?: boolean;
|
|
38
|
-
fallbackLocale?: string;
|
|
39
|
-
localeCookie?: string;
|
|
40
|
-
debug?: boolean;
|
|
41
|
-
globalLocaleRoutes?: GlobalLocaleRoutes;
|
|
42
|
-
customRegexMatcher?: string | RegExp;
|
|
43
|
-
}
|
|
44
|
-
interface ModuleOptionsExtend extends ModuleOptions {
|
|
45
|
-
dateBuild: number;
|
|
46
|
-
hashMode: boolean;
|
|
47
|
-
isSSG: boolean;
|
|
48
|
-
apiBaseUrl: string;
|
|
49
|
-
disablePageLocales: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface ModulePrivateOptionsExtend extends ModuleOptions {
|
|
52
|
-
rootDir: string;
|
|
53
|
-
rootDirs: string[];
|
|
54
|
-
debug: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type { GlobalLocaleRoutes as G, LocaleCode as L, ModulePrivateOptionsExtend as M, PluralFunc as P, Locale as a, ModuleOptionsExtend as b, ModuleOptions as c, Getter as d };
|