@intlayer/types 7.0.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 (67) hide show
  1. package/README.md +276 -0
  2. package/dist/cjs/_virtual/rolldown_runtime.cjs +14 -0
  3. package/dist/cjs/backend_models.cjs +0 -0
  4. package/dist/cjs/config.cjs +0 -0
  5. package/dist/cjs/dictionary.cjs +0 -0
  6. package/dist/cjs/index.cjs +11 -0
  7. package/dist/cjs/index.cjs.map +1 -0
  8. package/dist/cjs/intlayer.d.cjs +1 -0
  9. package/dist/cjs/keyPath.cjs +0 -0
  10. package/dist/cjs/locales copy.cjs +569 -0
  11. package/dist/cjs/locales copy.cjs.map +1 -0
  12. package/dist/cjs/locales.cjs +1413 -0
  13. package/dist/cjs/locales.cjs.map +1 -0
  14. package/dist/cjs/module_augmentation.cjs +0 -0
  15. package/dist/cjs/module_augmentation.cjs.map +1 -0
  16. package/dist/cjs/nodeType.cjs +31 -0
  17. package/dist/cjs/nodeType.cjs.map +1 -0
  18. package/dist/cjs/plugin.cjs +0 -0
  19. package/dist/cjs/test.cjs +0 -0
  20. package/dist/cjs/test.cjs.map +1 -0
  21. package/dist/cjs/translation.cjs +0 -0
  22. package/dist/esm/_virtual/rolldown_runtime.mjs +13 -0
  23. package/dist/esm/backend_models.mjs +0 -0
  24. package/dist/esm/config.mjs +0 -0
  25. package/dist/esm/dictionary.mjs +0 -0
  26. package/dist/esm/index.mjs +4 -0
  27. package/dist/esm/index.mjs.map +1 -0
  28. package/dist/esm/intlayer.d.mjs +3 -0
  29. package/dist/esm/keyPath.mjs +0 -0
  30. package/dist/esm/locales copy.mjs +568 -0
  31. package/dist/esm/locales copy.mjs.map +1 -0
  32. package/dist/esm/locales.mjs +1128 -0
  33. package/dist/esm/locales.mjs.map +1 -0
  34. package/dist/esm/module_augmentation.mjs +0 -0
  35. package/dist/esm/module_augmentation.mjs.map +1 -0
  36. package/dist/esm/nodeType.mjs +29 -0
  37. package/dist/esm/nodeType.mjs.map +1 -0
  38. package/dist/esm/plugin.mjs +0 -0
  39. package/dist/esm/test.mjs +0 -0
  40. package/dist/esm/test.mjs.map +1 -0
  41. package/dist/esm/translation.mjs +1 -0
  42. package/dist/types/backend_models.d.ts +1 -0
  43. package/dist/types/config.d.ts +793 -0
  44. package/dist/types/config.d.ts.map +1 -0
  45. package/dist/types/dictionary.d.ts +294 -0
  46. package/dist/types/dictionary.d.ts.map +1 -0
  47. package/dist/types/index.d.ts +8 -0
  48. package/dist/types/index.d.ts.map +1 -0
  49. package/dist/types/intlayer.d.ts +11 -0
  50. package/dist/types/intlayer.d.ts.map +1 -0
  51. package/dist/types/keyPath.d.ts +51 -0
  52. package/dist/types/keyPath.d.ts.map +1 -0
  53. package/dist/types/locales copy.d.ts +566 -0
  54. package/dist/types/locales copy.d.ts.map +1 -0
  55. package/dist/types/locales.d.ts +847 -0
  56. package/dist/types/locales.d.ts.map +1 -0
  57. package/dist/types/module_augmentation.d.ts +30 -0
  58. package/dist/types/module_augmentation.d.ts.map +1 -0
  59. package/dist/types/nodeType.d.ts +31 -0
  60. package/dist/types/nodeType.d.ts.map +1 -0
  61. package/dist/types/plugin.d.ts +71 -0
  62. package/dist/types/plugin.d.ts.map +1 -0
  63. package/dist/types/test.d.ts +20 -0
  64. package/dist/types/test.d.ts.map +1 -0
  65. package/dist/types/translation.d.ts +13 -0
  66. package/dist/types/translation.d.ts.map +1 -0
  67. package/package.json +93 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config.ts"],"sourcesContent":[],"mappings":";;;;;KAIY,UAAA;;AAAZ;AAKA;AAQW,KARC,0BAAA,GAQD;EAWQ;;;;AAsBnB;AAwEA;AAwBA;EA2CM,OAAA,EA5KK,MA4KL,EAAA;EACA;;;;AAgEN;AAoJA;AAyDA;AA4GA;;EAIyB,eAAA,EA/hBN,MA+hBM,EAAA;EAKL;;;;;;;;EAoBL,UAAA,EA9iBD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwGA,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCA,aAAA,GAAgB,oBAC1B,oBACA;KAEU,YAAA;iBACK,OAAA,CAAQ;eACV,OAAA,CAAQ;gBACP,OAAA,CAAQ;gBACR,OAAA,CAAQ;;KAGZ,SAAA;;;;;;;;;;;;;;;;;;;;;;iBAwBK,OAAA,CAAQ;eACV,OAAA,CAAQ;gBACP,OAAA,CAAQ;gBACR,OAAA,CAAQ;iBACP,OAAA,CAAQ"}
@@ -0,0 +1,294 @@
1
+ import { DeclaredLocales, LocalesValues } from "./module_augmentation.js";
2
+ import { NodeType } from "./nodeType.js";
3
+
4
+ //#region src/dictionary.d.ts
5
+ type BaseNode = number | string | boolean | null | undefined;
6
+ type TypedNodeBase = {
7
+ nodeType: NodeType | `${NodeType}`;
8
+ };
9
+ interface TypedNode<NodeType$1 = undefined> extends TypedNodeBase {}
10
+ type FetchableContentNode<NodeType$1> = (args?: any) => ContentNode<NodeType$1> | Promise<ContentNode<NodeType$1>>;
11
+ type ContentNode<T = undefined, FetchableNode = false, NodeType$1 = (T extends undefined ? BaseNode : T)> = NodeType$1 | TypedNode<NodeType$1> | ((args?: any) => ContentNode<NodeType$1>) | (FetchableNode extends true ? FetchableContentNode<NodeType$1> : undefined);
12
+ type IsArray<T> = T extends any[] ? true : false;
13
+ type ReplaceContentValueArray<T, FetchableNode> = T extends (infer U)[] ?
14
+ // Allow either a *single* typed node returning the entire array
15
+ ContentNode<T, FetchableNode> | ReplaceContentValue<U, FetchableNode>[] : never;
16
+ type ReplaceContentValueObject<T, FetchableNode> = { [K in keyof T]: ReplaceContentValue<T[K], FetchableNode> };
17
+ type ReplaceContentValue<NodeType$1, FetchableNode = true> = NodeType$1 extends object ? IsArray<NodeType$1> extends true ? ReplaceContentValueArray<NodeType$1, FetchableNode> : ContentNode<NodeType$1, FetchableNode> | ReplaceContentValueObject<NodeType$1, FetchableNode> : ContentNode<NodeType$1, FetchableNode>;
18
+ type Fill = boolean | string | Partial<Record<DeclaredLocales, boolean | string>>;
19
+ type LocalDictionaryId = `${Dictionary['key']}::${Dictionary['location']}::${Dictionary['filePath'] | Dictionary['id']}`;
20
+ type Dictionary<ContentType = undefined, FetchableNode = false> = {
21
+ /**
22
+ * _Auto generated by the intlayer, do not modify it_
23
+ *
24
+ * The schema of the dictionary, used for JSON validation
25
+ */
26
+ $schema?: string;
27
+ /**
28
+ * _Auto generated by the intlayer, do not modify it_
29
+ *
30
+ * For remote dictionaries, the id is the id of the dictionary in the remote server
31
+ */
32
+ id?: string;
33
+ /**
34
+ * _Auto generated by the intlayer, do not modify it_
35
+ *
36
+ * For remote dictionaries, the projectIds is the ids of the projects that can use this dictionary
37
+ * A remote dictionary can be shared between multiple projects
38
+ */
39
+ projectIds?: string[];
40
+ /**
41
+ * _Auto generated by the intlayer, do not modify it_
42
+ *
43
+ * 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.
44
+ */
45
+ localId?: LocalDictionaryId;
46
+ /**
47
+ * _Auto generated by the intlayer, do not modify it_
48
+ *
49
+ * For merged dictionaries, the localIds is the ids of the dictionaries that are merged
50
+ */
51
+ localIds?: LocalDictionaryId[];
52
+ /**
53
+ * The key of the dictionary. If multiple dictionaries have the same key, intlayer will merge them.
54
+ *
55
+ * As convention, use '-' to separate the words in the key.
56
+ *
57
+ * Example:
58
+ * ```json
59
+ * {
60
+ * "key": "about-page-meta",
61
+ * "content": { ... }
62
+ * }
63
+ * ```
64
+ */
65
+ key: string;
66
+ /**
67
+ * The title of the dictionary. Helps to identify the dictionary in the editor, and the CMS.
68
+ *
69
+ * Example:
70
+ * ```json
71
+ * {
72
+ * "key": "about-page-meta",
73
+ * "title": "About Page",
74
+ * "content": { ... }
75
+ * }
76
+ * ```
77
+ */
78
+ title?: string;
79
+ /**
80
+ * The description of the dictionary. Helps to understand the purpose of the dictionary in the editor, and the CMS.
81
+ * The descrtion is also used as context for translations generation.
82
+ *
83
+ * Example:
84
+ * ```ts
85
+ * {
86
+ * "key": "about-page-meta",
87
+ * "description":[
88
+ * "This dictionary is manage the metadata of the About Page",
89
+ * "Consider good practices for SEO:",
90
+ * "- The title should be between 50 and 60 characters",
91
+ * "- The description should be between 150 and 160 characters",
92
+ * ].join('\n'),
93
+ * "content": { ... }
94
+ * }
95
+ * ```
96
+ */
97
+ description?: string;
98
+ /**
99
+ * _Auto generated by the intlayer, do not modify it_
100
+ *
101
+ * The available versions of the remote dictionary. Helps to know the versions of the dictionary that are available.
102
+ */
103
+ versions?: string[];
104
+ /**
105
+ * _Managable on the CMS, do not modify it locally_
106
+ *
107
+ * The version of the remote dictionary. Helps to know the version of the dictionary that is currently used.
108
+ */
109
+ version?: string;
110
+ /**
111
+ * _Auto generated by the intlayer, do not modify it_
112
+ *
113
+ * The file path of the local dictionary. Helps to know from what .content file the dictionary has been generated.
114
+ */
115
+ filePath?: string;
116
+ /**
117
+ * Helps to categorize the dictionaries. The tags can provide more context and instructions for the dictionary.
118
+ *
119
+ * Example:
120
+ * ```json
121
+ * {
122
+ * "key": "about-page-meta",
123
+ * "tags": ["metadata","about-page"]
124
+ * }
125
+ * ```
126
+ */
127
+ tags?: string[];
128
+ /**
129
+ * Transform the dictionary in a per-locale dictionary.
130
+ * Each field declared in a per-locale dictionary will be transformed in a translation node.
131
+ * If missing, the dictionary will be treated as a multilingual dictionary.
132
+ * If declared, do not use translation nodes in the content.
133
+ *
134
+ * Example:
135
+ * ```json
136
+ * {
137
+ * "key": "about-page",
138
+ * "locale": "en",
139
+ * "content": {
140
+ * "multilingualContent": "English content"
141
+ * }
142
+ * }
143
+ * ```
144
+ */
145
+ locale?: LocalesValues;
146
+ /**
147
+ * Instruction to fill the dictionary.
148
+ * Can also be declared globally in the `intlayer.config.ts` file.
149
+ *
150
+ * Example:
151
+ * ```json
152
+ * {
153
+ * "key": "about-page",
154
+ * "fill": true
155
+ * }
156
+ * ```
157
+ * ```json
158
+ * {
159
+ * "key": "about-page",
160
+ * "fill": "./aboutPage.content.json"
161
+ * }
162
+ * ```
163
+ * ```json
164
+ * {
165
+ * "key": "about-page",
166
+ * "fill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
167
+ * }
168
+ * ```
169
+ * ```json
170
+ * {
171
+ * "key": "about-page",
172
+ * "fill": {
173
+ * "fr": "./aboutPage.fr.content.json",
174
+ * "es": "./aboutPage.es.content.json"
175
+ * }
176
+ * }
177
+ * ```
178
+ *
179
+ */
180
+ fill?: Fill;
181
+ /**
182
+ * _Auto generated by the intlayer, do not modify it_
183
+ *
184
+ * Indicates if the dictionary has been auto filled.
185
+ * In the case of conflicts, base dictionaryed will override auto filled dictionary.
186
+ */
187
+ filled?: true;
188
+ /**
189
+ * Indicates the priority of the dictionary.
190
+ * In the case of conflicts, the dictionary with the highest priority will override the other dictionaries.
191
+ */
192
+ priority?: number;
193
+ /**
194
+ * _Managable on the CMS, do not modify it locally_
195
+ *
196
+ * For remote dictionaries, indicates if the dictionary is live.
197
+ *
198
+ * Will need the `importMode` to be "live" to be effective in the `intlayer.config.ts` file. Will also need the live server to be running.
199
+ *
200
+ * A live dictionary will be fetched at runtime using the live sync API.
201
+ *
202
+ * If live, the dictionary will by transformed to include fetch functions.
203
+ * If not live, the dictionary will be transformed at build time using "dynamic" mode to optimize the number of fetch queries, and load performance.
204
+ *
205
+ * If live but the fetch request fails, the dictionary will return the dynamic value of the dictionary as fallback.
206
+ *
207
+ */
208
+ live?: boolean;
209
+ /**
210
+ * _Auto generated by the intlayer, do not modify it_
211
+ *
212
+ * Indicates the location of the dictionary.
213
+ */
214
+ location?: 'remote' | 'local' | 'plugin';
215
+ /**
216
+ * The content of the dictionary.
217
+ *
218
+ * Example:
219
+ * ```tsx
220
+ * import { t, enu, cond, nest, md, insert, file } from "intlayer";
221
+ *
222
+ * export default {
223
+ * key: "about-page-meta",
224
+ * content: {
225
+ * stringContent: "About Page Meta",
226
+ * numberContent: 123,
227
+ * booleanContent: true,
228
+ * multilingualContent: t({
229
+ * en: "About Page Meta",
230
+ * fr: "Meta de la page About",
231
+ * es: "Meta de la página About",
232
+ * }),
233
+ * conditionalContent: cond({
234
+ * true: "About Page Meta",
235
+ * false: "About Page Meta",
236
+ * }),
237
+ * insertionContent: insert("About Page Meta"),
238
+ * nestedContent: nest("about-page"),
239
+ * markdownContent: md("# About Page Meta"),
240
+ * fileContent: file("./path/to/file.txt"),
241
+ * jsxContent: <h1>About Page Meta</h1>,
242
+ * },
243
+ *
244
+ * } satisfies Dictionary<Content>;
245
+ * ```
246
+ *
247
+ * ```json
248
+ * {
249
+ * "key": "about-page-meta",
250
+ * "content": {
251
+ * "stringContent": "About Page Meta",
252
+ * "numberContent": 123,
253
+ * "booleanContent": true,
254
+ * "multilingualContent": {
255
+ * "nodeType": "translation",
256
+ * "translation": {
257
+ * "en": "About Page Meta",
258
+ * "fr": "Meta de la page About",
259
+ * "es": "Meta de la página About",
260
+ * },
261
+ * },
262
+ * "conditionalContent": {
263
+ * "nodeType": "condition",
264
+ * "condition": {
265
+ * "true": "About Page Meta",
266
+ * "false": "About Page Meta",
267
+ * },
268
+ * },
269
+ * "insertionContent": {
270
+ * "nodeType": "insertion",
271
+ * "insertion": "About Page Meta",
272
+ * },
273
+ * "nestedContent": {
274
+ * "nodeType": "nested",
275
+ * "nested": { "dictionaryKey": "about-page" },
276
+ * },
277
+ * "markdownContent": {
278
+ * "nodeType": "markdown",
279
+ * "markdown": "# About Page Meta",
280
+ * },
281
+ * "fileContent": {
282
+ * "nodeType": "file",
283
+ * "file": "./path/to/file.txt",
284
+ * },
285
+ * }
286
+ * }
287
+ * ```
288
+ */
289
+ content: ContentType extends undefined ? any : ReplaceContentValue<ContentType, FetchableNode> | ContentType;
290
+ };
291
+ 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;
292
+ //#endregion
293
+ export { ContentNode, Dictionary, Fill, GetSubPath, LocalDictionaryId, TypedNode };
294
+ //# sourceMappingURL=dictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../src/dictionary.ts"],"sourcesContent":[],"mappings":";;;;KAGK,QAAA;KAEA,aAAA;EAFA,QAAA,EAGO,QAHC,GAAA,GAGa,QAHb,EAAA;AAAA,CAAA;AAMI,UAAA,SAAS,CAAA,aAAA,SAA+B,CAAA,SAAA,aAAa,CAAA,CAAG;KAEpE,oBAEY,CAAA,UAAA,CAAA,GAAA,CAAA,IAAA,CAAA,EAAA,GAAA,EAAA,GAAZ,WAAY,CAAA,UAAA,CAAA,GAAY,OAAZ,CAAoB,WAApB,CAAgC,UAAhC,CAAA,CAAA;AAAZ,KAEO,WAFP,CAAA,IAAA,SAAA,EAAA,gBAAA,KAAA,EAAA,cAKQ,CALR,SAAA,SAAA,GAK8B,QAL9B,GAKyC,CALzC,EAAA,GAOD,UAPC,GAQD,SARC,CAQS,UART,CAAA,GAAA,CAAA,CAAA,IAAA,CAAA,EAAA,GAAA,EAAA,GASgB,WAThB,CAS4B,UAT5B,CAAA,CAAA,GAAA,CAUA,aAVA,SAAA,IAAA,GAU6B,oBAV7B,CAUkD,UAVlD,CAAA,GAAA,SAAA,CAAA;KAaA,OAb4C,CAAA,CAAA,CAAA,GAa/B,CAb+B,SAAA,GAAA,EAAA,GAAA,IAAA,GAAA,KAAA;KAe5C,wBAfgC,CAAA,CAAA,EAAA,aAAA,CAAA,GAea,CAfb,SAAA,CAAA,KAAA,EAAA,CAAA,EAAA;AAAA;AAkBjC,WAlByB,CAkBb,CAlBa,EAkBV,aAlBU,CAAA,GAkBO,mBAlBP,CAkB2B,CAlB3B,EAkB8B,aAlB9B,CAAA,EAAA,GAAA,KAAA;KAqBxB,yBArB+B,CAAA,CAAA,EAAA,aAAA,CA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EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAjKI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAkHE,sCAEL,oBAAoB,aAAa,iBAAiB;;KAG5C,mBAAmB,uCAC3B,gBAAgB,IACd,WAAW,EAAE,IAAI,gBAEnB,gBAAgB,IACd,EAAE,KACF"}
@@ -0,0 +1,8 @@
1
+ import { Locale, locales_d_exports } from "./locales.js";
2
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, LocalesValues, RequiredLocales, StrictModeLocaleMap, StringFallback } from "./module_augmentation.js";
3
+ import { NodeType, TypedNodeModel, formatNodeType } from "./nodeType.js";
4
+ import { ContentNode, Dictionary, Fill, GetSubPath, LocalDictionaryId, TypedNode } from "./dictionary.js";
5
+ import { MergedDictionaryOutput, MergedDictionaryResult, Plugin, UnmergedDictionaryOutput, UnmergedDictionaryResult } from "./plugin.js";
6
+ import { AiConfig, BaseContentConfig, BaseDerivedConfig, BuildConfig, ContentConfig, CookiesAttributes, CustomIntlayerConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LocaleStorageAttributes, LogConfig, LogFunctions, PatternsContentConfig, RoutingConfig, StrictMode } from "./config.js";
7
+ import { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, ReactNode, TranslationNode } from "./keyPath.js";
8
+ export { AiConfig, ArrayNode, BaseContentConfig, BaseDerivedConfig, BuildConfig, ConditionNode, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, DeclaredLocales, Dictionary, DictionaryKeys, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, EditorConfig, EnumerationNode, FileNode, Fill, GenderNode, GetSubPath, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, type Locale, LocaleStorageAttributes, locales_d_exports as Locales, LocalesValues, LogConfig, LogFunctions, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NestedNode, NodeType, ObjectNode, PatternsContentConfig, Plugin, ReactNode, RequiredLocales, RoutingConfig, StrictMode, StrictModeLocaleMap, StringFallback, TranslationNode, TypedNode, TypedNodeModel, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAGa,SAAoC"}
@@ -0,0 +1,11 @@
1
+ import "intlayer";
2
+
3
+ //#region src/intlayer.d.ts
4
+ declare module 'intlayer' {
5
+ // --- Registries to be augmented by the generator ---
6
+ export interface __DictionaryRegistry {} // id -> typeof Dictionary
7
+ export interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...
8
+ export interface __RequiredLocalesRegistry {} // 'en': 1, ...
9
+ export interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }
10
+ }
11
+ //# sourceMappingURL=intlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intlayer.d.ts","names":["_0","sideEffect"],"sources":["../../src/intlayer.d.ts"],"sourcesContent":["import 'intlayer';\n\ndeclare module 'intlayer' {\n // --- Registries to be augmented by the generator ---\n export interface __DictionaryRegistry {} // id -> typeof Dictionary\n export interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\n export interface __RequiredLocalesRegistry {} // 'en': 1, ...\n export interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\n}\n"],"mappings":";;;;EAAkB;EAAA,OAAA,UAAA,oBAAA,CAAA,CAAA,CAAA,CAAA;SAAA,UAAA,yBAAA,CAAA,CAAA,CAAA,CAAA;EAAAC,OAAAA,UAAA,yBAAA,CAAA,CAAA,CAAA,CAAA;EAAA,OAAA,UAAA,oBAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -0,0 +1,51 @@
1
+ import { NodeType } from "./nodeType.js";
2
+
3
+ //#region src/keyPath.d.ts
4
+ type ObjectNode = {
5
+ type: NodeType.Object;
6
+ key: string;
7
+ };
8
+ type ArrayNode = {
9
+ type: NodeType.Array;
10
+ key: number;
11
+ };
12
+ type EnumerationNode = {
13
+ type: NodeType.Enumeration;
14
+ key: string;
15
+ };
16
+ type TranslationNode = {
17
+ type: NodeType.Translation;
18
+ key: string;
19
+ };
20
+ type ConditionNode = {
21
+ type: NodeType.Condition;
22
+ key: string;
23
+ };
24
+ type GenderNode = {
25
+ type: NodeType.Gender;
26
+ key: string;
27
+ };
28
+ type InsertionNode = {
29
+ type: NodeType.Insertion;
30
+ key?: undefined;
31
+ };
32
+ type MarkdownNode = {
33
+ type: NodeType.Markdown;
34
+ key?: undefined;
35
+ };
36
+ type ReactNode = {
37
+ type: NodeType.ReactNode;
38
+ key?: undefined;
39
+ };
40
+ type NestedNode = {
41
+ type: NodeType.Nested;
42
+ key?: undefined;
43
+ };
44
+ type FileNode = {
45
+ type: NodeType.File;
46
+ key?: undefined;
47
+ };
48
+ type KeyPath = ObjectNode | ArrayNode | TranslationNode | EnumerationNode | InsertionNode | GenderNode | MarkdownNode | ReactNode | ConditionNode | NestedNode | FileNode;
49
+ //#endregion
50
+ export { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, ReactNode, TranslationNode };
51
+ //# sourceMappingURL=keyPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyPath.d.ts","names":[],"sources":["../../src/keyPath.ts"],"sourcesContent":[],"mappings":";;;KAEY,UAAA;QACJ,QAAA,CAAS;EADL,GAAA,EAAA,MAAA;AAKZ,CAAA;AAKY,KALA,SAAA,GAKe;EAKf,IAAA,EATJ,QAAA,CAAS,KASU;EAKf,GAAA,EAAA,MAAA;AAKZ,CAAA;AAKY,KApBA,eAAA,GAoBa;EAKb,IAAA,EAxBJ,QAAA,CAAS,WAwBO;EAKZ,GAAA,EAAA,MAAA;AAKZ,CAAA;AAKY,KAnCA,eAAA,GAoCJ;EAII,IAAA,EAvCJ,QAAA,CAAS,WAuCE;EACf,GAAA,EAAA,MAAA;CACA;AACA,KAtCQ,aAAA,GAsCR;EACA,IAAA,EAtCI,QAAA,CAAS,SAsCb;EACA,GAAA,EAAA,MAAA;CACA;AACA,KArCQ,UAAA,GAqCR;EACA,IAAA,EArCI,QAAA,CAAS,MAqCb;EACA,GAAA,EAAA,MAAA;CACA;AACA,KApCQ,aAAA,GAoCR;EAAQ,IAAA,EAnCJ,QAAA,CAAS,SAmCL;;;KA/BA,YAAA;QACJ,QAAA,CAAS;;;KAIL,SAAA;QACJ,QAAA,CAAS;;;KAIL,UAAA;QACJ,QAAA,CAAS;;;KAIL,QAAA;QACJ,QAAA,CAAS;;;KAIL,OAAA,GACR,aACA,YACA,kBACA,kBACA,gBACA,aACA,eACA,YACA,gBACA,aACA"}