@intlayer/core 9.0.0-canary.6 → 9.0.0-canary.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cjs/dictionaryManipulator/index.cjs +1 -0
  2. package/dist/cjs/dictionaryManipulator/mergeQualifiedDictionaries.cjs +1 -5
  3. package/dist/cjs/dictionaryManipulator/mergeQualifiedDictionaries.cjs.map +1 -1
  4. package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs +48 -74
  5. package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs.map +1 -1
  6. package/dist/cjs/index.cjs +1 -0
  7. package/dist/cjs/interpreter/getDictionary.cjs +5 -5
  8. package/dist/cjs/interpreter/getDictionary.cjs.map +1 -1
  9. package/dist/cjs/interpreter/getIntlayer.cjs +1 -1
  10. package/dist/cjs/interpreter/getIntlayer.cjs.map +1 -1
  11. package/dist/esm/dictionaryManipulator/index.mjs +2 -2
  12. package/dist/esm/dictionaryManipulator/mergeQualifiedDictionaries.mjs +1 -5
  13. package/dist/esm/dictionaryManipulator/mergeQualifiedDictionaries.mjs.map +1 -1
  14. package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs +48 -75
  15. package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs.map +1 -1
  16. package/dist/esm/index.mjs +2 -2
  17. package/dist/esm/interpreter/getDictionary.mjs +5 -5
  18. package/dist/esm/interpreter/getDictionary.mjs.map +1 -1
  19. package/dist/esm/interpreter/getIntlayer.mjs +1 -1
  20. package/dist/esm/interpreter/getIntlayer.mjs.map +1 -1
  21. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +1 -2
  22. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +1 -2
  23. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +1 -2
  24. package/dist/types/dictionaryManipulator/index.d.ts +2 -2
  25. package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts +1 -1
  26. package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts.map +1 -1
  27. package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts +33 -20
  28. package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts.map +1 -1
  29. package/dist/types/index.d.ts +2 -2
  30. package/dist/types/interpreter/getDictionary.d.ts +5 -5
  31. package/dist/types/interpreter/getIntlayer.d.ts +1 -1
  32. package/package.json +6 -6
@@ -3,19 +3,32 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
3
3
 
4
4
  //#region src/dictionaryManipulator/qualifiedDictionary.d.ts
5
5
  /**
6
- * Canonical order of qualifier dimensions. A key that declares several
7
- * dimensions always nests them in this order, with `item` innermost so it can
8
- * act as the collection (array) axis.
6
+ * Canonical order of qualifier dimensions. A key that declares both dimensions
7
+ * always nests them in this order, with `item` innermost so it can act as the
8
+ * collection (array) axis.
9
9
  */
10
- declare const QUALIFIER_ORDER: readonly ["variant", "meta", "item"];
10
+ declare const QUALIFIER_ORDER: readonly ["variant", "item"];
11
11
  /**
12
12
  * Separator joining per-dimension ids into a composite entry id. Also used as
13
13
  * the chunk path separator in dynamic mode.
14
14
  */
15
15
  declare const COMPOSITE_ID_SEPARATOR = "/";
16
+ /**
17
+ * Canonical serialization of a variant value into its identity string — the
18
+ * variant segment of a composite id and the runtime matching key.
19
+ *
20
+ * - `undefined` → `'default'` (the implicit fallback variant)
21
+ * - a string → the string itself (a named variant)
22
+ * - an object → its sorted `key=value` pairs joined by `&`
23
+ * (e.g. `{ userId: '123', id: 'abc' }` → `'id=abc&userId=123'`)
24
+ *
25
+ * Two variants resolve to the same entry iff their serializations are equal, so
26
+ * an object variant in a selector must equal the one declared on the dictionary.
27
+ */
28
+ declare const serializeVariant: (variant: string | Record<string, string | number> | undefined) => string;
16
29
  /**
17
30
  * Returns the qualifier dimensions declared on a dictionary, in canonical
18
- * order (`variant → meta → item`). Empty when the dictionary is unqualified
31
+ * order (`variant → item`). Empty when the dictionary is unqualified
19
32
  * (plain dictionary or shared base content of a qualified group).
20
33
  */
21
34
  declare const getDictionaryQualifierTypes: (dictionary: Dictionary) => DictionaryQualifierType[];
@@ -23,8 +36,7 @@ declare const getDictionaryQualifierTypes: (dictionary: Dictionary) => Dictionar
23
36
  * Returns the qualifier identifier of a dictionary for the given qualifier
24
37
  * dimension — one segment of the composite entry id.
25
38
  *
26
- * - 'variant' → the variant name
27
- * - 'meta' → the `meta.id` discriminator
39
+ * - 'variant' → the serialized variant (named string or object identity)
28
40
  * - 'item' → the item index as string
29
41
  */
30
42
  declare const getDictionaryQualifierId: (dictionary: Dictionary, qualifierType: DictionaryQualifierType) => string | undefined;
@@ -48,12 +60,13 @@ declare const isQualifiedDictionaryGroup: (value: unknown) => value is Qualified
48
60
  /**
49
61
  * Reconstructs a resolvable {@link Dictionary} from a single entry of a
50
62
  * qualified group: the content node stored under its composite id, plus the
51
- * qualifier coordinates decoded from that id (`variant`, `item`) and the
52
- * preserved `meta` object for the meta dimension.
63
+ * qualifier coordinates decoded from that id (`variant`, `item`).
53
64
  *
54
65
  * This keeps the resolver's matching/transform code unchanged: it still sees a
55
- * `{ key, content, variant?, item?, meta? }` shape, even though the stored
56
- * format no longer duplicates those fields per entry.
66
+ * `{ key, content, variant?, item? }` shape, even though the stored format no
67
+ * longer duplicates those fields per entry. The `variant` coordinate stays in
68
+ * its serialized form (e.g. `'id=abc&userId=123'`), which round-trips through
69
+ * {@link serializeVariant} during matching.
57
70
  */
58
71
  declare const reconstructQualifiedEntry: (group: QualifiedDictionaryGroup, compositeId: string) => Dictionary;
59
72
  /**
@@ -63,8 +76,8 @@ declare const reconstructQualifiedEntry: (group: QualifiedDictionaryGroup, compo
63
76
  * - Plain dictionary → returned as-is (selector ignored)
64
77
  * - `item` declared but not selected → every matching entry ordered by index
65
78
  * - `item` selected → the matching entry or null
66
- * - `variant` defaults to the `default` entry when not selected
67
- * - `meta` requires `{ id }` and every declared meta field to match
79
+ * - `variant` defaults to the `default` entry when not selected; an object
80
+ * variant resolves only when the selector provides an equal object
68
81
  *
69
82
  * Dimensions compose: e.g. a variant × item key with `{ variant: 'promo' }`
70
83
  * returns every promo item as an array; adding `{ item: 2 }` narrows to one.
@@ -119,7 +132,7 @@ type QualifiedDynamicLoaderMap = {
119
132
  };
120
133
  /**
121
134
  * Type guard discriminating a qualified dynamic loader map (collections /
122
- * variants / meta records, possibly combined) from a plain dynamic loader map.
135
+ * variants, possibly combined) from a plain dynamic loader map.
123
136
  */
124
137
  declare const isQualifiedDynamicLoaderMap: (value: unknown) => value is QualifiedDynamicLoaderMap;
125
138
  /**
@@ -127,11 +140,11 @@ declare const isQualifiedDynamicLoaderMap: (value: unknown) => value is Qualifie
127
140
  * loading only the chunk(s) the selector actually targets.
128
141
  *
129
142
  * Walks the nested loader tree one dimension at a time (canonical order
130
- * `variant → meta → item`): `variant` defaults to `default`, `meta` descends by
131
- * `id`, and `item` either narrows to the selected index or — when no item is
132
- * given — expands into every sibling chunk (the collection axis). Meta-equality
133
- * is verified on the loaded chunk. Semantics mirror
134
- * {@link resolveQualifiedDictionary} so dynamic and static modes behave alike.
143
+ * `variant → item`): `variant` defaults to `default` (or descends by the
144
+ * serialized object identity), and `item` either narrows to the selected index
145
+ * or — when no item is given — expands into every sibling chunk (the collection
146
+ * axis). Semantics mirror {@link resolveQualifiedDictionary} so dynamic and
147
+ * static modes behave alike.
135
148
  *
136
149
  * The Suspense mechanism is injected through `loadChunk` so the same logic
137
150
  * serves both the client (suspender cache) and the server (`react.use`). Every
@@ -172,5 +185,5 @@ declare const resolveQualifiedDynamicContentAsync: <Content>(params: {
172
185
  transform: (dictionary: Dictionary) => Content;
173
186
  }) => Promise<Content | Content[] | null>;
174
187
  //#endregion
175
- export { COMPOSITE_ID_SEPARATOR, DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, getDictionaryCompositeId, getDictionaryQualifierId, getDictionaryQualifierSegments, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, parseDictionarySelector, reconstructQualifiedEntry, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync };
188
+ export { COMPOSITE_ID_SEPARATOR, DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, getDictionaryCompositeId, getDictionaryQualifierId, getDictionaryQualifierSegments, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, parseDictionarySelector, reconstructQualifiedEntry, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, serializeVariant };
176
189
  //# sourceMappingURL=qualifiedDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"qualifiedDictionary.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDictionary.ts"],"mappings":";;;;;;AAmBA;;;cAAa,eAAA;;AAUb;;;cAAa,sBAAA;;AAOb;;;;cAAa,2BAAA,GACX,UAAA,EAAY,UAAA,KACX,uBAAA;;;;;AAmBH;;;;cAAa,wBAAA,GACX,UAAA,EAAY,UAAA,EACZ,aAAA,EAAe,uBAAA;;;;;;cAeJ,8BAAA,GACX,UAAA,EAAY,UAAA,EACZ,cAAA,EAAgB,uBAAA;;;;;cAiBL,wBAAA,GACX,UAAA,EAAY,UAAA,EACZ,cAAA,EAAgB,uBAAA;;;;;AAFlB;cAgEa,0BAAA,GACX,KAAA,cACC,KAAA,IAAS,wBAAA;;;;;;;;;AAFZ;;cAmBa,yBAAA,GACX,KAAA,EAAO,wBAAA,EACP,WAAA,aACC,UAAA;;;;;;;AAHH;;;;;;;cAwCa,0BAAA,GACX,iBAAA,EAAmB,UAAA,GAAa,wBAAA,EAChC,QAAA,GAAW,kBAAA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OAAA,EAAS,OAAA,CAAQ,UAAA,MAAgB,UAAA;EAC/D,SAAA,GAAY,UAAA,EAAY,UAAA,KAAe,OAAA;AAAA,MACrC,OAAA,GAAU,OAAA;AAPd;;;;;;;;;;;AAAA,cAyCa,mCAAA,YAAsD,MAAA;EACjE,SAAA,EAAW,yBAAA;EACX,GAAA;EACA,MAAA;EACA,QAAA,EAAU,kBAAA;EACV,SAAA,GAAY,UAAA,EAAY,UAAA,KAAe,OAAA;AAAA,MACrC,OAAA,CAAQ,OAAA,GAAU,OAAA"}
@@ -46,7 +46,7 @@ import { mergeDictionaries } from "./dictionaryManipulator/mergeDictionaries.js"
46
46
  import { mergeQualifiedDictionaries } from "./dictionaryManipulator/mergeQualifiedDictionaries.js";
47
47
  import { normalizeDictionaries, normalizeDictionary } from "./dictionaryManipulator/normalizeDictionary.js";
48
48
  import { orderDictionaries } from "./dictionaryManipulator/orderDictionaries.js";
49
- import { COMPOSITE_ID_SEPARATOR, DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, getDictionaryCompositeId, getDictionaryQualifierId, getDictionaryQualifierSegments, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, parseDictionarySelector, reconstructQualifiedEntry, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync } from "./dictionaryManipulator/qualifiedDictionary.js";
49
+ import { COMPOSITE_ID_SEPARATOR, DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, getDictionaryCompositeId, getDictionaryQualifierId, getDictionaryQualifierSegments, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, parseDictionarySelector, reconstructQualifiedEntry, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, serializeVariant } from "./dictionaryManipulator/qualifiedDictionary.js";
50
50
  import { removeContentNodeByKeyPath } from "./dictionaryManipulator/removeContentNodeByKeyPath.js";
51
51
  import { renameContentNodeByKeyPath } from "./dictionaryManipulator/renameContentNodeByKeyPath.js";
52
52
  import { updateNodeChildren } from "./dictionaryManipulator/updateNodeChildren.js";
@@ -94,4 +94,4 @@ import { isValidElement } from "./utils/isValidReactElement.js";
94
94
  import { CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, localeStorageOptions, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer } from "./utils/localeStorage.js";
95
95
  import { YamlRecord, YamlValue, parseYaml } from "./utils/parseYaml.js";
96
96
  import { stringifyYaml } from "./utils/stringifyYaml.js";
97
- export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, BlockQuoteNode, BoldTextNode, BreakLineNode, BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, COMPOSITE_ID_SEPARATOR, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CUSTOM_COMPONENT_R, CachedIntl, CachedIntl as Intl, CodeBlockNode, CodeFencedNode, CodeInlineNode, CompileOptions, ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, CustomComponentNode, DO_NOT_PROCESS_HTML_ELEMENTS, DURATION_DELAY_TRIGGER, DateTimePreset, DeepTransformContent, DotPath, DynamicDictionaryLoader, ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, EscapedTextNode, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, FileContent, FileContentConstructor, FootnoteNode, FootnoteReferenceNode, GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, GenerateSitemapOptions, GetNestingResult, GetPrefixOptions, GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTMLCommentNode, HTMLContent, HTMLContentConstructor, HTMLNode, HTMLSelfClosingNode, HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_BLOCK_ELEMENT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_TAGS, HeadingNode, HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LIST_LOOKBEHIND_R, LOOKAHEAD, LinkAngleBraceNode, LinkBareURLNode, LinkNode, ListType, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, MarkdownContext, MarkdownOptions, MarkdownRuntime, HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, MarkedTextNode, MessageFormatDialect, MessageValues, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedParser, NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, OrderedListNode, PARAGRAPH_R, ParagraphNode, ParseState, ParsedMarkdown, Parser, ParserResult, Plugins, PluralCategory, PluralCond, PluralContent, PluralContentState, PortableObject, Priority, PriorityValue, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, ReferenceImageNode, ReferenceLinkNode, ReferenceNode, RenderRuleHook, Rule, RuleOutput, RuleType, RuleTypeValue, Rules, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SitemapUrlEntry, 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_PLAIN_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, TableNode, TableSeparatorNode, TaggedMessageToken, TextNode, 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, UnorderedListNode, VOID_HTML_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, YamlRecord, YamlValue, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createRenderer, currency, cx, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, fallbackPlugin, file, fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getDictionaryCompositeId, getDictionaryQualifierId, getDictionaryQualifierSegments, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getEditedContent, getEditedDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getHTML, getHTMLTextDir, getInsertionValues, getInternalPath, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPlural, getPrefix, getReplacedValuesContent, getRewritePath, getRewriteRules, getSplittedContent, getSplittedDictionaryContent, getTranslation, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizePath, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseDictionarySelector, parseInline, parseMarkdown, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseTaggedMessage, parseYaml, parserFor, percentage, plural, pluralPlugin, portableObjectToIntlayerFormatter, presets, qualifies, reconstructQualifiedEntry, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveMessage, resolveMessageNode, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, sanitizer, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, stringifyYaml, translation as t, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter };
97
+ export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, BlockQuoteNode, BoldTextNode, BreakLineNode, BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, COMPOSITE_ID_SEPARATOR, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CUSTOM_COMPONENT_R, CachedIntl, CachedIntl as Intl, CodeBlockNode, CodeFencedNode, CodeInlineNode, CompileOptions, ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, CustomComponentNode, DO_NOT_PROCESS_HTML_ELEMENTS, DURATION_DELAY_TRIGGER, DateTimePreset, DeepTransformContent, DotPath, DynamicDictionaryLoader, ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, EscapedTextNode, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, FileContent, FileContentConstructor, FootnoteNode, FootnoteReferenceNode, GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, GenerateSitemapOptions, GetNestingResult, GetPrefixOptions, GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTMLCommentNode, HTMLContent, HTMLContentConstructor, HTMLNode, HTMLSelfClosingNode, HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_BLOCK_ELEMENT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_TAGS, HeadingNode, HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LIST_LOOKBEHIND_R, LOOKAHEAD, LinkAngleBraceNode, LinkBareURLNode, LinkNode, ListType, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, MarkdownContext, MarkdownOptions, MarkdownRuntime, HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, MarkedTextNode, MessageFormatDialect, MessageValues, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedParser, NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, OrderedListNode, PARAGRAPH_R, ParagraphNode, ParseState, ParsedMarkdown, Parser, ParserResult, Plugins, PluralCategory, PluralCond, PluralContent, PluralContentState, PortableObject, Priority, PriorityValue, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, ReferenceImageNode, ReferenceLinkNode, ReferenceNode, RenderRuleHook, Rule, RuleOutput, RuleType, RuleTypeValue, Rules, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SitemapUrlEntry, 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_PLAIN_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, TableNode, TableSeparatorNode, TaggedMessageToken, TextNode, 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, UnorderedListNode, VOID_HTML_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, YamlRecord, YamlValue, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createRenderer, currency, cx, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, fallbackPlugin, file, fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getDictionaryCompositeId, getDictionaryQualifierId, getDictionaryQualifierSegments, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getEditedContent, getEditedDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getHTML, getHTMLTextDir, getInsertionValues, getInternalPath, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPlural, getPrefix, getReplacedValuesContent, getRewritePath, getRewriteRules, getSplittedContent, getSplittedDictionaryContent, getTranslation, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizePath, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseDictionarySelector, parseInline, parseMarkdown, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseTaggedMessage, parseYaml, parserFor, percentage, plural, pluralPlugin, portableObjectToIntlayerFormatter, presets, qualifies, reconstructQualifiedEntry, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveMessage, resolveMessageNode, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, sanitizer, serializeVariant, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, stringifyYaml, translation as t, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter };
@@ -6,14 +6,14 @@ import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer
6
6
  /**
7
7
  * Transforms a dictionary in a single pass, applying each plugin as needed.
8
8
  *
9
- * Also accepts a `QualifiedDictionaryGroup` (collections, variants, meta
10
- * records) together with a selector as second argument — the group is resolved
11
- * to a single entry (or an ordered array of entries for collections without an
12
- * `item` selector) before transformation.
9
+ * Also accepts a `QualifiedDictionaryGroup` (collections, variants) together
10
+ * with a selector as second argument — the group is resolved to a single entry
11
+ * (or an ordered array of entries for collections without an `item` selector)
12
+ * before transformation.
13
13
  *
14
14
  * @param dictionary The dictionary (or qualified dictionary group) to transform.
15
15
  * @param localeOrSelector The locale, or a selector object (`{ item }`,
16
- * `{ variant }`, `{ id, ...meta }`, optionally with `locale`).
16
+ * `{ variant }`, optionally with `locale`).
17
17
  * @param plugins An array of NodeTransformer that define how to transform recognized nodes.
18
18
  * If omitted, we’ll use a default set of plugins.
19
19
  */
@@ -10,7 +10,7 @@ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, ExtractSelec
10
10
  * The second argument is either a locale (`'fr'`) or a selector object:
11
11
  * - `{ item: 2 }` — collection item (omit `item` to get every item as array)
12
12
  * - `{ variant: 'black-friday' }` — named variant (omit for the `default` one)
13
- * - `{ id: 'prod_abc', ...metaFields }` — meta record
13
+ * - `{ variant: { id: 'prod_abc', userId: '123' } }` — structured variant
14
14
  * - `locale` can be combined with any selector: `{ item: 2, locale: 'fr' }`
15
15
  */
16
16
  declare const getIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelector = DeclaredLocales>(key: T, localeOrSelector?: A, plugins?: Plugins[]) => DeepTransformContent<DictionaryRegistryResult<T, A>, IInterpreterPluginState, ExtractSelectorLocale<A>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/core",
3
- "version": "9.0.0-canary.6",
3
+ "version": "9.0.0-canary.8",
4
4
  "private": false,
5
5
  "description": "Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.",
6
6
  "keywords": [
@@ -172,11 +172,11 @@
172
172
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
173
173
  },
174
174
  "dependencies": {
175
- "@intlayer/api": "9.0.0-canary.6",
176
- "@intlayer/config": "9.0.0-canary.6",
177
- "@intlayer/dictionaries-entry": "9.0.0-canary.6",
178
- "@intlayer/types": "9.0.0-canary.6",
179
- "@intlayer/unmerged-dictionaries-entry": "9.0.0-canary.6",
175
+ "@intlayer/api": "9.0.0-canary.8",
176
+ "@intlayer/config": "9.0.0-canary.8",
177
+ "@intlayer/dictionaries-entry": "9.0.0-canary.8",
178
+ "@intlayer/types": "9.0.0-canary.8",
179
+ "@intlayer/unmerged-dictionaries-entry": "9.0.0-canary.8",
180
180
  "defu": "6.1.7"
181
181
  },
182
182
  "devDependencies": {