@intlayer/core 8.3.1 → 8.3.2
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/index.cjs +1 -1
- package/dist/cjs/interpreter/getContent/getContent.cjs +1 -1
- package/dist/cjs/interpreter/getContent/getContent.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/index.cjs +1 -1
- package/dist/cjs/interpreter/getContent/plugins.cjs +1 -1
- package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
- package/dist/cjs/interpreter/getDictionary.cjs +1 -1
- package/dist/cjs/interpreter/getDictionary.cjs.map +1 -1
- package/dist/cjs/interpreter/getHTML.cjs +1 -1
- package/dist/cjs/interpreter/getHTML.cjs.map +1 -1
- package/dist/cjs/interpreter/getIntlayer.cjs.map +1 -1
- package/dist/cjs/interpreter/index.cjs +1 -1
- package/dist/cjs/markdown/index.cjs +1 -1
- package/dist/cjs/transpiler/enumeration/enumeration.cjs.map +1 -1
- package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs +1 -1
- package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs.map +1 -1
- package/dist/cjs/transpiler/html/index.cjs +1 -1
- package/dist/cjs/transpiler/html/validateHTML.cjs +2 -0
- package/dist/cjs/transpiler/html/validateHTML.cjs.map +1 -0
- package/dist/cjs/transpiler/index.cjs +1 -1
- package/dist/cjs/transpiler/markdown/index.cjs +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/markdown/validateMarkdown.cjs +5 -0
- package/dist/cjs/transpiler/markdown/validateMarkdown.cjs.map +1 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/interpreter/getContent/getContent.mjs +1 -1
- package/dist/esm/interpreter/getContent/getContent.mjs.map +1 -1
- package/dist/esm/interpreter/getContent/index.mjs +1 -1
- package/dist/esm/interpreter/getContent/plugins.mjs +1 -1
- package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
- package/dist/esm/interpreter/getDictionary.mjs +1 -1
- package/dist/esm/interpreter/getDictionary.mjs.map +1 -1
- package/dist/esm/interpreter/getHTML.mjs +1 -1
- package/dist/esm/interpreter/getHTML.mjs.map +1 -1
- package/dist/esm/interpreter/getIntlayer.mjs.map +1 -1
- package/dist/esm/interpreter/index.mjs +1 -1
- package/dist/esm/markdown/index.mjs +1 -1
- package/dist/esm/transpiler/enumeration/enumeration.mjs.map +1 -1
- package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs +1 -1
- package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs.map +1 -1
- package/dist/esm/transpiler/html/index.mjs +1 -1
- package/dist/esm/transpiler/html/validateHTML.mjs +2 -0
- package/dist/esm/transpiler/html/validateHTML.mjs.map +1 -0
- package/dist/esm/transpiler/index.mjs +1 -1
- package/dist/esm/transpiler/markdown/index.mjs +1 -1
- package/dist/esm/transpiler/markdown/markdown.mjs.map +1 -1
- package/dist/esm/transpiler/markdown/validateMarkdown.mjs +5 -0
- package/dist/esm/transpiler/markdown/validateMarkdown.mjs.map +1 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/interpreter/getContent/getContent.d.ts +4 -3
- package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/index.d.ts +2 -2
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
- package/dist/types/interpreter/getHTML.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
- package/dist/types/interpreter/index.d.ts +2 -2
- package/dist/types/markdown/index.d.ts +3 -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/html/getHTMLCustomComponents.d.ts.map +1 -1
- package/dist/types/transpiler/html/index.d.ts +2 -1
- package/dist/types/transpiler/html/validateHTML.d.ts +21 -0
- package/dist/types/transpiler/html/validateHTML.d.ts.map +1 -0
- package/dist/types/transpiler/index.d.ts +3 -1
- package/dist/types/transpiler/markdown/index.d.ts +3 -1
- package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts +18 -0
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts.map +1 -0
- package/dist/types/transpiler/translation/translation.d.ts +1 -1
- package/package.json +8 -8
|
@@ -34,7 +34,7 @@ type EnumerationContent<Content = unknown> = TypedNodeModel<NodeType.Enumeration
|
|
|
34
34
|
* > The order of the keys will define the priority of the content.
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
|
-
declare const enumeration: <Content>(content?: EnumerationContentState<Content>) => TypedNodeModel<NodeType.Enumeration, EnumerationContentState<Content>, {}>;
|
|
37
|
+
declare const enumeration: <Content = unknown>(content?: EnumerationContentState<Content>) => TypedNodeModel<NodeType.Enumeration, EnumerationContentState<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,CAClD,QAAA,CAAS,WAAA,EACT,uBAAA,CAAwB,OAAA;;;AAzBQ;;;;;AAEd;;;;;AACU;;;;;AACH;;cA2CrB,WAAA,
|
|
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,CAClD,QAAA,CAAS,WAAA,EACT,uBAAA,CAAwB,OAAA;;;AAzBQ;;;;;AAEd;;;;;AACU;;;;;AACH;;cA2CrB,WAAA,sBACJ,OAAA,GAAU,uBAAA,CAAwB,OAAA,MAAQ,cAAA,CAAA,QAAA,CAAA,WAAA,EAAA,uBAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHTMLCustomComponents.d.ts","names":[],"sources":["../../../../src/transpiler/html/getHTMLCustomComponents.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getHTMLCustomComponents.d.ts","names":[],"sources":["../../../../src/transpiler/html/getHTMLCustomComponents.ts"],"mappings":";;AA8BA;;;;cAAa,uBAAA,GACX,OAAA,aACC,MAAA,SAAe,MAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { HTMLContent, HTMLContentConstructor, html } from "./html.js";
|
|
2
2
|
import { HTMLTagsType, HTML_TAGS } from "./htmlTags.js";
|
|
3
|
-
|
|
3
|
+
import { HTMLValidationIssue, HTMLValidationResult, VOID_ELEMENTS, validateHTML } from "./validateHTML.js";
|
|
4
|
+
export { HTMLContent, HTMLContentConstructor, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_TAGS, VOID_ELEMENTS, html, validateHTML };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/transpiler/html/validateHTML.d.ts
|
|
2
|
+
declare const VOID_ELEMENTS: Set<string>;
|
|
3
|
+
type HTMLValidationIssue = {
|
|
4
|
+
type: 'error' | 'warning';
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
type HTMLValidationResult = {
|
|
8
|
+
valid: boolean;
|
|
9
|
+
issues: HTMLValidationIssue[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Validates that HTML tags in `content` are properly opened, nested, and closed.
|
|
13
|
+
* Returns structured issues instead of logging to the console.
|
|
14
|
+
*
|
|
15
|
+
* False-positive exclusions:
|
|
16
|
+
* - Tags whose attribute string starts with `://` are URL autolinks (e.g. `<https://…>`).
|
|
17
|
+
*/
|
|
18
|
+
declare const validateHTML: (content: string) => HTMLValidationResult;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { HTMLValidationIssue, HTMLValidationResult, VOID_ELEMENTS, validateHTML };
|
|
21
|
+
//# sourceMappingURL=validateHTML.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateHTML.d.ts","names":[],"sources":["../../../../src/transpiler/html/validateHTML.ts"],"mappings":";cAAa,aAAA,EAAa,GAAA;AAAA,KAgBd,mBAAA;EACV,IAAA;EACA,OAAA;AAAA;AAAA,KAGU,oBAAA;EACV,KAAA;EACA,MAAA,EAAQ,mBAAA;AAAA;;;AAFV;;;;;cAmBa,YAAA,GAAgB,OAAA,aAAkB,oBAAA"}
|
|
@@ -4,10 +4,12 @@ import { FileContent, FileContentConstructor, file, fileContent } from "./file/f
|
|
|
4
4
|
import { Gender, GenderContent, GenderContentStates, gender } from "./gender/gender.js";
|
|
5
5
|
import { HTMLContent, HTMLContentConstructor, html } from "./html/html.js";
|
|
6
6
|
import { HTMLTagsType, HTML_TAGS } from "./html/htmlTags.js";
|
|
7
|
+
import { HTMLValidationIssue, HTMLValidationResult, VOID_ELEMENTS, validateHTML } from "./html/validateHTML.js";
|
|
7
8
|
import { getInsertionValues } from "./insertion/getInsertionValues.js";
|
|
8
9
|
import { InsertionContent, InsertionContentConstructor, insert as insertion } from "./insertion/insertion.js";
|
|
9
10
|
import { getMarkdownMetadata } from "./markdown/getMarkdownMetadata.js";
|
|
10
11
|
import { MarkdownContent, MarkdownContentConstructor, md as markdown } from "./markdown/markdown.js";
|
|
12
|
+
import { MarkdownValidationResult, validateMarkdown } from "./markdown/validateMarkdown.js";
|
|
11
13
|
import { DotPath, NestedContent, NestedContentState, ValidDotPathsFor, nest as nesting } from "./nesting/nesting.js";
|
|
12
14
|
import { TranslationContent, t as translation } from "./translation/translation.js";
|
|
13
|
-
export { ConditionContent, ConditionContentStates, DotPath, EnterFormat, EnumerationContent, EnumerationContentState, FileContent, FileContentConstructor, Gender, GenderContent, GenderContentStates, HTMLContent, HTMLContentConstructor, HTMLTagsType, HTML_TAGS, InsertionContent, InsertionContentConstructor, MarkdownContent, MarkdownContentConstructor, NestedContent, NestedContentState, TranslationContent, ValidDotPathsFor, condition as cond, enumeration as enu, file, fileContent, gender, getInsertionValues, getMarkdownMetadata, html, insertion as insert, markdown as md, nesting as nest, translation as t };
|
|
15
|
+
export { ConditionContent, ConditionContentStates, DotPath, EnterFormat, EnumerationContent, EnumerationContentState, FileContent, FileContentConstructor, Gender, GenderContent, GenderContentStates, HTMLContent, HTMLContentConstructor, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_TAGS, InsertionContent, InsertionContentConstructor, MarkdownContent, MarkdownContentConstructor, HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, NestedContent, NestedContentState, TranslationContent, VOID_ELEMENTS, ValidDotPathsFor, condition as cond, enumeration as enu, file, fileContent, gender, getInsertionValues, getMarkdownMetadata, html, insertion as insert, markdown as md, nesting as nest, translation as t, validateHTML, validateMarkdown };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HTMLValidationIssue } from "../html/validateHTML.js";
|
|
1
2
|
import { getMarkdownMetadata } from "./getMarkdownMetadata.js";
|
|
2
3
|
import { MarkdownContent, MarkdownContentConstructor, md as markdown } from "./markdown.js";
|
|
3
|
-
|
|
4
|
+
import { MarkdownValidationResult, validateMarkdown } from "./validateMarkdown.js";
|
|
5
|
+
export { MarkdownContent, MarkdownContentConstructor, HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, getMarkdownMetadata, markdown as md, validateMarkdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","names":[],"sources":["../../../../src/transpiler/markdown/markdown.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","names":[],"sources":["../../../../src/transpiler/markdown/markdown.ts"],"mappings":";;;KAOK,SAAA;AAAA,KAEA,aAAA;AAAA,KAEO,0BAAA,WACA,MAAA,yCAER,cAAA,CAAe,QAAA,CAAS,QAAA,EAAU,OAAA,EAAS,CAAA;AAAA,KAEnC,eAAA,uCAES,MAAA,CAAO,aAAA,EAAe,SAAA,IAAa,MAAA,CACpD,aAAA,EACA,SAAA,KAEA,0BAAA;EAEA,QAAA,GAAW,MAAA;EACX,IAAA,cAAkB,UAAA;AAAA,GAEpB,OAAA;;;;;AAhBF;;;;;;;;cA4CM,QAAA,sBACe,MAAA,gBAAsB,MAAA,kCAGzC,OAAA,EAAS,OAAA,EACT,UAAA,GAAa,UAAA,KACZ,eAAA,CAAgB,OAAA,EAAS,UAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLValidationIssue } from "../html/validateHTML.js";
|
|
2
|
+
|
|
3
|
+
//#region src/transpiler/markdown/validateMarkdown.d.ts
|
|
4
|
+
type MarkdownValidationResult = {
|
|
5
|
+
valid: boolean;
|
|
6
|
+
issues: HTMLValidationIssue[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Validates markdown content for structural correctness:
|
|
10
|
+
* - All fenced code blocks are properly closed
|
|
11
|
+
* - HTML tags are properly nested and closed
|
|
12
|
+
*
|
|
13
|
+
* HTML inside code blocks is excluded from HTML validation.
|
|
14
|
+
*/
|
|
15
|
+
declare const validateMarkdown: (content: string) => MarkdownValidationResult;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, validateMarkdown };
|
|
18
|
+
//# sourceMappingURL=validateMarkdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateMarkdown.d.ts","names":[],"sources":["../../../../src/transpiler/markdown/validateMarkdown.ts"],"mappings":";;;KAIY,wBAAA;EACV,KAAA;EACA,MAAA,EAAQ,mBAAA;AAAA;;;;;;;AAwFV;cAAa,gBAAA,GAAoB,OAAA,aAAkB,wBAAA"}
|
|
@@ -24,7 +24,7 @@ type TranslationContent<Content = unknown, RecordContent extends StrictModeLocal
|
|
|
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
26
|
declare const translation: <Content = unknown, ContentRecord extends StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>>(content: ContentRecord) => TypedNodeModel<NodeType.Translation, ContentRecord, {
|
|
27
|
-
nodeType: "translation"
|
|
27
|
+
nodeType: NodeType.Translation | "translation";
|
|
28
28
|
} & {
|
|
29
29
|
translation: ContentRecord;
|
|
30
30
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/core",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
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,22 +168,22 @@
|
|
|
168
168
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
169
169
|
},
|
|
170
170
|
"dependencies": {
|
|
171
|
-
"@intlayer/api": "8.3.
|
|
172
|
-
"@intlayer/config": "8.3.
|
|
173
|
-
"@intlayer/dictionaries-entry": "8.3.
|
|
174
|
-
"@intlayer/types": "8.3.
|
|
175
|
-
"@intlayer/unmerged-dictionaries-entry": "8.3.
|
|
171
|
+
"@intlayer/api": "8.3.2",
|
|
172
|
+
"@intlayer/config": "8.3.2",
|
|
173
|
+
"@intlayer/dictionaries-entry": "8.3.2",
|
|
174
|
+
"@intlayer/types": "8.3.2",
|
|
175
|
+
"@intlayer/unmerged-dictionaries-entry": "8.3.2",
|
|
176
176
|
"defu": "6.1.4"
|
|
177
177
|
},
|
|
178
178
|
"devDependencies": {
|
|
179
|
-
"@types/node": "25.
|
|
179
|
+
"@types/node": "25.5.0",
|
|
180
180
|
"@utils/ts-config": "1.0.4",
|
|
181
181
|
"@utils/ts-config-types": "1.0.4",
|
|
182
182
|
"@utils/tsdown-config": "1.0.4",
|
|
183
183
|
"rimraf": "6.1.3",
|
|
184
184
|
"tsdown": "0.21.2",
|
|
185
185
|
"typescript": "5.9.3",
|
|
186
|
-
"vitest": "4.0
|
|
186
|
+
"vitest": "4.1.0"
|
|
187
187
|
},
|
|
188
188
|
"engines": {
|
|
189
189
|
"node": ">=14.18"
|