@intlayer/types 9.0.0-canary.7 → 9.0.0-canary.9

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.
@@ -74,30 +74,21 @@ type Fill = boolean | FilePathPattern | Partial<Record<DeclaredLocales, boolean
74
74
  type DictionaryId = string;
75
75
  type DictionaryKey = string;
76
76
  /**
77
- * Meta record qualifier of a dictionary.
78
- *
79
- * The `id` field is the designated discriminator used to resolve the record at
80
- * runtime (`useIntlayer('product-copy', { id: 'prod_abc', ... })`). All other
81
- * fields are typed payload that must be provided by the selector to match.
82
- */
83
- type DictionaryMeta = {
84
- id: string | number;
85
- } & Record<string, string | number>;
86
- /**
87
77
  * A dimension used to discriminate sibling dictionaries sharing the same key.
88
78
  *
89
- * - 'variant': named alternative content shapes (A/B testing, seasonal banners…)
90
- * - 'meta': record-keyed content resolved by the `meta.id` discriminator
79
+ * - 'variant': named or structured alternative content (A/B testing, seasonal
80
+ * banners, CMS records, user-specific copy…). The variant value is a string
81
+ * (named) or an object (structured discriminator).
91
82
  * - 'item': ordered collection items (blog posts, FAQs…)
92
83
  *
93
- * A key may declare SEVERAL dimensions at once (e.g. a collection whose items
94
- * also have variants). They are always ordered canonically as
95
- * `variant → meta → item`, with `item` as the innermost / collection axis.
84
+ * A key may declare BOTH dimensions at once (e.g. a collection whose items also
85
+ * have variants). They are always ordered canonically as `variant → item`,
86
+ * with `item` as the innermost / collection axis.
96
87
  */
97
- type DictionaryQualifierType = "variant" | "meta" | "item";
88
+ type DictionaryQualifierType = "variant" | "item";
98
89
  /**
99
90
  * Output of the merge step for a key whose dictionaries declare one or more
100
- * qualifier dimensions (`item`, `variant`, `meta`).
91
+ * qualifier dimensions (`variant`, `item`).
101
92
  *
102
93
  * Sibling dictionaries sharing the same qualifier coordinates are merged
103
94
  * together (locale completion / priority overrides preserved). Sibling
@@ -105,9 +96,11 @@ type DictionaryQualifierType = "variant" | "meta" | "item";
105
96
  * every entry as fallback.
106
97
  *
107
98
  * `content` is keyed by the composite id — the per-dimension ids joined in
108
- * canonical order with `/` (e.g. `"promo/2"` for a variant × item key). Each
109
- * value is the resolved content node directly: the qualifier coordinates are
110
- * decoded from the composite id, not duplicated on a per-entry wrapper.
99
+ * canonical order with `/` (e.g. `"promo/2"` for a variant × item key). For an
100
+ * object variant the variant segment is the canonical serialization of the
101
+ * object (e.g. `"id=abc&userId=123"`). Each value is the resolved content node
102
+ * directly: the qualifier coordinates are decoded from the composite id, not
103
+ * duplicated on a per-entry wrapper.
111
104
  *
112
105
  * Example (`.intlayer/dictionaries/faq.json`):
113
106
  * ```json
@@ -129,13 +122,7 @@ type QualifiedDictionaryGroup = {
129
122
  * Maps each composite id to its resolved content node. Replaces the former
130
123
  * per-entry `Dictionary` wrapper — coordinates live in the key, not the value.
131
124
  */
132
- content: Record<string, unknown>;
133
- /**
134
- * Extra meta fields preserved per composite id, present only for groups that
135
- * declare the `meta` dimension. The composite id only encodes `meta.id`, so
136
- * the remaining declared meta fields are kept here for selector matching.
137
- */
138
- meta?: Record<string, DictionaryMeta>; /** Import mode shared by the group (collected from its qualified entries). */
125
+ content: Record<string, unknown>; /** Import mode shared by the group (collected from its qualified entries). */
139
126
  importMode?: ImportMode;
140
127
  localIds?: LocalDictionaryId[];
141
128
  };
@@ -145,18 +132,15 @@ type QualifiedDictionaryGroup = {
145
132
  *
146
133
  * - `{ item: 2 }` selects a collection item (1-based index)
147
134
  * - `{ variant: 'black-friday' }` selects a named variant
148
- * - `{ id: 'prod_abc', ...metaFields }` selects a meta record; every meta field
149
- * declared on the matching dictionary must be provided and equal
135
+ * - `{ variant: { id: 'prod_abc', userId: '123' } }` selects a structured
136
+ * variant; the object must equal the variant declared on the dictionary
150
137
  * - `locale` composes with any of the above and overrides the context locale
151
- *
152
- * The keys `locale`, `item` and `variant` are reserved and cannot be used as
153
- * meta field names.
154
138
  */
155
139
  type DictionarySelector = {
156
140
  locale?: LocalesValues;
157
141
  item?: number;
158
- variant?: string;
159
- } & Record<string, string | number | undefined>;
142
+ variant?: string | Record<string, string | number>;
143
+ };
160
144
  type QualifiedEntryContent<Entry> = Entry extends {
161
145
  content: infer Content;
162
146
  } ? Content : unknown;
@@ -169,7 +153,7 @@ type SplitCompositeId<Id extends string> = Id extends `${infer Head}/${infer Tai
169
153
  */
170
154
  type ZipQualifierCoordinates<QualifierTypes extends readonly DictionaryQualifierType[], Segments extends readonly string[]> = { [Index in keyof QualifierTypes as QualifierTypes[Index] extends DictionaryQualifierType ? QualifierTypes[Index] : never]: Index extends keyof Segments ? Segments[Index] : never };
171
155
  /**
172
- * Rebuilds the per-entry shape (`{ variant; item; meta; content }`) from the
156
+ * Rebuilds the per-entry shape (`{ variant; item; content }`) from the
173
157
  * `content` map keyed by composite id, so the coordinate-comparison helpers can
174
158
  * be reused unchanged. Coordinates are decoded from each key.
175
159
  */
@@ -183,27 +167,23 @@ type ReconstructedEntries<ContentMap, QualifierTypes extends readonly Dictionary
183
167
  item: infer Item;
184
168
  } ? {
185
169
  item: Item;
186
- } : unknown) & (Coordinates extends {
187
- meta: infer Id;
188
- } ? {
189
- meta: {
190
- id: Id;
191
- };
192
170
  } : unknown) : never };
193
171
  /** Stringifies a literal coordinate for comparison. */
194
172
  type StringifyCoordinate<Value> = Value extends string | number ? `${Value}` : never;
195
173
  /** Literal equality between two coordinate values. */
196
174
  type CoordinateEquals<Left, Right> = [StringifyCoordinate<Left>] extends [StringifyCoordinate<Right>] ? true : false;
197
- /** The coordinate a selector pins for each dimension. */
175
+ /**
176
+ * The variant coordinate a selector pins. A string variant is matched
177
+ * precisely; an object variant broadens to `string` (it matches any declared
178
+ * variant entry, since the object identity is not reconstructable at the type
179
+ * level). An absent selector defaults to the `'default'` variant.
180
+ */
198
181
  type SelectorVariant<Selector> = Selector extends {
199
182
  variant: infer Variant;
200
- } ? Variant : "default";
183
+ } ? Variant extends string ? Variant : string : "default";
201
184
  type SelectorItem<Selector> = Selector extends {
202
185
  item: infer Item;
203
186
  } ? Item : undefined;
204
- type SelectorMetaId<Selector> = Selector extends {
205
- id: infer Id;
206
- } ? Id : undefined;
207
187
  /**
208
188
  * Whether a single group entry matches the selector across every declared
209
189
  * dimension. The `item` dimension matches any value when the selector leaves it
@@ -211,13 +191,9 @@ type SelectorMetaId<Selector> = Selector extends {
211
191
  */
212
192
  type EntryMatchesSelector<Entry, QualifierTypes extends readonly DictionaryQualifierType[], Selector> = ("variant" extends QualifierTypes[number] ? Entry extends {
213
193
  variant: infer Variant;
214
- } ? CoordinateEquals<Variant, SelectorVariant<Selector>> : false : true) extends true ? ("meta" extends QualifierTypes[number] ? Entry extends {
215
- meta: {
216
- id: infer Id;
217
- };
218
- } ? CoordinateEquals<Id, SelectorMetaId<Selector>> : false : true) extends true ? "item" extends QualifierTypes[number] ? [SelectorItem<Selector>] extends [undefined] ? true : Entry extends {
194
+ } ? CoordinateEquals<Variant, SelectorVariant<Selector>> : false : true) extends true ? "item" extends QualifierTypes[number] ? [SelectorItem<Selector>] extends [undefined] ? true : Entry extends {
219
195
  item: infer Item;
220
- } ? CoordinateEquals<Item, SelectorItem<Selector>> : false : true : false : false;
196
+ } ? CoordinateEquals<Item, SelectorItem<Selector>> : false : true : false;
221
197
  /** Entries that match the selector. */
222
198
  type MatchingEntries<Entries, QualifierTypes extends readonly DictionaryQualifierType[], Selector> = { [Key in keyof Entries as EntryMatchesSelector<Entries[Key], QualifierTypes, Selector> extends true ? Key : never]: Entries[Key] };
223
199
  /** Whether the collection (`item`) axis is left open (→ array result). */
@@ -228,7 +204,7 @@ type IsItemAxisOpen<QualifierTypes extends readonly DictionaryQualifierType[], S
228
204
  * `Selector`.
229
205
  *
230
206
  * The result is resolved against the **specific** entries the selector targets
231
- * (matched across variant / meta / item coordinates), never the union of every
207
+ * (matched across variant / item coordinates), never the union of every
232
208
  * entry:
233
209
  * - `item` left open → array of the matching entries' content
234
210
  * - all dimensions pinned → that single entry's content (or `null` if none match)
@@ -251,26 +227,20 @@ type EntryVariant<Entry> = Entry extends {
251
227
  type EntryItem<Entry> = Entry extends {
252
228
  item: infer Item;
253
229
  } ? Item : never;
254
- type EntryMetaId<Entry> = Entry extends {
255
- meta: {
256
- id: infer Id;
257
- };
258
- } ? Id : never;
259
230
  /**
260
231
  * The selector accepted for a specific qualified dictionary group `T`: each
261
232
  * dimension is constrained to the coordinates that actually exist, so an unknown
262
- * `variant` / `item` / `id` is a compile-time error. Plain dictionaries (no
263
- * `entries`) fall back to the loose {@link DictionarySelector}.
233
+ * `item` is a compile-time error. Named (string) variants are suggested for
234
+ * autocomplete; object variants are accepted via the loose `Record` form. Plain
235
+ * dictionaries (no `entries`) fall back to the loose {@link DictionarySelector}.
264
236
  */
265
237
  type DictionarySelectorForGroup<T> = [GroupEntryUnion<T>] extends [never] ? DictionarySelector : {
266
238
  locale?: LocalesValues;
267
239
  } & ([EntryVariant<GroupEntryUnion<T>>] extends [never] ? unknown : {
268
- variant?: EntryVariant<GroupEntryUnion<T>> | (string & {});
240
+ variant?: EntryVariant<GroupEntryUnion<T>> | (string & {}) | Record<string, string | number>;
269
241
  }) & ([EntryItem<GroupEntryUnion<T>>] extends [never] ? unknown : {
270
242
  item?: EntryItem<GroupEntryUnion<T>> | number | (string & {});
271
- }) & ([EntryMetaId<GroupEntryUnion<T>>] extends [never] ? unknown : {
272
- id?: EntryMetaId<GroupEntryUnion<T>> | number | (string & {});
273
- } & Record<string, string | number | undefined>);
243
+ });
274
244
  type DictionaryLocation = "remote" | "local" | "hybrid" | "plugin" | (string & {});
275
245
  type LocalDictionaryId = `${DictionaryKey}::${Dictionary["location"]}::${Dictionary["filePath"] | DictionaryId}`;
276
246
  type DictionaryFormat = "intlayer" | "icu" | "i18next" | "vue-i18n" | "po";
@@ -445,32 +415,37 @@ type DictionaryBase = {
445
415
  */
446
416
  item?: number;
447
417
  /**
448
- * Variant name of this dictionary inside the variant set identified by `key`.
418
+ * Variant of this dictionary inside the variant set identified by `key`.
449
419
  *
450
- * Sibling dictionaries sharing the same key but different `variant` values
451
- * form a named variant set (A/B testing, seasonal banners, feature flags…):
420
+ * A variant can be declared in two equivalent forms:
452
421
  *
453
- * ```ts
454
- * // hero.content.ts → { key: 'hero-banner', variant: 'default', content: { ... } }
455
- * // hero.bf.content.ts → { key: 'hero-banner', variant: 'black-friday', content: { ... } }
422
+ * - **A string** — a single named alternative (A/B testing, seasonal banners,
423
+ * feature flags…). Omitting `variant` (or using `'default'`) marks the
424
+ * fallback variant.
456
425
  *
457
- * const hero = useIntlayer('hero-banner'); // → 'default' variant
458
- * const heroBf = useIntlayer('hero-banner', { variant: 'black-friday' }); // named variant
459
- * ```
460
- */
461
- variant?: string;
462
- /**
463
- * Meta record qualifier of this dictionary. The `meta.id` field is the
464
- * discriminator used to resolve the record at runtime; every other meta
465
- * field must be provided by the selector to match:
426
+ * ```ts
427
+ * // hero.content.ts → { key: 'hero-banner', variant: 'default', content: { ... } }
428
+ * // hero.bf.content.ts → { key: 'hero-banner', variant: 'black-friday', content: { ... } }
466
429
  *
467
- * ```ts
468
- * // product.abc.content.ts → { key: 'product-copy', meta: { id: 'abc', userId: '123' }, content: { ... } }
430
+ * const hero = useIntlayer('hero-banner'); // → 'default' variant
431
+ * const heroBf = useIntlayer('hero-banner', { variant: 'black-friday' }); // named variant
432
+ * ```
469
433
  *
470
- * const product = useIntlayer('product-copy', { id: 'abc', userId: '123' });
471
- * ```
434
+ * - **An object** a structured discriminator (CMS records, user-specific
435
+ * copy, any content keyed by a set of fields). The whole object is the
436
+ * identity: the selector must provide an equal object to resolve the entry.
437
+ *
438
+ * ```ts
439
+ * // product.abc.content.ts → { key: 'product', variant: { id: 'abc', userId: '123' }, content: { ... } }
440
+ *
441
+ * const product = useIntlayer('product', { variant: { id: 'abc', userId: '123' } });
442
+ * ```
443
+ *
444
+ * Sibling dictionaries sharing the same key but different `variant` values
445
+ * form the variant set. A sibling without any qualifier acts as shared base
446
+ * content merged into every variant as fallback.
472
447
  */
473
- meta?: DictionaryMeta;
448
+ variant?: string | Record<string, string | number>;
474
449
  /**
475
450
  * Transform the dictionary in a per-locale dictionary.
476
451
  * Each field declared in a per-locale dictionary will be transformed in a translation node.
@@ -616,5 +591,5 @@ type DictionaryWithoutSchema<ContentType, FetchableNode> = {
616
591
  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);
617
592
  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;
618
593
  //#endregion
619
- export { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryMeta, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode };
594
+ export { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode };
620
595
  //# sourceMappingURL=dictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../src/dictionary.ts"],"mappings":";;;;;KASK,QAAA;AAAA,KAEA,aAAA;EACH,QAAA,EAAU,QAAA;AAAA;AAAA,UAGK,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,SA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,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"}
@@ -3,8 +3,8 @@ import { ALL_LOCALES, Locale } from "./allLocales.js";
3
3
  import { DeclaredLocales, DictionaryKeys, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, GetLocaleLang, LocalesValues, LocalizedUrl, PathWithoutLocale, RequiredLocales, ResolvedDefaultLocale, ResolvedEditor, ResolvedRoutingMode, Schema, SchemaKeys, StrictModeLocaleMap } from "./module_augmentation.js";
4
4
  import { FilePathPattern, FilePathPatternContext, FilePathPatternFunction } from "./filePathPattern.js";
5
5
  import { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, NodeType, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SOLID_NODE, TEXT, TRANSLATION, TypedNodeModel, UNKNOWN, formatNodeType } from "./nodeType.js";
6
- import { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryMeta, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode } from "./dictionary.js";
6
+ import { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode } from "./dictionary.js";
7
7
  import { MergedDictionaryOutput, MergedDictionaryResult, Plugin, UnmergedDictionaryOutput, UnmergedDictionaryResult } from "./plugin.js";
8
8
  import { AiConfig, AiProviderConfigMap, AiProviders, BuildConfig, CommonAiConfig, CompilerConfig, ConfigSchema, ContentConfig, CookiesAttributes, CustomIntlayerConfig, CustomRoutingConfig, DictionaryConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, ProcessedCookieAttributes, ProcessedStorageAttributes, RewriteObject, RewriteRule, RewriteRules, RoutingConfig, RoutingStorageInput, StorageAttributes, StrictMode, SystemConfig, URLType } from "./config.js";
9
9
  import { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, HTMLNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, PluralNode, ReactNode, TranslationNode } from "./keyPath.js";
10
- export { ALL_LOCALES, ARRAY, AiConfig, AiProviderConfigMap, AiProviders, ArrayNode, BOOLEAN, BuildConfig, CONDITION, CommonAiConfig, CompilerConfig, ConditionNode, ConfigSchema, ContentAutoTransformation, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, CustomRoutingConfig, DeclaredLocales, Dictionary, DictionaryConfig, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryMeta, DictionaryQualifierType, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, DictionaryRegistryResult, DictionarySelector, DictionarySelectorForGroup, DictionarySelectorForKey, ENUMERATION, EditorConfig, EnumerationNode, ExtractSelectorLocale, FILE, FileNode, FilePathPattern, FilePathPatternContext, FilePathPatternFunction, Fill, GENDER, GenderNode, GetLocaleLang, GetSubPath, HTML, HTMLNode, INSERTION, ImportMode, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, Locale, locales_d_exports as Locales, LocalesValues, LocalizedUrl, LogConfig, LogFunctions, MARKDOWN, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NESTED, NULL, NUMBER, NestedNode, NodeType, OBJECT, ObjectNode, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, PathWithoutLocale, Plugin, PluralNode, ProcessedCookieAttributes, ProcessedStorageAttributes, QualifiedDictionaryGroup, REACT_NODE, ReactNode, RequiredLocales, ResolveQualifiedDictionaryContent, ResolvedDefaultLocale, ResolvedEditor, ResolvedRoutingMode, RewriteObject, RewriteRule, RewriteRules, RoutingConfig, RoutingStorageInput, SOLID_NODE, Schema, SchemaKeys, StorageAttributes, StrictMode, StrictModeLocaleMap, SystemConfig, TEXT, TRANSLATION, TranslationNode, TypedNode, TypedNodeModel, UNKNOWN, URLType, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
10
+ export { ALL_LOCALES, ARRAY, AiConfig, AiProviderConfigMap, AiProviders, ArrayNode, BOOLEAN, BuildConfig, CONDITION, CommonAiConfig, CompilerConfig, ConditionNode, ConfigSchema, ContentAutoTransformation, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, CustomRoutingConfig, DeclaredLocales, Dictionary, DictionaryConfig, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryQualifierType, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, DictionaryRegistryResult, DictionarySelector, DictionarySelectorForGroup, DictionarySelectorForKey, ENUMERATION, EditorConfig, EnumerationNode, ExtractSelectorLocale, FILE, FileNode, FilePathPattern, FilePathPatternContext, FilePathPatternFunction, Fill, GENDER, GenderNode, GetLocaleLang, GetSubPath, HTML, HTMLNode, INSERTION, ImportMode, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, Locale, locales_d_exports as Locales, LocalesValues, LocalizedUrl, LogConfig, LogFunctions, MARKDOWN, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NESTED, NULL, NUMBER, NestedNode, NodeType, OBJECT, ObjectNode, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, PathWithoutLocale, Plugin, PluralNode, ProcessedCookieAttributes, ProcessedStorageAttributes, QualifiedDictionaryGroup, REACT_NODE, ReactNode, RequiredLocales, ResolveQualifiedDictionaryContent, ResolvedDefaultLocale, ResolvedEditor, ResolvedRoutingMode, RewriteObject, RewriteRule, RewriteRules, RoutingConfig, RoutingStorageInput, SOLID_NODE, Schema, SchemaKeys, StorageAttributes, StrictMode, StrictModeLocaleMap, SystemConfig, TEXT, TRANSLATION, TranslationNode, TypedNode, TypedNodeModel, UNKNOWN, URLType, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
@@ -18,7 +18,7 @@ type DictionaryRegistryContent<T extends PropertyKey> = [T] extends [keyof __Dic
18
18
  * `DictionarySelector`).
19
19
  *
20
20
  * For plain dictionaries this is the registry content; for qualified groups
21
- * (collections, variants, meta records) the selector shape drives the result
21
+ * (collections, variants) the selector shape drives the result
22
22
  * (single entry, array of entries, or null).
23
23
  */
24
24
  type DictionaryRegistryResult<T extends PropertyKey, Arg = undefined> = [T] extends [keyof __DictionaryRegistry] ? ResolveQualifiedDictionaryContent<__DictionaryRegistry[T], Arg> : Dictionary["content"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/types",
3
- "version": "9.0.0-canary.7",
3
+ "version": "9.0.0-canary.9",
4
4
  "private": false,
5
5
  "description": "Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.",
6
6
  "keywords": [