@lokascript/i18n 2.3.0 → 2.4.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/browser.cjs +626 -473
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +25 -3
- package/dist/browser.d.ts +25 -3
- package/dist/browser.js +623 -474
- package/dist/browser.js.map +1 -1
- package/dist/dictionaries/index.cjs +489 -472
- package/dist/dictionaries/index.cjs.map +1 -1
- package/dist/dictionaries/index.d.cts +5 -3
- package/dist/dictionaries/index.d.ts +5 -3
- package/dist/dictionaries/index.js +489 -473
- package/dist/dictionaries/index.js.map +1 -1
- package/dist/index.cjs +617 -473
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -37
- package/dist/index.d.ts +37 -37
- package/dist/index.js +617 -473
- package/dist/index.js.map +1 -1
- package/dist/lokascript-i18n.min.js +1 -1
- package/dist/lokascript-i18n.min.js.map +1 -1
- package/dist/lokascript-i18n.mjs +730 -478
- package/dist/lokascript-i18n.mjs.map +1 -1
- package/dist/plugins/vite.cjs +488 -472
- package/dist/plugins/vite.cjs.map +1 -1
- package/dist/plugins/vite.js +488 -472
- package/dist/plugins/vite.js.map +1 -1
- package/dist/plugins/webpack.cjs +488 -472
- package/dist/plugins/webpack.cjs.map +1 -1
- package/dist/plugins/webpack.js +488 -472
- package/dist/plugins/webpack.js.map +1 -1
- package/dist/{transformer-B0zy-kti.d.ts → transformer-BLv389qz.d.ts} +12 -47
- package/dist/{transformer-CzY_vHU0.d.cts → transformer-PFsYELrc.d.cts} +12 -47
- package/dist/{types-BYtpqGq3.d.cts → types-BcALAO6h.d.cts} +1 -1
- package/dist/{types-BYtpqGq3.d.ts → types-BcALAO6h.d.ts} +1 -1
- package/package.json +5 -5
- package/src/browser.ts +3 -0
- package/src/constants.ts +9 -0
- package/src/dictionaries/ar.ts +22 -43
- package/src/dictionaries/bn.ts +17 -0
- package/src/dictionaries/de.ts +19 -40
- package/src/dictionaries/en.ts +26 -0
- package/src/dictionaries/es.ts +19 -40
- package/src/dictionaries/fr.ts +19 -40
- package/src/dictionaries/he.ts +2 -0
- package/src/dictionaries/hi.ts +18 -48
- package/src/dictionaries/id.ts +22 -43
- package/src/dictionaries/index.ts +5 -1
- package/src/dictionaries/it.ts +18 -39
- package/src/dictionaries/ja.ts +18 -39
- package/src/dictionaries/ko.ts +22 -43
- package/src/dictionaries/ms.ts +16 -50
- package/src/dictionaries/pl.ts +18 -45
- package/src/dictionaries/pt.ts +23 -48
- package/src/dictionaries/qu.ts +22 -43
- package/src/dictionaries/ru.ts +18 -48
- package/src/dictionaries/sw.ts +22 -43
- package/src/dictionaries/th.ts +17 -0
- package/src/dictionaries/tl.ts +16 -50
- package/src/dictionaries/tr.ts +24 -45
- package/src/dictionaries/uk.ts +18 -48
- package/src/dictionaries/vi.ts +17 -0
- package/src/dictionaries/zh.ts +22 -43
- package/src/grammar/grammar.test.ts +143 -24
- package/src/grammar/index.ts +1 -0
- package/src/grammar/profiles/index.ts +31 -0
- package/src/grammar/transformer.ts +161 -0
- package/src/parser/he.ts +29 -0
- package/src/parser/index.ts +1 -0
- package/src/schema-alignment.test.ts +154 -0
- package/src/test-utils/complete-languages.ts +40 -0
- package/src/translation-validation.test.ts +1 -26
package/dist/browser.d.cts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { K as KeywordProvider } from './transformer-PFsYELrc.cjs';
|
|
2
|
+
export { A as AdpositionType, E as ENGLISH_COMMANDS, a as ENGLISH_KEYWORDS, G as GrammarRule, b as GrammarTransformer, c as GrammaticalMarker, d as KeywordProviderOptions, L as LANGUAGE_FAMILY_DEFAULTS, e as LanguageProfile, f as LocaleManager, M as MorphologyType, P as ParsedElement, g as ParsedStatement, h as PatternMatcher, i as PatternTransform, S as SemanticRole, U as UNIVERSAL_ENGLISH_KEYWORDS, j as UNIVERSAL_PATTERNS, W as WordOrder, k as ar, k as arDictionary, l as arKeywords, m as arabicProfile, n as bn, n as bnDictionary, o as bnKeywords, p as chineseProfile, q as createEnglishProvider, r as createKeywordProvider, s as de, s as deDictionary, t as deKeywords, u as detectBrowserLocale, v as englishProfile, w as es, w as esDictionary, x as esKeywords, z as fr, z as frDictionary, B as frKeywords, C as frenchProfile, D as germanProfile, F as getProfile, H as getSupportedLocales, y as grammarExamples, I as hebrewProfile, N as hiDictionary, J as hiKeywords, N as hindiDictionary, O as id, O as idDictionary, Q as idKeywords, R as indonesianProfile, T as insertMarkers, V as it, V as itDictionary, X as itKeywords, Y as ja, Y as jaDictionary, Z as jaKeywords, _ as japaneseProfile, $ as joinTokens, a0 as ko, a0 as koDictionary, a1 as koKeywords, a2 as koreanProfile, a3 as ms, a3 as msDictionary, a4 as msKeywords, a5 as parseStatement, a6 as pl, a6 as plDictionary, a7 as plKeywords, a8 as portugueseProfile, a9 as profiles, aa as pt, aa as ptDictionary, ab as ptKeywords, ac as qu, ac as quDictionary, ad as quKeywords, ae as quechuaProfile, af as reorderRoles, ah as ruDictionary, ag as ruKeywords, ah as russianDictionary, ai as spanishProfile, aj as sw, aj as swDictionary, ak as swKeywords, al as swahiliProfile, am as th, am as thDictionary, an as thKeywords, ao as tl, ao as tlDictionary, ap as tlKeywords, aq as toEnglish, ar as toLocale, as as tr, as as trDictionary, at as trKeywords, au as transformStatement, av as translate, aw as turkishProfile, ay as ukDictionary, ax as ukKeywords, ay as ukrainianDictionary, az as vi, az as viDictionary, aA as viKeywords, aB as zh, aB as zhDictionary, aC as zhKeywords } from './transformer-PFsYELrc.cjs';
|
|
3
|
+
import { a as Dictionary } from './types-BcALAO6h.cjs';
|
|
4
|
+
|
|
5
|
+
declare const he: Dictionary;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Hebrew keyword provider for the hyperscript parser.
|
|
9
|
+
*
|
|
10
|
+
* Enables parsing hyperscript written in Hebrew (RTL, SVO):
|
|
11
|
+
* - `ב לחיצה מתג .active` → parses as `on click toggle .active`
|
|
12
|
+
*
|
|
13
|
+
* English keywords are also accepted (mixed mode).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { heKeywords } from '@lokascript/i18n/parser/he';
|
|
18
|
+
* import { Parser } from '@hyperfixi/core';
|
|
19
|
+
*
|
|
20
|
+
* const parser = new Parser({ keywords: heKeywords });
|
|
21
|
+
* parser.parse('ב לחיצה מתג .active');
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const heKeywords: KeywordProvider;
|
|
3
25
|
|
|
4
26
|
/**
|
|
5
27
|
* English dictionary - identity mapping since English is the canonical hyperscript language.
|
|
@@ -54,4 +76,4 @@ declare function getSupportedDirectPairs(): Array<{
|
|
|
54
76
|
target: string;
|
|
55
77
|
}>;
|
|
56
78
|
|
|
57
|
-
export { directMappings, en, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, translateWordDirect };
|
|
79
|
+
export { KeywordProvider, directMappings, en, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, he, he as heDictionary, heKeywords, translateWordDirect };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { K as KeywordProvider } from './transformer-BLv389qz.js';
|
|
2
|
+
export { A as AdpositionType, E as ENGLISH_COMMANDS, a as ENGLISH_KEYWORDS, G as GrammarRule, b as GrammarTransformer, c as GrammaticalMarker, d as KeywordProviderOptions, L as LANGUAGE_FAMILY_DEFAULTS, e as LanguageProfile, f as LocaleManager, M as MorphologyType, P as ParsedElement, g as ParsedStatement, h as PatternMatcher, i as PatternTransform, S as SemanticRole, U as UNIVERSAL_ENGLISH_KEYWORDS, j as UNIVERSAL_PATTERNS, W as WordOrder, k as ar, k as arDictionary, l as arKeywords, m as arabicProfile, n as bn, n as bnDictionary, o as bnKeywords, p as chineseProfile, q as createEnglishProvider, r as createKeywordProvider, s as de, s as deDictionary, t as deKeywords, u as detectBrowserLocale, v as englishProfile, w as es, w as esDictionary, x as esKeywords, z as fr, z as frDictionary, B as frKeywords, C as frenchProfile, D as germanProfile, F as getProfile, H as getSupportedLocales, y as grammarExamples, I as hebrewProfile, N as hiDictionary, J as hiKeywords, N as hindiDictionary, O as id, O as idDictionary, Q as idKeywords, R as indonesianProfile, T as insertMarkers, V as it, V as itDictionary, X as itKeywords, Y as ja, Y as jaDictionary, Z as jaKeywords, _ as japaneseProfile, $ as joinTokens, a0 as ko, a0 as koDictionary, a1 as koKeywords, a2 as koreanProfile, a3 as ms, a3 as msDictionary, a4 as msKeywords, a5 as parseStatement, a6 as pl, a6 as plDictionary, a7 as plKeywords, a8 as portugueseProfile, a9 as profiles, aa as pt, aa as ptDictionary, ab as ptKeywords, ac as qu, ac as quDictionary, ad as quKeywords, ae as quechuaProfile, af as reorderRoles, ah as ruDictionary, ag as ruKeywords, ah as russianDictionary, ai as spanishProfile, aj as sw, aj as swDictionary, ak as swKeywords, al as swahiliProfile, am as th, am as thDictionary, an as thKeywords, ao as tl, ao as tlDictionary, ap as tlKeywords, aq as toEnglish, ar as toLocale, as as tr, as as trDictionary, at as trKeywords, au as transformStatement, av as translate, aw as turkishProfile, ay as ukDictionary, ax as ukKeywords, ay as ukrainianDictionary, az as vi, az as viDictionary, aA as viKeywords, aB as zh, aB as zhDictionary, aC as zhKeywords } from './transformer-BLv389qz.js';
|
|
3
|
+
import { a as Dictionary } from './types-BcALAO6h.js';
|
|
4
|
+
|
|
5
|
+
declare const he: Dictionary;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Hebrew keyword provider for the hyperscript parser.
|
|
9
|
+
*
|
|
10
|
+
* Enables parsing hyperscript written in Hebrew (RTL, SVO):
|
|
11
|
+
* - `ב לחיצה מתג .active` → parses as `on click toggle .active`
|
|
12
|
+
*
|
|
13
|
+
* English keywords are also accepted (mixed mode).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { heKeywords } from '@lokascript/i18n/parser/he';
|
|
18
|
+
* import { Parser } from '@hyperfixi/core';
|
|
19
|
+
*
|
|
20
|
+
* const parser = new Parser({ keywords: heKeywords });
|
|
21
|
+
* parser.parse('ב לחיצה מתג .active');
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const heKeywords: KeywordProvider;
|
|
3
25
|
|
|
4
26
|
/**
|
|
5
27
|
* English dictionary - identity mapping since English is the canonical hyperscript language.
|
|
@@ -54,4 +76,4 @@ declare function getSupportedDirectPairs(): Array<{
|
|
|
54
76
|
target: string;
|
|
55
77
|
}>;
|
|
56
78
|
|
|
57
|
-
export { directMappings, en, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, translateWordDirect };
|
|
79
|
+
export { KeywordProvider, directMappings, en, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, he, he as heDictionary, heKeywords, translateWordDirect };
|