@intlayer/core 9.6.0 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/formatters/compact.cjs +1 -2
- package/dist/cjs/formatters/compact.cjs.map +1 -1
- package/dist/cjs/formatters/currency.cjs +1 -2
- package/dist/cjs/formatters/currency.cjs.map +1 -1
- package/dist/cjs/formatters/date.cjs +1 -2
- package/dist/cjs/formatters/date.cjs.map +1 -1
- package/dist/cjs/formatters/list.cjs +1 -2
- package/dist/cjs/formatters/list.cjs.map +1 -1
- package/dist/cjs/formatters/number.cjs +1 -2
- package/dist/cjs/formatters/number.cjs.map +1 -1
- package/dist/cjs/formatters/percentage.cjs +1 -2
- package/dist/cjs/formatters/percentage.cjs.map +1 -1
- package/dist/cjs/formatters/relativeTime.cjs +1 -2
- package/dist/cjs/formatters/relativeTime.cjs.map +1 -1
- package/dist/cjs/formatters/units.cjs +1 -2
- package/dist/cjs/formatters/units.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/markdown/constants.cjs +5 -2
- package/dist/cjs/markdown/constants.cjs.map +1 -1
- package/dist/cjs/transpiler/index.cjs +1 -0
- package/dist/cjs/transpiler/plural/index.cjs +1 -0
- package/dist/cjs/transpiler/plural/plural.cjs +20 -1
- package/dist/cjs/transpiler/plural/plural.cjs.map +1 -1
- package/dist/cjs/utils/intl.cjs +2 -27
- package/dist/cjs/utils/intl.cjs.map +1 -1
- package/dist/esm/formatters/compact.mjs +1 -2
- package/dist/esm/formatters/compact.mjs.map +1 -1
- package/dist/esm/formatters/currency.mjs +1 -2
- package/dist/esm/formatters/currency.mjs.map +1 -1
- package/dist/esm/formatters/date.mjs +1 -2
- package/dist/esm/formatters/date.mjs.map +1 -1
- package/dist/esm/formatters/list.mjs +1 -2
- package/dist/esm/formatters/list.mjs.map +1 -1
- package/dist/esm/formatters/number.mjs +1 -2
- package/dist/esm/formatters/number.mjs.map +1 -1
- package/dist/esm/formatters/percentage.mjs +1 -2
- package/dist/esm/formatters/percentage.mjs.map +1 -1
- package/dist/esm/formatters/relativeTime.mjs +1 -2
- package/dist/esm/formatters/relativeTime.mjs.map +1 -1
- package/dist/esm/formatters/units.mjs +1 -2
- package/dist/esm/formatters/units.mjs.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/markdown/constants.mjs +5 -2
- package/dist/esm/markdown/constants.mjs.map +1 -1
- package/dist/esm/transpiler/index.mjs +2 -2
- package/dist/esm/transpiler/plural/index.mjs +2 -2
- package/dist/esm/transpiler/plural/plural.mjs +20 -2
- package/dist/esm/transpiler/plural/plural.mjs.map +1 -1
- package/dist/esm/utils/intl.mjs +2 -27
- package/dist/esm/utils/intl.mjs.map +1 -1
- package/dist/types/formatters/compact.d.ts.map +1 -1
- package/dist/types/formatters/currency.d.ts.map +1 -1
- package/dist/types/formatters/date.d.ts.map +1 -1
- package/dist/types/formatters/list.d.ts.map +1 -1
- package/dist/types/formatters/number.d.ts.map +1 -1
- package/dist/types/formatters/percentage.d.ts.map +1 -1
- package/dist/types/formatters/relativeTime.d.ts.map +1 -1
- package/dist/types/formatters/units.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/markdown/constants.d.ts +4 -1
- package/dist/types/markdown/constants.d.ts.map +1 -1
- package/dist/types/transpiler/index.d.ts +2 -2
- package/dist/types/transpiler/plural/index.d.ts +2 -2
- package/dist/types/transpiler/plural/plural.d.ts +31 -2
- package/dist/types/transpiler/plural/plural.d.ts.map +1 -1
- package/dist/types/utils/intl.d.ts +1 -1
- package/dist/types/utils/intl.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/types/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { getMarkdownMetadata } from "./transpiler/markdown/getMarkdownMetadata.j
|
|
|
12
12
|
import { MarkdownContent, MarkdownContentConstructor, md as markdown } from "./transpiler/markdown/markdown.js";
|
|
13
13
|
import { MarkdownValidationResult, validateMarkdown } from "./transpiler/markdown/validateMarkdown.js";
|
|
14
14
|
import { DotPath, NestedContent, NestedContentState, ValidDotPathsFor, nest as nesting } from "./transpiler/nesting/nesting.js";
|
|
15
|
-
import { PluralCategory, PluralContent, PluralContentState, plural } from "./transpiler/plural/plural.js";
|
|
15
|
+
import { DEFAULT_PLURAL_VARIABLE, PluralCategory, PluralContent, PluralContentState, PluralOptions, plural } from "./transpiler/plural/plural.js";
|
|
16
16
|
import { SelectContent, SelectContentStates, select } from "./transpiler/select/select.js";
|
|
17
17
|
import { TranslationContent, t as translation } from "./transpiler/translation/translation.js";
|
|
18
18
|
import "./transpiler/index.js";
|
|
@@ -126,4 +126,4 @@ import { CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorag
|
|
|
126
126
|
import { YamlRecord, YamlValue, parseYaml } from "./utils/parseYaml.js";
|
|
127
127
|
import { stringifyYaml } from "./utils/stringifyYaml.js";
|
|
128
128
|
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, type CompileOptions, type ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, type CustomComponentNode, 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, 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, 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, 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, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createMessageResolver, createRenderer, currency, cx, date, deepTransformNode, 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, getReplacedValuesContent, getRewritePath, getRewriteRules, getRuleSet, getSelect, getSplittedContent, getSplittedDictionaryContent, getTranslation, getVariantIds, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isDeclaredLocale, isInterpolableWrapperNode, isLocaleExclusiveOnDomain, isProxyStorageLocaleEnabled, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, navigatePath, 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, readTransformCache, rebuildInterpolableContent, reconstructQualifiedEntry, registerAmbientLocaleResolver, registerAsyncAmbientLocaleResolver, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveBrowserLocale, resolveDictionaryArgument, resolveEffectiveVariantId, resolveInsertedSelector, resolveInterpreterLocale, resolveInterpreterLocaleAsync, resolveLocalizedPath, resolveMessage, resolveMessageNode, resolveMessageNodeToString, resolvePlainDynamicLoader, resolveProviderVariant, resolveProxyMode, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, sanitizer, select, selectPlugin, 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 };
|
|
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, 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, 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, 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, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createMessageResolver, createRenderer, currency, cx, date, deepTransformNode, 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, getReplacedValuesContent, getRewritePath, getRewriteRules, getRuleSet, getSelect, getSplittedContent, getSplittedDictionaryContent, getTranslation, getVariantIds, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isDeclaredLocale, isInterpolableWrapperNode, isLocaleExclusiveOnDomain, isProxyStorageLocaleEnabled, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, navigatePath, 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, readTransformCache, rebuildInterpolableContent, reconstructQualifiedEntry, registerAmbientLocaleResolver, registerAsyncAmbientLocaleResolver, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveBrowserLocale, resolveDictionaryArgument, resolveEffectiveVariantId, resolveInsertedSelector, resolveInterpreterLocale, resolveInterpreterLocaleAsync, resolveLocalizedPath, resolveMessage, resolveMessageNode, resolveMessageNodeToString, resolvePlainDynamicLoader, resolveProviderVariant, resolveProxyMode, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, sanitizer, select, selectPlugin, 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 };
|
|
@@ -90,7 +90,10 @@ export declare const NAMED_CODES_TO_UNICODE: Record<string, string>;
|
|
|
90
90
|
export declare const DO_NOT_PROCESS_HTML_ELEMENTS: string[];
|
|
91
91
|
/** Attributes that require URL sanitization */
|
|
92
92
|
export declare const ATTRIBUTES_TO_SANITIZE: string[];
|
|
93
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Attribute extractor regex. Values may be double/single quoted, `{…}`
|
|
95
|
+
* expressions, or unquoted `[…]` arrays (`codeFormat=["typescript", "esm"]`).
|
|
96
|
+
*/
|
|
94
97
|
export declare const ATTR_EXTRACTOR_R: RegExp;
|
|
95
98
|
/** First character of a valid attribute name (a letter, `_` or `:`). */
|
|
96
99
|
export declare const ATTRIBUTE_NAME_START_R: RegExp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/markdown/constants.ts"],"mappings":";;;;;qBAQa;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;YAUU,wBAAwB,uBAAuB;;;;qBAS9C;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;YAGU,wBAAwB,uBAAuB;;;;;;;;qBAa9C;WACX;WACA;WACA;;qBAGW;qBACA;qBACA;YAED,yBACA,wBAAwB;;;;;qBAavB,4BAA4B;;;;qBAsD5B,wBAAwB;;qBAcxB;;qBAGA
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/markdown/constants.ts"],"mappings":";;;;;qBAQa;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;YAUU,wBAAwB,uBAAuB;;;;qBAS9C;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;YAGU,wBAAwB,uBAAuB;;;;;;;;qBAa9C;WACX;WACA;WACA;;qBAGW;qBACA;qBACA;YAED,yBACA,wBAAwB;;;;;qBAavB,4BAA4B;;;;qBAsD5B,wBAAwB;;qBAcxB;;qBAGA;;;;;qBAiBA,kBAAgB;;qBAIhB,wBAAsB;;qBAGtB,aAAW;;qBAGX,cAAY;qBACZ,kCAAgC;qBAChC,oBAAkB;;qBAGlB,cAAY;qBACZ,kBAAgB;;qBAOhB,qBAAmB;qBAEnB,cAAY;;qBAEZ,mBAAiB;qBACjB,eAAa;;qBAGb,uBAAqB;qBACrB,cAAY;;qBAGZ,YAAU;qBACV,sBAAoB;;qBAGpB,YAAU;;qBAGV,gBAAc;;qBAGd,YAAU;;qBAGV,WAAS;qBACT,yBAAuB;qBAEvB,kBAAgB;;qBAIhB,kBAAgB;qBAEhB,gBAAc;qBACd,oBAAkB;;qBAGlB,iBAAe;;qBAGf,0BAAwB;qBACxB,iBAAe;qBACf,6BAA2B;;;;;;;;;qBAU3B,YAAU;qBAEV,kBAAgB;qBAChB,oBAAkB;qBAClB,kBAAgB;qBAChB,mBAAiB;;qBAGjB,aAAW;;qBAGX,yBAAuB;qBAEvB,mBAAiB;qBACjB,kBAAgB;;qBAGhB,0BAAwB;;qBAGxB,OAAK;qBACL,wBAAsB;qBACtB,yBAAuB;;qBAGvB;qBACA;;qBAGA,gBAAc;qBACd,YAAU;;qBAGV,aAAW;YAMZ;qBACC,SAAS;qBACT,WAAW;;;;;qBAUX,YAAS;;;;;qBAOT;;qBAIA,aAAW;;qBAKX,mBAAiB;;qBAKjB,eAAa;;qBAKb,wBAAsB;qBAQtB,yBAAsB,MAAU;qBAQhC;qBACA;qBAEA,8BAA2B,MAAU,aAAW;qBAOhD,4BAA0B;qBAC1B,8BAA4B;qBAG5B,wBAAqB,MAAU,aAAW;qBAc1C,qBAAmB;qBACnB,uBAAqB;qBAErB,oBAAiB,MAAU,aAAW;qBA4BtC,gBAAc;qBACd,kBAAgB"}
|
|
@@ -19,10 +19,10 @@ import { MarkdownValidationResult, validateMarkdown } from "./markdown/validateM
|
|
|
19
19
|
import "./markdown/index.js";
|
|
20
20
|
import { DotPath, NestedContent, NestedContentState, ValidDotPathsFor, nest as nesting } from "./nesting/nesting.js";
|
|
21
21
|
import "./nesting/index.js";
|
|
22
|
-
import { PluralCategory, PluralContent, PluralContentState, plural } from "./plural/plural.js";
|
|
22
|
+
import { DEFAULT_PLURAL_VARIABLE, PluralCategory, PluralContent, PluralContentState, PluralOptions, plural } from "./plural/plural.js";
|
|
23
23
|
import "./plural/index.js";
|
|
24
24
|
import { SelectContent, SelectContentStates, select } from "./select/select.js";
|
|
25
25
|
import "./select/index.js";
|
|
26
26
|
import { TranslationContent, t as translation } from "./translation/translation.js";
|
|
27
27
|
import "./translation/index.js";
|
|
28
|
-
export { ConditionContent, ConditionContentStates, DotPath, EnterFormat, EnumerationContent, EnumerationContentState, type FileContent, type FileContentConstructor, Gender, GenderContent, GenderContentStates, HTMLContent, HTMLContentConstructor, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_TAGS, InsertionContent, InsertionContentConstructor, MarkdownContent, MarkdownContentConstructor, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, NestedContent, NestedContentState, PluralCategory, PluralContent, PluralContentState, SelectContent, SelectContentStates, TranslationContent, VOID_HTML_ELEMENTS, ValidDotPathsFor, condition as cond, enumeration as enu, type file, type fileContent, gender, getInsertionValues, getMarkdownMetadata, html, insertion as insert, markdown as md, nesting as nest, plural, select, translation as t, validateHTML, validateMarkdown };
|
|
28
|
+
export { ConditionContent, ConditionContentStates, DEFAULT_PLURAL_VARIABLE, DotPath, EnterFormat, EnumerationContent, EnumerationContentState, type FileContent, type FileContentConstructor, Gender, GenderContent, GenderContentStates, HTMLContent, HTMLContentConstructor, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_TAGS, InsertionContent, InsertionContentConstructor, MarkdownContent, MarkdownContentConstructor, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, NestedContent, NestedContentState, PluralCategory, PluralContent, PluralContentState, PluralOptions, SelectContent, SelectContentStates, TranslationContent, VOID_HTML_ELEMENTS, ValidDotPathsFor, condition as cond, enumeration as enu, type file, type fileContent, gender, getInsertionValues, getMarkdownMetadata, html, insertion as insert, markdown as md, nesting as nest, plural, select, translation as t, validateHTML, validateMarkdown };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluralCategory, PluralContent, PluralContentState, plural } from "./plural.js";
|
|
2
|
-
export { PluralCategory, PluralContent, PluralContentState, plural };
|
|
1
|
+
import { DEFAULT_PLURAL_VARIABLE, PluralCategory, PluralContent, PluralContentState, PluralOptions, plural } from "./plural.js";
|
|
2
|
+
export { DEFAULT_PLURAL_VARIABLE, PluralCategory, PluralContent, PluralContentState, PluralOptions, plural };
|
|
@@ -4,7 +4,20 @@ export type PluralCategory = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';
|
|
|
4
4
|
export type PluralContentState<Content> = Partial<Record<PluralCategory, Content>> & {
|
|
5
5
|
other: Content;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
/** Name of the value a plural selects on when no `variable` is declared. */
|
|
8
|
+
export declare const DEFAULT_PLURAL_VARIABLE = "count";
|
|
9
|
+
export type PluralOptions<Variable extends string = string> = {
|
|
10
|
+
/**
|
|
11
|
+
* Name of the value the plural category is selected on.
|
|
12
|
+
*
|
|
13
|
+
* Defaults to `count`. Set it to nest plurals over independent quantities:
|
|
14
|
+
* the resolved function then takes `{ [variable]: number, … }`.
|
|
15
|
+
*/
|
|
16
|
+
variable?: Variable;
|
|
17
|
+
};
|
|
18
|
+
export type PluralContent<Content = unknown, Variable extends string = typeof DEFAULT_PLURAL_VARIABLE> = TypedNodeModel<typeof PLURAL, PluralContentState<Content>, {
|
|
19
|
+
variable?: Variable;
|
|
20
|
+
}>;
|
|
8
21
|
/**
|
|
9
22
|
* Function intended to be used to build intlayer dictionaries.
|
|
10
23
|
*
|
|
@@ -27,8 +40,24 @@ export type PluralContent<Content = unknown> = TypedNodeModel<typeof PLURAL, Plu
|
|
|
27
40
|
* other: '{{count}} вакансий',
|
|
28
41
|
* });
|
|
29
42
|
* ```
|
|
43
|
+
*
|
|
44
|
+
* Nest plurals declaring a `variable` to select on several quantities:
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* plural(
|
|
48
|
+
* {
|
|
49
|
+
* one: plural(
|
|
50
|
+
* { one: '{{files}} file in {{folders}} folder', other: '…' },
|
|
51
|
+
* { variable: 'folders' }
|
|
52
|
+
* ),
|
|
53
|
+
* other: plural({ … }, { variable: 'folders' }),
|
|
54
|
+
* },
|
|
55
|
+
* { variable: 'files' }
|
|
56
|
+
* );
|
|
57
|
+
* // content.filesInFolders({ files: 1, folders: 2 })
|
|
58
|
+
* ```
|
|
30
59
|
*/
|
|
31
|
-
declare const plural: <Content = unknown>(content: PluralContentState<Content>) => PluralContent<Content>;
|
|
60
|
+
declare const plural: <Content = unknown, const Variable extends string = typeof DEFAULT_PLURAL_VARIABLE>(content: PluralContentState<Content>, options?: PluralOptions<Variable>) => PluralContent<Content, Variable>;
|
|
32
61
|
//#endregion
|
|
33
62
|
export { plural };
|
|
34
63
|
//# sourceMappingURL=plural.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plural.d.ts","names":[],"sources":["../../../../src/transpiler/plural/plural.ts"],"mappings":";;YAGY;YAEA,mBAAmB,WAAW,QACxC,OAAO,gBAAgB;EAEvB,OAAO
|
|
1
|
+
{"version":3,"file":"plural.d.ts","names":[],"sources":["../../../../src/transpiler/plural/plural.ts"],"mappings":";;YAGY;YAEA,mBAAmB,WAAW,QACxC,OAAO,gBAAgB;EAEvB,OAAO;;;qBAII;YAED,cAAc;;;;;;;EAOxB,WAAW;;YAGD,cACV,mBACA,iCAAiC,2BAC/B,sBACK,QACP,mBAAmB;EACjB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0CT,SACJ,yBACM,iCAAiC,yBAAuB,SAErD,mBAAmB,UAAQ,UAC1B,cAAc,cACvB,cAAc,SAAS"}
|
|
@@ -74,7 +74,7 @@ export declare function getCachedIntl<T extends new (...args: any[]) => any>(Cto
|
|
|
74
74
|
* Optional: Keep bindIntl if your library exports it publicly.
|
|
75
75
|
* It now uses the much smaller getCachedIntl under the hood.
|
|
76
76
|
*/
|
|
77
|
-
export declare const bindIntl: (boundLocale
|
|
77
|
+
export declare const bindIntl: (boundLocale?: LocalesValues) => WrappedIntl;
|
|
78
78
|
export declare const CachedIntl: any;
|
|
79
79
|
//#endregion
|
|
80
80
|
export { CachedIntl as Intl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl.d.ts","names":[],"sources":["../../../src/utils/intl.ts"],"mappings":";;;;;;KAoCK;EACH,OAAO,MAAM;EACb,cACE,MAAM;IACH;IAA6B;;;;;;;KAO/B;EACH,QAAQ,gBAAgB;IAAW;IAAiB;;;;;;KAMjD;EACH,UAAU,KAAK;EACf,gBAAgB,KAAK;EACrB,cAAc,KAAK;EACnB,YAAY;EACZ,QAAQ,KAAK;EACb,cAAc,KAAK;EACnB,aAAa,KAAK;EAClB,oBAAoB,KAAK;EACzB,WAAW;;;;;YAMD,4BAA4B;KAiGnC,sBACF,kBAAkB,gBAAgB,MAAM,oBACpC,qBAED,oBACgB,MAAM;KAGvB,+BAA+B,KAAK,gBACvC,cACA,gBAAgB,kBACP;OAEA,UAAU,eAAe,UAAU,UAAU;OAC7C,UAAU;IAAY,SAAS;MAAkB;GACrD,UAAU,eAAe,UAAU,UAAU;GAC7C,UAAU;IAAY,SAAS;MAAkB;IAEpD,gBACI,uBACS;OAEJ,UAAU,gBAAgB;OAC1B;IAAY,SAAS;MAAkB;GAC3C,UAAU,gBAAgB;GAC1B;IAAY,SAAS;MAAkB;IAE1C;YAEM,iBACT,kBAAkB,OAAO,gBAAgB,mBACtC,uCAAuC,MAAM,cACrC,MAAM;;;;;;;;;wBAWJ,cAAc,aAAa,qBACzC,iBAAiB,MACjB,SAAS,wBACT,gBACC,mBAAmB;wBACN,cAAc,kBAAkB,qBAC9C,MAAM,GACN,SAAS,wBACT,gBACC,aAAa;;;;;
|
|
1
|
+
{"version":3,"file":"intl.d.ts","names":[],"sources":["../../../src/utils/intl.ts"],"mappings":";;;;;;KAoCK;EACH,OAAO,MAAM;EACb,cACE,MAAM;IACH;IAA6B;;;;;;;KAO/B;EACH,QAAQ,gBAAgB;IAAW;IAAiB;;;;;;KAMjD;EACH,UAAU,KAAK;EACf,gBAAgB,KAAK;EACrB,cAAc,KAAK;EACnB,YAAY;EACZ,QAAQ,KAAK;EACb,cAAc,KAAK;EACnB,aAAa,KAAK;EAClB,oBAAoB,KAAK;EACzB,WAAW;;;;;YAMD,4BAA4B;KAiGnC,sBACF,kBAAkB,gBAAgB,MAAM,oBACpC,qBAED,oBACgB,MAAM;KAGvB,+BAA+B,KAAK,gBACvC,cACA,gBAAgB,kBACP;OAEA,UAAU,eAAe,UAAU,UAAU;OAC7C,UAAU;IAAY,SAAS;MAAkB;GACrD,UAAU,eAAe,UAAU,UAAU;GAC7C,UAAU;IAAY,SAAS;MAAkB;IAEpD,gBACI,uBACS;OAEJ,UAAU,gBAAgB;OAC1B;IAAY,SAAS;MAAkB;GAC3C,UAAU,gBAAgB;GAC1B;IAAY,SAAS;MAAkB;IAE1C;YAEM,iBACT,kBAAkB,OAAO,gBAAgB,mBACtC,uCAAuC,MAAM,cACrC,MAAM;;;;;;;;;wBAWJ,cAAc,aAAa,qBACzC,iBAAiB,MACjB,SAAS,wBACT,gBACC,mBAAmB;wBACN,cAAc,kBAAkB,qBAC9C,MAAM,GACN,SAAS,wBACT,gBACC,aAAa;;;;;qBAiDH,WAAQ,cAAkB,kBAAgB;qBA+B1C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/core",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.",
|
|
6
6
|
"keywords": [
|
|
@@ -173,14 +173,14 @@
|
|
|
173
173
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
174
174
|
},
|
|
175
175
|
"dependencies": {
|
|
176
|
-
"@intlayer/api": "9.
|
|
176
|
+
"@intlayer/api": "9.7.0",
|
|
177
177
|
"@intlayer/config": "9.6.0",
|
|
178
178
|
"@intlayer/dictionaries-entry": "9.6.0",
|
|
179
|
-
"@intlayer/types": "9.
|
|
179
|
+
"@intlayer/types": "9.7.0",
|
|
180
180
|
"defu": "6.1.7"
|
|
181
181
|
},
|
|
182
182
|
"devDependencies": {
|
|
183
|
-
"@types/node": "^
|
|
183
|
+
"@types/node": "^26",
|
|
184
184
|
"@utils/ts-config": "1.0.4",
|
|
185
185
|
"@utils/ts-config-types": "1.0.4",
|
|
186
186
|
"@utils/tsdown-config": "1.0.4",
|