@intlayer/types 9.0.2 → 9.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,7 @@ exports.PLUGIN_NODE_TYPES = require_nodeType.PLUGIN_NODE_TYPES;
34
34
  exports.PLURAL = require_nodeType.PLURAL;
35
35
  exports.PREACT_NODE = require_nodeType.PREACT_NODE;
36
36
  exports.REACT_NODE = require_nodeType.REACT_NODE;
37
+ exports.SELECT = require_nodeType.SELECT;
37
38
  exports.SOLID_NODE = require_nodeType.SOLID_NODE;
38
39
  exports.TEXT = require_nodeType.TEXT;
39
40
  exports.TRANSLATION = require_nodeType.TRANSLATION;
@@ -19,6 +19,7 @@ const TEXT = "text";
19
19
  const NUMBER = "number";
20
20
  const BOOLEAN = "boolean";
21
21
  const GENDER = "gender";
22
+ const SELECT = "select";
22
23
  const NULL = "null";
23
24
  const UNKNOWN = "unknown";
24
25
  /**
@@ -32,6 +33,7 @@ const PLUGIN_NODE_TYPES = [
32
33
  CONDITION,
33
34
  INSERTION,
34
35
  GENDER,
36
+ SELECT,
35
37
  NESTED,
36
38
  FILE,
37
39
  MARKDOWN,
@@ -64,6 +66,7 @@ exports.PLUGIN_NODE_TYPES = PLUGIN_NODE_TYPES;
64
66
  exports.PLURAL = PLURAL;
65
67
  exports.PREACT_NODE = PREACT_NODE;
66
68
  exports.REACT_NODE = REACT_NODE;
69
+ exports.SELECT = SELECT;
67
70
  exports.SOLID_NODE = SOLID_NODE;
68
71
  exports.TEXT = TEXT;
69
72
  exports.TRANSLATION = TRANSLATION;
@@ -1 +1 @@
1
- {"version":3,"file":"nodeType.cjs","names":[],"sources":["../../src/nodeType.ts"],"sourcesContent":["export const TRANSLATION = 'translation' as const;\nexport const ENUMERATION = 'enumeration' as const;\nexport const PLURAL = 'plural' as const;\nexport const CONDITION = 'condition' as const;\nexport const INSERTION = 'insertion' as const;\nexport const FILE = 'file' as const;\nexport const OBJECT = 'object' as const;\nexport const ARRAY = 'array' as const;\nexport const NESTED = 'nested' as const;\nexport const REACT_NODE = 'reactNode' as const;\nexport const PREACT_NODE = 'preactNode' as const;\nexport const SOLID_NODE = 'solidNode' as const;\nexport const MARKDOWN = 'markdown' as const;\nexport const HTML = 'html' as const;\nexport const TEXT = 'text' as const;\nexport const NUMBER = 'number' as const;\nexport const BOOLEAN = 'boolean' as const;\nexport const GENDER = 'gender' as const;\nexport const NULL = 'null' as const;\nexport const UNKNOWN = 'unknown' as const;\n\n/**\n * NodeType strings that correspond to plugins that can be conditionally\n * removed from the bundle when unused.\n */\nexport const PLUGIN_NODE_TYPES: readonly [\n typeof TRANSLATION,\n typeof ENUMERATION,\n typeof PLURAL,\n typeof CONDITION,\n typeof INSERTION,\n typeof GENDER,\n typeof NESTED,\n typeof FILE,\n typeof MARKDOWN,\n typeof HTML,\n typeof REACT_NODE,\n typeof PREACT_NODE,\n typeof SOLID_NODE,\n] = [\n TRANSLATION,\n ENUMERATION,\n PLURAL,\n CONDITION,\n INSERTION,\n GENDER,\n NESTED,\n FILE,\n MARKDOWN,\n HTML,\n REACT_NODE,\n PREACT_NODE,\n SOLID_NODE,\n] as const;\n\nexport type NodeType =\n | typeof TRANSLATION\n | typeof ENUMERATION\n | typeof PLURAL\n | typeof CONDITION\n | typeof INSERTION\n | typeof FILE\n | typeof OBJECT\n | typeof ARRAY\n | typeof NESTED\n | typeof REACT_NODE\n | typeof PREACT_NODE\n | typeof SOLID_NODE\n | typeof MARKDOWN\n | typeof HTML\n | typeof TEXT\n | typeof NUMBER\n | typeof BOOLEAN\n | typeof GENDER\n | typeof NULL\n | typeof UNKNOWN;\n\ntype AdditionalAttributesType = {\n [key: string]: unknown;\n};\n\nexport type TypedNodeModel<\n T extends NodeType,\n Content,\n AdditionalAttributes extends AdditionalAttributesType = {},\n> = {\n nodeType: T;\n} & {\n [K in T]: Content;\n} & AdditionalAttributes;\n\nexport const formatNodeType = <\n T extends NodeType,\n Content = unknown,\n AdditionalAttributes extends AdditionalAttributesType = {},\n>(\n nodeType: T,\n content: Content,\n additionalAttributes?: { [key: string]: unknown }\n) =>\n ({\n ...additionalAttributes,\n nodeType,\n [nodeType]: content,\n }) as TypedNodeModel<T, Content, AdditionalAttributes>;\n"],"mappings":";;;AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,YAAY;AACzB,MAAa,YAAY;AACzB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,SAAS;AACtB,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,WAAW;AACxB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,SAAS;AACtB,MAAa,OAAO;AACpB,MAAa,UAAU;;;;;AAMvB,MAAa,oBAcT;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAsCA,MAAa,kBAKX,UACA,SACA,0BAEC;CACC,GAAG;CACH;EACC,WAAW;AACd"}
1
+ {"version":3,"file":"nodeType.cjs","names":[],"sources":["../../src/nodeType.ts"],"sourcesContent":["export const TRANSLATION = 'translation' as const;\nexport const ENUMERATION = 'enumeration' as const;\nexport const PLURAL = 'plural' as const;\nexport const CONDITION = 'condition' as const;\nexport const INSERTION = 'insertion' as const;\nexport const FILE = 'file' as const;\nexport const OBJECT = 'object' as const;\nexport const ARRAY = 'array' as const;\nexport const NESTED = 'nested' as const;\nexport const REACT_NODE = 'reactNode' as const;\nexport const PREACT_NODE = 'preactNode' as const;\nexport const SOLID_NODE = 'solidNode' as const;\nexport const MARKDOWN = 'markdown' as const;\nexport const HTML = 'html' as const;\nexport const TEXT = 'text' as const;\nexport const NUMBER = 'number' as const;\nexport const BOOLEAN = 'boolean' as const;\nexport const GENDER = 'gender' as const;\nexport const SELECT = 'select' as const;\nexport const NULL = 'null' as const;\nexport const UNKNOWN = 'unknown' as const;\n\n/**\n * NodeType strings that correspond to plugins that can be conditionally\n * removed from the bundle when unused.\n */\nexport const PLUGIN_NODE_TYPES: readonly [\n typeof TRANSLATION,\n typeof ENUMERATION,\n typeof PLURAL,\n typeof CONDITION,\n typeof INSERTION,\n typeof GENDER,\n typeof SELECT,\n typeof NESTED,\n typeof FILE,\n typeof MARKDOWN,\n typeof HTML,\n typeof REACT_NODE,\n typeof PREACT_NODE,\n typeof SOLID_NODE,\n] = [\n TRANSLATION,\n ENUMERATION,\n PLURAL,\n CONDITION,\n INSERTION,\n GENDER,\n SELECT,\n NESTED,\n FILE,\n MARKDOWN,\n HTML,\n REACT_NODE,\n PREACT_NODE,\n SOLID_NODE,\n] as const;\n\nexport type NodeType =\n | typeof TRANSLATION\n | typeof ENUMERATION\n | typeof PLURAL\n | typeof CONDITION\n | typeof INSERTION\n | typeof FILE\n | typeof OBJECT\n | typeof ARRAY\n | typeof NESTED\n | typeof REACT_NODE\n | typeof PREACT_NODE\n | typeof SOLID_NODE\n | typeof MARKDOWN\n | typeof HTML\n | typeof TEXT\n | typeof NUMBER\n | typeof BOOLEAN\n | typeof GENDER\n | typeof SELECT\n | typeof NULL\n | typeof UNKNOWN;\n\ntype AdditionalAttributesType = {\n [key: string]: unknown;\n};\n\nexport type TypedNodeModel<\n T extends NodeType,\n Content,\n AdditionalAttributes extends AdditionalAttributesType = {},\n> = {\n nodeType: T;\n} & {\n [K in T]: Content;\n} & AdditionalAttributes;\n\nexport const formatNodeType = <\n T extends NodeType,\n Content = unknown,\n AdditionalAttributes extends AdditionalAttributesType = {},\n>(\n nodeType: T,\n content: Content,\n additionalAttributes?: { [key: string]: unknown }\n) =>\n ({\n ...additionalAttributes,\n nodeType,\n [nodeType]: content,\n }) as TypedNodeModel<T, Content, AdditionalAttributes>;\n"],"mappings":";;;AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,YAAY;AACzB,MAAa,YAAY;AACzB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,SAAS;AACtB,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,WAAW;AACxB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,OAAO;AACpB,MAAa,UAAU;;;;;AAMvB,MAAa,oBAeT;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAuCA,MAAa,kBAKX,UACA,SACA,0BAEC;CACC,GAAG;CACH;EACC,WAAW;AACd"}
@@ -1,4 +1,4 @@
1
- import { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SOLID_NODE, TEXT, TRANSLATION, UNKNOWN, formatNodeType } from "./nodeType.mjs";
1
+ import { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SELECT, SOLID_NODE, TEXT, TRANSLATION, UNKNOWN, formatNodeType } from "./nodeType.mjs";
2
2
  import "./dictionary.mjs";
3
3
  import * as locales_exports from "./locales.mjs";
4
4
  import "./plugin.mjs";
@@ -8,4 +8,4 @@ import "./module_augmentation.mjs";
8
8
  import { ALL_LOCALES } from "./allLocales.mjs";
9
9
  import { AiProviders } from "./config.mjs";
10
10
 
11
- export { ALL_LOCALES, ARRAY, AiProviders, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, locales_exports as Locales, MARKDOWN, NESTED, NULL, NUMBER, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SOLID_NODE, TEXT, TRANSLATION, UNKNOWN, formatNodeType };
11
+ export { ALL_LOCALES, ARRAY, AiProviders, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, locales_exports as Locales, MARKDOWN, NESTED, NULL, NUMBER, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SELECT, SOLID_NODE, TEXT, TRANSLATION, UNKNOWN, formatNodeType };
@@ -17,6 +17,7 @@ const TEXT = "text";
17
17
  const NUMBER = "number";
18
18
  const BOOLEAN = "boolean";
19
19
  const GENDER = "gender";
20
+ const SELECT = "select";
20
21
  const NULL = "null";
21
22
  const UNKNOWN = "unknown";
22
23
  /**
@@ -30,6 +31,7 @@ const PLUGIN_NODE_TYPES = [
30
31
  CONDITION,
31
32
  INSERTION,
32
33
  GENDER,
34
+ SELECT,
33
35
  NESTED,
34
36
  FILE,
35
37
  MARKDOWN,
@@ -45,5 +47,5 @@ const formatNodeType = (nodeType, content, additionalAttributes) => ({
45
47
  });
46
48
 
47
49
  //#endregion
48
- export { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SOLID_NODE, TEXT, TRANSLATION, UNKNOWN, formatNodeType };
50
+ export { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SELECT, SOLID_NODE, TEXT, TRANSLATION, UNKNOWN, formatNodeType };
49
51
  //# sourceMappingURL=nodeType.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeType.mjs","names":[],"sources":["../../src/nodeType.ts"],"sourcesContent":["export const TRANSLATION = 'translation' as const;\nexport const ENUMERATION = 'enumeration' as const;\nexport const PLURAL = 'plural' as const;\nexport const CONDITION = 'condition' as const;\nexport const INSERTION = 'insertion' as const;\nexport const FILE = 'file' as const;\nexport const OBJECT = 'object' as const;\nexport const ARRAY = 'array' as const;\nexport const NESTED = 'nested' as const;\nexport const REACT_NODE = 'reactNode' as const;\nexport const PREACT_NODE = 'preactNode' as const;\nexport const SOLID_NODE = 'solidNode' as const;\nexport const MARKDOWN = 'markdown' as const;\nexport const HTML = 'html' as const;\nexport const TEXT = 'text' as const;\nexport const NUMBER = 'number' as const;\nexport const BOOLEAN = 'boolean' as const;\nexport const GENDER = 'gender' as const;\nexport const NULL = 'null' as const;\nexport const UNKNOWN = 'unknown' as const;\n\n/**\n * NodeType strings that correspond to plugins that can be conditionally\n * removed from the bundle when unused.\n */\nexport const PLUGIN_NODE_TYPES: readonly [\n typeof TRANSLATION,\n typeof ENUMERATION,\n typeof PLURAL,\n typeof CONDITION,\n typeof INSERTION,\n typeof GENDER,\n typeof NESTED,\n typeof FILE,\n typeof MARKDOWN,\n typeof HTML,\n typeof REACT_NODE,\n typeof PREACT_NODE,\n typeof SOLID_NODE,\n] = [\n TRANSLATION,\n ENUMERATION,\n PLURAL,\n CONDITION,\n INSERTION,\n GENDER,\n NESTED,\n FILE,\n MARKDOWN,\n HTML,\n REACT_NODE,\n PREACT_NODE,\n SOLID_NODE,\n] as const;\n\nexport type NodeType =\n | typeof TRANSLATION\n | typeof ENUMERATION\n | typeof PLURAL\n | typeof CONDITION\n | typeof INSERTION\n | typeof FILE\n | typeof OBJECT\n | typeof ARRAY\n | typeof NESTED\n | typeof REACT_NODE\n | typeof PREACT_NODE\n | typeof SOLID_NODE\n | typeof MARKDOWN\n | typeof HTML\n | typeof TEXT\n | typeof NUMBER\n | typeof BOOLEAN\n | typeof GENDER\n | typeof NULL\n | typeof UNKNOWN;\n\ntype AdditionalAttributesType = {\n [key: string]: unknown;\n};\n\nexport type TypedNodeModel<\n T extends NodeType,\n Content,\n AdditionalAttributes extends AdditionalAttributesType = {},\n> = {\n nodeType: T;\n} & {\n [K in T]: Content;\n} & AdditionalAttributes;\n\nexport const formatNodeType = <\n T extends NodeType,\n Content = unknown,\n AdditionalAttributes extends AdditionalAttributesType = {},\n>(\n nodeType: T,\n content: Content,\n additionalAttributes?: { [key: string]: unknown }\n) =>\n ({\n ...additionalAttributes,\n nodeType,\n [nodeType]: content,\n }) as TypedNodeModel<T, Content, AdditionalAttributes>;\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,YAAY;AACzB,MAAa,YAAY;AACzB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,SAAS;AACtB,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,WAAW;AACxB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,SAAS;AACtB,MAAa,OAAO;AACpB,MAAa,UAAU;;;;;AAMvB,MAAa,oBAcT;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAsCA,MAAa,kBAKX,UACA,SACA,0BAEC;CACC,GAAG;CACH;EACC,WAAW;AACd"}
1
+ {"version":3,"file":"nodeType.mjs","names":[],"sources":["../../src/nodeType.ts"],"sourcesContent":["export const TRANSLATION = 'translation' as const;\nexport const ENUMERATION = 'enumeration' as const;\nexport const PLURAL = 'plural' as const;\nexport const CONDITION = 'condition' as const;\nexport const INSERTION = 'insertion' as const;\nexport const FILE = 'file' as const;\nexport const OBJECT = 'object' as const;\nexport const ARRAY = 'array' as const;\nexport const NESTED = 'nested' as const;\nexport const REACT_NODE = 'reactNode' as const;\nexport const PREACT_NODE = 'preactNode' as const;\nexport const SOLID_NODE = 'solidNode' as const;\nexport const MARKDOWN = 'markdown' as const;\nexport const HTML = 'html' as const;\nexport const TEXT = 'text' as const;\nexport const NUMBER = 'number' as const;\nexport const BOOLEAN = 'boolean' as const;\nexport const GENDER = 'gender' as const;\nexport const SELECT = 'select' as const;\nexport const NULL = 'null' as const;\nexport const UNKNOWN = 'unknown' as const;\n\n/**\n * NodeType strings that correspond to plugins that can be conditionally\n * removed from the bundle when unused.\n */\nexport const PLUGIN_NODE_TYPES: readonly [\n typeof TRANSLATION,\n typeof ENUMERATION,\n typeof PLURAL,\n typeof CONDITION,\n typeof INSERTION,\n typeof GENDER,\n typeof SELECT,\n typeof NESTED,\n typeof FILE,\n typeof MARKDOWN,\n typeof HTML,\n typeof REACT_NODE,\n typeof PREACT_NODE,\n typeof SOLID_NODE,\n] = [\n TRANSLATION,\n ENUMERATION,\n PLURAL,\n CONDITION,\n INSERTION,\n GENDER,\n SELECT,\n NESTED,\n FILE,\n MARKDOWN,\n HTML,\n REACT_NODE,\n PREACT_NODE,\n SOLID_NODE,\n] as const;\n\nexport type NodeType =\n | typeof TRANSLATION\n | typeof ENUMERATION\n | typeof PLURAL\n | typeof CONDITION\n | typeof INSERTION\n | typeof FILE\n | typeof OBJECT\n | typeof ARRAY\n | typeof NESTED\n | typeof REACT_NODE\n | typeof PREACT_NODE\n | typeof SOLID_NODE\n | typeof MARKDOWN\n | typeof HTML\n | typeof TEXT\n | typeof NUMBER\n | typeof BOOLEAN\n | typeof GENDER\n | typeof SELECT\n | typeof NULL\n | typeof UNKNOWN;\n\ntype AdditionalAttributesType = {\n [key: string]: unknown;\n};\n\nexport type TypedNodeModel<\n T extends NodeType,\n Content,\n AdditionalAttributes extends AdditionalAttributesType = {},\n> = {\n nodeType: T;\n} & {\n [K in T]: Content;\n} & AdditionalAttributes;\n\nexport const formatNodeType = <\n T extends NodeType,\n Content = unknown,\n AdditionalAttributes extends AdditionalAttributesType = {},\n>(\n nodeType: T,\n content: Content,\n additionalAttributes?: { [key: string]: unknown }\n) =>\n ({\n ...additionalAttributes,\n nodeType,\n [nodeType]: content,\n }) as TypedNodeModel<T, Content, AdditionalAttributes>;\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,YAAY;AACzB,MAAa,YAAY;AACzB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,SAAS;AACtB,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,WAAW;AACxB,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,SAAS;AACtB,MAAa,SAAS;AACtB,MAAa,OAAO;AACpB,MAAa,UAAU;;;;;AAMvB,MAAa,oBAeT;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAuCA,MAAa,kBAKX,UACA,SACA,0BAEC;CACC,GAAG;CACH;EACC,WAAW;AACd"}
@@ -1,4 +1,4 @@
1
- import { DeclaredLocales, LocalesValues, Schema, SchemaKeys } from "./module_augmentation.js";
1
+ import { DeclaredLocales, DeclaredVariants, LocalesValues, Schema, SchemaKeys } from "./module_augmentation.js";
2
2
  import { FilePathPattern } from "./filePathPattern.js";
3
3
  import { NodeType } from "./nodeType.js";
4
4
  //#region src/dictionary.d.ts
@@ -148,7 +148,11 @@ type QualifiedDictionaryGroup = {
148
148
  * - `locale` composes with any of the above and overrides the context locale
149
149
  */
150
150
  type DictionarySelector = {
151
- locale?: LocalesValues;
151
+ /**
152
+ * Restricted to the declared locales (no `string` escape hatch), so a typo is
153
+ * a compile error and the declared locales are offered as suggestions.
154
+ */
155
+ locale?: DeclaredLocales;
152
156
  item?: number;
153
157
  variant?: DictionaryVariantValue;
154
158
  };
@@ -161,8 +165,14 @@ type SplitCompositeId<Id extends string> = Id extends `${infer Head}/${infer Tai
161
165
  * Zips the declared qualifier dimensions with the segments decoded from a
162
166
  * composite id into a coordinate record (e.g. `['variant', 'item']` +
163
167
  * `['promo', '2']` → `{ variant: 'promo'; item: '2' }`).
168
+ *
169
+ * Both tuples are consumed head-first in lockstep. A mapped type over
170
+ * `keyof QualifierTypes` cannot be used here: remapping the keys of a tuple
171
+ * collapses the index into the union of all positions, so every dimension would
172
+ * receive the union of all segments (`{ variant: 'promo' | '2'; item: 'promo' |
173
+ * '2' }`) and no entry would ever compare equal to a selector coordinate.
164
174
  */
165
- 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; };
175
+ type ZipQualifierCoordinates<QualifierTypes extends readonly DictionaryQualifierType[], Segments extends readonly string[]> = QualifierTypes extends readonly [infer Dimension extends DictionaryQualifierType, ...infer RestDimensions extends readonly DictionaryQualifierType[]] ? Segments extends readonly [infer Segment extends string, ...infer RestSegments extends readonly string[]] ? { [Key in Dimension]: Segment; } & ZipQualifierCoordinates<RestDimensions, RestSegments> : unknown : unknown;
166
176
  /**
167
177
  * Rebuilds the per-entry shape (`{ variant; item; content }`) from the
168
178
  * `content` map keyed by composite id, so the coordinate-comparison helpers can
@@ -189,24 +199,36 @@ type CoordinateEquals<Left, Right> = [StringifyCoordinate<Left>] extends [String
189
199
  * variant entry, since the object identity is not reconstructable at the type
190
200
  * level). An absent selector defaults to the `'default'` variant.
191
201
  */
192
- type SelectorVariant<Selector> = Selector extends {
193
- variant: infer Variant;
194
- } ? Variant extends string ? Variant : string : "default";
195
- type SelectorItem<Selector> = Selector extends {
196
- item: infer Item;
197
- } ? Item : undefined;
202
+ type SelectorVariant<Selector> = "variant" extends keyof Selector ? Selector["variant" & keyof Selector] extends (infer Variant) ? Variant extends string ? Variant : string : never : "default";
203
+ /** The item a selector pins, or `undefined` when it leaves the axis open. */
204
+ type SelectorItem<Selector> = "item" extends keyof Selector ? Selector["item" & keyof Selector] : undefined;
205
+ /**
206
+ * The variant ids a group declares — the first segment of every composite id
207
+ * (`variant` is always the outermost dimension in canonical order).
208
+ */
209
+ type DeclaredVariantIds<ContentMap> = SplitCompositeId<keyof ContentMap & string>[0];
210
+ /**
211
+ * The variant id a selector actually resolves to, mirroring the runtime
212
+ * sparse-override fallback: the requested id when the group declares it,
213
+ * otherwise the `'default'` entry when the group declares one.
214
+ *
215
+ * A broad (non-literal) variant — what an object variant widens to — is left
216
+ * untouched, since it is meant to match any declared entry.
217
+ */
218
+ type EffectiveSelectorVariant<Selector, DeclaredIds extends string> = SelectorVariant<Selector> extends (infer Requested extends string) ? string extends Requested ? Requested : Requested extends DeclaredIds ? Requested : "default" extends DeclaredIds ? "default" : Requested : never;
198
219
  /**
199
220
  * Whether a single group entry matches the selector across every declared
200
221
  * dimension. The `item` dimension matches any value when the selector leaves it
201
- * open (collection axis).
222
+ * open (collection axis); the `variant` dimension is compared against the
223
+ * already-resolved effective id, so the `default` fallback applies here too.
202
224
  */
203
- type EntryMatchesSelector<Entry, QualifierTypes extends readonly DictionaryQualifierType[], Selector> = ("variant" extends QualifierTypes[number] ? Entry extends {
225
+ type EntryMatchesSelector<Entry, QualifierTypes extends readonly DictionaryQualifierType[], Selector, EffectiveVariant> = ("variant" extends QualifierTypes[number] ? Entry extends {
204
226
  variant: infer Variant;
205
- } ? CoordinateEquals<Variant, SelectorVariant<Selector>> : false : true) extends true ? "item" extends QualifierTypes[number] ? [SelectorItem<Selector>] extends [undefined] ? true : Entry extends {
227
+ } ? CoordinateEquals<Variant, EffectiveVariant> : false : true) extends true ? "item" extends QualifierTypes[number] ? [SelectorItem<Selector>] extends [undefined] ? true : Entry extends {
206
228
  item: infer Item;
207
229
  } ? CoordinateEquals<Item, SelectorItem<Selector>> : false : true : false;
208
230
  /** Entries that match the selector. */
209
- type MatchingEntries<Entries, QualifierTypes extends readonly DictionaryQualifierType[], Selector> = { [Key in keyof Entries as EntryMatchesSelector<Entries[Key], QualifierTypes, Selector> extends true ? Key : never]: Entries[Key]; };
231
+ type MatchingEntries<Entries, QualifierTypes extends readonly DictionaryQualifierType[], Selector, EffectiveVariant> = { [Key in keyof Entries as EntryMatchesSelector<Entries[Key], QualifierTypes, Selector, EffectiveVariant> extends true ? Key : never]: Entries[Key]; };
210
232
  /** Whether the collection (`item`) axis is left open (→ array result). */
211
233
  type IsItemAxisOpen<QualifierTypes extends readonly DictionaryQualifierType[], Selector> = "item" extends QualifierTypes[number] ? [SelectorItem<Selector>] extends [undefined] ? true : false : false;
212
234
  /**
@@ -219,12 +241,14 @@ type IsItemAxisOpen<QualifierTypes extends readonly DictionaryQualifierType[], S
219
241
  * entry:
220
242
  * - `item` left open → array of the matching entries' content
221
243
  * - all dimensions pinned → that single entry's content (or `null` if none match)
244
+ * - a variant the group does not declare → the `default` entry's content, when
245
+ * the group declares one (sparse-override fallback)
222
246
  * - plain dictionary → its `content` (selector ignored)
223
247
  */
224
248
  type ResolveQualifiedDictionaryContent<T, Selector = undefined> = T extends {
225
249
  qualifierTypes: infer QualifierTypes extends readonly DictionaryQualifierType[];
226
250
  content: infer ContentMap extends Record<string, any>;
227
- } ? ReconstructedEntries<ContentMap, QualifierTypes> extends (infer Entries) ? IsItemAxisOpen<QualifierTypes, Selector> extends true ? QualifiedEntryContent<MatchingEntries<Entries, QualifierTypes, Selector>[keyof MatchingEntries<Entries, QualifierTypes, Selector>]>[] : [keyof MatchingEntries<Entries, QualifierTypes, Selector>] extends [never] ? null : QualifiedEntryContent<MatchingEntries<Entries, QualifierTypes, Selector>[keyof MatchingEntries<Entries, QualifierTypes, Selector>]> : never : T extends {
251
+ } ? MatchingEntries<ReconstructedEntries<ContentMap, QualifierTypes>, QualifierTypes, Selector, EffectiveSelectorVariant<Selector, DeclaredVariantIds<ContentMap>>> extends (infer Matched) ? IsItemAxisOpen<QualifierTypes, Selector> extends true ? QualifiedEntryContent<Matched[keyof Matched]>[] : [keyof Matched] extends [never] ? null : QualifiedEntryContent<Matched[keyof Matched]> : never : T extends {
228
252
  content: infer Content;
229
253
  } ? Content : never;
230
254
  /** Distributes over the union of a group's entries. */
@@ -238,17 +262,82 @@ type EntryVariant<Entry> = Entry extends {
238
262
  type EntryItem<Entry> = Entry extends {
239
263
  item: infer Item;
240
264
  } ? Item : never;
265
+ /**
266
+ * Every variant id a qualified group declares — the variant segment of each
267
+ * composite id, in its stored (serialized) form. Distributes over a union of
268
+ * groups so it can be applied to the whole dictionary registry at once.
269
+ */
270
+ type VariantIdsOfGroup<T> = T extends {
271
+ qualifierTypes: infer QualifierTypes extends readonly DictionaryQualifierType[];
272
+ content: infer ContentMap;
273
+ } ? "variant" extends QualifierTypes[number] ? DeclaredVariantIds<ContentMap> : never : never;
274
+ /**
275
+ * Splits the serialized ids of a group into their two declaration forms. An
276
+ * object variant serializes to `field=value` pairs joined by `&`, so the
277
+ * presence of `=` discriminates it from a named (string) variant.
278
+ */
279
+ type NamedVariantIds<Ids> = Ids extends `${string}=${string}` ? never : Ids;
280
+ type ObjectVariantIds<Ids> = Ids extends `${string}=${string}` ? Ids : never;
281
+ /** Rebuilds one `field=value` pair into `{ field: value }`. */
282
+ type ParseVariantPair<Pair extends string> = Pair extends `${infer Field}=${infer Value}` ? { [Key in Field]: Value; } : never;
283
+ /**
284
+ * Rebuilds a serialized object-variant id into the object literal that declared
285
+ * it (`'category=audio&id=abc'` → `{ category: 'audio'; id: 'abc' }`), so the
286
+ * selector is typed by the declaration rather than by its storage encoding.
287
+ *
288
+ * Values come back as string literals: the serialization stringifies numbers,
289
+ * and percent-encoded characters (see `serializeVariant`) are not decoded, so a
290
+ * variant whose field values contain path-hostile characters is matched on its
291
+ * encoded form.
292
+ */
293
+ type ParseObjectVariantId<Id extends string> = Id extends `${infer Pair}&${infer Rest}` ? ParseVariantPair<Pair> & ParseObjectVariantId<Rest> : ParseVariantPair<Id>;
294
+ /**
295
+ * The **named** variant ids declared by a group (or by a union of groups).
296
+ * Excludes object variants: their serialized form is an internal storage
297
+ * encoding, never a value the selector should accept as a string.
298
+ */
299
+ type DictionaryVariantIdsOf<T> = NamedVariantIds<VariantIdsOfGroup<T>>;
300
+ /**
301
+ * The object variants a group declares, rebuilt into their declared shape.
302
+ *
303
+ * Left as the intersection `ParseObjectVariantId` accumulates: wrapping it in a
304
+ * flattening mapped type makes TypeScript print the wrapper's name instead of
305
+ * resolving it, which hides the accepted values from the error message.
306
+ */
307
+ type DictionaryObjectVariantsOf<T> = ParseObjectVariantId<ObjectVariantIds<VariantIdsOfGroup<T>> & string>;
308
+ /**
309
+ * Whether a group declares a `default` entry — the target every undeclared
310
+ * variant falls back to. A group without one (an object-variant catalogue, say)
311
+ * resolves an undeclared variant to `null`, so it cannot accept the project
312
+ * vocabulary.
313
+ */
314
+ type HasDefaultVariant<T> = "default" extends VariantIdsOfGroup<T> ? true : false;
241
315
  /**
242
316
  * The selector accepted for a specific qualified dictionary group `T`: each
243
317
  * dimension is constrained to the coordinates that actually exist, so an unknown
244
- * `item` is a compile-time error. Named (string) variants are suggested for
245
- * autocomplete; object variants are accepted via the loose `Record` form. Plain
246
- * dictionaries (no `entries`) fall back to the loose {@link DictionarySelector}.
318
+ * `item` is a compile-time error. Plain dictionaries (no `entries`) fall back to
319
+ * the loose {@link DictionarySelector}.
320
+ *
321
+ * The two variant forms are scoped differently, because they mean different
322
+ * things:
323
+ *
324
+ * - **Named** variants always accept the names this key declares. A key that
325
+ * also declares a `default` entry additionally accepts any name declared
326
+ * **anywhere in the project** (`KnownVariants`), because an undeclared name
327
+ * resolves to that `default` entry at runtime. That is what makes the
328
+ * sparse-override pattern typecheck — one session-wide variant passed to every
329
+ * key, most of which override nothing — while still rejecting a name no
330
+ * dictionary declares (a typo). A key **without** a `default` entry resolves
331
+ * an undeclared name to `null`, so it accepts only its own names.
332
+ * - **Object** variants address one specific record, so they are restricted to
333
+ * the objects **this key** declares, rebuilt from their stored form. They are
334
+ * never accepted in their serialized string form (`'id=abc&userId=123'`) —
335
+ * that is a storage encoding, not part of the API.
247
336
  */
248
- type DictionarySelectorForGroup<T> = [GroupEntryUnion<T>] extends [never] ? DictionarySelector : {
249
- locale?: LocalesValues;
337
+ type DictionarySelectorForGroup<T, KnownVariants = DeclaredVariants> = [GroupEntryUnion<T>] extends [never] ? DictionarySelector : {
338
+ locale?: DeclaredLocales;
250
339
  } & ([EntryVariant<GroupEntryUnion<T>>] extends [never] ? unknown : {
251
- variant?: EntryVariant<GroupEntryUnion<T>> | (string & {}) | Record<string, string | number>;
340
+ variant?: NamedVariantIds<EntryVariant<GroupEntryUnion<T>>> | (HasDefaultVariant<T> extends true ? KnownVariants : never) | DictionaryObjectVariantsOf<T>;
252
341
  }) & ([EntryItem<GroupEntryUnion<T>>] extends [never] ? unknown : {
253
342
  item?: EntryItem<GroupEntryUnion<T>> | number | (string & {});
254
343
  });
@@ -613,5 +702,5 @@ type DictionaryWithoutSchema<ContentType, FetchableNode> = {
613
702
  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);
614
703
  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;
615
704
  //#endregion
616
- export { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, DictionaryVariantValue, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode };
705
+ export { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, DictionaryVariantIdsOf, DictionaryVariantValue, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode };
617
706
  //# sourceMappingURL=dictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../src/dictionary.ts"],"mappings":";;;;KASK;KAEA;EACH,UAAU;;UAGK,UAAU,+BAA+B;KAErD,qBAAqB,aACxB,eACG,YAAY,YAAY,QAAQ,YAAY;KAErC,YACV,eACA,uBACA,WAAW,sBAAsB,WAAW,KAE1C,WACA,UAAU,cACR,eAAe,YAAY,cAC5B,6BAA6B,qBAAqB;KAGlD,QAAQ,KAAK;KAEb,yBAAyB,GAAG,iBAAiB,iBAAiB,OAG/D,YAAY,GAAG,iBAAiB,oBAAoB,GAAG;KAGtD,0BAA0B,GAAG,oBAC/B,WAAW,IAAI,oBAAoB,EAAE,IAAI;KAIvC,oBACH,UACA,wBACE,0BACA,QAAQ,yBACN,yBAAyB,UAAU,iBAE/B,YAAY,UAAU,iBACtB,0BAA0B,UAAU,iBAC1C,YAAY,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0Dd,iBAER,kBACA,QAAQ,OAAO,2BAA2B;KAElC;KACA;;;;;;;;;;;;;KAcA;;;;;;;;;;;KAYA,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BlC;EACV;EACA,KAAK;EACL,gBAAgB;;;;;EAKhB,SAAS;;EAET,aAAa;EACb,WAAW;;;;;;;;;;;;KAaD;EACV,SAAS;EACT;EACA,UAAU;;KAGP,sBAAsB,SAAS;EAAgB,eAAe;IAC/D;;KAIC,iBAAiB,qBACpB,oBAAoB,cAAc,UAC7B,SAAS,iBAAiB,UAC1B;;;;;;KAOF,wBACH,gCAAgC,2BAChC,yCAEC,eAAe,kBAAkB,eAAe,eAAe,0BAC5D,eAAe,iBACP,oBAAoB,WAAW,SAAS;;;;;;KAQjD,qBACH,YACA,gCAAgC,gCAE/B,aAAa,sBAAsB,wBAClC,gBACA,iBAAiB,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AAO,IAAI,iBAAiB,OAAO,KAEnD,oBAAoB,cAAc,OAAO,IAAI,kBAC5C,cAAc,OAAO;;;;;KAO/B,wBAAwB,aAAa;EACxC;EACA,SAAS,sCAEL,oBAAoB,aAAa,iBAAiB;;;;;KAM5C,WACV,yBACA,kBAAkB,oCAClB,yBACE,kBACD,kBAAkB,aACf,qBAAqB,aAAa,eAAe,+BAC/B,YAEZ,wBAAwB,aAAa,iBACrC,qBAAqB,aAAa;KAGlC,WAAW,GAAG,KAAK,mBAAmB,WAAW,SACzD,gBAAgB,IACd,WAAW,EAAE,IAAI,gBAEnB,gBAAgB,IACd,EAAE,KACF"}
@@ -1,10 +1,10 @@
1
1
  import { locales_d_exports } from "./locales.js";
2
2
  import { ALL_LOCALES, Locale } from "./allLocales.js";
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";
3
+ import { DeclaredLocales, DeclaredVariants, 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
- 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, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, DictionaryVariantValue, Fill, GetSubPath, ImportMode, LocalDictionaryId, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent, TypedNode } from "./dictionary.js";
5
+ import { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, NodeType, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SELECT, SOLID_NODE, TEXT, TRANSLATION, TypedNodeModel, UNKNOWN, formatNodeType } from "./nodeType.js";
6
+ import { ContentAutoTransformation, ContentNode, Dictionary, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryLocation, DictionaryQualifierType, DictionarySelector, DictionarySelectorForGroup, DictionaryVariantIdsOf, DictionaryVariantValue, 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, AnalyticsConfig, 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
- 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, AnalyticsConfig, 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, DictionaryVariantValue, 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 };
9
+ import { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, HTMLNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, PluralNode, ReactNode, SelectNode, TranslationNode } from "./keyPath.js";
10
+ export { ALL_LOCALES, ARRAY, AiConfig, AiProviderConfigMap, AiProviders, AnalyticsConfig, ArrayNode, BOOLEAN, BuildConfig, CONDITION, CommonAiConfig, CompilerConfig, ConditionNode, ConfigSchema, ContentAutoTransformation, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, CustomRoutingConfig, DeclaredLocales, DeclaredVariants, Dictionary, DictionaryConfig, DictionaryFormat, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryQualifierType, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, DictionaryRegistryResult, DictionarySelector, DictionarySelectorForGroup, DictionarySelectorForKey, DictionaryVariantIdsOf, DictionaryVariantValue, 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, SELECT, SOLID_NODE, Schema, SchemaKeys, SelectNode, StorageAttributes, StrictMode, StrictModeLocaleMap, SystemConfig, TEXT, TRANSLATION, TranslationNode, TypedNode, TypedNodeModel, UNKNOWN, URLType, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
@@ -1,4 +1,4 @@
1
- import { ARRAY, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, OBJECT, PLURAL, REACT_NODE, TRANSLATION } from "./nodeType.js";
1
+ import { ARRAY, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, OBJECT, PLURAL, REACT_NODE, SELECT, TRANSLATION } from "./nodeType.js";
2
2
  //#region src/keyPath.d.ts
3
3
  type ObjectNode = {
4
4
  type: typeof OBJECT;
@@ -28,6 +28,10 @@ type GenderNode = {
28
28
  type: typeof GENDER;
29
29
  key: string;
30
30
  };
31
+ type SelectNode = {
32
+ type: typeof SELECT;
33
+ key: string;
34
+ };
31
35
  type InsertionNode = {
32
36
  type: typeof INSERTION;
33
37
  key?: undefined;
@@ -52,7 +56,7 @@ type HTMLNode = {
52
56
  type: typeof HTML;
53
57
  key?: undefined;
54
58
  };
55
- type KeyPath = ObjectNode | ArrayNode | TranslationNode | EnumerationNode | PluralNode | InsertionNode | GenderNode | MarkdownNode | ReactNode | ConditionNode | NestedNode | FileNode | HTMLNode;
59
+ type KeyPath = ObjectNode | ArrayNode | TranslationNode | EnumerationNode | PluralNode | InsertionNode | GenderNode | SelectNode | MarkdownNode | ReactNode | ConditionNode | NestedNode | FileNode | HTMLNode;
56
60
  //#endregion
57
- export { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, HTMLNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, PluralNode, ReactNode, TranslationNode };
61
+ export { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, HTMLNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, PluralNode, ReactNode, SelectNode, TranslationNode };
58
62
  //# sourceMappingURL=keyPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyPath.d.ts","names":[],"sources":["../../src/keyPath.ts"],"mappings":";;KAEY;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU,UACR,aACA,YACA,kBACA,kBACA,aACA,gBACA,aACA,eACA,YACA,gBACA,aACA,WACA"}
1
+ {"version":3,"file":"keyPath.d.ts","names":[],"sources":["../../src/keyPath.ts"],"mappings":";;KAEY;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU;EACV,aAAa;EACb;;KAGU,UACR,aACA,YACA,kBACA,kBACA,aACA,gBACA,aACA,aACA,eACA,YACA,gBACA,aACA,WACA"}
@@ -1,5 +1,5 @@
1
1
  import { Locale } from "./allLocales.js";
2
- import { Dictionary, DictionarySelector, DictionarySelectorForGroup, ResolveQualifiedDictionaryContent } from "./dictionary.js";
2
+ import { Dictionary, DictionarySelector, DictionarySelectorForGroup, DictionaryVariantIdsOf, ResolveQualifiedDictionaryContent } from "./dictionary.js";
3
3
  import { StrictMode } from "./config.js";
4
4
  import { __DeclaredLocalesRegistry, __DictionaryRegistry, __EditorRegistry, __RequiredLocalesRegistry, __RoutingRegistry, __SchemaRegistry, __StrictModeRegistry } from "intlayer";
5
5
  //#region src/module_augmentation.d.ts
@@ -28,6 +28,23 @@ type DictionaryRegistryResult<T extends PropertyKey, Arg = undefined> = [T] exte
28
28
  type ExtractSelectorLocale<Arg> = Arg extends {
29
29
  locale: infer L extends LocalesValues;
30
30
  } ? L : Arg extends LocalesValues ? Arg : DeclaredLocales;
31
+ /**
32
+ * Every named variant declared anywhere in the project — the vocabulary of
33
+ * variant names collected across the whole dictionary registry. `never` when the
34
+ * project declares no variant at all.
35
+ *
36
+ * This is the domain a `variant` selector is checked against, rather than the
37
+ * names of the single key being read: a key that declares no entry for the
38
+ * selected variant falls back to its `default` entry at runtime, so one
39
+ * session-wide variant can legitimately be passed to every key. Checking against
40
+ * the project vocabulary keeps that legal while still catching a name that no
41
+ * dictionary declares.
42
+ *
43
+ * Kept as a plain alias (the `never` fallback lives at the use site) so
44
+ * TypeScript prints this name in error messages instead of expanding the
45
+ * registry inline.
46
+ */
47
+ type DeclaredVariants = DictionaryVariantIdsOf<__DictionaryRegistry[keyof __DictionaryRegistry]>;
31
48
  /**
32
49
  * The selector accepted for a dictionary **key** `T`: its `variant` / `item` /
33
50
  * `id` are constrained to the coordinates that exist for that key, so an unknown
@@ -98,5 +115,5 @@ type GetLocaleLang<L extends string> = L extends `${infer Lang}-${string}` ? Lan
98
115
  */
99
116
  type PathWithoutLocale<Path extends string, Locales extends string> = Path extends `${infer Protocol}://${infer Domain}/${infer Seg}/${infer Rest}` ? Seg extends Locales ? `${Protocol}://${Domain}/${Rest}` : Path : Path extends `${infer Protocol}://${infer Domain}/${infer Seg}` ? Seg extends Locales ? `${Protocol}://${Domain}/` : Path : Path extends `/${infer Seg}/${infer Rest}` ? Seg extends Locales ? `/${Rest}` : Path : Path extends `/${infer Seg}` ? Seg extends Locales ? "/" : Path : Path;
100
117
  //#endregion
101
- export { DeclaredLocales, DictionaryKeys, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, DictionaryRegistryResult, type DictionarySelector, type DictionarySelectorForGroup, DictionarySelectorForKey, ExtractSelectorLocale, GetLocaleLang, LocalesValues, LocalizedUrl, PathWithoutLocale, RequiredLocales, ResolvedDefaultLocale, ResolvedEditor, ResolvedRoutingMode, Schema, SchemaKeys, StrictModeLocaleMap };
118
+ export { DeclaredLocales, DeclaredVariants, DictionaryKeys, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, DictionaryRegistryResult, type DictionarySelector, type DictionarySelectorForGroup, DictionarySelectorForKey, ExtractSelectorLocale, GetLocaleLang, LocalesValues, LocalizedUrl, PathWithoutLocale, RequiredLocales, ResolvedDefaultLocale, ResolvedEditor, ResolvedRoutingMode, Schema, SchemaKeys, StrictModeLocaleMap };
102
119
  //# sourceMappingURL=module_augmentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module_augmentation.d.ts","names":[],"sources":["../../src/module_augmentation.ts"],"mappings":";;;;;KAkBY,mBAAmB,gDAErB;KAEE,OAAO,UAAU,gCAAgC,WAEzD,gBAAgB,mBACd,iBAAiB;KAGX,uBAAuB,oDAEzB;KAGE,qBACV,2BAA2B,sCACvB,eAAe,cACf;KAEM,0BAA0B,UAAU,oCAErC,KACP,aACA,gBAAgB,uBACd,qBAAqB,WAAW,aAC9B,qBAAqB,KACrB,aACF;KAEM,0BAA0B,UAAU,gBAAgB,kBACxD,wBAEJ,qBAAqB;EAAa,eAAe;IAC/C,IACA,wBACF;;;;;;;;;;KAWQ,yBAAyB,UAAU,aAAa,oBAC1D,kBACe,wBACb,kCAAkC,qBAAqB,IAAI,OAC3D;;;;;KAMQ,sBAAsB,OAAO;EACvC,cAAc,UAAU;IAEtB,IACA,YAAY,gBACV,MACA;;;;;;KAOM,yBAAyB,UAAU,gBAAgB,kBACvD,wBAEJ,2BAA2B,qBAAqB,MAChD;KAMC,iBAAiB,0BAA0B,YAE5C,cAAc;KAEN,mBACV,iBAAiB,8CAEf,SACA,iBAAiB;KAET,mBACV,iBAAiB,sDAGf,iBAAiB;;KAGT,gBAAgB;KAGvB,qBAAqB;EAA+B,YAAY;IACjE;KAIQ,oBACV,mBACA,aAAa,aAAa,sBACxB,gCACA,QAAQ,OAAO,QAAQ,YACvB,wBACE,SAAS,OAAO,iBAAiB,YAC/B,QAAQ,OAAO,iBAAiB,YAClC,2BACE,SAAS,OAAO,iBAAiB,YAC/B,QAAQ,OAAO,QAAQ,YACzB,QAAQ,OAAO,QAAQ;KAGnB,eAAe,MAAM,UAAU;EACzC;IAEE,SACA;KAIC;;KAOO,sBAAsB;EAChC,YAAY,UAAU;IAEpB;;KAIQ,wBAAwB;EAClC,qBAAqB,UAAU;IAE7B,IACA;;KAKC,oBACH,kBACA,qBACA,0BACE,+BACG,OACH,mCACE,UAAU,kBAEL;;KAIN,iBACH,qBACA,yBACE,oBACA,OACA,uBAAuB,aACjB,SAAS,SACb;;;;;;;;;;;;;;;;KAiBM,aACV,qBACA,UAAU,eACV,sBAAsB,qBACtB,gBAAgB,gBAAgB,uBAChC,yBAAyB,8CACL,iBAElB,2BACE,kBAAkB,MAAM,WACxB,wCAEE,iBACE,kBAAkB,MAAM,UACxB,oBAAoB,GAAG,MAAM;;;;;;;;KAU3B,cAAc,oBACxB,mBAAmB,mBAAmB,OAAO;;;;;;;;;;;;;;KAenC,kBAAkB,qBAAqB,0BAEjD,sBAAsB,oBAAoB,gBAAgB,aAAa,SACnE,YAAY,aACP,cAAc,UAAU,SAC3B,OAEF,sBAAsB,oBAAoB,gBAAgB,QACxD,YAAY,aACP,cAAc,YACjB,OAEF,uBAAuB,aAAa,SAClC,YAAY,cACN,SACJ,OAEF,uBAAuB,QACrB,YAAY,gBAEV,OACF"}
1
+ {"version":3,"file":"module_augmentation.d.ts","names":[],"sources":["../../src/module_augmentation.ts"],"mappings":";;;;;KAmBY,mBAAmB,gDAErB;KAEE,OAAO,UAAU,gCAAgC,WAEzD,gBAAgB,mBACd,iBAAiB;KAGX,uBAAuB,oDAEzB;KAGE,qBACV,2BAA2B,sCACvB,eAAe,cACf;KAEM,0BAA0B,UAAU,oCAErC,KACP,aACA,gBAAgB,uBACd,qBAA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;;;;;;;;KAU3B,cAAc,oBACxB,mBAAmB,mBAAmB,OAAO;;;;;;;;;;;;;;KAenC,kBAAkB,qBAAqB,0BAEjD,sBAAsB,oBAAoB,gBAAgB,aAAa,SACnE,YAAY,aACP,cAAc,UAAU,SAC3B,OAEF,sBAAsB,oBAAoB,gBAAgB,QACxD,YAAY,aACP,cAAc,YACjB,OAEF,uBAAuB,aAAa,SAClC,YAAY,cACN,SACJ,OAEF,uBAAuB,QACrB,YAAY,gBAEV,OACF"}
@@ -17,14 +17,15 @@ declare const TEXT: "text";
17
17
  declare const NUMBER: "number";
18
18
  declare const BOOLEAN: "boolean";
19
19
  declare const GENDER: "gender";
20
+ declare const SELECT: "select";
20
21
  declare const NULL: "null";
21
22
  declare const UNKNOWN: "unknown";
22
23
  /**
23
24
  * NodeType strings that correspond to plugins that can be conditionally
24
25
  * removed from the bundle when unused.
25
26
  */
26
- declare const PLUGIN_NODE_TYPES: readonly [typeof TRANSLATION, typeof ENUMERATION, typeof PLURAL, typeof CONDITION, typeof INSERTION, typeof GENDER, typeof NESTED, typeof FILE, typeof MARKDOWN, typeof HTML, typeof REACT_NODE, typeof PREACT_NODE, typeof SOLID_NODE];
27
- type NodeType = typeof TRANSLATION | typeof ENUMERATION | typeof PLURAL | typeof CONDITION | typeof INSERTION | typeof FILE | typeof OBJECT | typeof ARRAY | typeof NESTED | typeof REACT_NODE | typeof PREACT_NODE | typeof SOLID_NODE | typeof MARKDOWN | typeof HTML | typeof TEXT | typeof NUMBER | typeof BOOLEAN | typeof GENDER | typeof NULL | typeof UNKNOWN;
27
+ declare const PLUGIN_NODE_TYPES: readonly [typeof TRANSLATION, typeof ENUMERATION, typeof PLURAL, typeof CONDITION, typeof INSERTION, typeof GENDER, typeof SELECT, typeof NESTED, typeof FILE, typeof MARKDOWN, typeof HTML, typeof REACT_NODE, typeof PREACT_NODE, typeof SOLID_NODE];
28
+ type NodeType = typeof TRANSLATION | typeof ENUMERATION | typeof PLURAL | typeof CONDITION | typeof INSERTION | typeof FILE | typeof OBJECT | typeof ARRAY | typeof NESTED | typeof REACT_NODE | typeof PREACT_NODE | typeof SOLID_NODE | typeof MARKDOWN | typeof HTML | typeof TEXT | typeof NUMBER | typeof BOOLEAN | typeof GENDER | typeof SELECT | typeof NULL | typeof UNKNOWN;
28
29
  type AdditionalAttributesType = {
29
30
  [key: string]: unknown;
30
31
  };
@@ -35,5 +36,5 @@ declare const formatNodeType: <T extends NodeType, Content = unknown, Additional
35
36
  [key: string]: unknown;
36
37
  }) => TypedNodeModel<T, Content, AdditionalAttributes>;
37
38
  //#endregion
38
- export { 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 };
39
+ export { ARRAY, BOOLEAN, CONDITION, ENUMERATION, FILE, GENDER, HTML, INSERTION, MARKDOWN, NESTED, NULL, NUMBER, NodeType, OBJECT, PLUGIN_NODE_TYPES, PLURAL, PREACT_NODE, REACT_NODE, SELECT, SOLID_NODE, TEXT, TRANSLATION, TypedNodeModel, UNKNOWN, formatNodeType };
39
40
  //# sourceMappingURL=nodeType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeType.d.ts","names":[],"sources":["../../src/nodeType.ts"],"mappings":";cAAa;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;;;;cAMA,oCACJ,oBACA,oBACA,eACA,kBACA,kBACA,eACA,eACA,aACA,iBACA,aACA,mBACA,oBACA;KAiBG,kBACD,qBACA,qBACA,gBACA,mBACA,mBACA,cACA,gBACA,eACA,gBACA,oBACA,qBACA,oBACA,kBACA,cACA,cACA,gBACA,iBACA,gBACA,cACA;KAEN;GAAA;;KAIO,eACV,UAAU,UACV,SACA,6BAA6B;EAE7B,UAAU;OAET,KAAK,IAAI,aACR;cAES,iBACX,UAAU,UACV,mBACA,6BAA6B,+BAE7B,UAAU,GACV,SAAS,SACT;;MAMM,eAAe,GAAG,SAAS"}
1
+ {"version":3,"file":"nodeType.d.ts","names":[],"sources":["../../src/nodeType.ts"],"mappings":";cAAa;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;;;;cAMA,oCACJ,oBACA,oBACA,eACA,kBACA,kBACA,eACA,eACA,eACA,aACA,iBACA,aACA,mBACA,oBACA;KAkBG,kBACD,qBACA,qBACA,gBACA,mBACA,mBACA,cACA,gBACA,eACA,gBACA,oBACA,qBACA,oBACA,kBACA,cACA,cACA,gBACA,iBACA,gBACA,gBACA,cACA;KAEN;GAAA;;KAIO,eACV,UAAU,UACV,SACA,6BAA6B;EAE7B,UAAU;OAET,KAAK,IAAI,aACR;cAES,iBACX,UAAU,UACV,mBACA,6BAA6B,+BAE7B,UAAU,GACV,SAAS,SACT;;MAMM,eAAe,GAAG,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/types",
3
- "version": "9.0.2",
3
+ "version": "9.1.1",
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": [
@@ -141,7 +141,7 @@
141
141
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
142
142
  },
143
143
  "devDependencies": {
144
- "@types/node": "26.1.1",
144
+ "@types/node": "26.1.2",
145
145
  "@utils/ts-config": "1.0.4",
146
146
  "@utils/ts-config-types": "1.0.4",
147
147
  "@utils/tsdown-config": "1.0.4",