@intlayer/types 8.2.3 → 8.3.0-canary.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 (42) hide show
  1. package/dist/cjs/allLocales.cjs +2 -0
  2. package/dist/cjs/allLocales.cjs.map +1 -0
  3. package/dist/cjs/config.cjs.map +1 -1
  4. package/dist/cjs/filePathPattern.cjs +0 -0
  5. package/dist/cjs/index.cjs +1 -1
  6. package/dist/cjs/locales.cjs +1 -1
  7. package/dist/cjs/locales.cjs.map +1 -1
  8. package/dist/esm/allLocales.mjs +2 -0
  9. package/dist/esm/allLocales.mjs.map +1 -0
  10. package/dist/esm/config.mjs.map +1 -1
  11. package/dist/esm/filePathPattern.mjs +0 -0
  12. package/dist/esm/index.mjs +1 -1
  13. package/dist/esm/locales.mjs +1 -1
  14. package/dist/esm/locales.mjs.map +1 -1
  15. package/dist/types/@intlayer/config/dist/types/built.d.ts +1 -0
  16. package/dist/types/@intlayer/core/dist/types/getStorageAttributes.d.ts +1 -0
  17. package/dist/types/@intlayer/core/dist/types/localization/getLocaleFromPath.d.ts +1 -0
  18. package/dist/types/@intlayer/core/dist/types/localization/getLocalizedUrl.d.ts +1 -0
  19. package/dist/types/@intlayer/core/dist/types/localization/getMultilingualUrls.d.ts +1 -0
  20. package/dist/types/@intlayer/core/dist/types/localization/getPrefix.d.ts +1 -0
  21. package/dist/types/@intlayer/core/dist/types/localization/index.d.ts +1 -0
  22. package/dist/types/@intlayer/core/dist/types/localization/rewriteUtils.d.ts +1 -0
  23. package/dist/types/@intlayer/core/dist/types/localization/validatePrefix.d.ts +1 -0
  24. package/dist/types/@intlayer/types/dist/types/config.d.ts +1 -0
  25. package/dist/types/allLocales.d.ts +10 -0
  26. package/dist/types/allLocales.d.ts.map +1 -0
  27. package/dist/types/config.d.ts +758 -716
  28. package/dist/types/config.d.ts.map +1 -1
  29. package/dist/types/dictionary.d.ts +193 -193
  30. package/dist/types/dictionary.d.ts.map +1 -1
  31. package/dist/types/filePathPattern.d.ts +29 -0
  32. package/dist/types/filePathPattern.d.ts.map +1 -0
  33. package/dist/types/index.d.ts +4 -2
  34. package/dist/types/intlayer/dist/types/index.d.ts +9 -0
  35. package/dist/types/intlayer/dist/types/index.d.ts.map +1 -0
  36. package/dist/types/locales.d.ts +2 -308
  37. package/dist/types/locales.d.ts.map +1 -1
  38. package/dist/types/module_augmentation.d.ts +4 -4
  39. package/dist/types/nodeType.d.ts.map +1 -1
  40. package/dist/types/plugin.d.ts +24 -24
  41. package/dist/types/plugin.d.ts.map +1 -1
  42. package/package.json +78 -21
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config.ts"],"mappings":";;;;;;;KAUY,UAAA;AAAA,KAEP,QAAA;AAAA,KAEA,OAAA;AAAA,KAEA,eAAA;AAAA,KAGA,YAAA,MAAkB,QAAA,yBAAiC,eAAA;AAAA,KAGnD,KAAA,MACE,QAAA,yBAAiC,eAAA,QACjC,QAAA,mCAA2C,eAAA;AAAA,KAI7C,SAAA,MAAe,QAAA,yBAAiC,eAAA;AAAA,KAEzC,OAAA,GAAU,YAAA,GAAe,KAAA,GAAQ,SAAA;;;;KAKjC,0BAAA;EArBP;;;;;AAAO;;EA6BV,OAAA,EAAS,MAAA;EA3BS;;AAAA;;;;;AAGmD;;EAmCrE,eAAA,EAAiB,MAAA;EA/BZ;;;;;;;;EAyCL,UAAA,EAAY,UAAA;EAxCoC;;;AAAe;;;;EAiD/D,aAAA,EAAe,MAAA;AAAA;AAAA,KAGL,iBAAA;;;;;;EAMV,IAAA;EApDoB;;;;;AAKtB;;EAuDE,IAAA;EA/CS;;;;;;;;EAwDT,MAAA;EA7CiB;;;;;;;EAqDjB,IAAA;EA/B2B;;;;;;;;EAwC3B,MAAA;EAkBA;;;;;AAcF;;EAxBE,QAAA;EA+BA;;AAYF;;;;;;;EAjCE,QAAA;EAmCW;;;AAGb;;;;;AAIA;EA/BE,OAAA,GAAU,IAAA;AA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AAA;;;;;;;;EASA,mBAAA;;;;;;;;EASA,2BAAA;AAAA;AAAA,KAGU,YAAA;;;;;;;;EAQV,OAAA;;;;;;;;EASA,qBAAA;;;;;;;;EASA,uBAAA;;;;;;;;EASA,qBAAA;;;;;;;;EASA,eAAA;;;;;;;;EASA,sBAAA;;;;;;;;EASA,oBAAA;;;;;;;;EASA,QAAA;;;;;;;;EASA,OAAA;;;;;;;;EASA,SAAA;;;;;;;;EASA,QAAA;;;;;;;;EASA,OAAA;;;;;;;;EASA,0BAAA;AAAA;AAAA,KAGU,YAAA;EACV,KAAA,UAAe,OAAA,CAAQ,KAAA;EACvB,GAAA,UAAa,OAAA,CAAQ,GAAA;EACrB,IAAA,UAAc,OAAA,CAAQ,IAAA;EACtB,IAAA,UAAc,OAAA,CAAQ,IAAA;AAAA;AAAA,KAGZ,SAAA;;;;;;;;;;EAUV,IAAA;;;;;;;;EASA,MAAA;;;;EAKA,KAAA,UAAe,OAAA,CAAQ,KAAA;EACvB,GAAA,UAAa,OAAA,CAAQ,GAAA;EACrB,IAAA,UAAc,OAAA,CAAQ,IAAA;EACtB,IAAA,UAAc,OAAA,CAAQ,IAAA;EACtB,KAAA,UAAe,OAAA,CAAQ,KAAA;AAAA"}
@@ -1,4 +1,5 @@
1
1
  import { DeclaredLocales, LocalesValues, Schema, SchemaKeys } from "./module_augmentation.js";
2
+ import { FilePathPattern } from "./filePathPattern.js";
2
3
  import { NodeType } from "./nodeType.js";
3
4
 
4
5
  //#region src/dictionary.d.ts
@@ -10,265 +11,264 @@ interface TypedNode<_NodeType = undefined> extends TypedNodeBase {}
10
11
  type FetchableContentNode<NodeType> = (args?: any) => ContentNode<NodeType> | Promise<ContentNode<NodeType>>;
11
12
  type ContentNode<T = undefined, FetchableNode = false, NodeType = (T extends undefined ? BaseNode : T)> = NodeType | TypedNode<NodeType> | ((args?: any) => ContentNode<NodeType>) | (FetchableNode extends true ? FetchableContentNode<NodeType> : undefined);
12
13
  type IsArray<T> = T extends any[] ? true : false;
13
- type ReplaceContentValueArray<T, FetchableNode> = T extends (infer U)[] ? // Allow either a *single* typed node returning the entire array
14
- ContentNode<T, FetchableNode> | ReplaceContentValue<U, FetchableNode>[] : never;
14
+ type ReplaceContentValueArray<T, FetchableNode> = T extends (infer U)[] ? ContentNode<T, FetchableNode> | ReplaceContentValue<U, FetchableNode>[] : never;
15
15
  type ReplaceContentValueObject<T, FetchableNode> = { [K in keyof T]: ReplaceContentValue<T[K], FetchableNode> };
16
16
  type ReplaceContentValue<NodeType, FetchableNode = true> = NodeType extends object ? IsArray<NodeType> extends true ? ReplaceContentValueArray<NodeType, FetchableNode> : ContentNode<NodeType, FetchableNode> | ReplaceContentValueObject<NodeType, FetchableNode> : ContentNode<NodeType, FetchableNode>;
17
- type Fill = boolean | string | Partial<Record<DeclaredLocales, boolean | string>>;
17
+ type Fill = boolean | FilePathPattern | Partial<Record<DeclaredLocales, boolean | FilePathPattern>>;
18
18
  type DictionaryId = string;
19
19
  type DictionaryKey = string;
20
- type DictionaryLocation = 'remote' | 'local' | 'hybrid' | 'plugin' | (string & {});
21
- type LocalDictionaryId = `${DictionaryKey}::${Dictionary['location']}::${Dictionary['filePath'] | DictionaryId}`;
22
- type DictionaryFormat = 'intlayer' | 'icu' | 'i18next' | 'vue-i18n';
20
+ type DictionaryLocation = "remote" | "local" | "hybrid" | "plugin" | (string & {});
21
+ type LocalDictionaryId = `${DictionaryKey}::${Dictionary["location"]}::${Dictionary["filePath"] | DictionaryId}`;
22
+ type DictionaryFormat = "intlayer" | "icu" | "i18next" | "vue-i18n";
23
23
  /**
24
- * Indicates the mode of import to use for the dictionary.
25
- *
26
- * Available modes:
27
- * - "static": The dictionaries are imported statically.
28
- * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.
29
- * - "dynamic": The dictionaries are imported dynamically in a synchronous component using the suspense API.
30
- * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
31
- * - "live": The dictionaries are imported dynamically using the live sync API.
32
- * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
33
- * Live mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
34
- *
35
- * Default: "static"
36
- */
37
- type ImportMode = 'static' | 'dynamic' | 'fetch';
24
+ * Indicates the mode of import to use for the dictionary.
25
+ *
26
+ * Available modes:
27
+ * - "static": The dictionaries are imported statically.
28
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.
29
+ * - "dynamic": The dictionaries are imported dynamically in a synchronous component using the suspense API.
30
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
31
+ * - "live": The dictionaries are imported dynamically using the live sync API.
32
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
33
+ * Live mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
34
+ *
35
+ * Default: "static"
36
+ */
37
+ type ImportMode = "static" | "dynamic" | "fetch";
38
38
  type ContentAutoTransformation = boolean | {
39
39
  /**
40
- * Indicates if the content should be automatically transformed to a markdown node.
41
- * Default: true
42
- */
40
+ * Indicates if the content should be automatically transformed to a markdown node.
41
+ * Default: true
42
+ */
43
43
  markdown?: boolean;
44
44
  /**
45
- * Indicates if the content should be automatically transformed to an HTML node.
46
- * Default: true
47
- */
45
+ * Indicates if the content should be automatically transformed to an HTML node.
46
+ * Default: true
47
+ */
48
48
  html?: boolean;
49
49
  /**
50
- * Indicates if the content should be automatically transformed to an insertion node.
51
- * Default: true
52
- */
50
+ * Indicates if the content should be automatically transformed to an insertion node.
51
+ * Default: true
52
+ */
53
53
  insertion?: boolean;
54
54
  };
55
55
  /**
56
- * Common properties shared by all Dictionary variants.
57
- */
56
+ * Common properties shared by all Dictionary variants.
57
+ */
58
58
  type DictionaryBase = {
59
59
  /**
60
- * _Auto generated by the intlayer, do not modify it_
61
- *
62
- * The schema of the dictionary, used for JSON validation
63
- */
64
- $schema?: 'https://intlayer.org/schema.json';
60
+ * _Auto generated by the intlayer, do not modify it_
61
+ *
62
+ * The schema of the dictionary, used for JSON validation
63
+ */
64
+ $schema?: "https://intlayer.org/schema.json";
65
65
  /**
66
- * _Auto generated by the intlayer, do not modify it_
67
- *
68
- * For remote dictionaries, the id is the id of the dictionary in the remote server
69
- */
66
+ * _Auto generated by the intlayer, do not modify it_
67
+ *
68
+ * For remote dictionaries, the id is the id of the dictionary in the remote server
69
+ */
70
70
  id?: DictionaryId;
71
71
  /**
72
- * _Auto generated by the intlayer, do not modify it_
73
- *
74
- * For remote dictionaries, the projectIds is the ids of the projects that can use this dictionary
75
- * A remote dictionary can be shared between multiple projects
76
- */
72
+ * _Auto generated by the intlayer, do not modify it_
73
+ *
74
+ * For remote dictionaries, the projectIds is the ids of the projects that can use this dictionary
75
+ * A remote dictionary can be shared between multiple projects
76
+ */
77
77
  projectIds?: string[];
78
78
  /**
79
- * _Auto generated by the intlayer, do not modify it_
80
- *
81
- * Unique Identifier for the dictionaries. Auto generated by the intlayer, it helps to identify the dictionary and know if it is a local or remote dictionary, and his location.
82
- */
79
+ * _Auto generated by the intlayer, do not modify it_
80
+ *
81
+ * Unique Identifier for the dictionaries. Auto generated by the intlayer, it helps to identify the dictionary and know if it is a local or remote dictionary, and his location.
82
+ */
83
83
  localId?: LocalDictionaryId;
84
84
  /**
85
- * _Auto generated by the intlayer, do not modify it_
86
- *
87
- * For merged dictionaries, the localIds is the ids of the dictionaries that are merged
88
- */
85
+ * _Auto generated by the intlayer, do not modify it_
86
+ *
87
+ * For merged dictionaries, the localIds is the ids of the dictionaries that are merged
88
+ */
89
89
  localIds?: LocalDictionaryId[];
90
90
  /**
91
- * The formatter to use for the dictionary.
92
- *
93
- * Default: 'intlayer'
94
- *
95
- * The formatter to use for the dictionary content.
96
- */
91
+ * The formatter to use for the dictionary.
92
+ *
93
+ * Default: 'intlayer'
94
+ *
95
+ * The formatter to use for the dictionary content.
96
+ */
97
97
  format?: DictionaryFormat;
98
98
  /**
99
- * The key of the dictionary. If multiple dictionaries have the same key, intlayer will merge them.
100
- *
101
- * As convention, use '-' to separate the words in the key.
102
- *
103
- * Example:
104
- * ```json
105
- * {
106
- * "key": "about-page-meta",
107
- * "content": { ... }
108
- * }
109
- * ```
110
- */
99
+ * The key of the dictionary. If multiple dictionaries have the same key, intlayer will merge them.
100
+ *
101
+ * As convention, use '-' to separate the words in the key.
102
+ *
103
+ * Example:
104
+ * ```json
105
+ * {
106
+ * "key": "about-page-meta",
107
+ * "content": { ... }
108
+ * }
109
+ * ```
110
+ */
111
111
  key: DictionaryKey;
112
112
  /**
113
- * The title of the dictionary. Helps to identify the dictionary in the editor, and the CMS.
114
- *
115
- * Example:
116
- * ```json
117
- * {
118
- * "key": "about-page-meta",
119
- * "title": "About Page",
120
- * "content": { ... }
121
- * }
122
- * ```
123
- */
113
+ * The title of the dictionary. Helps to identify the dictionary in the editor, and the CMS.
114
+ *
115
+ * Example:
116
+ * ```json
117
+ * {
118
+ * "key": "about-page-meta",
119
+ * "title": "About Page",
120
+ * "content": { ... }
121
+ * }
122
+ * ```
123
+ */
124
124
  title?: string;
125
125
  /**
126
- * The description of the dictionary. Helps to understand the purpose of the dictionary in the editor, and the CMS.
127
- * The description is also used as context for translations generation.
128
- *
129
- * Example:
130
- * ```ts
131
- * {
132
- * "key": "about-page-meta",
133
- * "description":[
134
- * "This dictionary is manage the metadata of the About Page",
135
- * "Consider good practices for SEO:",
136
- * "- The title should be between 50 and 60 characters",
137
- * "- The description should be between 150 and 160 characters",
138
- * ].join('\n'),
139
- * "content": { ... }
140
- * }
141
- * ```
142
- */
126
+ * The description of the dictionary. Helps to understand the purpose of the dictionary in the editor, and the CMS.
127
+ * The description is also used as context for translations generation.
128
+ *
129
+ * Example:
130
+ * ```ts
131
+ * {
132
+ * "key": "about-page-meta",
133
+ * "description":[
134
+ * "This dictionary is manage the metadata of the About Page",
135
+ * "Consider good practices for SEO:",
136
+ * "- The title should be between 50 and 60 characters",
137
+ * "- The description should be between 150 and 160 characters",
138
+ * ].join('\n'),
139
+ * "content": { ... }
140
+ * }
141
+ * ```
142
+ */
143
143
  description?: string;
144
144
  /**
145
- * _Auto generated by the intlayer, do not modify it_
146
- *
147
- * The available versions of the remote dictionary. Helps to know the versions of the dictionary that are available.
148
- */
145
+ * _Auto generated by the intlayer, do not modify it_
146
+ *
147
+ * The available versions of the remote dictionary. Helps to know the versions of the dictionary that are available.
148
+ */
149
149
  versions?: string[];
150
150
  /**
151
- * _Managable on the CMS, do not modify it locally_
152
- *
153
- * The version of the remote dictionary. Helps to know the version of the dictionary that is currently used.
154
- */
151
+ * _Managable on the CMS, do not modify it locally_
152
+ *
153
+ * The version of the remote dictionary. Helps to know the version of the dictionary that is currently used.
154
+ */
155
155
  version?: string;
156
156
  /**
157
- * _Auto generated by the intlayer, do not modify it_
158
- *
159
- * The file path of the local dictionary. Helps to know from what .content file the dictionary has been generated.
160
- */
157
+ * _Auto generated by the intlayer, do not modify it_
158
+ *
159
+ * The file path of the local dictionary. Helps to know from what .content file the dictionary has been generated.
160
+ */
161
161
  filePath?: string;
162
162
  /**
163
- * Helps to categorize the dictionaries. The tags can provide more context and instructions for the dictionary.
164
- *
165
- * Example:
166
- * ```json
167
- * {
168
- * "key": "about-page-meta",
169
- * "tags": ["metadata","about-page"]
170
- * }
171
- * ```
172
- */
163
+ * Helps to categorize the dictionaries. The tags can provide more context and instructions for the dictionary.
164
+ *
165
+ * Example:
166
+ * ```json
167
+ * {
168
+ * "key": "about-page-meta",
169
+ * "tags": ["metadata","about-page"]
170
+ * }
171
+ * ```
172
+ */
173
173
  tags?: string[];
174
174
  /**
175
- * Transform the dictionary in a per-locale dictionary.
176
- * Each field declared in a per-locale dictionary will be transformed in a translation node.
177
- * If missing, the dictionary will be treated as a multilingual dictionary.
178
- * If declared, do not use translation nodes in the content.
179
- *
180
- * Example:
181
- * ```json
182
- * {
183
- * "key": "about-page",
184
- * "locale": "en",
185
- * "content": {
186
- * "multilingualContent": "English content"
187
- * }
188
- * }
189
- * ```
190
- */
175
+ * Transform the dictionary in a per-locale dictionary.
176
+ * Each field declared in a per-locale dictionary will be transformed in a translation node.
177
+ * If missing, the dictionary will be treated as a multilingual dictionary.
178
+ * If declared, do not use translation nodes in the content.
179
+ *
180
+ * Example:
181
+ * ```json
182
+ * {
183
+ * "key": "about-page",
184
+ * "locale": "en",
185
+ * "content": {
186
+ * "multilingualContent": "English content"
187
+ * }
188
+ * }
189
+ * ```
190
+ */
191
191
  locale?: LocalesValues;
192
192
  /**
193
- * Indicators if the content of the dictionary should be automatically transformed.
194
- * If true, the content will be transformed to the corresponding node type.
195
- * - Markdown: `### Title` -> `md('### Title')`
196
- * - HTML: `<div>Title</div>` -> `html('<div>Title</div>')`
197
- * - Insertion: `Hello {{name}}` -> `insert('Hello {{name}}')`
198
- *
199
- * If an object is provided, you can specify which transformations should be enabled.
200
- *
201
- * Default: false
202
- */
193
+ * Indicators if the content of the dictionary should be automatically transformed.
194
+ * If true, the content will be transformed to the corresponding node type.
195
+ * - Markdown: `### Title` -> `md('### Title')`
196
+ * - HTML: `<div>Title</div>` -> `html('<div>Title</div>')`
197
+ * - Insertion: `Hello {{name}}` -> `insert('Hello {{name}}')`
198
+ *
199
+ * If an object is provided, you can specify which transformations should be enabled.
200
+ *
201
+ * Default: false
202
+ */
203
203
  contentAutoTransformation?: ContentAutoTransformation;
204
204
  /**
205
- * Instruction to fill the dictionary.
206
- * Can also be declared globally in the `intlayer.config.ts` file.
207
- *
208
- * Example:
209
- * ```json
210
- * {
211
- * "key": "about-page",
212
- * "fill": true
213
- * }
214
- * ```
215
- */
205
+ * Instruction to fill the dictionary.
206
+ * Can also be declared globally in the `intlayer.config.ts` file.
207
+ *
208
+ * Example:
209
+ * ```json
210
+ * {
211
+ * "key": "about-page",
212
+ * "fill": true
213
+ * }
214
+ * ```
215
+ */
216
216
  fill?: Fill;
217
217
  /**
218
- * _Auto generated by the intlayer, do not modify it_
219
- *
220
- * Indicates if the dictionary has been auto filled.
221
- * In the case of conflicts, base dictionaryed will override auto filled dictionary.
222
- */
218
+ * _Auto generated by the intlayer, do not modify it_
219
+ *
220
+ * Indicates if the dictionary has been auto filled.
221
+ * In the case of conflicts, base dictionaryed will override auto filled dictionary.
222
+ */
223
223
  filled?: true;
224
224
  /**
225
- * Indicates the priority of the dictionary.
226
- * In the case of conflicts, the dictionary with the highest priority will override the other dictionaries.
227
- */
225
+ * Indicates the priority of the dictionary.
226
+ * In the case of conflicts, the dictionary with the highest priority will override the other dictionaries.
227
+ */
228
228
  priority?: number;
229
229
  /**
230
- * Indicates the mode of import to use for the dictionary.
231
- *
232
- * Available modes:
233
- * - "static": The dictionaries are imported statically.
234
- * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.
235
- * - "dynamic": The dictionaries are imported dynamically in a synchronous component using the suspense API.
236
- * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
237
- * - "live": The dictionaries are imported dynamically using the live sync API.
238
- * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
239
- * Live mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
240
- *
241
- * Default: "static"
242
- */
230
+ * Indicates the mode of import to use for the dictionary.
231
+ *
232
+ * Available modes:
233
+ * - "static": The dictionaries are imported statically.
234
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.
235
+ * - "dynamic": The dictionaries are imported dynamically in a synchronous component using the suspense API.
236
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
237
+ * - "live": The dictionaries are imported dynamically using the live sync API.
238
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
239
+ * Live mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
240
+ *
241
+ * Default: "static"
242
+ */
243
243
  importMode?: ImportMode;
244
244
  /**
245
- * Indicates the location of the dictionary and controls how it synchronizes with the CMS.
246
- *
247
- * - 'hybrid': The dictionary is managed locally and remotely. Once pushed on the CMS, it will be synchronized from the local one. The local dictionary will be pulled from the CMS.
248
- * - 'remote': The dictionary is managed remotely only. Once pushed on the CMS, it will be detached from the local one. At content load time, the remote dictionary will be pulled from the CMS. A '.content' file with remote location will be ignored.
249
- * - 'local': The dictionary is managed locally. It will not be pushed to the remote CMS.
250
- * - 'plugin' (or any custom string): The dictionary is managed by a plugin, or a custom source. When you will try to push it, the system will ask an action to the user.
251
- */
245
+ * Indicates the location of the dictionary and controls how it synchronizes with the CMS.
246
+ *
247
+ * - 'hybrid': The dictionary is managed locally and remotely. Once pushed on the CMS, it will be synchronized from the local one. The local dictionary will be pulled from the CMS.
248
+ * - 'remote': The dictionary is managed remotely only. Once pushed on the CMS, it will be detached from the local one. At content load time, the remote dictionary will be pulled from the CMS. A '.content' file with remote location will be ignored.
249
+ * - 'local': The dictionary is managed locally. It will not be pushed to the remote CMS.
250
+ * - 'plugin' (or any custom string): The dictionary is managed by a plugin, or a custom source. When you will try to push it, the system will ask an action to the user.
251
+ */
252
252
  location?: DictionaryLocation;
253
253
  };
254
254
  /**
255
- * Strict Schema Branch:
256
- * If a schema is provided, it MUST be one of the SchemaKeys.
257
- */
255
+ * Strict Schema Branch:
256
+ * If a schema is provided, it MUST be one of the SchemaKeys.
257
+ */
258
258
  type DictionaryWithSchema<ContentType, FetchableNode, K extends SchemaKeys = SchemaKeys> = K extends any ? {
259
259
  schema: K;
260
260
  content: ContentType extends undefined ? ReplaceContentValue<Schema<K>, FetchableNode> | Schema<K> : ReplaceContentValue<ContentType & Schema<K>, FetchableNode> | (ContentType & Schema<K>);
261
261
  } : never;
262
262
  /**
263
- * Strict Discrimination Branch
264
- */
263
+ * Strict Discrimination Branch
264
+ */
265
265
  type DictionaryWithoutSchema<ContentType, FetchableNode> = {
266
266
  schema?: never;
267
267
  content: ContentType extends undefined ? any : ReplaceContentValue<ContentType, FetchableNode> | ContentType;
268
268
  };
269
269
  /**
270
- * The Final Dictionary Type
271
- */
270
+ * The Final Dictionary Type
271
+ */
272
272
  type Dictionary<ContentType = undefined, SchemaKey extends SchemaKeys | undefined = undefined, FetchableNode = false> = DictionaryBase & (SchemaKey extends SchemaKeys ? DictionaryWithSchema<ContentType, FetchableNode, SchemaKey> : undefined extends SchemaKey ? DictionaryWithoutSchema<ContentType, FetchableNode> | DictionaryWithSchema<ContentType, FetchableNode> : never);
273
273
  type GetSubPath<T, P> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? GetSubPath<T[K], Rest> : never : P extends keyof T ? T[P] : T;
274
274
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../src/dictionary.ts"],"mappings":";;;;KAQK,QAAA;AAAA,KAEA,aAAA;EACH,QAAA,EAAU,QAAA,MAAc,QAAA;AAAA;AAAA,UAGT,SAAA,gCAAyC,aAAA;AAAA,KAErD,oBAAA,cACH,IAAA,WACG,WAAA,CAAY,QAAA,IAAY,OAAA,CAAQ,WAAA,CAAY,QAAA;AAAA,KAErC,WAAA,mDAGC,CAAA,qBAAsB,QAAA,GAAW,CAAA,KAE1C,QAAA,GACA,SAAA,CAAU,QAAA,MACR,IAAA,WAAe,WAAA,CAAY,QAAA,MAC5B,aAAA,gBAA6B,oBAAA,CAAqB,QAAA;AAAA,KAGlD,OAAA,MAAa,CAAA;AAAA,KAEb,wBAAA,qBAA6C,CAAA;AAG9C,WAAA,CAAY,CAAA,EAAG,aAAA,IAAiB,mBAAA,CAAoB,CAAA,EAAG,aAAA;AAAA,KAGtD,yBAAA,mCACS,CAAA,GAAI,mBAAA,CAAoB,CAAA,CAAE,CAAA,GAAI,aAAA;AAAA,KAIvC,mBAAA,mCAGD,QAAA,kBACA,OAAA,CAAQ,QAAA,iBACN,wBAAA,CAAyB,QAAA,EAAU,aAAA,IAE/B,WAAA,CAAY,QAAA,EAAU,aAAA,IACtB,yBAAA,CAA0B,QAAA,EAAU,aAAA,IAC1C,W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GAA4B,yBAAA;EAvMlB;;AAgBZ;;;;;AAEA;;;;;EAmME,IAAA,GAAO,IAAA;;;;;;;EAQP,MAAA;;;;;EAMA,QAAA;;;;;;;;;;;;;;;EAgBA,UAAA,GAAa,UAAA;;;;;;;;;EAUb,QAAA,GAAW,kBAAA;AAAA;;;;;KAOR,oBAAA,uCAGO,UAAA,GAAa,UAAA,IACrB,CAAA;EAEE,MAAA,EAAQ,CAAA;EACR,OAAA,EAAS,WAAA,qBACL,mBAAA,CAAoB,MAAA,CAAO,CAAA,GAAI,aAAA,IAAiB,MAAA,CAAO,CAAA,IAEnD,mBAAA,CAAoB,WAAA,GAAc,MAAA,CAAO,CAAA,GAAI,aAAA,KAC5C,WAAA,GAAc,MAAA,CAAO,CAAA;AAAA;;AAlBvB;;KAyBR,uBAAA;EACH,MAAA;EACA,OAAA,EAAS,WAAA,2BAEL,mBAAA,CAAoB,WAAA,EAAa,aAAA,IAAiB,WAAA;AAAA;;;;KAM5C,UAAA,4CAEQ,UAAA,mDAEhB,cAAA,IACD,SAAA,SAAkB,UAAA,GACf,oBAAA,CAAqB,WAAA,EAAa,aAAA,EAAe,SAAA,sBAC/B,SAAA,GAEZ,uBAAA,CAAwB,WAAA,EAAa,aAAA,IACrC,oBAAA,CAAqB,WAAA,EAAa,aAAA;AAAA,KAGlC,UAAA,SAAmB,CAAA,sCAC3B,CAAA,eAAgB,CAAA,GACd,UAAA,CAAW,CAAA,CAAE,CAAA,GAAI,IAAA,YAEnB,CAAA,eAAgB,CAAA,GACd,CAAA,CAAE,CAAA,IACF,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { DeclaredLocales } from "./module_augmentation.js";
2
+ import { DictionaryKey } from "./dictionary.js";
3
+
4
+ //#region src/filePathPattern.d.ts
5
+ type ContentExtension = `.${string}.${"json" | "js" | "ts" | "jsx" | "tsx" | "cjs" | "mjs"}`;
6
+ type FilePathPatternContext = {
7
+ locale?: DeclaredLocales;
8
+ key: DictionaryKey;
9
+ fileName: string;
10
+ extension: ContentExtension | (string & {});
11
+ format: "ts" | "cjs" | "esm" | "json" | "jsonc" | "json5";
12
+ componentExtension?: ".json" | ".js" | ".ts" | ".jsx" | ".tsx" | ".cjs" | ".mjs";
13
+ componentFormat?: "ts" | "cjs" | "esm";
14
+ componentFileName?: string;
15
+ componentDirPath?: string;
16
+ };
17
+ /**
18
+ * Syntax for resolving file paths.
19
+ */
20
+ type FilePathPatternFunction = (context: FilePathPatternContext) => string | Promise<string>;
21
+ /**
22
+ * Global syntax for defining file paths and patterns.
23
+ * Can be a static string, a templated string (e.g. `path/{{locale}}/{{key}}{{extension}}`),
24
+ * or a function evaluating the path dynamically.
25
+ */
26
+ type FilePathPattern = string | FilePathPatternFunction;
27
+ //#endregion
28
+ export { FilePathPattern, FilePathPatternContext, FilePathPatternFunction };
29
+ //# sourceMappingURL=filePathPattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filePathPattern.d.ts","names":[],"sources":["../../src/filePathPattern.ts"],"mappings":";;;;KAGK,gBAAA;AAAA,KAGO,sBAAA;EACV,MAAA,GAAS,eAAA;EACT,GAAA,EAAK,aAAA;EACL,QAAA;EACA,SAAA,EAAW,gBAAA;EACX,MAAA;EACA,kBAAA;EAQA,eAAA;EAEA,iBAAA;EACA,gBAAA;AAAA;;;;KAMU,uBAAA,IACV,OAAA,EAAS,sBAAA,cACG,OAAA;;;;;;KAOF,eAAA,YAA2B,uBAAA"}
@@ -1,8 +1,10 @@
1
- import { Locale, locales_d_exports } from "./locales.js";
1
+ import { locales_d_exports } from "./locales.js";
2
+ import { ALL_LOCALES, Locale } from "./allLocales.js";
2
3
  import { DeclaredLocales, DictionaryKeys, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, LocalesValues, RequiredLocales, Schema, SchemaKeys, StrictModeLocaleMap } from "./module_augmentation.js";
4
+ import { FilePathPattern, FilePathPatternContext, FilePathPatternFunction } from "./filePathPattern.js";
3
5
  import { NodeType, TypedNodeModel, formatNodeType } from "./nodeType.js";
4
6
  import { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, Fill, GetSubPath, ImportMode, LocalDictionaryId, TypedNode } from "./dictionary.js";
5
7
  import { MergedDictionaryOutput, MergedDictionaryResult, Plugin, UnmergedDictionaryOutput, UnmergedDictionaryResult } from "./plugin.js";
6
8
  import { AiConfig, AiProviderConfigMap, AiProviders, BuildConfig, CommonAiConfig, CompilerConfig, ContentConfig, CookiesAttributes, CustomIntlayerConfig, DictionaryConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, RewriteObject, RewriteRule, RewriteRules, RoutingConfig, StorageAttributes, StrictMode, SystemConfig, URLType } from "./config.js";
7
9
  import { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, HTMLNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, ReactNode, TranslationNode } from "./keyPath.js";
8
- export { AiConfig, AiProviderConfigMap, AiProviders, ArrayNode, BuildConfig, CommonAiConfig, CompilerConfig, ConditionNode, ContentAutoTransformation, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, DeclaredLocales, Dictionary, DictionaryConfig, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, EditorConfig, EnumerationNode, FileNode, Fill, GenderNode, GetSubPath, HTMLNode, ImportMode, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, type Locale, locales_d_exports as Locales, LocalesValues, LogConfig, LogFunctions, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NestedNode, NodeType, ObjectNode, Plugin, ReactNode, RequiredLocales, RewriteObject, RewriteRule, RewriteRules, RoutingConfig, type Schema, type SchemaKeys, StorageAttributes, StrictMode, StrictModeLocaleMap, SystemConfig, TranslationNode, TypedNode, TypedNodeModel, URLType, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
10
+ export { ALL_LOCALES, AiConfig, AiProviderConfigMap, AiProviders, ArrayNode, BuildConfig, CommonAiConfig, CompilerConfig, ConditionNode, ContentAutoTransformation, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, DeclaredLocales, Dictionary, DictionaryConfig, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, EditorConfig, EnumerationNode, FileNode, FilePathPattern, FilePathPatternContext, FilePathPatternFunction, Fill, GenderNode, GetSubPath, HTMLNode, ImportMode, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, Locale, locales_d_exports as Locales, LocalesValues, LogConfig, LogFunctions, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NestedNode, NodeType, ObjectNode, Plugin, ReactNode, RequiredLocales, RewriteObject, RewriteRule, RewriteRules, RoutingConfig, Schema, SchemaKeys, StorageAttributes, StrictMode, StrictModeLocaleMap, SystemConfig, TranslationNode, TypedNode, TypedNodeModel, URLType, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
@@ -0,0 +1,9 @@
1
+ //#region ../../intlayer/dist/types/index.d.ts
2
+ interface __DictionaryRegistry {}
3
+ interface __DeclaredLocalesRegistry {}
4
+ interface __RequiredLocalesRegistry {}
5
+ interface __SchemaRegistry {}
6
+ interface __StrictModeRegistry {} //#endregion
7
+ //#endregion
8
+ export { __DeclaredLocalesRegistry, __DictionaryRegistry, __RequiredLocalesRegistry, __SchemaRegistry, __StrictModeRegistry };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["_intlayer_types_config0","CustomIntlayerConfig","IntlayerConfig","_intlayer_types_allLocales0","ALL_LOCALES","Locale","ContentNode","Dictionary","Dictionary$1","LocalesValues","SchemaKeys","StrictModeLocaleMap","Locales","configuration","file","Intl","compact","currency","date","number","percentage","relativeTime","units","getDictionary","getEnumeration","getEnumerationContent","getIntlayer","getNesting","getTranslation","getTranslationContent","getBrowserLocale","getCanonicalPath","getHTMLTextDir","getLocale","getLocaleFromPath","getLocaleLang","getLocaleName","getLocalizedPath","getLocalizedUrl","getMultilingualUrls","getPathWithoutLocale","getPrefix","getRewriteRules","localeDetector","localeFlatMap","localeMap","localeRecord","localeResolver","validatePrefix","getMarkdownMetadata","cond","enu","gender","html","insert","md","nest","t","getCookie","getLocaleFromStorage","setLocaleInStorage","T","SchemaKey","DeclarationContent","getConfiguration","locales","requiredLocales","defaultLocale","__DictionaryRegistry","__DeclaredLocalesRegistry","__RequiredLocalesRegistry","__SchemaRegistry","__StrictModeRegistry"],"sources":["../../../../../../../intlayer/dist/types/index.d.ts"],"mappings":";UAmDUoE,oBAAAA;AAAAA,UACAC,yBAAAA;AAAAA,UACAC,yBAAAA;AAAAA,UACAC,gBAAAA;AAAAA,UACAC,oBAAAA"}