@intlayer/core 5.3.1 → 5.3.3
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/dictionaryManipulator/getNodeChildren.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs +2 -14
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/getContent.cjs +2 -0
- package/dist/cjs/interpreter/getContent/getContent.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/plugins.cjs +62 -3
- package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
- package/dist/cjs/interpreter/getInsertion.cjs +29 -0
- package/dist/cjs/interpreter/getInsertion.cjs.map +1 -0
- package/dist/cjs/interpreter/getTranslation.cjs.map +1 -1
- package/dist/cjs/transpiler/file/file.cjs +60 -0
- package/dist/cjs/transpiler/file/file.cjs.map +1 -0
- package/dist/cjs/transpiler/file/fileBrowser.cjs +36 -0
- package/dist/cjs/transpiler/file/fileBrowser.cjs.map +1 -0
- package/dist/cjs/transpiler/file/index.cjs +23 -0
- package/dist/cjs/transpiler/file/index.cjs.map +1 -0
- package/dist/cjs/transpiler/index.cjs +2 -0
- package/dist/cjs/transpiler/index.cjs.map +1 -1
- package/dist/cjs/transpiler/insertion/getInsertionValues.cjs +34 -0
- package/dist/cjs/transpiler/insertion/getInsertionValues.cjs.map +1 -0
- package/dist/cjs/transpiler/insertion/index.cjs +25 -0
- package/dist/cjs/transpiler/insertion/index.cjs.map +1 -0
- package/dist/cjs/transpiler/insertion/insertion.cjs +54 -0
- package/dist/cjs/transpiler/insertion/insertion.cjs.map +1 -0
- package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs +30 -26
- package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs.map +1 -1
- package/dist/cjs/transpiler/markdown/markdown.cjs +1 -1
- package/dist/cjs/transpiler/markdown/markdown.cjs.map +1 -1
- package/dist/cjs/transpiler/translation/index.cjs +1 -3
- package/dist/cjs/transpiler/translation/index.cjs.map +1 -1
- package/dist/cjs/transpiler/translation/translation.cjs.map +1 -1
- package/dist/cjs/types/dictionary.cjs.map +1 -1
- package/dist/cjs/types/index.cjs +3 -1
- package/dist/cjs/types/index.cjs.map +1 -1
- package/dist/cjs/types/keyPath.cjs.map +1 -1
- package/dist/cjs/types/nodeType.cjs +2 -0
- package/dist/cjs/types/nodeType.cjs.map +1 -1
- package/dist/cjs/{transpiler/translation/types.cjs → types/translation.cjs} +3 -3
- package/dist/cjs/types/translation.cjs.map +1 -0
- package/dist/esm/dictionaryManipulator/getNodeChildren.mjs +1 -1
- package/dist/esm/dictionaryManipulator/getNodeChildren.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getNodeType.mjs +2 -14
- package/dist/esm/dictionaryManipulator/getNodeType.mjs.map +1 -1
- package/dist/esm/interpreter/getContent/getContent.mjs +5 -1
- package/dist/esm/interpreter/getContent/getContent.mjs.map +1 -1
- package/dist/esm/interpreter/getContent/plugins.mjs +60 -3
- package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
- package/dist/esm/interpreter/getInsertion.mjs +5 -0
- package/dist/esm/interpreter/getInsertion.mjs.map +1 -0
- package/dist/esm/interpreter/getTranslation.mjs.map +1 -1
- package/dist/esm/transpiler/file/file.mjs +39 -0
- package/dist/esm/transpiler/file/file.mjs.map +1 -0
- package/dist/esm/transpiler/file/fileBrowser.mjs +12 -0
- package/dist/esm/transpiler/file/fileBrowser.mjs.map +1 -0
- package/dist/esm/transpiler/file/index.mjs +2 -0
- package/dist/esm/transpiler/file/index.mjs.map +1 -0
- package/dist/esm/transpiler/index.mjs +1 -0
- package/dist/esm/transpiler/index.mjs.map +1 -1
- package/dist/esm/transpiler/insertion/getInsertionValues.mjs +10 -0
- package/dist/esm/transpiler/insertion/getInsertionValues.mjs.map +1 -0
- package/dist/esm/transpiler/insertion/index.mjs +3 -0
- package/dist/esm/transpiler/insertion/index.mjs.map +1 -0
- package/dist/esm/transpiler/insertion/insertion.mjs +33 -0
- package/dist/esm/transpiler/insertion/insertion.mjs.map +1 -0
- package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +30 -26
- package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs.map +1 -1
- package/dist/esm/transpiler/markdown/markdown.mjs +1 -1
- package/dist/esm/transpiler/markdown/markdown.mjs.map +1 -1
- package/dist/esm/transpiler/translation/index.mjs +0 -1
- package/dist/esm/transpiler/translation/index.mjs.map +1 -1
- package/dist/esm/transpiler/translation/translation.mjs +4 -1
- package/dist/esm/transpiler/translation/translation.mjs.map +1 -1
- package/dist/esm/types/index.mjs +1 -0
- package/dist/esm/types/index.mjs.map +1 -1
- package/dist/esm/types/nodeType.mjs +2 -0
- package/dist/esm/types/nodeType.mjs.map +1 -1
- package/dist/esm/types/translation.mjs +1 -0
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +1 -1
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/plugins.d.ts +19 -0
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getInsertion.d.ts +16 -0
- package/dist/types/interpreter/getInsertion.d.ts.map +1 -0
- package/dist/types/interpreter/getTranslation.d.ts +1 -1
- package/dist/types/interpreter/getTranslation.d.ts.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/file/file.d.ts +22 -0
- package/dist/types/transpiler/file/file.d.ts.map +1 -0
- package/dist/types/transpiler/file/fileBrowser.d.ts +18 -0
- package/dist/types/transpiler/file/fileBrowser.d.ts.map +1 -0
- package/dist/types/transpiler/file/index.d.ts +2 -0
- package/dist/types/transpiler/file/index.d.ts.map +1 -0
- package/dist/types/transpiler/index.d.ts +2 -0
- package/dist/types/transpiler/index.d.ts.map +1 -1
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts +2 -0
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +1 -0
- package/dist/types/transpiler/insertion/index.d.ts +3 -0
- package/dist/types/transpiler/insertion/index.d.ts.map +1 -0
- package/dist/types/transpiler/insertion/insertion.d.ts +19 -0
- package/dist/types/transpiler/insertion/insertion.d.ts.map +1 -0
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +1 -1
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/markdown.d.ts +1 -1
- package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
- package/dist/types/transpiler/translation/index.d.ts +0 -1
- package/dist/types/transpiler/translation/index.d.ts.map +1 -1
- package/dist/types/transpiler/translation/translation.d.ts +7 -3
- package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
- package/dist/types/types/dictionary.d.ts +8 -2
- package/dist/types/types/dictionary.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/keyPath.d.ts +9 -1
- package/dist/types/types/keyPath.d.ts.map +1 -1
- package/dist/types/types/nodeType.d.ts +10 -4
- package/dist/types/types/nodeType.d.ts.map +1 -1
- package/dist/types/{transpiler/translation/types.d.ts → types/translation.d.ts} +1 -3
- package/dist/types/types/translation.d.ts.map +1 -0
- package/package.json +20 -9
- package/dist/cjs/transpiler/translation/types.cjs.map +0 -1
- package/dist/esm/transpiler/translation/types.mjs +0 -1
- package/dist/types/transpiler/translation/types.d.ts.map +0 -1
- /package/dist/esm/{transpiler/translation/types.mjs.map → types/translation.mjs.map} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const getInsertionValues = (content) => {
|
|
2
|
+
const regex = /{{\s*(\w+)\s*}}/g;
|
|
3
|
+
const matches = [...content.matchAll(regex)];
|
|
4
|
+
if (matches.length === 0) return [];
|
|
5
|
+
return matches.map((match) => match[1]);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
getInsertionValues
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=getInsertionValues.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/insertion/getInsertionValues.ts"],"sourcesContent":["export const getInsertionValues = (content: string): string[] => {\n // Regular expression to match {{field}} patterns\n const regex = /{{\\s*(\\w+)\\s*}}/g;\n const matches = [...content.matchAll(regex)];\n\n // If no matches are found, return undefined\n if (matches.length === 0) return [];\n\n // Extract field names from matches and return as an object with the field names\n return matches.map((match) => match[1]);\n};\n"],"mappings":"AAAO,MAAM,qBAAqB,CAAC,YAA8B;AAE/D,QAAM,QAAQ;AACd,QAAM,UAAU,CAAC,GAAG,QAAQ,SAAS,KAAK,CAAC;AAG3C,MAAI,QAAQ,WAAW,EAAG,QAAO,CAAC;AAGlC,SAAO,QAAQ,IAAI,CAAC,UAAU,MAAM,CAAC,CAAC;AACxC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/insertion/index.ts"],"sourcesContent":["export * from './insertion';\nexport * from './getInsertionValues';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatNodeType,
|
|
3
|
+
NodeType
|
|
4
|
+
} from "../../types/index.mjs";
|
|
5
|
+
import { getInsertionValues } from "./getInsertionValues.mjs";
|
|
6
|
+
const insertion = (content) => {
|
|
7
|
+
const getInsertions = () => {
|
|
8
|
+
if (typeof content === "string") {
|
|
9
|
+
return getInsertionValues(content);
|
|
10
|
+
}
|
|
11
|
+
let stringContent = void 0;
|
|
12
|
+
if (typeof content === "function") {
|
|
13
|
+
stringContent = content();
|
|
14
|
+
} else if (typeof content.then === "function") {
|
|
15
|
+
stringContent = async () => getInsertionValues(await content);
|
|
16
|
+
}
|
|
17
|
+
if (typeof stringContent === "string") {
|
|
18
|
+
return getInsertionValues(stringContent);
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
return getInsertionValues(JSON.stringify(content));
|
|
22
|
+
} catch (e) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return formatNodeType(NodeType.Insertion, content, {
|
|
27
|
+
fields: getInsertions()
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
insertion as insert
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=insertion.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/insertion/insertion.ts"],"sourcesContent":["import {\n formatNodeType,\n NodeType,\n type TypedNodeModel,\n} from '../../types/index';\nimport { getInsertionValues } from './getInsertionValues';\n\nexport type InsertionContent<Content = unknown> = TypedNodeModel<\n NodeType.Insertion,\n Content,\n { fields: string[] }\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to identify insertions inside a content.\n *\n * Usage:\n *\n * ```ts\n * insertion('Hi, my name is {{name}} and I am {{age}} years old.')\n * ```\n *\n */\nconst insertion = <Content = unknown>(\n content: Content\n): InsertionContent<Content> => {\n const getInsertions = () => {\n if (typeof content === 'string') {\n return getInsertionValues(content);\n }\n\n let stringContent = undefined;\n\n if (typeof content === 'function') {\n stringContent = content();\n } else if (typeof (content as Promise<string>).then === 'function') {\n stringContent = async () =>\n getInsertionValues(await (content as Promise<string>));\n }\n\n if (typeof stringContent === 'string') {\n return getInsertionValues(stringContent);\n }\n\n try {\n return getInsertionValues(JSON.stringify(content));\n } catch (e) {\n return [];\n }\n };\n\n return formatNodeType(NodeType.Insertion, content, {\n fields: getInsertions(),\n });\n};\n\nexport { insertion as insert };\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,0BAA0B;AAoBnC,MAAM,YAAY,CAChB,YAC8B;AAC9B,QAAM,gBAAgB,MAAM;AAC1B,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO,mBAAmB,OAAO;AAAA,IACnC;AAEA,QAAI,gBAAgB;AAEpB,QAAI,OAAO,YAAY,YAAY;AACjC,sBAAgB,QAAQ;AAAA,IAC1B,WAAW,OAAQ,QAA4B,SAAS,YAAY;AAClE,sBAAgB,YACd,mBAAmB,MAAO,OAA2B;AAAA,IACzD;AAEA,QAAI,OAAO,kBAAkB,UAAU;AACrC,aAAO,mBAAmB,aAAa;AAAA,IACzC;AAEA,QAAI;AACF,aAAO,mBAAmB,KAAK,UAAU,OAAO,CAAC;AAAA,IACnD,SAAS,GAAG;AACV,aAAO,CAAC;AAAA,IACV;AAAA,EACF;AAEA,SAAO,eAAe,SAAS,WAAW,SAAS;AAAA,IACjD,QAAQ,cAAc;AAAA,EACxB,CAAC;AACH;","names":[]}
|
|
@@ -16,37 +16,41 @@ const parseToObject = (input) => {
|
|
|
16
16
|
return JSON.parse(normalizedInput);
|
|
17
17
|
};
|
|
18
18
|
const getMarkdownMetadata = (markdown) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const metadata = {};
|
|
25
|
-
let inMetadataBlock = false;
|
|
26
|
-
for (const line of lines) {
|
|
27
|
-
const trimmedLine = line.trim();
|
|
28
|
-
if (trimmedLine === "---") {
|
|
29
|
-
if (!inMetadataBlock) {
|
|
30
|
-
inMetadataBlock = true;
|
|
31
|
-
continue;
|
|
32
|
-
} else {
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
19
|
+
try {
|
|
20
|
+
const lines = markdown.split(/\r?\n/);
|
|
21
|
+
const firstNonEmptyLine = lines.find((line) => line.trim() !== "");
|
|
22
|
+
if (!firstNonEmptyLine || firstNonEmptyLine.trim() !== "---") {
|
|
23
|
+
return {};
|
|
35
24
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
const metadata = {};
|
|
26
|
+
let inMetadataBlock = false;
|
|
27
|
+
for (const line of lines) {
|
|
28
|
+
const trimmedLine = line.trim();
|
|
29
|
+
if (trimmedLine === "---") {
|
|
30
|
+
if (!inMetadataBlock) {
|
|
31
|
+
inMetadataBlock = true;
|
|
32
|
+
continue;
|
|
33
|
+
} else {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (inMetadataBlock) {
|
|
38
|
+
const match = line.match(/^([^:]+)\s*:\s*(.*)$/);
|
|
39
|
+
if (match) {
|
|
40
|
+
const key = match[1].trim();
|
|
41
|
+
const value = match[2].trim();
|
|
42
|
+
try {
|
|
43
|
+
metadata[key] = parseToObject(value);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
metadata[key] = value;
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
}
|
|
50
|
+
return metadata;
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return void 0;
|
|
48
53
|
}
|
|
49
|
-
return metadata;
|
|
50
54
|
};
|
|
51
55
|
export {
|
|
52
56
|
getMarkdownMetadata
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/transpiler/markdown/getMarkdownMetadata.ts"],"sourcesContent":["const parseToObject = <T = any>(input: string): T | null => {\n // Normalize different bracket types and keys/values\n let normalizedInput = input\n .trim()\n .replace(/^\\[/, '[') // Keep array brackets\n .replace(/^\\{/, '{') // Keep object brackets\n .replace(/\\]$/, ']') // Keep array brackets\n .replace(/\\}$/, '}') // Keep object brackets\n .replace(/([\\w\\d_]+)\\s*:/g, '\"$1\":') // Ensure JSON-valid keys (e.g., key: -> \"key\":)\n .replace(/:\\s*([a-zA-Z_][\\w\\d_]*)/g, ': \"$1\"'); // Handle unquoted string values\n\n // Fix arrays with unquoted items (e.g., [content, anotherContent])\n normalizedInput = normalizedInput.replace(\n /\\[([^\\[\\]]+?)\\]/g,\n (_match, arrayContent) => {\n const newContent = (arrayContent as string)\n .split(',')\n .map((item) => {\n const trimmed = item.trim();\n // If already quoted or is a valid number, return as is.\n if (\n (trimmed.startsWith('\"') && trimmed.endsWith('\"')) ||\n !isNaN(Number(trimmed))\n ) {\n return trimmed;\n }\n return `\"${trimmed}\"`;\n })\n .join(', ');\n return `[${newContent}]`;\n }\n );\n\n // Parse the string into an object\n return JSON.parse(normalizedInput) as T;\n};\n\nexport const getMarkdownMetadata = (markdown: string): Record<string, any> => {\n const lines = markdown.split(/\\r?\\n/);\n\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/markdown/getMarkdownMetadata.ts"],"sourcesContent":["const parseToObject = <T = any>(input: string): T | null => {\n // Normalize different bracket types and keys/values\n let normalizedInput = input\n .trim()\n .replace(/^\\[/, '[') // Keep array brackets\n .replace(/^\\{/, '{') // Keep object brackets\n .replace(/\\]$/, ']') // Keep array brackets\n .replace(/\\}$/, '}') // Keep object brackets\n .replace(/([\\w\\d_]+)\\s*:/g, '\"$1\":') // Ensure JSON-valid keys (e.g., key: -> \"key\":)\n .replace(/:\\s*([a-zA-Z_][\\w\\d_]*)/g, ': \"$1\"'); // Handle unquoted string values\n\n // Fix arrays with unquoted items (e.g., [content, anotherContent])\n normalizedInput = normalizedInput.replace(\n /\\[([^\\[\\]]+?)\\]/g,\n (_match, arrayContent) => {\n const newContent = (arrayContent as string)\n .split(',')\n .map((item) => {\n const trimmed = item.trim();\n // If already quoted or is a valid number, return as is.\n if (\n (trimmed.startsWith('\"') && trimmed.endsWith('\"')) ||\n !isNaN(Number(trimmed))\n ) {\n return trimmed;\n }\n return `\"${trimmed}\"`;\n })\n .join(', ');\n return `[${newContent}]`;\n }\n );\n\n // Parse the string into an object\n return JSON.parse(normalizedInput) as T;\n};\n\nexport const getMarkdownMetadata = (\n markdown: string\n): Record<string, any> | undefined => {\n try {\n const lines = markdown.split(/\\r?\\n/);\n\n // Check if the very first non-empty line is the metadata start delimiter.\n const firstNonEmptyLine = lines.find((line) => line.trim() !== '');\n\n if (!firstNonEmptyLine || firstNonEmptyLine.trim() !== '---') {\n return {};\n }\n\n const metadata: Record<string, any> = {};\n let inMetadataBlock = false;\n\n for (const line of lines) {\n const trimmedLine = line.trim();\n\n // Toggle metadata block on encountering the delimiter.\n if (trimmedLine === '---') {\n if (!inMetadataBlock) {\n // Begin metadata block.\n inMetadataBlock = true;\n continue;\n } else {\n // End of metadata block; stop processing.\n break;\n }\n }\n\n // If we're inside the metadata block, parse key: value pairs.\n if (inMetadataBlock) {\n const match = line.match(/^([^:]+)\\s*:\\s*(.*)$/);\n if (match) {\n const key = match[1].trim();\n const value = match[2].trim();\n try {\n metadata[key] = parseToObject(value);\n } catch (e) {\n metadata[key] = value;\n }\n }\n }\n }\n\n return metadata;\n } catch (e) {\n return undefined;\n }\n};\n"],"mappings":"AAAA,MAAM,gBAAgB,CAAU,UAA4B;AAE1D,MAAI,kBAAkB,MACnB,KAAK,EACL,QAAQ,OAAO,GAAG,EAClB,QAAQ,OAAO,GAAG,EAClB,QAAQ,OAAO,GAAG,EAClB,QAAQ,OAAO,GAAG,EAClB,QAAQ,mBAAmB,OAAO,EAClC,QAAQ,4BAA4B,QAAQ;AAG/C,oBAAkB,gBAAgB;AAAA,IAChC;AAAA,IACA,CAAC,QAAQ,iBAAiB;AACxB,YAAM,aAAc,aACjB,MAAM,GAAG,EACT,IAAI,CAAC,SAAS;AACb,cAAM,UAAU,KAAK,KAAK;AAE1B,YACG,QAAQ,WAAW,GAAG,KAAK,QAAQ,SAAS,GAAG,KAChD,CAAC,MAAM,OAAO,OAAO,CAAC,GACtB;AACA,iBAAO;AAAA,QACT;AACA,eAAO,IAAI,OAAO;AAAA,MACpB,CAAC,EACA,KAAK,IAAI;AACZ,aAAO,IAAI,UAAU;AAAA,IACvB;AAAA,EACF;AAGA,SAAO,KAAK,MAAM,eAAe;AACnC;AAEO,MAAM,sBAAsB,CACjC,aACoC;AACpC,MAAI;AACF,UAAM,QAAQ,SAAS,MAAM,OAAO;AAGpC,UAAM,oBAAoB,MAAM,KAAK,CAAC,SAAS,KAAK,KAAK,MAAM,EAAE;AAEjE,QAAI,CAAC,qBAAqB,kBAAkB,KAAK,MAAM,OAAO;AAC5D,aAAO,CAAC;AAAA,IACV;AAEA,UAAM,WAAgC,CAAC;AACvC,QAAI,kBAAkB;AAEtB,eAAW,QAAQ,OAAO;AACxB,YAAM,cAAc,KAAK,KAAK;AAG9B,UAAI,gBAAgB,OAAO;AACzB,YAAI,CAAC,iBAAiB;AAEpB,4BAAkB;AAClB;AAAA,QACF,OAAO;AAEL;AAAA,QACF;AAAA,MACF;AAGA,UAAI,iBAAiB;AACnB,cAAM,QAAQ,KAAK,MAAM,sBAAsB;AAC/C,YAAI,OAAO;AACT,gBAAM,MAAM,MAAM,CAAC,EAAE,KAAK;AAC1B,gBAAM,QAAQ,MAAM,CAAC,EAAE,KAAK;AAC5B,cAAI;AACF,qBAAS,GAAG,IAAI,cAAc,KAAK;AAAA,UACrC,SAAS,GAAG;AACV,qBAAS,GAAG,IAAI;AAAA,UAClB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT,SAAS,GAAG;AACV,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/transpiler/markdown/markdown.ts"],"sourcesContent":["import {\n formatNodeType,\n NodeType,\n type TypedNodeModel,\n} from '../../types/index';\nimport { getMarkdownMetadata } from './getMarkdownMetadata';\n\nexport type MarkdownContentState = string;\n\nexport type MarkdownContent = TypedNodeModel<\n NodeType.Markdown,\n MarkdownContentState\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 * markdown('## Hello world!');\n * ```\n *\n */\nconst markdown =
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/markdown/markdown.ts"],"sourcesContent":["import {\n formatNodeType,\n NodeType,\n type TypedNodeModel,\n} from '../../types/index';\nimport { getMarkdownMetadata } from './getMarkdownMetadata';\n\nexport type MarkdownContentState = string;\n\nexport type MarkdownContent = TypedNodeModel<\n NodeType.Markdown,\n MarkdownContentState\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 * markdown('## Hello world!');\n * ```\n *\n */\nconst markdown = <Content = unknown>(content: Content): MarkdownContent => {\n const getMetadata = () => {\n if (typeof content === 'string') {\n return getMarkdownMetadata(content);\n }\n if (typeof content === 'function') {\n return () => getMarkdownMetadata(content());\n } else if (typeof (content as Promise<string>).then === 'function') {\n return async () =>\n getMarkdownMetadata(await (content as Promise<string>));\n }\n };\n\n return formatNodeType(NodeType.Markdown, content as string, {\n metadata: getMetadata(),\n });\n};\n\nexport { markdown as md };\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,2BAA2B;AAqBpC,MAAM,WAAW,CAAoB,YAAsC;AACzE,QAAM,cAAc,MAAM;AACxB,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO,oBAAoB,OAAO;AAAA,IACpC;AACA,QAAI,OAAO,YAAY,YAAY;AACjC,aAAO,MAAM,oBAAoB,QAAQ,CAAC;AAAA,IAC5C,WAAW,OAAQ,QAA4B,SAAS,YAAY;AAClE,aAAO,YACL,oBAAoB,MAAO,OAA2B;AAAA,IAC1D;AAAA,EACF;AAEA,SAAO,eAAe,SAAS,UAAU,SAAmB;AAAA,IAC1D,UAAU,YAAY;AAAA,EACxB,CAAC;AACH;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/transpiler/translation/index.ts"],"sourcesContent":["export * from './translation';\
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/translation/index.ts"],"sourcesContent":["export * from './translation';\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":["import {\n formatNodeType,\n NodeType,\n type LanguageContent,\n type TypedNodeModel,\n} from '../../types/index';\n\nexport type TranslationContent<\n Content = unknown,\n RecordContent extends LanguageContent<Content> = LanguageContent<Content>,\n> = TypedNodeModel<NodeType.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 LanguageContent<Content> = LanguageContent<Content>,\n>(\n content: ContentRecord\n) =>\n formatNodeType(NodeType.Translation, content) satisfies TranslationContent<\n Content,\n ContentRecord\n >;\n\nexport { translation as t };\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AA2BP,MAAM,cAAc,CAIlB,YAEA,eAAe,SAAS,aAAa,OAAO;","names":[]}
|
package/dist/esm/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/index.ts"],"sourcesContent":["export * from './dictionary';\nexport * from './nodeType';\nexport * from './keyPath';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/types/index.ts"],"sourcesContent":["export * from './dictionary';\nexport * from './nodeType';\nexport * from './keyPath';\nexport * from './translation';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -2,6 +2,8 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
|
|
|
2
2
|
NodeType2["Translation"] = "translation";
|
|
3
3
|
NodeType2["Enumeration"] = "enumeration";
|
|
4
4
|
NodeType2["Condition"] = "condition";
|
|
5
|
+
NodeType2["Insertion"] = "insertion";
|
|
6
|
+
NodeType2["File"] = "file";
|
|
5
7
|
NodeType2["Object"] = "object";
|
|
6
8
|
NodeType2["Array"] = "array";
|
|
7
9
|
NodeType2["Nested"] = "nested";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/nodeType.ts"],"sourcesContent":["export enum NodeType {\n Translation = 'translation',\n Enumeration = 'enumeration',\n Condition = 'condition',\n Object = 'object',\n Array = 'array',\n Nested = 'nested',\n ReactNode = 'reactNode',\n Markdown = 'markdown',\n Text = 'text',\n Number = 'number',\n Boolean = 'boolean',\n Unknown = 'unknown',\n}\n\nexport type TypedNodeModel
|
|
1
|
+
{"version":3,"sources":["../../../src/types/nodeType.ts"],"sourcesContent":["export enum NodeType {\n Translation = 'translation',\n Enumeration = 'enumeration',\n Condition = 'condition',\n Insertion = 'insertion',\n File = 'file',\n Object = 'object',\n Array = 'array',\n Nested = 'nested',\n ReactNode = 'reactNode',\n Markdown = 'markdown',\n Text = 'text',\n Number = 'number',\n Boolean = 'boolean',\n Unknown = 'unknown',\n}\n\ntype AdditionalAttributesType = {\n [key: string]: any;\n};\n\nexport type TypedNodeModel<\n T extends NodeType,\n Content,\n AdditionalAttributes extends AdditionalAttributesType = {},\n> = {\n nodeType: T | `${T}`;\n} & {\n [K in T]: Content;\n} & AdditionalAttributes;\n\nexport const formatNodeType = <\n T extends NodeType,\n Content = any,\n AdditionalAttributes extends AdditionalAttributesType = {},\n>(\n nodeType: T | `${T}`,\n content: Content,\n additionalAttributes?: { [key: string]: any }\n) =>\n ({\n ...additionalAttributes,\n nodeType,\n [nodeType]: content,\n }) as TypedNodeModel<T, Content, AdditionalAttributes>;\n"],"mappings":"AAAO,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,UAAA,iBAAc;AACd,EAAAA,UAAA,iBAAc;AACd,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,UAAO;AACP,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,UAAO;AACP,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,aAAU;AAdA,SAAAA;AAAA,GAAA;AA+BL,MAAM,iBAAiB,CAK5B,UACA,SACA,0BAEC;AAAA,EACC,GAAG;AAAA,EACH;AAAA,EACA,CAAC,QAAQ,GAAG;AACd;","names":["NodeType"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=translation.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LocalesValues } from '@intlayer/config/client';
|
|
2
2
|
import type { TranslationContent, EnumerationContent, ConditionContent, NestedContent, MarkdownContent } from '../transpiler';
|
|
3
3
|
import { type ContentNode, NodeType } from '../types';
|
|
4
|
-
export declare const getDefaultNode: (nodeType: NodeType, locales: LocalesValues[], content?: ContentNode) => string | number | boolean | MarkdownContent | NestedContent<never> | ((args?: any) => ContentNode<string | number | boolean, false, string | number | boolean>) | TranslationContent<ContentNode> | EnumerationContent<ContentNode> | ConditionContent<ContentNode> | Record<number, ContentNode>;
|
|
4
|
+
export declare const getDefaultNode: (nodeType: NodeType, locales: LocalesValues[], content?: ContentNode) => string | number | boolean | import("..").FileContent | MarkdownContent | NestedContent<never> | import("..").InsertionContent<string | number | boolean> | ((args?: any) => ContentNode<string | number | boolean, false, string | number | boolean>) | TranslationContent<ContentNode> | EnumerationContent<ContentNode> | ConditionContent<ContentNode> | Record<number, ContentNode>;
|
|
5
5
|
//# sourceMappingURL=getDefaultNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultNode.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getDefaultNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,cAAc,GACzB,UAAU,QAAQ,EAClB,SAAS,aAAa,EAAE,EACxB,UAAU,WAAW,
|
|
1
|
+
{"version":3,"file":"getDefaultNode.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getDefaultNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,cAAc,GACzB,UAAU,QAAQ,EAClB,SAAS,aAAa,EAAE,EACxB,UAAU,WAAW,4XAiEtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNodeChildren.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getNodeChildren.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAA4B,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,KAAG,
|
|
1
|
+
{"version":3,"file":"getNodeChildren.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getNodeChildren.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAA4B,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,KAAG,WAyCtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNodeType.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getNodeType.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getNodeType.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getNodeType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,eAAO,MAAM,WAAW,GAAI,SAAS,WAAW,KAAG,QA8BlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContent.d.ts","sourceRoot":"","sources":["../../../../src/interpreter/getContent/getContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"getContent.d.ts","sourceRoot":"","sources":["../../../../src/interpreter/getContent/getContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAOL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAEf,MAAM,WAAW,CAAC;AAEnB;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,aAAa,GAAG,OAAO,EAEjC,MAAM,CAAC,EACP,WAAW,SAAS,EACpB,SAAQ,CAAyD,KAe3D,oBAAoB,CAAC,CAAC,CAC7B,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { type GetNestingResult } from '../getNesting';
|
|
|
12
12
|
* > `transformFn` is a function that can be used to deeply transform inside the plugin.
|
|
13
13
|
*/
|
|
14
14
|
export type Plugins = {
|
|
15
|
+
id: string;
|
|
15
16
|
canHandle: (node: any) => boolean;
|
|
16
17
|
transform: (node: any, props: NodeProps, transformFn: (node: any, props: NodeProps) => any) => any;
|
|
17
18
|
};
|
|
@@ -42,6 +43,15 @@ export type ConditionCond<T, S> = T extends {
|
|
|
42
43
|
} ? (value: boolean) => DeepTransformContent<T[NodeType.Condition][keyof T[NodeType.Condition]], S> : never;
|
|
43
44
|
/** Condition plugin. Replaces node with a function that takes boolean => string. */
|
|
44
45
|
export declare const conditionPlugin: Plugins;
|
|
46
|
+
/** ---------------------------------------------
|
|
47
|
+
* INSERTION PLUGIN
|
|
48
|
+
* --------------------------------------------- */
|
|
49
|
+
export type InsertionCond<T, S> = T extends {
|
|
50
|
+
nodeType: NodeType | string;
|
|
51
|
+
[NodeType.Insertion]: infer I;
|
|
52
|
+
fields?: infer U;
|
|
53
|
+
} ? U extends readonly string[] ? (data: Record<U[number], string>) => DeepTransformContent<I, S> : (data: Record<string, string>) => DeepTransformContent<I, S> : never;
|
|
54
|
+
export declare const insertionPlugin: Plugins;
|
|
45
55
|
/** ---------------------------------------------
|
|
46
56
|
* NESTED PLUGIN
|
|
47
57
|
* --------------------------------------------- */
|
|
@@ -54,6 +64,13 @@ export type NestedCond<T, S> = T extends {
|
|
|
54
64
|
} ? GetNestingResult<K, P, S> : never : never;
|
|
55
65
|
/** Nested plugin. Replaces node with the result of `getNesting`. */
|
|
56
66
|
export declare const nestedPlugin: Plugins;
|
|
67
|
+
export type FileCond<T> = T extends {
|
|
68
|
+
nodeType: NodeType | string;
|
|
69
|
+
[NodeType.File]: string;
|
|
70
|
+
content?: string;
|
|
71
|
+
} ? string : never;
|
|
72
|
+
/** File plugin. Replaces node with the result of `getNesting`. */
|
|
73
|
+
export declare const filePlugin: Plugins;
|
|
57
74
|
/**
|
|
58
75
|
* PLUGIN RESULT
|
|
59
76
|
*/
|
|
@@ -75,6 +92,7 @@ export interface NodeProps {
|
|
|
75
92
|
*/
|
|
76
93
|
export interface IInterpreterPlugin<T, S> {
|
|
77
94
|
translation: TranslationCond<T, S>;
|
|
95
|
+
insertion: InsertionCond<T, S>;
|
|
78
96
|
enumeration: EnumerationCond<T, S>;
|
|
79
97
|
condition: ConditionCond<T, S>;
|
|
80
98
|
nested: NestedCond<T, S>;
|
|
@@ -86,6 +104,7 @@ export type IInterpreterPluginState = {
|
|
|
86
104
|
translation: true;
|
|
87
105
|
enumeration: true;
|
|
88
106
|
condition: true;
|
|
107
|
+
insertion: true;
|
|
89
108
|
nested: true;
|
|
90
109
|
};
|
|
91
110
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interpreter/getContent/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../src/interpreter/getContent/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAStE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EAAE,KAAK,gBAAgB,EAAc,MAAM,eAAe,CAAC;AAIlE;;oDAEoD;AAEpD;;;;;;GAMG;AACH,MAAM,MAAM,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}!', {
|
|
9
|
+
* name: 'John',
|
|
10
|
+
* });
|
|
11
|
+
* // 'Hello John!'
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare const getInsertion: (content: string, values: { [K in InsertionContent["fields"][number]]: string; }) => string;
|
|
16
|
+
//# sourceMappingURL=getInsertion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInsertion.d.ts","sourceRoot":"","sources":["../../../src/interpreter/getInsertion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,MAAM,EACf,QAAQ,GAAG,CAAC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,GAAE,WACM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslation.d.ts","sourceRoot":"","sources":["../../../src/interpreter/getTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"getTranslation.d.ts","sourceRoot":"","sources":["../../../src/interpreter/getTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,GAAG,MAAM,EAC7C,iBAAiB,eAAe,CAAC,OAAO,CAAC,EACzC,SAAS,aAAa,KACrB,OAYF,CAAC"}
|
|
@@ -20,6 +20,6 @@ export type ConditionContent<Content = unknown> = TypedNodeModel<NodeType.Condit
|
|
|
20
20
|
* The last key provided will be used as the fallback value.
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
declare const condition: <Content>(content?: ConditionContentStates<Content>) => TypedNodeModel<NodeType.Condition, ConditionContentStates<Content
|
|
23
|
+
declare const condition: <Content>(content?: ConditionContentStates<Content>) => TypedNodeModel<NodeType.Condition, ConditionContentStates<Content>, {}>;
|
|
24
24
|
export { condition as cond };
|
|
25
25
|
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/condition/condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,sBAAsB,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,OAAO,EAAE,EAAE,OAAO,CAAC,GAAG;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,OAAO,GAAG,OAAO,IAAI,cAAc,CAC9D,QAAQ,CAAC,SAAS,EAClB,sBAAsB,CAAC,OAAO,CAAC,CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,EAAE,UAAU,sBAAsB,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/condition/condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,sBAAsB,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,OAAO,EAAE,EAAE,OAAO,CAAC,GAAG;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,OAAO,GAAG,OAAO,IAAI,cAAc,CAC9D,QAAQ,CAAC,SAAS,EAClB,sBAAsB,CAAC,OAAO,CAAC,CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,EAAE,UAAU,sBAAsB,CAAC,OAAO,CAAC,4EACxB,CAAC;AAE9C,OAAO,EAAE,SAAS,IAAI,IAAI,EAAE,CAAC"}
|
|
@@ -32,6 +32,6 @@ export type EnumerationContent<Content = unknown> = TypedNodeModel<NodeType.Enum
|
|
|
32
32
|
* > The order of the keys will define the priority of the content.
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
|
-
declare const enumeration: <Content>(content?: EnumerationContentState<Content>) => TypedNodeModel<NodeType.Enumeration, EnumerationContentState<Content
|
|
35
|
+
declare const enumeration: <Content>(content?: EnumerationContentState<Content>) => TypedNodeModel<NodeType.Enumeration, EnumerationContentState<Content>, {}>;
|
|
36
36
|
export { enumeration as enu };
|
|
37
37
|
//# sourceMappingURL=enumeration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumeration.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,KAAK,OAAO,GAAG,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;AACpC,KAAK,OAAO,GAAG,IAAI,MAAM,EAAE,CAAC;AAC5B,KAAK,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjC,KAAK,KAAK,GAAG,OAAO,CAAC;AACrB,KAAK,WAAW,GAAG,IAAI,OAAO,EAAE,CAAC;AACjC,KAAK,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,KAAK,eAAe,GAAG,KAAK,OAAO,EAAE,CAAC;AACtC,KAAK,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,KAAK,eAAe,GAAG,KAAK,OAAO,EAAE,CAAC;AAEtC,MAAM,MAAM,WAAW,GACnB,KAAK,GACL,WAAW,GACX,QA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,CAAC,CAC7B,GAAG;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,OAAO,GAAG,OAAO,IAAI,cAAc,CAChE,QAAQ,CAAC,WAAW,EACpB,uBAAuB,CAAC,OAAO,CAAC,CACjC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,WAAW,GAAI,OAAO,EAAE,UAAU,uBAAuB,CAAC,OAAO,CAAC,+EACzB,CAAC;AAEhD,OAAO,EAAE,WAAW,IAAI,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NodeType, type TypedNodeModel } from '../../types/index';
|
|
2
|
+
export type FileContent = TypedNodeModel<NodeType.File, string, {
|
|
3
|
+
content: string;
|
|
4
|
+
fixedPath?: string;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* Function intended to be used to build intlayer dictionaries.
|
|
8
|
+
*
|
|
9
|
+
* Allow identify the usage of an external resource.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* file('/path/to/file.md') // absolute path
|
|
15
|
+
*
|
|
16
|
+
* // or
|
|
17
|
+
*
|
|
18
|
+
* file('path/to/file.md') // relative path
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const file: (path: string) => FileContent;
|
|
22
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/file/file.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,EACR,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,WAAW,GAAG,cAAc,CACtC,QAAQ,CAAC,IAAI,EACb,MAAM,EACN;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAKF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,KAAG,WAiCnC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FileContent } from './file';
|
|
2
|
+
/**
|
|
3
|
+
* Function intended to be used to build intlayer dictionaries.
|
|
4
|
+
*
|
|
5
|
+
* Allow identify the usage of an external resource.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* file('/path/to/file.md') // absolute path
|
|
11
|
+
*
|
|
12
|
+
* // or
|
|
13
|
+
*
|
|
14
|
+
* file('path/to/file.md') // relative path
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const file: (path: string) => FileContent;
|
|
18
|
+
//# sourceMappingURL=fileBrowser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileBrowser.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/file/fileBrowser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,KAAG,WAOnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/file/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './translation/index';
|
|
2
2
|
export * from './enumeration/index';
|
|
3
3
|
export * from './condition/index';
|
|
4
|
+
export * from './insertion/index';
|
|
4
5
|
export * from './markdown/index';
|
|
5
6
|
export * from './nesting/index';
|
|
7
|
+
export type * from './file/index';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transpiler/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transpiler/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,mBAAmB,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInsertionValues.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/insertion/getInsertionValues.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,KAAG,MAAM,EAU1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/insertion/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NodeType, type TypedNodeModel } from '../../types/index';
|
|
2
|
+
export type InsertionContent<Content = unknown> = TypedNodeModel<NodeType.Insertion, Content, {
|
|
3
|
+
fields: string[];
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* Function intended to be used to build intlayer dictionaries.
|
|
7
|
+
*
|
|
8
|
+
* Allow to identify insertions inside a content.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* insertion('Hi, my name is {{name}} and I am {{age}} years old.')
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
declare const insertion: <Content = unknown>(content: Content) => InsertionContent<Content>;
|
|
18
|
+
export { insertion as insert };
|
|
19
|
+
//# sourceMappingURL=insertion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertion.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/insertion/insertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,gBAAgB,CAAC,OAAO,GAAG,OAAO,IAAI,cAAc,CAC9D,QAAQ,CAAC,SAAS,EAClB,OAAO,EACP;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CACrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,GAAG,OAAO,EAClC,SAAS,OAAO,KACf,gBAAgB,CAAC,OAAO,CA6B1B,CAAC;AAEF,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getMarkdownMetadata: (markdown: string) => Record<string, any
|
|
1
|
+
export declare const getMarkdownMetadata: (markdown: string) => Record<string, any> | undefined;
|
|
2
2
|
//# sourceMappingURL=getMarkdownMetadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMarkdownMetadata.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/markdown/getMarkdownMetadata.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"getMarkdownMetadata.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/markdown/getMarkdownMetadata.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAgDxB,CAAC"}
|
|
@@ -13,6 +13,6 @@ export type MarkdownContent = TypedNodeModel<NodeType.Markdown, MarkdownContentS
|
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
declare const markdown:
|
|
16
|
+
declare const markdown: <Content = unknown>(content: Content) => MarkdownContent;
|
|
17
17
|
export { markdown as md };
|
|
18
18
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/markdown/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,cAAc,CAC1C,QAAQ,CAAC,QAAQ,EACjB,oBAAoB,CACrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/markdown/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,cAAc,CAC1C,QAAQ,CAAC,QAAQ,EACjB,oBAAoB,CACrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,GAAG,OAAO,EAAE,SAAS,OAAO,KAAG,eAgBvD,CAAC;AAEF,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/translation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/translation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|