@intlayer/core 9.8.5 → 9.9.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.
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs +3 -1
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/getMultilingualDictionary.cjs +2 -1
- package/dist/cjs/deepTransformPlugins/getMultilingualDictionary.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/dynamicDictionary.cjs +262 -0
- package/dist/cjs/dictionaryManipulator/dynamicDictionary.cjs.map +1 -0
- package/dist/cjs/dictionaryManipulator/getLocalizedMetadata.cjs +25 -0
- package/dist/cjs/dictionaryManipulator/getLocalizedMetadata.cjs.map +1 -0
- package/dist/cjs/dictionaryManipulator/index.cjs +27 -3
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs +3 -0
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/mergeQualifiedDictionaries.cjs +6 -2
- package/dist/cjs/dictionaryManipulator/mergeQualifiedDictionaries.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs +2 -1
- package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs +80 -12
- package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/qualifiedDictionaryDeclaration.cjs +9 -3
- package/dist/cjs/dictionaryManipulator/qualifiedDictionaryDeclaration.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/qualifiedDynamicLoader.cjs +38 -68
- package/dist/cjs/dictionaryManipulator/qualifiedDynamicLoader.cjs.map +1 -1
- package/dist/cjs/index.cjs +27 -3
- package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
- package/dist/cjs/interpreter/getDictionary.cjs +3 -0
- package/dist/cjs/interpreter/getDictionary.cjs.map +1 -1
- package/dist/cjs/interpreter/getDictionaryAsync.cjs +5 -19
- package/dist/cjs/interpreter/getDictionaryAsync.cjs.map +1 -1
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +3 -1
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs.map +1 -1
- package/dist/esm/deepTransformPlugins/getMultilingualDictionary.mjs +2 -1
- package/dist/esm/deepTransformPlugins/getMultilingualDictionary.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/dynamicDictionary.mjs +252 -0
- package/dist/esm/dictionaryManipulator/dynamicDictionary.mjs.map +1 -0
- package/dist/esm/dictionaryManipulator/getLocalizedMetadata.mjs +22 -0
- package/dist/esm/dictionaryManipulator/getLocalizedMetadata.mjs.map +1 -0
- package/dist/esm/dictionaryManipulator/index.mjs +6 -4
- package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs +3 -0
- package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/mergeQualifiedDictionaries.mjs +6 -2
- package/dist/esm/dictionaryManipulator/mergeQualifiedDictionaries.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs +2 -1
- package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs +75 -13
- package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/qualifiedDictionaryDeclaration.mjs +10 -5
- package/dist/esm/dictionaryManipulator/qualifiedDictionaryDeclaration.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/qualifiedDynamicLoader.mjs +33 -68
- package/dist/esm/dictionaryManipulator/qualifiedDynamicLoader.mjs.map +1 -1
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
- package/dist/esm/interpreter/getDictionary.mjs +3 -0
- package/dist/esm/interpreter/getDictionary.mjs.map +1 -1
- package/dist/esm/interpreter/getDictionaryAsync.mjs +5 -19
- package/dist/esm/interpreter/getDictionaryAsync.mjs.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +2 -1
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +2 -1
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +2 -1
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/dynamicDictionary.d.ts +159 -0
- package/dist/types/dictionaryManipulator/dynamicDictionary.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/getLocalizedMetadata.d.ts +14 -0
- package/dist/types/dictionaryManipulator/getLocalizedMetadata.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/index.d.ts +6 -4
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts +51 -5
- package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts +7 -2
- package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +34 -54
- package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -4
- package/dist/types/interpreter/getContent/plugins.d.ts +2 -1
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionaryAsync.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dictionary, DictionarySelector, DictionaryVariantChain, DictionaryVariantValue, ProviderVariantBase, QualifiedDictionaryGroup } from "@intlayer/types/dictionary";
|
|
1
|
+
import { Dictionary, DictionaryItemId, DictionaryQualifierType, DictionarySelector, DictionaryVariantChain, DictionaryVariantValue, ProviderVariantBase, QualifiedDictionaryGroup } from "@intlayer/types/dictionary";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
3
|
/**
|
|
4
4
|
* Separator joining per-dimension ids into a composite entry id. Also used as
|
|
@@ -30,6 +30,32 @@ export declare const DEFAULT_VARIANT_ID = "default";
|
|
|
30
30
|
* an object variant in a selector must equal the one declared on the dictionary.
|
|
31
31
|
*/
|
|
32
32
|
export declare const serializeVariant: (variant: DictionaryVariantValue | undefined) => string;
|
|
33
|
+
/**
|
|
34
|
+
* Normalizes a raw item id: a string holding a number's exact canonical form
|
|
35
|
+
* becomes that number (`'2'` → `2`), anything else stays a string id
|
|
36
|
+
* (`'007'`, `'65f1c0a2'`, `'Infinity'`).
|
|
37
|
+
*
|
|
38
|
+
* @param rawItem - The item id as text (a composite id segment, a form input…).
|
|
39
|
+
*/
|
|
40
|
+
export declare const parseItemId: (rawItem: string) => DictionaryItemId;
|
|
41
|
+
/**
|
|
42
|
+
* Canonical serialization of an item id — the item segment of a composite id,
|
|
43
|
+
* the chunk directory name in dynamic mode, and the runtime matching key.
|
|
44
|
+
*
|
|
45
|
+
* A number and its digits serialize identically (`2` and `'2'` → `'2'`).
|
|
46
|
+
* Characters unsafe in file paths or generated code are percent-encoded like
|
|
47
|
+
* variant names, so database ids (hex, UUID, nanoid…) are kept verbatim.
|
|
48
|
+
*/
|
|
49
|
+
export declare const serializeItem: (item: DictionaryItemId) => string;
|
|
50
|
+
/** Decodes the item segment of a composite id back into its item id. */
|
|
51
|
+
export declare const parseItemSegment: (segment: string) => DictionaryItemId;
|
|
52
|
+
/**
|
|
53
|
+
* Collection order of two item ids: numeric ids by value first, then string
|
|
54
|
+
* ids by UTF-16 code unit (locale-independent, so every build agrees).
|
|
55
|
+
*/
|
|
56
|
+
export declare const compareItemIds: (leftItem: DictionaryItemId, rightItem: DictionaryItemId) => number;
|
|
57
|
+
/** Collection order of two serialized item segments (see {@link compareItemIds}). */
|
|
58
|
+
export declare const compareItemSegments: (leftSegment: string, rightSegment: string) => number;
|
|
33
59
|
/**
|
|
34
60
|
* Serializes the variant coordinate of a selector into the ordered list of
|
|
35
61
|
* candidate ids to try, so a single value and a preference chain share one code
|
|
@@ -74,7 +100,8 @@ export declare const isQualifiedDictionaryGroup: (value: unknown) => value is Qu
|
|
|
74
100
|
* `{ key, content, variant?, item? }` shape, even though the stored format no
|
|
75
101
|
* longer duplicates those fields per entry. The `variant` coordinate stays in
|
|
76
102
|
* its serialized (encoded) form, e.g. `'id=abc&userId=123'` — matching happens
|
|
77
|
-
* on the composite id segments, never on this reconstructed field.
|
|
103
|
+
* on the composite id segments, never on this reconstructed field. The `item`
|
|
104
|
+
* coordinate is decoded back to its id (`2`, `'65f1c0a2'`).
|
|
78
105
|
*/
|
|
79
106
|
export declare const reconstructQualifiedEntry: (group: QualifiedDictionaryGroup, compositeId: string) => Dictionary;
|
|
80
107
|
/**
|
|
@@ -82,7 +109,8 @@ export declare const reconstructQualifiedEntry: (group: QualifiedDictionaryGroup
|
|
|
82
109
|
* across every declared dimension.
|
|
83
110
|
*
|
|
84
111
|
* - Plain dictionary → returned as-is (selector ignored)
|
|
85
|
-
* - `item` declared but not selected → every matching entry
|
|
112
|
+
* - `item` declared but not selected → every matching entry, in collection
|
|
113
|
+
* order (see `compareItemIds`)
|
|
86
114
|
* - `item` selected → the matching entry or null
|
|
87
115
|
* - `variant` defaults to the `default` entry when not selected, and falls back
|
|
88
116
|
* to it when the selected variant declares no entry of its own; an object
|
|
@@ -93,6 +121,23 @@ export declare const reconstructQualifiedEntry: (group: QualifiedDictionaryGroup
|
|
|
93
121
|
* returns every promo item as an array; adding `{ item: 2 }` narrows to one.
|
|
94
122
|
*/
|
|
95
123
|
export declare const resolveQualifiedDictionary: (dictionaryOrGroup: Dictionary | QualifiedDictionaryGroup, selector?: DictionarySelector) => Dictionary | Dictionary[] | null;
|
|
124
|
+
/** Ids a selector targets among a qualified key's entries. */
|
|
125
|
+
export type MatchedQualifiedEntryIds = {
|
|
126
|
+
/** True when the `item` axis is open (collection result → array). */
|
|
127
|
+
itemAxisOpen: boolean;
|
|
128
|
+
/** Matching composite ids, in collection order when the axis is open. */
|
|
129
|
+
matchedIds: string[];
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Selects the composite ids a selector targets across every declared
|
|
133
|
+
* dimension — the matching shared by the static resolver and the dynamic
|
|
134
|
+
* metadata index, so both modes resolve the same entries.
|
|
135
|
+
*
|
|
136
|
+
* @param compositeIds - Every composite id the key declares.
|
|
137
|
+
* @param qualifierTypes - The key's dimensions, in canonical order.
|
|
138
|
+
* @param selector - The selector splitting the dimensions.
|
|
139
|
+
*/
|
|
140
|
+
export declare const matchQualifiedEntryIds: (compositeIds: string[], qualifierTypes: DictionaryQualifierType[], selector?: DictionarySelector) => MatchedQualifiedEntryIds;
|
|
96
141
|
/**
|
|
97
142
|
* Splits the second argument of `getIntlayer` / `getDictionary` into the
|
|
98
143
|
* effective locale and the selector object (if any).
|
|
@@ -138,8 +183,9 @@ export declare const resolveDictionaryArgument: (params: {
|
|
|
138
183
|
dictionaryKey: string;
|
|
139
184
|
}) => LocalesValues | DictionarySelector | undefined;
|
|
140
185
|
/**
|
|
141
|
-
* Builds a stable string identity of a selector (excluding `locale
|
|
142
|
-
* for cache keys and memoization
|
|
186
|
+
* Builds a stable string identity of a selector (excluding `locale`, and the
|
|
187
|
+
* dimensions left `undefined`), suitable for cache keys and memoization
|
|
188
|
+
* dependencies.
|
|
143
189
|
*/
|
|
144
190
|
export declare const getDictionarySelectorCacheKey: (selector?: DictionarySelector) => string;
|
|
145
191
|
//# sourceMappingURL=qualifiedDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualifiedDictionary.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDictionary.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"qualifiedDictionary.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDictionary.ts"],"mappings":";;;;;;qBAiBa;;;;;;qBAOA;;;;;;;;;;;;;;;;;;;qBAqDA,mBAAgB,SAClB;;;;;;;;qBA+BE,cAAW,oBAAsB;;;;;;;;;qBAkBjC,gBAAa,MAAU;;qBAIvB,mBAAgB,oBAAsB;;;;;qBAOtC,iBAAc,UACf,kBAAgB,WACf;;qBAcA,sBAAmB,qBACX;;;;;;;;;;;;;qBAiBR,wBAAqB,SACvB;;;;;;;;;;;;;;;;qBA0BE,4BAAyB,+BACP,sBACP;;;;;;qBA6CX,6BAA0B,mBAEpC,SAAS;;;;;;;;;;;;;qBAmBC,4BAAyB,OAC7B,0BAAwB,wBAE9B;;;;;;;;;;;;;;;;;qBAyCU,6BAA0B,mBAClB,aAAa,0BAAwB,WAC7C,uBACV,aAAa;;YAqBJ;;EAEV;;EAEA;;;;;;;;;;;qBAYW,yBAAsB,wBACX,gBACN,2BAAyB,WAC9B,uBACV;;;;;qBA6CU,0BAA2B,UAAU,eAAa,mBAC1C,IAAI;EACpB,SAAS;EAAG,WAAW;;;;;;;;;;;;;;;;;qBA0Bf,yBAAsB,iBAChB,iCAA+B,0BAE/C;;;;;;;;;;;;;;;qBA0BU,4BAAyB;EACpC,mBAAmB,gBAAgB;EACnC,gBAAgB;EAChB,iBAAiB;EACjB;MACE,gBAAgB;;;;;;qBAsCP,gCAA6B,WAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dictionary, DictionaryQualifierType } from "@intlayer/types/dictionary";
|
|
1
|
+
import { Dictionary, DictionaryItemId, DictionaryQualifierType } from "@intlayer/types/dictionary";
|
|
2
2
|
/**
|
|
3
3
|
* Canonical order of qualifier dimensions. A key that declares both dimensions
|
|
4
4
|
* always nests them in this order, with `item` innermost so it can act as the
|
|
@@ -13,6 +13,11 @@ export declare const QUALIFIER_ORDER: readonly ["variant", "item"];
|
|
|
13
13
|
* field, or an empty array).
|
|
14
14
|
*/
|
|
15
15
|
export declare const getVariantIds: (variant: Dictionary['variant']) => string[] | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Whether an `item` field declares the collection dimension: a number, or a
|
|
18
|
+
* non-empty string id. An empty string (a blank form field) declares nothing.
|
|
19
|
+
*/
|
|
20
|
+
export declare const isDeclaredItem: (item: Dictionary['item']) => item is DictionaryItemId;
|
|
16
21
|
/**
|
|
17
22
|
* Returns the qualifier dimensions declared on a dictionary, in canonical
|
|
18
23
|
* order (`variant → item`). Empty when the dictionary is unqualified
|
|
@@ -25,7 +30,7 @@ export declare const getDictionaryQualifierTypes: (dictionary: Dictionary) => Di
|
|
|
25
30
|
*
|
|
26
31
|
* - 'variant' → the serialized variant id(s); an array variant yields one id
|
|
27
32
|
* per element (declaration-side fan-out)
|
|
28
|
-
* - 'item' → the item
|
|
33
|
+
* - 'item' → the serialized item id as a single-element list
|
|
29
34
|
*/
|
|
30
35
|
export declare const getDictionaryQualifierIds: (dictionary: Dictionary, qualifierType: DictionaryQualifierType) => string[] | undefined;
|
|
31
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualifiedDictionaryDeclaration.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDictionaryDeclaration.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"qualifiedDictionaryDeclaration.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDictionaryDeclaration.ts"],"mappings":";;;;;;qBAgBa;;;;;;;;qBAYA,gBAAa,SACf;;;;;qBAcE,iBAAc,MACnB,uBACL,QAAQ;;;;;;qBAQE,8BAA2B,YAC1B,eACX;;;;;;;;;qBAmBU,4BAAyB,YACxB,YAAU,eACP;;;;;;;qBAgBJ,4BAAyB,YACxB,YAAU,gBACN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dictionary, DictionaryQualifierType, DictionarySelector } from "@intlayer/types/dictionary";
|
|
2
|
-
import { QUALIFIER_DYNAMIC_TYPES_KEY } from "@intlayer/config/defaultValues";
|
|
1
|
+
import { Dictionary, DictionaryMetadata, DictionaryQualifierType, DictionarySelector } from "@intlayer/types/dictionary";
|
|
2
|
+
import { QUALIFIER_DYNAMIC_METADATA_KEY, QUALIFIER_DYNAMIC_TYPES_KEY } from "@intlayer/config/defaultValues";
|
|
3
3
|
/**
|
|
4
4
|
* A lazily-imported per-locale dictionary chunk loader.
|
|
5
5
|
*/
|
|
@@ -25,7 +25,9 @@ export type QualifiedDynamicLoaderTree = {
|
|
|
25
25
|
*/
|
|
26
26
|
export type QualifiedDynamicLoaderMap = {
|
|
27
27
|
[QUALIFIER_DYNAMIC_TYPES_KEY]: DictionaryQualifierType[];
|
|
28
|
-
|
|
28
|
+
/** Per-locale loaders of the metadata index (absent in older builds). */
|
|
29
|
+
[QUALIFIER_DYNAMIC_METADATA_KEY]?: Record<string, DynamicDictionaryLoader>;
|
|
30
|
+
[locale: string]: QualifiedDynamicLoaderTree | DictionaryQualifierType[] | Record<string, DynamicDictionaryLoader> | undefined;
|
|
29
31
|
};
|
|
30
32
|
/**
|
|
31
33
|
* Type guard discriminating a qualified dynamic loader map (collections /
|
|
@@ -36,62 +38,40 @@ export declare const isQualifiedDynamicLoaderMap: (value: unknown) => value is Q
|
|
|
36
38
|
export type CollectedChunk = {
|
|
37
39
|
cacheKey: string;
|
|
38
40
|
loader: DynamicDictionaryLoader;
|
|
41
|
+
/** The chunk, already loaded by the entry point's preload. */
|
|
42
|
+
preloaded?: Dictionary;
|
|
43
|
+
};
|
|
44
|
+
/** The chunks a dynamic read targets. */
|
|
45
|
+
export type CollectedChunks = {
|
|
46
|
+
/** True when the `item` axis is open (collection result → array). */
|
|
47
|
+
itemAxisOpen: boolean;
|
|
48
|
+
/** True when a required coordinate is absent (result → [] or null). */
|
|
49
|
+
missed: boolean;
|
|
50
|
+
/** The chunks the selector targets (in collection order for the item axis). */
|
|
51
|
+
chunks: CollectedChunk[];
|
|
52
|
+
/** True when the single chunk is the metadata index, not entry chunks. */
|
|
53
|
+
readsMetadataIndex?: boolean;
|
|
39
54
|
};
|
|
40
55
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* @returns The targeted chunks, empty when a required coordinate is absent.
|
|
45
|
-
*/
|
|
46
|
-
export declare const getQualifiedDynamicChunks: (loaderMap: QualifiedDynamicLoaderMap, key: string, locale: string, selector: DictionarySelector | undefined) => CollectedChunk[];
|
|
47
|
-
/**
|
|
48
|
-
* Resolves the content of a qualified dynamic loader map against a selector,
|
|
49
|
-
* loading only the chunk(s) the selector actually targets.
|
|
50
|
-
*
|
|
51
|
-
* Walks the nested loader tree one dimension at a time (canonical order
|
|
52
|
-
* `variant → item`): `variant` descends by the serialized id, falling back to
|
|
53
|
-
* `default` when the selected variant has no chunk of its own, and `item`
|
|
54
|
-
* either narrows to the selected index or — when no item is given — expands
|
|
55
|
-
* into every sibling chunk (the collection axis). Semantics mirror
|
|
56
|
-
* `resolveQualifiedDictionary` so dynamic and static modes behave alike.
|
|
57
|
-
*
|
|
58
|
-
* The Suspense mechanism is injected through `loadChunk` so the same logic
|
|
59
|
-
* serves both the client (suspender cache) and the server (`react.use`). Every
|
|
60
|
-
* targeted loader is started before the first chunk is read, so sibling chunks
|
|
61
|
-
* load in parallel rather than waterfalling.
|
|
56
|
+
* Walks the loader tree following the selector and collects the chunk loaders
|
|
57
|
+
* it targets.
|
|
62
58
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
59
|
+
* Walks one dimension at a time (canonical order `variant → item`): `variant`
|
|
60
|
+
* descends by the serialized id, falling back to `default` when the selected
|
|
61
|
+
* variant has no chunk of its own, and `item` either narrows to the selected
|
|
62
|
+
* index or — when no item is given — expands into every sibling chunk (the
|
|
63
|
+
* collection axis). Semantics mirror `resolveQualifiedDictionary` so dynamic
|
|
64
|
+
* and static modes behave alike.
|
|
69
65
|
*/
|
|
70
|
-
export declare const
|
|
71
|
-
loaderMap: QualifiedDynamicLoaderMap;
|
|
72
|
-
key: string;
|
|
73
|
-
locale: string;
|
|
74
|
-
selector: DictionarySelector | undefined;
|
|
75
|
-
loadChunk: (cacheKey: string, promise: Promise<Dictionary>) => Dictionary;
|
|
76
|
-
transform: (dictionary: Dictionary) => Content;
|
|
77
|
-
}) => Content | Content[] | null;
|
|
66
|
+
export declare const collectQualifiedChunks: (loaderMap: QualifiedDynamicLoaderMap, key: string, locale: string, selector: DictionarySelector | undefined) => CollectedChunks;
|
|
78
67
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* vanilla). Awaits every targeted chunk in parallel, then resolves identically.
|
|
68
|
+
* Reads the metadata a selector targets out of a loaded metadata index, with
|
|
69
|
+
* the same entry matching as static mode.
|
|
82
70
|
*
|
|
83
|
-
* @param
|
|
84
|
-
* @param
|
|
85
|
-
* @param
|
|
86
|
-
* @param selector - The selector splitting the qualifier dimensions.
|
|
87
|
-
* @param transform - Turns a resolved chunk dictionary into final content.
|
|
71
|
+
* @param metadataIndex - The loaded index chunk (`metadata` maps composite ids).
|
|
72
|
+
* @param qualifierTypes - The key's dimensions, in canonical order.
|
|
73
|
+
* @param selector - The selector splitting the dimensions.
|
|
88
74
|
*/
|
|
89
|
-
export declare const
|
|
90
|
-
|
|
91
|
-
key: string;
|
|
92
|
-
locale: string;
|
|
93
|
-
selector: DictionarySelector | undefined;
|
|
94
|
-
transform: (dictionary: Dictionary) => Content;
|
|
95
|
-
}) => Promise<Content | Content[] | null>;
|
|
96
|
-
export { QUALIFIER_DYNAMIC_TYPES_KEY };
|
|
75
|
+
export declare const readMetadataIndex: (metadataIndex: Dictionary | undefined, qualifierTypes: DictionaryQualifierType[], selector: DictionarySelector | undefined) => DictionaryMetadata[];
|
|
76
|
+
export { QUALIFIER_DYNAMIC_METADATA_KEY, QUALIFIER_DYNAMIC_TYPES_KEY };
|
|
97
77
|
//# sourceMappingURL=qualifiedDynamicLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualifiedDynamicLoader.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDynamicLoader.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"qualifiedDynamicLoader.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDynamicLoader.ts"],"mappings":";;;;;YAkCY,gCAAgC,QAAQ;;;;;YAMxC;GACT,kBAAkB,6BAA6B;;;;;;;;;;;;;;YAetC;GACT,8BAA8B;;GAE9B,kCAAkC,eAAe;GACjD,iBACG,6BACA,4BACA,eAAe;;;;;;qBAQR,8BAA2B,mBAErC,SAAS;;YAMA;EACV;EACA,QAAQ;;EAER,YAAY;;;YAIF;;EAEV;;EAEA;;EAEA,QAAQ;;EAER;;;;;;;;;;;;;qBAcW,yBAAsB,WACtB,2BAAyB,aACzB,gBACG,UACJ,mCACT;;;;;;;;;qBAyFU,oBAAiB,eACb,wBAAsB,gBACrB,2BAAyB,UAC/B,mCACT"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { TransformCacheWrite, collectTransformCacheWrites, deleteTransformCacheW
|
|
|
24
24
|
import { getCondition } from "./interpreter/getCondition.js";
|
|
25
25
|
import { getDictionary } from "./interpreter/getDictionary.js";
|
|
26
26
|
import { PlainDynamicLoaderMap, ResolvedDynamicLoader, findPlainDynamicLoader, resolvePlainDynamicLoader } from "./dictionaryManipulator/plainDynamicLoader.js";
|
|
27
|
-
import { CollectedChunk, DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree,
|
|
27
|
+
import { CollectedChunk, CollectedChunks, DynamicDictionaryLoader, QUALIFIER_DYNAMIC_METADATA_KEY, QUALIFIER_DYNAMIC_TYPES_KEY, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, collectQualifiedChunks, isQualifiedDynamicLoaderMap, readMetadataIndex } from "./dictionaryManipulator/qualifiedDynamicLoader.js";
|
|
28
28
|
import { getDictionaryAsync } from "./interpreter/getDictionaryAsync.js";
|
|
29
29
|
import { findMatchingCondition, getEnumeration } from "./interpreter/getEnumeration.js";
|
|
30
30
|
import { getGender } from "./interpreter/getGender.js";
|
|
@@ -50,10 +50,12 @@ import { getReplacedValuesContent } from "./deepTransformPlugins/getReplacedValu
|
|
|
50
50
|
import { getSplittedContent, getSplittedDictionaryContent } from "./deepTransformPlugins/getSplittedContent.js";
|
|
51
51
|
import { insertContentInDictionary } from "./deepTransformPlugins/insertContentInDictionary.js";
|
|
52
52
|
import "./formatters/index.js";
|
|
53
|
+
import { ChunkSuspenseCache, DictionaryRead, DynamicChunkTransform, DynamicContent, DynamicContentStore, DynamicLoaderMap, DynamicReadContext, DynamicReadParams, DynamicReader, DynamicStoreRead, SettledDynamicContent, createChunkSuspenseCache, createDynamicContentStore, getDynamicChunkArgument, getDynamicChunks, loadDynamicDictionary, loadingContentPlaceholder, resolveDictionaryRead, resolveDynamicContent, resolveDynamicContentAsync } from "./dictionaryManipulator/dynamicDictionary.js";
|
|
53
54
|
import { editDictionaryByKeyPath } from "./dictionaryManipulator/editDictionaryByKeyPath.js";
|
|
54
55
|
import { getContentNodeByKeyPath } from "./dictionaryManipulator/getContentNodeByKeyPath.js";
|
|
55
56
|
import { getDefaultNode } from "./dictionaryManipulator/getDefaultNode.js";
|
|
56
57
|
import { getEmptyNode } from "./dictionaryManipulator/getEmptyNode.js";
|
|
58
|
+
import { getLocalizedMetadata } from "./dictionaryManipulator/getLocalizedMetadata.js";
|
|
57
59
|
import { NestedFieldReferences, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences } from "./dictionaryManipulator/getNestedDictionaryReferences.js";
|
|
58
60
|
import { getNodeChildren } from "./dictionaryManipulator/getNodeChildren.js";
|
|
59
61
|
import { getNodeType } from "./dictionaryManipulator/getNodeType.js";
|
|
@@ -62,8 +64,8 @@ import { mergeQualifiedDictionaries } from "./dictionaryManipulator/mergeQualifi
|
|
|
62
64
|
import { normalizeDictionaries, normalizeDictionary } from "./dictionaryManipulator/normalizeDictionary.js";
|
|
63
65
|
import { orderDictionaries } from "./dictionaryManipulator/orderDictionaries.js";
|
|
64
66
|
import { PRELOADED_DYNAMIC_KEY, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, getPreloadedDictionary } from "./dictionaryManipulator/preloadedDynamicLoader.js";
|
|
65
|
-
import { COMPOSITE_ID_SEPARATOR, DEFAULT_VARIANT_ID, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, parseDictionarySelector, reconstructQualifiedEntry, resolveDictionaryArgument, resolveEffectiveVariantId, resolveProviderVariant, resolveQualifiedDictionary, serializeVariant, serializeVariantChain } from "./dictionaryManipulator/qualifiedDictionary.js";
|
|
66
|
-
import { QUALIFIER_ORDER, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getVariantIds } from "./dictionaryManipulator/qualifiedDictionaryDeclaration.js";
|
|
67
|
+
import { COMPOSITE_ID_SEPARATOR, DEFAULT_VARIANT_ID, MatchedQualifiedEntryIds, compareItemIds, compareItemSegments, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, matchQualifiedEntryIds, parseDictionarySelector, parseItemId, parseItemSegment, reconstructQualifiedEntry, resolveDictionaryArgument, resolveEffectiveVariantId, resolveProviderVariant, resolveQualifiedDictionary, serializeItem, serializeVariant, serializeVariantChain } from "./dictionaryManipulator/qualifiedDictionary.js";
|
|
68
|
+
import { QUALIFIER_ORDER, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getVariantIds, isDeclaredItem } from "./dictionaryManipulator/qualifiedDictionaryDeclaration.js";
|
|
67
69
|
import { removeContentNodeByKeyPath } from "./dictionaryManipulator/removeContentNodeByKeyPath.js";
|
|
68
70
|
import { renameContentNodeByKeyPath } from "./dictionaryManipulator/renameContentNodeByKeyPath.js";
|
|
69
71
|
import { updateNodeChildren } from "./dictionaryManipulator/updateNodeChildren.js";
|
|
@@ -126,4 +128,4 @@ import { CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorag
|
|
|
126
128
|
import { YamlRecord, YamlValue, parseYaml } from "./utils/parseYaml.js";
|
|
127
129
|
import { stringifyYaml } from "./utils/stringifyYaml.js";
|
|
128
130
|
import "./utils/index.js";
|
|
129
|
-
export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_NAME_START_R, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, AmbientLocaleResolver, AsyncAmbientLocaleResolver, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, type BlockQuoteNode, BlockSyntaxProbe, type BoldTextNode, type BreakLineNode, type BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, COMPOSITE_ID_SEPARATOR, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CachedIntl, CachedIntl as Intl, type CodeBlockNode, type CodeFencedNode, type CodeInlineNode, CollectedChunk, type CompileOptions, type ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, type CustomComponentNode, DEFAULT_PLURAL_VARIABLE, DEFAULT_VARIANT_ID, DO_NOT_PROCESS_HTML_ELEMENTS, DateTimePreset, DeepTransformContent, DotPath, DynamicDictionaryLoader, type ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, type EscapedTextNode, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, type FileContent, type FileContentConstructor, type FootnoteNode, type FootnoteReferenceNode, type GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, type GenerateSitemapOptions, GetNestingResult, type GetPrefixOptions, type GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, type HTMLCommentNode, HTMLContent, HTMLContentConstructor, type HTMLNode, type HTMLSelfClosingNode, type HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_TAGS, type HeadingNode, type HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, type ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, InterpolableNode, IntlConstructorName, IsAny, type ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, type LinkAngleBraceNode, type LinkBareURLNode, type LinkNode, ListFormatOptions, ListType, type LocaleDomainMap, type LocaleRequest, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, type LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, type MarkdownContext, type MarkdownOptions, MarkdownReferences, type MarkdownRuntime, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, type MarkedTextNode, MessageArgumentFormatter, MessageArgumentFormatterContext, MessageArgumentFormatters, MessageFormatDialect, MessageFormatter, MessageResolver, MessageValues, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedFieldReferences, type NestedParser, type NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, type OrderedListNode, PARAGRAPH_R, PRELOADED_DYNAMIC_KEY, type ParagraphNode, type ParseState, ParsedMarkdown, type Parser, type ParserResult, PlainDynamicLoaderMap, Plugins, PluralCategory, PluralCond, PluralContent, PluralContentState, PluralOptions, PortableObject, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, Priority, PriorityValue, type ProxyMode, type ProxyStorageSuppressionPurpose, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, type ReferenceImageNode, type ReferenceLinkNode, type ReferenceNode, type RenderRuleHook, ResolvedDynamicLoader, type Rule, type RuleOutput, RuleScope, RuleScopeValue, RuleType, RuleTypeValue, type Rules, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SelectCond, SelectContent, SelectContentStates, SelectSelector, type SitemapUrlEntry, type StrikethroughTextNode, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, type TableNode, type TableSeparatorNode, TaggedMessageToken, type TextNode, TransformCacheWrite, TranslationCond, TranslationContent, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, UnionKeys, type UnorderedListNode, VOID_HTML_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, YamlRecord, YamlValue, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindInsertedValues, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, collectTransformCacheWrites, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createMessageResolver, createRenderer, currency, cx, date, deepTransformNode, deleteTransformCacheWrites, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, fallbackPlugin, type file, type fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, findPlainDynamicLoader, formatProxyEnabledMessage, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCachedLocaleFromStorageClient, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getDictionaryAsync, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getDictionaryTransformCacheKey, getDomainHostname, getDomainOrigin, getEditedContent, getEditedDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getGender, getHTML, getHTMLTextDir, getInsertion, getInsertionValues, getInternalPath, getInterpolableContent, getIntlayer, getIntlayerAsync, getIntlayerNodePrototype, getLocale, getLocaleFromDomain, getLocaleFromPath, getLocaleFromRequest, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPluginsCacheKey, getPlural, getPrefix, getPreloadLocale, getPreloadedDictionary,
|
|
131
|
+
export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_NAME_START_R, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, AmbientLocaleResolver, AsyncAmbientLocaleResolver, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, type BlockQuoteNode, BlockSyntaxProbe, type BoldTextNode, type BreakLineNode, type BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, COMPOSITE_ID_SEPARATOR, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CachedIntl, CachedIntl as Intl, ChunkSuspenseCache, type CodeBlockNode, type CodeFencedNode, type CodeInlineNode, CollectedChunk, CollectedChunks, type CompileOptions, type ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, type CustomComponentNode, DEFAULT_PLURAL_VARIABLE, DEFAULT_VARIANT_ID, DO_NOT_PROCESS_HTML_ELEMENTS, DateTimePreset, DeepTransformContent, DictionaryRead, DotPath, DynamicChunkTransform, DynamicContent, DynamicContentStore, DynamicDictionaryLoader, DynamicLoaderMap, DynamicReadContext, DynamicReadParams, DynamicReader, DynamicStoreRead, type ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, type EscapedTextNode, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, type FileContent, type FileContentConstructor, type FootnoteNode, type FootnoteReferenceNode, type GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, type GenerateSitemapOptions, GetNestingResult, type GetPrefixOptions, type GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, type HTMLCommentNode, HTMLContent, HTMLContentConstructor, type HTMLNode, type HTMLSelfClosingNode, type HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_TAGS, type HeadingNode, type HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, type ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, InterpolableNode, IntlConstructorName, IsAny, type ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, type LinkAngleBraceNode, type LinkBareURLNode, type LinkNode, ListFormatOptions, ListType, type LocaleDomainMap, type LocaleRequest, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, type LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, type MarkdownContext, type MarkdownOptions, MarkdownReferences, type MarkdownRuntime, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, type MarkedTextNode, MatchedQualifiedEntryIds, MessageArgumentFormatter, MessageArgumentFormatterContext, MessageArgumentFormatters, MessageFormatDialect, MessageFormatter, MessageResolver, MessageValues, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedFieldReferences, type NestedParser, type NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, type OrderedListNode, PARAGRAPH_R, PRELOADED_DYNAMIC_KEY, type ParagraphNode, type ParseState, ParsedMarkdown, type Parser, type ParserResult, PlainDynamicLoaderMap, Plugins, PluralCategory, PluralCond, PluralContent, PluralContentState, PluralOptions, PortableObject, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, Priority, PriorityValue, type ProxyMode, type ProxyStorageSuppressionPurpose, QUALIFIER_DYNAMIC_METADATA_KEY, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, type ReferenceImageNode, type ReferenceLinkNode, type ReferenceNode, type RenderRuleHook, ResolvedDynamicLoader, type Rule, type RuleOutput, RuleScope, RuleScopeValue, RuleType, RuleTypeValue, type Rules, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SelectCond, SelectContent, SelectContentStates, SelectSelector, SettledDynamicContent, type SitemapUrlEntry, type StrikethroughTextNode, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, type TableNode, type TableSeparatorNode, TaggedMessageToken, type TextNode, TransformCacheWrite, TranslationCond, TranslationContent, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, UnionKeys, type UnorderedListNode, VOID_HTML_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, YamlRecord, YamlValue, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindInsertedValues, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, collectQualifiedChunks, collectTransformCacheWrites, compact, compareItemIds, compareItemSegments, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createChunkSuspenseCache, createCompiler, createDynamicContentStore, createMessageResolver, createRenderer, currency, cx, date, deepTransformNode, deleteTransformCacheWrites, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, fallbackPlugin, type file, type fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, findPlainDynamicLoader, formatProxyEnabledMessage, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCachedLocaleFromStorageClient, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getDictionaryAsync, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getDictionaryTransformCacheKey, getDomainHostname, getDomainOrigin, getDynamicChunkArgument, getDynamicChunks, getEditedContent, getEditedDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getGender, getHTML, getHTMLTextDir, getInsertion, getInsertionValues, getInternalPath, getInterpolableContent, getIntlayer, getIntlayerAsync, getIntlayerNodePrototype, getLocale, getLocaleFromDomain, getLocaleFromPath, getLocaleFromRequest, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedMetadata, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPluginsCacheKey, getPlural, getPrefix, getPreloadLocale, getPreloadedDictionary, getReplacedValuesContent, getRewritePath, getRewriteRules, getRuleSet, getSelect, getSplittedContent, getSplittedDictionaryContent, getTranslation, getVariantIds, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isDeclaredItem, isDeclaredLocale, isInterpolableWrapperNode, isLocaleExclusiveOnDomain, isProxyStorageLocaleEnabled, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, loadDynamicDictionary, loadingContentPlaceholder, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, matchQualifiedEntryIds, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, navigatePath, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizePath, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseDictionarySelector, parseInline, parseItemId, parseItemSegment, parseMarkdown, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseTaggedMessage, parseYaml, parserFor, percentage, plural, pluralPlugin, portableObjectToIntlayerFormatter, presets, qualifies, readMetadataIndex, readTransformCache, rebuildInterpolableContent, reconstructQualifiedEntry, registerAmbientLocaleResolver, registerAsyncAmbientLocaleResolver, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveBrowserLocale, resolveDictionaryArgument, resolveDictionaryRead, resolveDynamicContent, resolveDynamicContentAsync, resolveEffectiveVariantId, resolveInsertedSelector, resolveInterpreterLocale, resolveInterpreterLocaleAsync, resolveLocalizedPath, resolveMessage, resolveMessageNode, resolveMessageNodeToString, resolvePlainDynamicLoader, resolveProviderVariant, resolveProxyMode, resolveQualifiedDictionary, sanitizer, select, selectPlugin, serializeItem, serializeVariant, serializeVariantChain, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, stringifyYaml, translation as t, transformInterpolableNode, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter, writeTransformCache };
|
|
@@ -2,6 +2,7 @@ import { Gender } from "../../transpiler/gender/gender.js";
|
|
|
2
2
|
import "../../transpiler/index.js";
|
|
3
3
|
import { DEFAULT_PLURAL_VARIABLE } from "../../transpiler/plural/plural.js";
|
|
4
4
|
import { GetNestingResult } from "../getNesting.js";
|
|
5
|
+
import { UninterpretedContent } from "@intlayer/types/dictionary";
|
|
5
6
|
import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
6
7
|
import { Locale } from "@intlayer/types/allLocales";
|
|
7
8
|
import { KeyPath } from "@intlayer/types/keyPath";
|
|
@@ -237,6 +238,6 @@ export type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
|
237
238
|
/**
|
|
238
239
|
* Traverse recursively through an object or array, applying each plugin as needed.
|
|
239
240
|
*/
|
|
240
|
-
export type DeepTransformContent<T, S = IInterpreterPluginState, L extends LocalesValues = DeclaredLocales> = IsAny<T> extends true ? T : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L> extends never ? Traverse<T, S, L> : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L>;
|
|
241
|
+
export type DeepTransformContent<T, S = IInterpreterPluginState, L extends LocalesValues = DeclaredLocales> = IsAny<T> extends true ? T : [T] extends [UninterpretedContent<infer Declared>] ? Declared : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L> extends never ? Traverse<T, S, L> : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L>;
|
|
241
242
|
export {};
|
|
242
243
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/plugins.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/plugins.ts"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../../src/interpreter/getDictionary.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../../src/interpreter/getDictionary.ts"],"mappings":";;;;;;;;;;;;;qBAgDa,sBACL,UAAU,aAAa,gCACvB,UAAU,gBAAgB,qBAAqB,iBAAe,YAExD,GAAC,mBACM,GAAC,UACV,cACT,qBACD,kCAAkC,GAAG,IACrC,yBACA,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionaryAsync.d.ts","names":[],"sources":["../../../src/interpreter/getDictionaryAsync.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getDictionaryAsync.d.ts","names":[],"sources":["../../../src/interpreter/getDictionaryAsync.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2Da,2BACL,UAAU,kBACV,UAAU,gBAAgB,qBAAqB,iBAAe,mBAEjD,sBAAsB,KAAK,2BAAyB,aAC5D,mBACQ,GAAC,UACV,cACT,QACD,qBACE,cACA,yBACA,sBAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/core",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.9.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.",
|
|
6
6
|
"keywords": [
|
|
@@ -176,10 +176,10 @@
|
|
|
176
176
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
177
177
|
},
|
|
178
178
|
"dependencies": {
|
|
179
|
-
"@intlayer/api": "9.
|
|
180
|
-
"@intlayer/config": "9.
|
|
181
|
-
"@intlayer/dictionaries-entry": "9.
|
|
182
|
-
"@intlayer/types": "9.
|
|
179
|
+
"@intlayer/api": "9.9.1",
|
|
180
|
+
"@intlayer/config": "9.9.1",
|
|
181
|
+
"@intlayer/dictionaries-entry": "9.9.1",
|
|
182
|
+
"@intlayer/types": "9.9.1",
|
|
183
183
|
"defu": "6.1.7"
|
|
184
184
|
},
|
|
185
185
|
"devDependencies": {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"rimraf": "6.1.4",
|
|
191
191
|
"tsdown": "0.23.7",
|
|
192
192
|
"typescript": "7.0.2",
|
|
193
|
-
"vitest": "5.1.
|
|
193
|
+
"vitest": "5.1.2"
|
|
194
194
|
},
|
|
195
195
|
"engines": {
|
|
196
196
|
"node": ">=14.18"
|