@intlayer/core 8.4.9 → 8.4.10
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/transpiler/condition/condition.cjs.map +1 -1
- package/dist/cjs/transpiler/enumeration/enumeration.cjs.map +1 -1
- package/dist/cjs/transpiler/gender/gender.cjs.map +1 -1
- package/dist/cjs/transpiler/translation/translation.cjs.map +1 -1
- package/dist/esm/transpiler/condition/condition.mjs.map +1 -1
- package/dist/esm/transpiler/enumeration/enumeration.mjs.map +1 -1
- package/dist/esm/transpiler/gender/gender.mjs.map +1 -1
- package/dist/esm/transpiler/translation/translation.mjs.map +1 -1
- package/dist/types/transpiler/condition/condition.d.ts +1 -1
- package/dist/types/transpiler/condition/condition.d.ts.map +1 -1
- package/dist/types/transpiler/enumeration/enumeration.d.ts +1 -1
- package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
- package/dist/types/transpiler/gender/gender.d.ts +1 -1
- package/dist/types/transpiler/gender/gender.d.ts.map +1 -1
- package/dist/types/transpiler/translation/translation.d.ts +1 -5
- package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.cjs","names":["CONDITION"],"sources":["../../../../src/transpiler/condition/condition.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { CONDITION, formatNodeType } from '@intlayer/types/nodeType';\n\nexport type ConditionContentStates<Content> = Record<`${boolean}`, Content> & {\n fallback?: Content;\n};\n\nexport type ConditionContent<Content = unknown> = TypedNodeModel<\n typeof CONDITION,\n ConditionContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a condition.\n *\n * Usage:\n *\n * ```ts\n * cond({\n * 'true': 'The condition is validated',\n * 'false': 'The condition is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst condition = <Content>(content?: ConditionContentStates<Content
|
|
1
|
+
{"version":3,"file":"condition.cjs","names":["CONDITION"],"sources":["../../../../src/transpiler/condition/condition.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { CONDITION, formatNodeType } from '@intlayer/types/nodeType';\n\nexport type ConditionContentStates<Content> = Record<`${boolean}`, Content> & {\n fallback?: Content;\n};\n\nexport type ConditionContent<Content = unknown> = TypedNodeModel<\n typeof CONDITION,\n ConditionContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a condition.\n *\n * Usage:\n *\n * ```ts\n * cond({\n * 'true': 'The condition is validated',\n * 'false': 'The condition is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst condition = <Content>(\n content?: ConditionContentStates<Content>\n): ConditionContent<Content> => formatNodeType(CONDITION, content);\n\nexport { condition as cond };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,aACJ,yDAC6CA,oCAAW,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumeration.cjs","names":["ENUMERATION"],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { ENUMERATION, formatNodeType } from '@intlayer/types/nodeType';\n\ntype Positive = number | `${number}`;\ntype Negative = `-${number}`;\ntype Numbers = Positive | Negative;\n\ntype Equal = Numbers;\ntype EqualString = `=${Numbers}`;\ntype Superior = `>${Numbers}`;\ntype SuperiorOrEqual = `>=${Numbers}`;\ntype Inferior = `<${Numbers}`;\ntype InferiorOrEqual = `<=${Numbers}`;\n\nexport type EnterFormat =\n | Equal\n | EqualString\n | Superior\n | SuperiorOrEqual\n | Inferior\n | InferiorOrEqual;\n\nexport type EnumerationContentState<Content> = Partial<\n Record<EnterFormat, Content>\n> & {\n fallback?: Content;\n};\n\nexport type EnumerationContent<Content = unknown> = TypedNodeModel<\n typeof ENUMERATION,\n EnumerationContentState<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a quantity.\n *\n * Usage:\n *\n * ```ts\n * enu({\n * '<=-2.3': 'You have less than -2.3',\n * '<1': 'You have less than one',\n * '2': 'You have two',\n * '>=3': 'You have three or more',\n * });\n * ```\n *\n * > The order of the keys will define the priority of the content.\n *\n */\nconst enumeration = <Content = unknown>(\n content?: EnumerationContentState<Content>\n) => formatNodeType(ENUMERATION, content);\n\nexport { enumeration as enu };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,eACJ,
|
|
1
|
+
{"version":3,"file":"enumeration.cjs","names":["ENUMERATION"],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { ENUMERATION, formatNodeType } from '@intlayer/types/nodeType';\n\ntype Positive = number | `${number}`;\ntype Negative = `-${number}`;\ntype Numbers = Positive | Negative;\n\ntype Equal = Numbers;\ntype EqualString = `=${Numbers}`;\ntype Superior = `>${Numbers}`;\ntype SuperiorOrEqual = `>=${Numbers}`;\ntype Inferior = `<${Numbers}`;\ntype InferiorOrEqual = `<=${Numbers}`;\n\nexport type EnterFormat =\n | Equal\n | EqualString\n | Superior\n | SuperiorOrEqual\n | Inferior\n | InferiorOrEqual;\n\nexport type EnumerationContentState<Content> = Partial<\n Record<EnterFormat, Content>\n> & {\n fallback?: Content;\n};\n\nexport type EnumerationContent<Content = unknown> = TypedNodeModel<\n typeof ENUMERATION,\n EnumerationContentState<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a quantity.\n *\n * Usage:\n *\n * ```ts\n * enu({\n * '<=-2.3': 'You have less than -2.3',\n * '<1': 'You have less than one',\n * '2': 'You have two',\n * '>=3': 'You have three or more',\n * });\n * ```\n *\n * > The order of the keys will define the priority of the content.\n *\n */\nconst enumeration = <Content = unknown>(\n content?: EnumerationContentState<Content>\n): EnumerationContent<Content> => formatNodeType(ENUMERATION, content);\n\nexport { enumeration as enu };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,eACJ,yDAC+CA,sCAAa,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gender.cjs","names":["GENDER"],"sources":["../../../../src/transpiler/gender/gender.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, GENDER } from '@intlayer/types/nodeType';\n\nexport type Gender = 'male' | 'female' | 'fallback';\n\nexport type GenderContentStates<Content> = Record<`${Gender}`, Content> & {\n fallback?: Content;\n};\n\nexport type GenderContent<Content = unknown> = TypedNodeModel<\n typeof GENDER,\n GenderContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a gender.\n *\n * Usage:\n *\n * ```ts\n * gender({\n * 'true': 'The gender is validated',\n * 'false': 'The gender is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst gender = <Content>(content?: GenderContentStates<Content
|
|
1
|
+
{"version":3,"file":"gender.cjs","names":["GENDER"],"sources":["../../../../src/transpiler/gender/gender.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, GENDER } from '@intlayer/types/nodeType';\n\nexport type Gender = 'male' | 'female' | 'fallback';\n\nexport type GenderContentStates<Content> = Record<`${Gender}`, Content> & {\n fallback?: Content;\n};\n\nexport type GenderContent<Content = unknown> = TypedNodeModel<\n typeof GENDER,\n GenderContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a gender.\n *\n * Usage:\n *\n * ```ts\n * gender({\n * 'true': 'The gender is validated',\n * 'false': 'The gender is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst gender = <Content>(\n content?: GenderContentStates<Content>\n): GenderContent<Content> => formatNodeType(GENDER, content);\n\nexport { gender };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,UACJ,yDAC0CA,iCAAQ,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.cjs","names":["TRANSLATION"],"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":["import type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\nimport type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, TRANSLATION } from '@intlayer/types/nodeType';\n\nexport type TranslationContent<\n Content = unknown,\n RecordContent extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n> = TypedNodeModel<typeof TRANSLATION, RecordContent>;\n\n/**\n *\n * Function intended to be used to build intlayer dictionaries.\n *\n * Get the content of a translation based on the locale.\n *\n * Usage:\n *\n * ```ts\n * translation<string>({\n * \"en\": \"Hello\",\n * \"fr\": \"Bonjour\",\n * // ... any other available locale\n * })\n * ```\n *\n * Using TypeScript:\n * - this function require each locale to be defined if defined in the project configuration.\n * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.\n */\nconst translation = <\n Content = unknown,\n ContentRecord extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n>(\n content: ContentRecord\n) =>\n formatNodeType(TRANSLATION, content) satisfies TranslationContent<\n Content,\n ContentRecord\n >;\n\nexport { translation as t };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,eAKJ,yDAEeA,sCAAa,QAAQ"}
|
|
1
|
+
{"version":3,"file":"translation.cjs","names":["TRANSLATION"],"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":["import type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\nimport type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, TRANSLATION } from '@intlayer/types/nodeType';\n\nexport type TranslationContent<\n Content = unknown,\n RecordContent extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n> = TypedNodeModel<typeof TRANSLATION, RecordContent>;\n\n/**\n *\n * Function intended to be used to build intlayer dictionaries.\n *\n * Get the content of a translation based on the locale.\n *\n * Usage:\n *\n * ```ts\n * translation<string>({\n * \"en\": \"Hello\",\n * \"fr\": \"Bonjour\",\n * // ... any other available locale\n * })\n * ```\n *\n * Using TypeScript:\n * - this function require each locale to be defined if defined in the project configuration.\n * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.\n */\nconst translation = <\n Content = unknown,\n ContentRecord extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n>(\n content: ContentRecord\n): TranslationContent<Content, ContentRecord> =>\n formatNodeType(TRANSLATION, content) satisfies TranslationContent<\n Content,\n ContentRecord\n >;\n\nexport { translation as t };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,eAKJ,yDAEeA,sCAAa,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.mjs","names":[],"sources":["../../../../src/transpiler/condition/condition.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { CONDITION, formatNodeType } from '@intlayer/types/nodeType';\n\nexport type ConditionContentStates<Content> = Record<`${boolean}`, Content> & {\n fallback?: Content;\n};\n\nexport type ConditionContent<Content = unknown> = TypedNodeModel<\n typeof CONDITION,\n ConditionContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a condition.\n *\n * Usage:\n *\n * ```ts\n * cond({\n * 'true': 'The condition is validated',\n * 'false': 'The condition is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst condition = <Content>(content?: ConditionContentStates<Content
|
|
1
|
+
{"version":3,"file":"condition.mjs","names":[],"sources":["../../../../src/transpiler/condition/condition.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { CONDITION, formatNodeType } from '@intlayer/types/nodeType';\n\nexport type ConditionContentStates<Content> = Record<`${boolean}`, Content> & {\n fallback?: Content;\n};\n\nexport type ConditionContent<Content = unknown> = TypedNodeModel<\n typeof CONDITION,\n ConditionContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a condition.\n *\n * Usage:\n *\n * ```ts\n * cond({\n * 'true': 'The condition is validated',\n * 'false': 'The condition is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst condition = <Content>(\n content?: ConditionContentStates<Content>\n): ConditionContent<Content> => formatNodeType(CONDITION, content);\n\nexport { condition as cond };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,aACJ,YAC8B,eAAe,WAAW,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumeration.mjs","names":[],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { ENUMERATION, formatNodeType } from '@intlayer/types/nodeType';\n\ntype Positive = number | `${number}`;\ntype Negative = `-${number}`;\ntype Numbers = Positive | Negative;\n\ntype Equal = Numbers;\ntype EqualString = `=${Numbers}`;\ntype Superior = `>${Numbers}`;\ntype SuperiorOrEqual = `>=${Numbers}`;\ntype Inferior = `<${Numbers}`;\ntype InferiorOrEqual = `<=${Numbers}`;\n\nexport type EnterFormat =\n | Equal\n | EqualString\n | Superior\n | SuperiorOrEqual\n | Inferior\n | InferiorOrEqual;\n\nexport type EnumerationContentState<Content> = Partial<\n Record<EnterFormat, Content>\n> & {\n fallback?: Content;\n};\n\nexport type EnumerationContent<Content = unknown> = TypedNodeModel<\n typeof ENUMERATION,\n EnumerationContentState<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a quantity.\n *\n * Usage:\n *\n * ```ts\n * enu({\n * '<=-2.3': 'You have less than -2.3',\n * '<1': 'You have less than one',\n * '2': 'You have two',\n * '>=3': 'You have three or more',\n * });\n * ```\n *\n * > The order of the keys will define the priority of the content.\n *\n */\nconst enumeration = <Content = unknown>(\n content?: EnumerationContentState<Content>\n) => formatNodeType(ENUMERATION, content);\n\nexport { enumeration as enu };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,eACJ,
|
|
1
|
+
{"version":3,"file":"enumeration.mjs","names":[],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { ENUMERATION, formatNodeType } from '@intlayer/types/nodeType';\n\ntype Positive = number | `${number}`;\ntype Negative = `-${number}`;\ntype Numbers = Positive | Negative;\n\ntype Equal = Numbers;\ntype EqualString = `=${Numbers}`;\ntype Superior = `>${Numbers}`;\ntype SuperiorOrEqual = `>=${Numbers}`;\ntype Inferior = `<${Numbers}`;\ntype InferiorOrEqual = `<=${Numbers}`;\n\nexport type EnterFormat =\n | Equal\n | EqualString\n | Superior\n | SuperiorOrEqual\n | Inferior\n | InferiorOrEqual;\n\nexport type EnumerationContentState<Content> = Partial<\n Record<EnterFormat, Content>\n> & {\n fallback?: Content;\n};\n\nexport type EnumerationContent<Content = unknown> = TypedNodeModel<\n typeof ENUMERATION,\n EnumerationContentState<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a quantity.\n *\n * Usage:\n *\n * ```ts\n * enu({\n * '<=-2.3': 'You have less than -2.3',\n * '<1': 'You have less than one',\n * '2': 'You have two',\n * '>=3': 'You have three or more',\n * });\n * ```\n *\n * > The order of the keys will define the priority of the content.\n *\n */\nconst enumeration = <Content = unknown>(\n content?: EnumerationContentState<Content>\n): EnumerationContent<Content> => formatNodeType(ENUMERATION, content);\n\nexport { enumeration as enu };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,eACJ,YACgC,eAAe,aAAa,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gender.mjs","names":[],"sources":["../../../../src/transpiler/gender/gender.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, GENDER } from '@intlayer/types/nodeType';\n\nexport type Gender = 'male' | 'female' | 'fallback';\n\nexport type GenderContentStates<Content> = Record<`${Gender}`, Content> & {\n fallback?: Content;\n};\n\nexport type GenderContent<Content = unknown> = TypedNodeModel<\n typeof GENDER,\n GenderContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a gender.\n *\n * Usage:\n *\n * ```ts\n * gender({\n * 'true': 'The gender is validated',\n * 'false': 'The gender is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst gender = <Content>(content?: GenderContentStates<Content
|
|
1
|
+
{"version":3,"file":"gender.mjs","names":[],"sources":["../../../../src/transpiler/gender/gender.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, GENDER } from '@intlayer/types/nodeType';\n\nexport type Gender = 'male' | 'female' | 'fallback';\n\nexport type GenderContentStates<Content> = Record<`${Gender}`, Content> & {\n fallback?: Content;\n};\n\nexport type GenderContent<Content = unknown> = TypedNodeModel<\n typeof GENDER,\n GenderContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a gender.\n *\n * Usage:\n *\n * ```ts\n * gender({\n * 'true': 'The gender is validated',\n * 'false': 'The gender is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst gender = <Content>(\n content?: GenderContentStates<Content>\n): GenderContent<Content> => formatNodeType(GENDER, content);\n\nexport { gender };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,UACJ,YAC2B,eAAe,QAAQ,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.mjs","names":[],"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":["import type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\nimport type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, TRANSLATION } from '@intlayer/types/nodeType';\n\nexport type TranslationContent<\n Content = unknown,\n RecordContent extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n> = TypedNodeModel<typeof TRANSLATION, RecordContent>;\n\n/**\n *\n * Function intended to be used to build intlayer dictionaries.\n *\n * Get the content of a translation based on the locale.\n *\n * Usage:\n *\n * ```ts\n * translation<string>({\n * \"en\": \"Hello\",\n * \"fr\": \"Bonjour\",\n * // ... any other available locale\n * })\n * ```\n *\n * Using TypeScript:\n * - this function require each locale to be defined if defined in the project configuration.\n * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.\n */\nconst translation = <\n Content = unknown,\n ContentRecord extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n>(\n content: ContentRecord\n) =>\n formatNodeType(TRANSLATION, content) satisfies TranslationContent<\n Content,\n ContentRecord\n >;\n\nexport { translation as t };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,eAKJ,YAEA,eAAe,aAAa,QAAQ"}
|
|
1
|
+
{"version":3,"file":"translation.mjs","names":[],"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":["import type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\nimport type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, TRANSLATION } from '@intlayer/types/nodeType';\n\nexport type TranslationContent<\n Content = unknown,\n RecordContent extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n> = TypedNodeModel<typeof TRANSLATION, RecordContent>;\n\n/**\n *\n * Function intended to be used to build intlayer dictionaries.\n *\n * Get the content of a translation based on the locale.\n *\n * Usage:\n *\n * ```ts\n * translation<string>({\n * \"en\": \"Hello\",\n * \"fr\": \"Bonjour\",\n * // ... any other available locale\n * })\n * ```\n *\n * Using TypeScript:\n * - this function require each locale to be defined if defined in the project configuration.\n * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.\n */\nconst translation = <\n Content = unknown,\n ContentRecord extends\n StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>,\n>(\n content: ContentRecord\n): TranslationContent<Content, ContentRecord> =>\n formatNodeType(TRANSLATION, content) satisfies TranslationContent<\n Content,\n ContentRecord\n >;\n\nexport { translation as t };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,eAKJ,YAEA,eAAe,aAAa,QAAQ"}
|
|
@@ -22,7 +22,7 @@ type ConditionContent<Content = unknown> = TypedNodeModel<typeof CONDITION, Cond
|
|
|
22
22
|
* The last key provided will be used as the fallback value.
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
|
-
declare const condition: <Content>(content?: ConditionContentStates<Content>) =>
|
|
25
|
+
declare const condition: <Content>(content?: ConditionContentStates<Content>) => ConditionContent<Content>;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { ConditionContent, ConditionContentStates, condition as cond };
|
|
28
28
|
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.d.ts","names":[],"sources":["../../../../src/transpiler/condition/condition.ts"],"mappings":";;;KAGY,sBAAA,YAAkC,MAAA,eAAqB,OAAA;EACjE,QAAA,GAAW,OAAA;AAAA;AAAA,KAGD,gBAAA,sBAAsC,cAAA,QACzC,SAAA,EACP,sBAAA,CAAuB,OAAA;;;;;;;;;;;;;AAFzB;;;;;cAsBM,SAAA,
|
|
1
|
+
{"version":3,"file":"condition.d.ts","names":[],"sources":["../../../../src/transpiler/condition/condition.ts"],"mappings":";;;KAGY,sBAAA,YAAkC,MAAA,eAAqB,OAAA;EACjE,QAAA,GAAW,OAAA;AAAA;AAAA,KAGD,gBAAA,sBAAsC,cAAA,QACzC,SAAA,EACP,sBAAA,CAAuB,OAAA;;;;;;;;;;;;;AAFzB;;;;;cAsBM,SAAA,YACJ,OAAA,GAAU,sBAAA,CAAuB,OAAA,MAChC,gBAAA,CAAiB,OAAA"}
|
|
@@ -34,7 +34,7 @@ type EnumerationContent<Content = unknown> = TypedNodeModel<typeof ENUMERATION,
|
|
|
34
34
|
* > The order of the keys will define the priority of the content.
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
|
-
declare const enumeration: <Content = unknown>(content?: EnumerationContentState<Content>) =>
|
|
37
|
+
declare const enumeration: <Content = unknown>(content?: EnumerationContentState<Content>) => EnumerationContent<Content>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export { EnterFormat, EnumerationContent, EnumerationContentState, enumeration as enu };
|
|
40
40
|
//# sourceMappingURL=enumeration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumeration.d.ts","names":[],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"mappings":";;;KAGK,QAAA;AAAA,KACA,QAAA;AAAA,KACA,OAAA,GAAU,QAAA,GAAW,QAAA;AAAA,KAErB,KAAA,GAAQ,OAAA;AAAA,KACR,WAAA,OAAkB,OAAA;AAAA,KAClB,QAAA,OAAe,OAAA;AAAA,KACf,eAAA,QAAuB,OAAA;AAAA,KACvB,QAAA,OAAe,OAAA;AAAA,KACf,eAAA,QAAuB,OAAA;AAAA,KAEhB,WAAA,GACR,KAAA,GACA,WAAA,GACA,QAAA,GACA,eAAA,GACA,QAAA,GACA,eAAA;AAAA,KAEQ,uBAAA,YAAmC,OAAA,CAC7C,MAAA,CAAO,WAAA,EAAa,OAAA;EAEpB,QAAA,GAAW,OAAA;AAAA;AAAA,KAGD,kBAAA,sBAAwC,cAAA,QAC3C,WAAA,EACP,uBAAA,CAAwB,OAAA;;;AAzBQ;;;;;AAEd;;;;;AACU;;;;;AACH;;cA2CrB,WAAA,sBACJ,OAAA,GAAU,uBAAA,CAAwB,OAAA,
|
|
1
|
+
{"version":3,"file":"enumeration.d.ts","names":[],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"mappings":";;;KAGK,QAAA;AAAA,KACA,QAAA;AAAA,KACA,OAAA,GAAU,QAAA,GAAW,QAAA;AAAA,KAErB,KAAA,GAAQ,OAAA;AAAA,KACR,WAAA,OAAkB,OAAA;AAAA,KAClB,QAAA,OAAe,OAAA;AAAA,KACf,eAAA,QAAuB,OAAA;AAAA,KACvB,QAAA,OAAe,OAAA;AAAA,KACf,eAAA,QAAuB,OAAA;AAAA,KAEhB,WAAA,GACR,KAAA,GACA,WAAA,GACA,QAAA,GACA,eAAA,GACA,QAAA,GACA,eAAA;AAAA,KAEQ,uBAAA,YAAmC,OAAA,CAC7C,MAAA,CAAO,WAAA,EAAa,OAAA;EAEpB,QAAA,GAAW,OAAA;AAAA;AAAA,KAGD,kBAAA,sBAAwC,cAAA,QAC3C,WAAA,EACP,uBAAA,CAAwB,OAAA;;;AAzBQ;;;;;AAEd;;;;;AACU;;;;;AACH;;cA2CrB,WAAA,sBACJ,OAAA,GAAU,uBAAA,CAAwB,OAAA,MACjC,kBAAA,CAAmB,OAAA"}
|
|
@@ -23,7 +23,7 @@ type GenderContent<Content = unknown> = TypedNodeModel<typeof GENDER, GenderCont
|
|
|
23
23
|
* The last key provided will be used as the fallback value.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
declare const gender: <Content>(content?: GenderContentStates<Content>) =>
|
|
26
|
+
declare const gender: <Content>(content?: GenderContentStates<Content>) => GenderContent<Content>;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Gender, GenderContent, GenderContentStates, gender };
|
|
29
29
|
//# sourceMappingURL=gender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gender.d.ts","names":[],"sources":["../../../../src/transpiler/gender/gender.ts"],"mappings":";;;KAGY,MAAA;AAAA,KAEA,mBAAA,YAA+B,MAAA,IAAU,MAAA,IAAU,OAAA;EAC7D,QAAA,GAAW,OAAA;AAAA;AAAA,KAGD,aAAA,sBAAmC,cAAA,QACtC,MAAA,EACP,mBAAA,CAAoB,OAAA;;AANtB;;;;;;;;;;;;;;;;cA0BM,MAAA,
|
|
1
|
+
{"version":3,"file":"gender.d.ts","names":[],"sources":["../../../../src/transpiler/gender/gender.ts"],"mappings":";;;KAGY,MAAA;AAAA,KAEA,mBAAA,YAA+B,MAAA,IAAU,MAAA,IAAU,OAAA;EAC7D,QAAA,GAAW,OAAA;AAAA;AAAA,KAGD,aAAA,sBAAmC,cAAA,QACtC,MAAA,EACP,mBAAA,CAAoB,OAAA;;AANtB;;;;;;;;;;;;;;;;cA0BM,MAAA,YACJ,OAAA,GAAU,mBAAA,CAAoB,OAAA,MAC7B,aAAA,CAAc,OAAA"}
|
|
@@ -23,11 +23,7 @@ type TranslationContent<Content = unknown, RecordContent extends StrictModeLocal
|
|
|
23
23
|
* - this function require each locale to be defined if defined in the project configuration.
|
|
24
24
|
* - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.
|
|
25
25
|
*/
|
|
26
|
-
declare const translation: <Content = unknown, ContentRecord extends StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>>(content: ContentRecord) =>
|
|
27
|
-
nodeType: "translation";
|
|
28
|
-
} & {
|
|
29
|
-
translation: ContentRecord;
|
|
30
|
-
}>;
|
|
26
|
+
declare const translation: <Content = unknown, ContentRecord extends StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>>(content: ContentRecord) => TranslationContent<Content, ContentRecord>;
|
|
31
27
|
//#endregion
|
|
32
28
|
export { TranslationContent, translation as t };
|
|
33
29
|
//# sourceMappingURL=translation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.d.ts","names":[],"sources":["../../../../src/transpiler/translation/translation.ts"],"mappings":";;;;KAIY,kBAAA,0CAGR,mBAAA,CAAoB,OAAA,IAAW,mBAAA,CAAoB,OAAA,KACnD,cAAA,QAAsB,WAAA,EAAa,aAAA;AAJvC;;;;;;;;;;;;;;;;;;;;AAAA,cA0BM,WAAA,4CAGF,mBAAA,CAAoB,OAAA,IAAW,mBAAA,CAAoB,OAAA,GAErD,OAAA,EAAS,aAAA,
|
|
1
|
+
{"version":3,"file":"translation.d.ts","names":[],"sources":["../../../../src/transpiler/translation/translation.ts"],"mappings":";;;;KAIY,kBAAA,0CAGR,mBAAA,CAAoB,OAAA,IAAW,mBAAA,CAAoB,OAAA,KACnD,cAAA,QAAsB,WAAA,EAAa,aAAA;AAJvC;;;;;;;;;;;;;;;;;;;;AAAA,cA0BM,WAAA,4CAGF,mBAAA,CAAoB,OAAA,IAAW,mBAAA,CAAoB,OAAA,GAErD,OAAA,EAAS,aAAA,KACR,kBAAA,CAAmB,OAAA,EAAS,aAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/core",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.",
|
|
6
6
|
"keywords": [
|
|
@@ -168,11 +168,11 @@
|
|
|
168
168
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
169
169
|
},
|
|
170
170
|
"dependencies": {
|
|
171
|
-
"@intlayer/api": "8.4.
|
|
172
|
-
"@intlayer/config": "8.4.
|
|
173
|
-
"@intlayer/dictionaries-entry": "8.4.
|
|
174
|
-
"@intlayer/types": "8.4.
|
|
175
|
-
"@intlayer/unmerged-dictionaries-entry": "8.4.
|
|
171
|
+
"@intlayer/api": "8.4.10",
|
|
172
|
+
"@intlayer/config": "8.4.10",
|
|
173
|
+
"@intlayer/dictionaries-entry": "8.4.10",
|
|
174
|
+
"@intlayer/types": "8.4.10",
|
|
175
|
+
"@intlayer/unmerged-dictionaries-entry": "8.4.10",
|
|
176
176
|
"defu": "6.1.4"
|
|
177
177
|
},
|
|
178
178
|
"devDependencies": {
|
|
@@ -182,8 +182,8 @@
|
|
|
182
182
|
"@utils/tsdown-config": "1.0.4",
|
|
183
183
|
"rimraf": "6.1.3",
|
|
184
184
|
"tsdown": "0.21.4",
|
|
185
|
-
"typescript": "
|
|
186
|
-
"vitest": "4.1.
|
|
185
|
+
"typescript": "6.0.2",
|
|
186
|
+
"vitest": "4.1.1"
|
|
187
187
|
},
|
|
188
188
|
"engines": {
|
|
189
189
|
"node": ">=14.18"
|