astro-intlayer 9.7.0 → 9.7.2
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/cjs/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/client/format/index.cjs +9 -9
- package/dist/cjs/client/index.cjs +13 -13
- package/dist/cjs/client/localeRedirect.cjs +1 -2
- package/dist/cjs/emitRewrittenPages.cjs +1 -2
- package/dist/cjs/format/index.cjs +9 -9
- package/dist/cjs/format/useCompact.cjs +2 -3
- package/dist/cjs/format/useCurrency.cjs +2 -3
- package/dist/cjs/format/useDate.cjs +2 -3
- package/dist/cjs/format/useIntl.cjs +2 -3
- package/dist/cjs/format/useList.cjs +2 -3
- package/dist/cjs/format/useNumber.cjs +2 -3
- package/dist/cjs/format/usePercentage.cjs +2 -3
- package/dist/cjs/format/useRelativeTime.cjs +2 -3
- package/dist/cjs/format/useUnit.cjs +2 -3
- package/dist/cjs/html/index.cjs +5 -5
- package/dist/cjs/index.cjs +5 -6
- package/dist/cjs/integration.cjs +2 -3
- package/dist/cjs/markdown/index.cjs +7 -7
- package/dist/cjs/middleware.cjs +3 -4
- package/dist/cjs/requestStorage.cjs +1 -2
- package/dist/cjs/useDictionary.cjs +3 -4
- package/dist/cjs/useDictionary.cjs.map +1 -1
- package/dist/cjs/useIntlayer.cjs +3 -4
- package/dist/cjs/useLocale.cjs +2 -3
- package/dist/cjs/withInertOnChange.cjs +1 -2
- package/dist/esm/client/localeRedirect.mjs +1 -2
- package/dist/esm/emitRewrittenPages.mjs +1 -2
- package/dist/esm/format/useCompact.mjs +1 -2
- package/dist/esm/format/useCurrency.mjs +1 -2
- package/dist/esm/format/useDate.mjs +1 -2
- package/dist/esm/format/useIntl.mjs +1 -2
- package/dist/esm/format/useList.mjs +1 -2
- package/dist/esm/format/useNumber.mjs +1 -2
- package/dist/esm/format/usePercentage.mjs +1 -2
- package/dist/esm/format/useRelativeTime.mjs +1 -2
- package/dist/esm/format/useUnit.mjs +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/integration.mjs +1 -2
- package/dist/esm/middleware.mjs +1 -2
- package/dist/esm/requestStorage.mjs +1 -2
- package/dist/esm/useDictionary.mjs +1 -2
- package/dist/esm/useDictionary.mjs.map +1 -1
- package/dist/esm/useIntlayer.mjs +1 -2
- package/dist/esm/useLocale.mjs +1 -2
- package/dist/esm/withInertOnChange.mjs +1 -2
- package/dist/types/client/index.d.ts +11 -0
- package/dist/types/client/localeRedirect.d.ts +0 -2
- package/dist/types/client/localeRedirect.d.ts.map +1 -1
- package/dist/types/emitRewrittenPages.d.ts +0 -2
- package/dist/types/emitRewrittenPages.d.ts.map +1 -1
- package/dist/types/format/useCompact.d.ts +0 -2
- package/dist/types/format/useCompact.d.ts.map +1 -1
- package/dist/types/format/useCurrency.d.ts +0 -2
- package/dist/types/format/useCurrency.d.ts.map +1 -1
- package/dist/types/format/useDate.d.ts +0 -2
- package/dist/types/format/useDate.d.ts.map +1 -1
- package/dist/types/format/useIntl.d.ts +1 -3
- package/dist/types/format/useIntl.d.ts.map +1 -1
- package/dist/types/format/useList.d.ts +0 -2
- package/dist/types/format/useList.d.ts.map +1 -1
- package/dist/types/format/useNumber.d.ts +0 -2
- package/dist/types/format/useNumber.d.ts.map +1 -1
- package/dist/types/format/usePercentage.d.ts +0 -2
- package/dist/types/format/usePercentage.d.ts.map +1 -1
- package/dist/types/format/useRelativeTime.d.ts +0 -2
- package/dist/types/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/format/useUnit.d.ts +0 -2
- package/dist/types/format/useUnit.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/integration.d.ts +1 -2
- package/dist/types/integration.d.ts.map +1 -1
- package/dist/types/middleware.d.ts +1 -3
- package/dist/types/middleware.d.ts.map +1 -1
- package/dist/types/requestStorage.d.ts +0 -2
- package/dist/types/requestStorage.d.ts.map +1 -1
- package/dist/types/useDictionary.d.ts +1 -3
- package/dist/types/useDictionary.d.ts.map +1 -1
- package/dist/types/useIntlayer.d.ts +1 -3
- package/dist/types/useIntlayer.d.ts.map +1 -1
- package/dist/types/useLocale.d.ts +0 -2
- package/dist/types/useLocale.d.ts.map +1 -1
- package/dist/types/withInertOnChange.d.ts +0 -2
- package/dist/types/withInertOnChange.d.ts.map +1 -1
- package/package.json +62 -62
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { DeepTransformContent, WithOnChange } from "vanilla-intlayer";
|
|
2
1
|
import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
2
|
import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from "@intlayer/types/dictionary";
|
|
4
|
-
|
|
3
|
+
import { DeepTransformContent, WithOnChange } from "vanilla-intlayer";
|
|
5
4
|
/**
|
|
6
5
|
* Transforms an imported dictionary (or qualified dictionary group) and returns
|
|
7
6
|
* its content for the locale of the request being rendered, read from
|
|
@@ -25,5 +24,4 @@ import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, Resol
|
|
|
25
24
|
* ```
|
|
26
25
|
*/
|
|
27
26
|
export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => WithOnChange<DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>>;
|
|
28
|
-
//#endregion
|
|
29
27
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBA0Ca,sBACL,UAAU,aAAa,gCACvB,UAAU,gBAAgB,2BAA2B,KACzD,iBAAe,YAEL,GAAC,mBACM,MAClB,aACD,qBACE,kCAAkC,GAAG,IACrC,sBAAsB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DeepTransformContent, WithOnChange } from "vanilla-intlayer";
|
|
2
1
|
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
|
|
2
|
+
import { DeepTransformContent, WithOnChange } from "vanilla-intlayer";
|
|
4
3
|
/**
|
|
5
4
|
* Picks one dictionary by its key and returns its content for the locale of
|
|
6
5
|
* the request being rendered, read from `Astro.locals.intlayer`.
|
|
@@ -24,5 +23,4 @@ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySe
|
|
|
24
23
|
* ```
|
|
25
24
|
*/
|
|
26
25
|
export declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => WithOnChange<DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>>;
|
|
27
|
-
//#endregion
|
|
28
26
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../src/useIntlayer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../src/useIntlayer.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;qBAuCa,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,MAClB,aACD,qBAAqB,yBAAyB,GAAG,IAAI,sBAAsB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UseLocaleProps, UseLocaleProps as UseLocaleProps$1, UseLocaleResult as UseLocaleResult$1 } from "vanilla-intlayer";
|
|
2
|
-
//#region src/useLocale.d.ts
|
|
3
2
|
export type UseLocaleResult = UseLocaleResult$1;
|
|
4
3
|
/**
|
|
5
4
|
* Returns the locale of the request being rendered, read from
|
|
@@ -24,6 +23,5 @@ export type UseLocaleResult = UseLocaleResult$1;
|
|
|
24
23
|
* ```
|
|
25
24
|
*/
|
|
26
25
|
export declare const useLocale: (_props?: UseLocaleProps$1) => UseLocaleResult;
|
|
27
|
-
//#endregion
|
|
28
26
|
export type { UseLocaleProps };
|
|
29
27
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../src/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":["VanillaUseLocaleResult","UseLocaleProps"],"sources":["../../src/useLocale.ts"],"mappings":";YAUY,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;qBA0BjB,YAAS,SAAYC,qBAAsB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { WithOnChange } from "vanilla-intlayer";
|
|
2
|
-
//#region src/withInertOnChange.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Gives server-rendered content the `.onChange()` of its client counterpart.
|
|
5
4
|
*
|
|
@@ -8,5 +7,4 @@ import { WithOnChange } from "vanilla-intlayer";
|
|
|
8
7
|
* `astro-intlayer` entry.
|
|
9
8
|
*/
|
|
10
9
|
export declare const withInertOnChange: <T>(content: T) => WithOnChange<T>;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=withInertOnChange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withInertOnChange.d.ts","names":[],"sources":["../../src/withInertOnChange.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"withInertOnChange.d.ts","names":[],"sources":["../../src/withInertOnChange.ts"],"mappings":";;;;;;;;qBASa,oBAAqB,GAAC,SAAW,MAAI,aAAa"}
|
package/package.json
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-intlayer",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Astro applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
7
|
-
"
|
|
8
|
-
"internationalization",
|
|
9
|
-
"i18n",
|
|
10
|
-
"typescript",
|
|
7
|
+
"a11y",
|
|
11
8
|
"astro",
|
|
12
|
-
"astro-integration",
|
|
13
9
|
"astro-component",
|
|
14
|
-
"
|
|
15
|
-
"devtools",
|
|
10
|
+
"astro-integration",
|
|
16
11
|
"astro-loader",
|
|
12
|
+
"devtools",
|
|
13
|
+
"i18n",
|
|
14
|
+
"internationalization",
|
|
15
|
+
"intlayer",
|
|
17
16
|
"tooling",
|
|
18
|
-
"
|
|
17
|
+
"typescript",
|
|
18
|
+
"withastro"
|
|
19
19
|
],
|
|
20
20
|
"homepage": "https://intlayer.org",
|
|
21
21
|
"bugs": {
|
|
22
22
|
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
23
23
|
},
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
27
|
-
},
|
|
28
24
|
"license": "Apache-2.0",
|
|
29
25
|
"author": {
|
|
30
26
|
"name": "Aymeric PINEAU",
|
|
@@ -37,7 +33,46 @@
|
|
|
37
33
|
"url": "https://github.com/aymericzip"
|
|
38
34
|
}
|
|
39
35
|
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"./dist",
|
|
42
|
+
"./package.json"
|
|
43
|
+
],
|
|
40
44
|
"sideEffects": false,
|
|
45
|
+
"main": "dist/cjs/index.cjs",
|
|
46
|
+
"module": "dist/esm/index.mjs",
|
|
47
|
+
"types": "dist/types/index.d.ts",
|
|
48
|
+
"typesVersions": {
|
|
49
|
+
"*": {
|
|
50
|
+
"client": [
|
|
51
|
+
"./dist/types/client/index.d.ts"
|
|
52
|
+
],
|
|
53
|
+
"client/locale-redirect": [
|
|
54
|
+
"./dist/types/client/localeRedirect.d.ts"
|
|
55
|
+
],
|
|
56
|
+
"format": [
|
|
57
|
+
"./dist/types/format/index.d.ts"
|
|
58
|
+
],
|
|
59
|
+
"html": [
|
|
60
|
+
"./dist/types/html/index.d.ts"
|
|
61
|
+
],
|
|
62
|
+
"markdown": [
|
|
63
|
+
"./dist/types/markdown/index.d.ts"
|
|
64
|
+
],
|
|
65
|
+
"middleware": [
|
|
66
|
+
"./dist/types/middleware.d.ts"
|
|
67
|
+
],
|
|
68
|
+
"package.json": [
|
|
69
|
+
"./package.json"
|
|
70
|
+
],
|
|
71
|
+
"integration": [
|
|
72
|
+
"./dist/types/integration.d.ts"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
41
76
|
"exports": {
|
|
42
77
|
".": {
|
|
43
78
|
"types": "./dist/types/index.d.ts",
|
|
@@ -113,50 +148,15 @@
|
|
|
113
148
|
},
|
|
114
149
|
"./package.json": "./package.json"
|
|
115
150
|
},
|
|
116
|
-
"main": "dist/cjs/index.cjs",
|
|
117
|
-
"module": "dist/esm/index.mjs",
|
|
118
|
-
"types": "dist/types/index.d.ts",
|
|
119
|
-
"typesVersions": {
|
|
120
|
-
"*": {
|
|
121
|
-
"client": [
|
|
122
|
-
"./dist/types/client/index.d.ts"
|
|
123
|
-
],
|
|
124
|
-
"client/locale-redirect": [
|
|
125
|
-
"./dist/types/client/localeRedirect.d.ts"
|
|
126
|
-
],
|
|
127
|
-
"format": [
|
|
128
|
-
"./dist/types/format/index.d.ts"
|
|
129
|
-
],
|
|
130
|
-
"html": [
|
|
131
|
-
"./dist/types/html/index.d.ts"
|
|
132
|
-
],
|
|
133
|
-
"markdown": [
|
|
134
|
-
"./dist/types/markdown/index.d.ts"
|
|
135
|
-
],
|
|
136
|
-
"middleware": [
|
|
137
|
-
"./dist/types/middleware.d.ts"
|
|
138
|
-
],
|
|
139
|
-
"package.json": [
|
|
140
|
-
"./package.json"
|
|
141
|
-
],
|
|
142
|
-
"integration": [
|
|
143
|
-
"./dist/types/integration.d.ts"
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"files": [
|
|
148
|
-
"./dist",
|
|
149
|
-
"./package.json"
|
|
150
|
-
],
|
|
151
151
|
"scripts": {
|
|
152
152
|
"build": "tsdown --config tsdown.config.ts",
|
|
153
153
|
"build:ci": "tsdown --config tsdown.config.ts",
|
|
154
154
|
"clean": "bun --bun rimraf ./dist .turbo",
|
|
155
155
|
"dev": "tsdown --config tsdown.config.ts --watch",
|
|
156
|
-
"format": "
|
|
157
|
-
"format:fix": "
|
|
158
|
-
"lint": "
|
|
159
|
-
"lint:fix": "
|
|
156
|
+
"format": "oxfmt --check .",
|
|
157
|
+
"format:fix": "oxfmt .",
|
|
158
|
+
"lint": "oxlint .",
|
|
159
|
+
"lint:fix": "oxlint --fix .",
|
|
160
160
|
"prepublish": "cp -f ../../README.md ./README.md",
|
|
161
161
|
"publish": "bun publish || true",
|
|
162
162
|
"publish:canary": "bun publish --access public --tag canary || true",
|
|
@@ -167,24 +167,24 @@
|
|
|
167
167
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
168
168
|
},
|
|
169
169
|
"dependencies": {
|
|
170
|
-
"@intlayer/config": "9.7.
|
|
171
|
-
"@intlayer/core": "9.7.
|
|
172
|
-
"@intlayer/engine": "9.7.
|
|
173
|
-
"@intlayer/types": "9.7.
|
|
174
|
-
"vanilla-intlayer": "9.7.
|
|
175
|
-
"vite-intlayer": "9.7.
|
|
170
|
+
"@intlayer/config": "9.7.2",
|
|
171
|
+
"@intlayer/core": "9.7.2",
|
|
172
|
+
"@intlayer/engine": "9.7.2",
|
|
173
|
+
"@intlayer/types": "9.7.2",
|
|
174
|
+
"vanilla-intlayer": "9.7.2",
|
|
175
|
+
"vite-intlayer": "9.7.2"
|
|
176
176
|
},
|
|
177
177
|
"devDependencies": {
|
|
178
|
-
"@intlayer/dictionaries-entry": "9.7.
|
|
178
|
+
"@intlayer/dictionaries-entry": "9.7.2",
|
|
179
179
|
"@types/node": "^26",
|
|
180
180
|
"@utils/ts-config": "1.0.4",
|
|
181
181
|
"@utils/ts-config-types": "1.0.4",
|
|
182
182
|
"@utils/tsdown-config": "1.0.4",
|
|
183
183
|
"fast-glob": "3.3.3",
|
|
184
|
-
"rimraf": "6.1.
|
|
185
|
-
"tsdown": "0.23.
|
|
184
|
+
"rimraf": "6.1.4",
|
|
185
|
+
"tsdown": "0.23.7",
|
|
186
186
|
"typescript": "7.0.2",
|
|
187
|
-
"vitest": "5.0
|
|
187
|
+
"vitest": "5.1.0"
|
|
188
188
|
},
|
|
189
189
|
"peerDependencies": {
|
|
190
190
|
"astro": ">=4.0.0",
|