@lokascript/i18n 1.3.0 → 2.1.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.
Files changed (92) hide show
  1. package/dist/browser.cjs +3625 -3581
  2. package/dist/browser.cjs.map +1 -1
  3. package/dist/browser.d.cts +9 -3
  4. package/dist/browser.d.ts +9 -3
  5. package/dist/browser.js +3595 -3582
  6. package/dist/browser.js.map +1 -1
  7. package/dist/dictionaries/index.cjs +0 -44
  8. package/dist/dictionaries/index.cjs.map +1 -1
  9. package/dist/dictionaries/index.d.cts +30 -81
  10. package/dist/dictionaries/index.d.ts +30 -81
  11. package/dist/dictionaries/index.js +0 -44
  12. package/dist/dictionaries/index.js.map +1 -1
  13. package/dist/index.cjs +7605 -7544
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +38 -38
  16. package/dist/index.d.ts +38 -38
  17. package/dist/index.js +7576 -7545
  18. package/dist/index.js.map +1 -1
  19. package/dist/lokascript-i18n.min.js +1 -1
  20. package/dist/lokascript-i18n.min.js.map +1 -1
  21. package/dist/lokascript-i18n.mjs +3792 -3813
  22. package/dist/lokascript-i18n.mjs.map +1 -1
  23. package/dist/plugins/vite.cjs +0 -42
  24. package/dist/plugins/vite.cjs.map +1 -1
  25. package/dist/plugins/vite.js +0 -42
  26. package/dist/plugins/vite.js.map +1 -1
  27. package/dist/plugins/webpack.cjs +0 -42
  28. package/dist/plugins/webpack.cjs.map +1 -1
  29. package/dist/plugins/webpack.js +0 -42
  30. package/dist/plugins/webpack.js.map +1 -1
  31. package/dist/{transformer-BBKJJ2vd.d.ts → transformer-B6NgN3JQ.d.ts} +108 -15
  32. package/dist/{transformer-D8MM2_rz.d.cts → transformer-DQqxl6hb.d.cts} +108 -15
  33. package/dist/{types-naTJIIaT.d.cts → types-BYtpqGq3.d.cts} +1 -1
  34. package/dist/{types-naTJIIaT.d.ts → types-BYtpqGq3.d.ts} +1 -1
  35. package/package.json +8 -7
  36. package/src/browser.ts +22 -1
  37. package/src/dictionaries/ar.ts +0 -2
  38. package/src/dictionaries/de.ts +0 -2
  39. package/src/dictionaries/derive.ts +0 -2
  40. package/src/dictionaries/en.ts +0 -2
  41. package/src/dictionaries/es.ts +0 -2
  42. package/src/dictionaries/fr.ts +0 -2
  43. package/src/dictionaries/hi.ts +0 -2
  44. package/src/dictionaries/id.ts +0 -2
  45. package/src/dictionaries/index.ts +79 -163
  46. package/src/dictionaries/it.ts +0 -2
  47. package/src/dictionaries/ja.ts +0 -2
  48. package/src/dictionaries/ko.ts +0 -2
  49. package/src/dictionaries/ms.ts +0 -2
  50. package/src/dictionaries/pl.ts +0 -2
  51. package/src/dictionaries/pt.ts +0 -2
  52. package/src/dictionaries/qu.ts +0 -2
  53. package/src/dictionaries/ru.ts +0 -2
  54. package/src/dictionaries/sw.ts +0 -2
  55. package/src/dictionaries/tl.ts +0 -2
  56. package/src/dictionaries/tr.ts +0 -2
  57. package/src/dictionaries/uk.ts +0 -2
  58. package/src/dictionaries/vi.ts +0 -2
  59. package/src/dictionaries/zh.ts +0 -2
  60. package/src/grammar/direct-mappings.ts +0 -2
  61. package/src/grammar/grammar.test.ts +98 -0
  62. package/src/grammar/index.ts +9 -0
  63. package/src/grammar/transformer.ts +125 -73
  64. package/src/index.ts +30 -0
  65. package/src/parser/ar.ts +1 -1
  66. package/src/parser/bn.ts +9 -0
  67. package/src/parser/de.ts +1 -1
  68. package/src/parser/es.ts +1 -1
  69. package/src/parser/fr.ts +1 -1
  70. package/src/parser/hi.ts +9 -0
  71. package/src/parser/id.ts +1 -1
  72. package/src/parser/index.ts +10 -0
  73. package/src/parser/it.ts +9 -0
  74. package/src/parser/ja.ts +1 -1
  75. package/src/parser/ko.ts +1 -1
  76. package/src/parser/locale-manager.ts +1 -1
  77. package/src/parser/ms.ts +9 -0
  78. package/src/parser/pl.ts +9 -0
  79. package/src/parser/pt.ts +1 -1
  80. package/src/parser/qu.ts +1 -1
  81. package/src/parser/ru.ts +9 -0
  82. package/src/parser/sw.ts +1 -1
  83. package/src/parser/th.ts +9 -0
  84. package/src/parser/tl.ts +9 -0
  85. package/src/parser/tr.ts +1 -1
  86. package/src/parser/uk.ts +9 -0
  87. package/src/parser/vi.ts +9 -0
  88. package/src/parser/zh.ts +1 -1
  89. package/src/runtime.test.ts +152 -0
  90. package/src/runtime.ts +32 -13
  91. package/src/utils/locale.test.ts +108 -0
  92. package/src/utils/locale.ts +19 -25
@@ -1,4 +1,4 @@
1
- import { D as Dictionary } from './types-naTJIIaT.js';
1
+ import { D as Dictionary } from './types-BYtpqGq3.js';
2
2
 
3
3
  /**
4
4
  * KeywordProvider interface for locale-aware parsing.
@@ -369,7 +369,7 @@ declare const es: Dictionary;
369
369
  * @example
370
370
  * ```typescript
371
371
  * import { esKeywords } from '@lokascript/i18n/parser/es';
372
- * import { Parser } from '@lokascript/core';
372
+ * import { Parser } from '@hyperfixi/core';
373
373
  *
374
374
  * const parser = new Parser({ keywords: esKeywords });
375
375
  * parser.parse('en clic alternar .active');
@@ -397,7 +397,7 @@ declare const ja: Dictionary;
397
397
  * @example
398
398
  * ```typescript
399
399
  * import { jaKeywords } from '@lokascript/i18n/parser/ja';
400
- * import { Parser } from '@lokascript/core';
400
+ * import { Parser } from '@hyperfixi/core';
401
401
  *
402
402
  * const parser = new Parser({ keywords: jaKeywords });
403
403
  * parser.parse('クリック で 切り替え .active');
@@ -420,7 +420,7 @@ declare const fr: Dictionary;
420
420
  * @example
421
421
  * ```typescript
422
422
  * import { frKeywords } from '@lokascript/i18n/parser/fr';
423
- * import { Parser } from '@lokascript/core';
423
+ * import { Parser } from '@hyperfixi/core';
424
424
  *
425
425
  * const parser = new Parser({ keywords: frKeywords });
426
426
  * parser.parse('sur clic basculer .active');
@@ -448,7 +448,7 @@ declare const de: Dictionary;
448
448
  * @example
449
449
  * ```typescript
450
450
  * import { deKeywords } from '@lokascript/i18n/parser/de';
451
- * import { Parser } from '@lokascript/core';
451
+ * import { Parser } from '@hyperfixi/core';
452
452
  *
453
453
  * const parser = new Parser({ keywords: deKeywords });
454
454
  * parser.parse('bei klick umschalten .active');
@@ -480,7 +480,7 @@ declare const ar: Dictionary;
480
480
  * @example
481
481
  * ```typescript
482
482
  * import { arKeywords } from '@lokascript/i18n/parser/ar';
483
- * import { Parser } from '@lokascript/core';
483
+ * import { Parser } from '@hyperfixi/core';
484
484
  *
485
485
  * const parser = new Parser({ keywords: arKeywords });
486
486
  * parser.parse('على نقر بدل .active');
@@ -509,7 +509,7 @@ declare const ko: Dictionary;
509
509
  * @example
510
510
  * ```typescript
511
511
  * import { koKeywords } from '@lokascript/i18n/parser/ko';
512
- * import { Parser } from '@lokascript/core';
512
+ * import { Parser } from '@hyperfixi/core';
513
513
  *
514
514
  * const parser = new Parser({ keywords: koKeywords });
515
515
  * parser.parse('에 클릭 토글 .active');
@@ -539,7 +539,7 @@ declare const zh: Dictionary;
539
539
  * @example
540
540
  * ```typescript
541
541
  * import { zhKeywords } from '@lokascript/i18n/parser/zh';
542
- * import { Parser } from '@lokascript/core';
542
+ * import { Parser } from '@hyperfixi/core';
543
543
  *
544
544
  * const parser = new Parser({ keywords: zhKeywords });
545
545
  * parser.parse('当 点击 切换 .active');
@@ -569,7 +569,7 @@ declare const tr: Dictionary;
569
569
  * @example
570
570
  * ```typescript
571
571
  * import { trKeywords } from '@lokascript/i18n/parser/tr';
572
- * import { Parser } from '@lokascript/core';
572
+ * import { Parser } from '@hyperfixi/core';
573
573
  *
574
574
  * const parser = new Parser({ keywords: trKeywords });
575
575
  * parser.parse('üzerinde tıklama değiştir .active');
@@ -595,7 +595,7 @@ declare const id: Dictionary;
595
595
  * @example
596
596
  * ```typescript
597
597
  * import { idKeywords } from '@lokascript/i18n/parser/id';
598
- * import { Parser } from '@lokascript/core';
598
+ * import { Parser } from '@hyperfixi/core';
599
599
  *
600
600
  * const parser = new Parser({ keywords: idKeywords });
601
601
  * parser.parse('pada klik ganti .active');
@@ -624,7 +624,7 @@ declare const qu: Dictionary;
624
624
  * @example
625
625
  * ```typescript
626
626
  * import { quKeywords } from '@lokascript/i18n/parser/qu';
627
- * import { Parser } from '@lokascript/core';
627
+ * import { Parser } from '@hyperfixi/core';
628
628
  *
629
629
  * const parser = new Parser({ keywords: quKeywords });
630
630
  * parser.parse('ñitiy-pi yapay #count-ta');
@@ -653,7 +653,7 @@ declare const sw: Dictionary;
653
653
  * @example
654
654
  * ```typescript
655
655
  * import { swKeywords } from '@lokascript/i18n/parser/sw';
656
- * import { Parser } from '@lokascript/core';
656
+ * import { Parser } from '@hyperfixi/core';
657
657
  *
658
658
  * const parser = new Parser({ keywords: swKeywords });
659
659
  * parser.parse('kwenye bonyeza badilisha .active');
@@ -686,7 +686,7 @@ declare const pt: Dictionary;
686
686
  * @example
687
687
  * ```typescript
688
688
  * import { ptKeywords } from '@lokascript/i18n/parser/pt';
689
- * import { Parser } from '@lokascript/core';
689
+ * import { Parser } from '@hyperfixi/core';
690
690
  *
691
691
  * const parser = new Parser({ keywords: ptKeywords });
692
692
  * parser.parse('em clique alternar .active');
@@ -694,6 +694,99 @@ declare const pt: Dictionary;
694
694
  */
695
695
  declare const ptKeywords: KeywordProvider;
696
696
 
697
+ declare const it: Dictionary;
698
+
699
+ declare const itKeywords: KeywordProvider;
700
+
701
+ declare const vi: Dictionary;
702
+
703
+ declare const viKeywords: KeywordProvider;
704
+
705
+ /**
706
+ * Polish Dictionary
707
+ *
708
+ * Polish uses IMPERATIVE verb forms for software commands
709
+ * (unlike most languages which use infinitive).
710
+ */
711
+ declare const pl: Dictionary;
712
+
713
+ declare const plKeywords: KeywordProvider;
714
+
715
+ /**
716
+ * Russian Dictionary
717
+ *
718
+ * Translations for Russian language support.
719
+ * Uses infinitive verbs (common in software UIs).
720
+ */
721
+
722
+ declare const russianDictionary: Dictionary;
723
+
724
+ declare const ruKeywords: KeywordProvider;
725
+
726
+ /**
727
+ * Ukrainian Dictionary
728
+ *
729
+ * Translations for Ukrainian language support.
730
+ * Uses infinitive verbs (common in software UIs).
731
+ */
732
+
733
+ declare const ukrainianDictionary: Dictionary;
734
+
735
+ declare const ukKeywords: KeywordProvider;
736
+
737
+ /**
738
+ * Hindi Dictionary
739
+ *
740
+ * Translations for Hindi language support.
741
+ * Uses imperative verb forms (common in software UIs).
742
+ */
743
+
744
+ declare const hindiDictionary: Dictionary;
745
+
746
+ declare const hiKeywords: KeywordProvider;
747
+
748
+ /**
749
+ * Bengali Dictionary
750
+ *
751
+ * Bengali translations for hyperscript keywords.
752
+ */
753
+
754
+ declare const bn: Dictionary;
755
+
756
+ declare const bnKeywords: KeywordProvider;
757
+
758
+ /**
759
+ * Thai Dictionary
760
+ *
761
+ * Thai translations for hyperscript keywords.
762
+ */
763
+
764
+ declare const th: Dictionary;
765
+
766
+ declare const thKeywords: KeywordProvider;
767
+
768
+ /**
769
+ * Malay Dictionary
770
+ *
771
+ * Malay translations for hyperscript keywords.
772
+ * Malay is an SVO (Subject-Verb-Object) language with prepositions.
773
+ */
774
+
775
+ declare const ms: Dictionary;
776
+
777
+ declare const msKeywords: KeywordProvider;
778
+
779
+ /**
780
+ * Tagalog Dictionary
781
+ *
782
+ * Tagalog translations for hyperscript keywords.
783
+ * Tagalog is a VSO (Verb-Subject-Object) language with rich verbal morphology.
784
+ */
785
+
786
+ declare const tl: Dictionary;
787
+
788
+ declare const tlKeywords: KeywordProvider;
789
+
697
790
  /**
698
791
  * LocaleManager - Centralized locale configuration for hyperscript parsing.
699
792
  *
@@ -806,7 +899,7 @@ declare class LocaleManager {
806
899
  * @example
807
900
  * ```typescript
808
901
  * import { detectBrowserLocale } from '@lokascript/i18n/parser';
809
- * import { Parser } from '@lokascript/core';
902
+ * import { Parser } from '@hyperfixi/core';
810
903
  *
811
904
  * // Auto-detect and use browser locale
812
905
  * const parser = new Parser({ keywords: detectBrowserLocale() });
@@ -919,4 +1012,4 @@ declare const examples: {
919
1012
  };
920
1013
  };
921
1014
 
922
- export { englishProfile as $, ptKeywords as A, pt as B, detectBrowserLocale as C, type AdpositionType as D, ENGLISH_COMMANDS as E, type LanguageProfile as F, type GrammaticalMarker as G, type GrammarRule as H, type PatternTransform as I, type ParsedStatement as J, type KeywordProvider as K, LocaleManager as L, type MorphologyType as M, type ParsedElement as N, UNIVERSAL_PATTERNS as O, type PatternMatcher as P, LANGUAGE_FAMILY_DEFAULTS as Q, reorderRoles as R, type SemanticRole as S, insertMarkers as T, UNIVERSAL_ENGLISH_KEYWORDS as U, joinTokens as V, type WordOrder as W, transformStatement as X, profiles as Y, getProfile as Z, getSupportedLocales as _, type KeywordProviderOptions as a, japaneseProfile as a0, koreanProfile as a1, chineseProfile as a2, arabicProfile as a3, turkishProfile as a4, spanishProfile as a5, germanProfile as a6, frenchProfile as a7, portugueseProfile as a8, indonesianProfile as a9, quechuaProfile as aa, swahiliProfile as ab, GrammarTransformer as ac, parseStatement as ad, toLocale as ae, toEnglish as af, translate as ag, examples as ah, createEnglishProvider as b, createKeywordProvider as c, ENGLISH_KEYWORDS as d, esKeywords as e, es as f, ja as g, frKeywords as h, fr as i, jaKeywords as j, deKeywords as k, de as l, arKeywords as m, ar as n, koKeywords as o, ko as p, zh as q, tr as r, idKeywords as s, trKeywords as t, id as u, quKeywords as v, qu as w, swKeywords as x, sw as y, zhKeywords as z };
1015
+ export { ko as $, type AdpositionType as A, frenchProfile as B, germanProfile as C, getProfile as D, ENGLISH_COMMANDS as E, getSupportedLocales as F, type GrammarRule as G, examples as H, hindiDictionary as I, hiKeywords as J, type KeywordProvider as K, LANGUAGE_FAMILY_DEFAULTS as L, type MorphologyType as M, id as N, idKeywords as O, type ParsedElement as P, indonesianProfile as Q, insertMarkers as R, type SemanticRole as S, it as T, UNIVERSAL_ENGLISH_KEYWORDS as U, itKeywords as V, type WordOrder as W, ja as X, jaKeywords as Y, japaneseProfile as Z, joinTokens as _, ENGLISH_KEYWORDS as a, koKeywords as a0, koreanProfile as a1, ms as a2, msKeywords as a3, parseStatement as a4, pl as a5, plKeywords as a6, portugueseProfile as a7, profiles as a8, pt as a9, zh as aA, zhKeywords as aB, ptKeywords as aa, qu as ab, quKeywords as ac, quechuaProfile as ad, reorderRoles as ae, russianDictionary as af, ruKeywords as ag, spanishProfile as ah, sw as ai, swKeywords as aj, swahiliProfile as ak, th as al, thKeywords as am, tl as an, tlKeywords as ao, toEnglish as ap, toLocale as aq, tr as ar, trKeywords as as, transformStatement as at, translate as au, turkishProfile as av, ukrainianDictionary as aw, ukKeywords as ax, vi as ay, viKeywords as az, GrammarTransformer as b, type GrammaticalMarker as c, type KeywordProviderOptions as d, type LanguageProfile as e, LocaleManager as f, type ParsedStatement as g, type PatternMatcher as h, type PatternTransform as i, UNIVERSAL_PATTERNS as j, ar as k, arKeywords as l, arabicProfile as m, bn as n, bnKeywords as o, chineseProfile as p, createEnglishProvider as q, createKeywordProvider as r, de as s, deKeywords as t, detectBrowserLocale as u, englishProfile as v, es as w, esKeywords as x, fr as y, frKeywords as z };
@@ -1,4 +1,4 @@
1
- import { D as Dictionary } from './types-naTJIIaT.cjs';
1
+ import { D as Dictionary } from './types-BYtpqGq3.cjs';
2
2
 
3
3
  /**
4
4
  * KeywordProvider interface for locale-aware parsing.
@@ -369,7 +369,7 @@ declare const es: Dictionary;
369
369
  * @example
370
370
  * ```typescript
371
371
  * import { esKeywords } from '@lokascript/i18n/parser/es';
372
- * import { Parser } from '@lokascript/core';
372
+ * import { Parser } from '@hyperfixi/core';
373
373
  *
374
374
  * const parser = new Parser({ keywords: esKeywords });
375
375
  * parser.parse('en clic alternar .active');
@@ -397,7 +397,7 @@ declare const ja: Dictionary;
397
397
  * @example
398
398
  * ```typescript
399
399
  * import { jaKeywords } from '@lokascript/i18n/parser/ja';
400
- * import { Parser } from '@lokascript/core';
400
+ * import { Parser } from '@hyperfixi/core';
401
401
  *
402
402
  * const parser = new Parser({ keywords: jaKeywords });
403
403
  * parser.parse('クリック で 切り替え .active');
@@ -420,7 +420,7 @@ declare const fr: Dictionary;
420
420
  * @example
421
421
  * ```typescript
422
422
  * import { frKeywords } from '@lokascript/i18n/parser/fr';
423
- * import { Parser } from '@lokascript/core';
423
+ * import { Parser } from '@hyperfixi/core';
424
424
  *
425
425
  * const parser = new Parser({ keywords: frKeywords });
426
426
  * parser.parse('sur clic basculer .active');
@@ -448,7 +448,7 @@ declare const de: Dictionary;
448
448
  * @example
449
449
  * ```typescript
450
450
  * import { deKeywords } from '@lokascript/i18n/parser/de';
451
- * import { Parser } from '@lokascript/core';
451
+ * import { Parser } from '@hyperfixi/core';
452
452
  *
453
453
  * const parser = new Parser({ keywords: deKeywords });
454
454
  * parser.parse('bei klick umschalten .active');
@@ -480,7 +480,7 @@ declare const ar: Dictionary;
480
480
  * @example
481
481
  * ```typescript
482
482
  * import { arKeywords } from '@lokascript/i18n/parser/ar';
483
- * import { Parser } from '@lokascript/core';
483
+ * import { Parser } from '@hyperfixi/core';
484
484
  *
485
485
  * const parser = new Parser({ keywords: arKeywords });
486
486
  * parser.parse('على نقر بدل .active');
@@ -509,7 +509,7 @@ declare const ko: Dictionary;
509
509
  * @example
510
510
  * ```typescript
511
511
  * import { koKeywords } from '@lokascript/i18n/parser/ko';
512
- * import { Parser } from '@lokascript/core';
512
+ * import { Parser } from '@hyperfixi/core';
513
513
  *
514
514
  * const parser = new Parser({ keywords: koKeywords });
515
515
  * parser.parse('에 클릭 토글 .active');
@@ -539,7 +539,7 @@ declare const zh: Dictionary;
539
539
  * @example
540
540
  * ```typescript
541
541
  * import { zhKeywords } from '@lokascript/i18n/parser/zh';
542
- * import { Parser } from '@lokascript/core';
542
+ * import { Parser } from '@hyperfixi/core';
543
543
  *
544
544
  * const parser = new Parser({ keywords: zhKeywords });
545
545
  * parser.parse('当 点击 切换 .active');
@@ -569,7 +569,7 @@ declare const tr: Dictionary;
569
569
  * @example
570
570
  * ```typescript
571
571
  * import { trKeywords } from '@lokascript/i18n/parser/tr';
572
- * import { Parser } from '@lokascript/core';
572
+ * import { Parser } from '@hyperfixi/core';
573
573
  *
574
574
  * const parser = new Parser({ keywords: trKeywords });
575
575
  * parser.parse('üzerinde tıklama değiştir .active');
@@ -595,7 +595,7 @@ declare const id: Dictionary;
595
595
  * @example
596
596
  * ```typescript
597
597
  * import { idKeywords } from '@lokascript/i18n/parser/id';
598
- * import { Parser } from '@lokascript/core';
598
+ * import { Parser } from '@hyperfixi/core';
599
599
  *
600
600
  * const parser = new Parser({ keywords: idKeywords });
601
601
  * parser.parse('pada klik ganti .active');
@@ -624,7 +624,7 @@ declare const qu: Dictionary;
624
624
  * @example
625
625
  * ```typescript
626
626
  * import { quKeywords } from '@lokascript/i18n/parser/qu';
627
- * import { Parser } from '@lokascript/core';
627
+ * import { Parser } from '@hyperfixi/core';
628
628
  *
629
629
  * const parser = new Parser({ keywords: quKeywords });
630
630
  * parser.parse('ñitiy-pi yapay #count-ta');
@@ -653,7 +653,7 @@ declare const sw: Dictionary;
653
653
  * @example
654
654
  * ```typescript
655
655
  * import { swKeywords } from '@lokascript/i18n/parser/sw';
656
- * import { Parser } from '@lokascript/core';
656
+ * import { Parser } from '@hyperfixi/core';
657
657
  *
658
658
  * const parser = new Parser({ keywords: swKeywords });
659
659
  * parser.parse('kwenye bonyeza badilisha .active');
@@ -686,7 +686,7 @@ declare const pt: Dictionary;
686
686
  * @example
687
687
  * ```typescript
688
688
  * import { ptKeywords } from '@lokascript/i18n/parser/pt';
689
- * import { Parser } from '@lokascript/core';
689
+ * import { Parser } from '@hyperfixi/core';
690
690
  *
691
691
  * const parser = new Parser({ keywords: ptKeywords });
692
692
  * parser.parse('em clique alternar .active');
@@ -694,6 +694,99 @@ declare const pt: Dictionary;
694
694
  */
695
695
  declare const ptKeywords: KeywordProvider;
696
696
 
697
+ declare const it: Dictionary;
698
+
699
+ declare const itKeywords: KeywordProvider;
700
+
701
+ declare const vi: Dictionary;
702
+
703
+ declare const viKeywords: KeywordProvider;
704
+
705
+ /**
706
+ * Polish Dictionary
707
+ *
708
+ * Polish uses IMPERATIVE verb forms for software commands
709
+ * (unlike most languages which use infinitive).
710
+ */
711
+ declare const pl: Dictionary;
712
+
713
+ declare const plKeywords: KeywordProvider;
714
+
715
+ /**
716
+ * Russian Dictionary
717
+ *
718
+ * Translations for Russian language support.
719
+ * Uses infinitive verbs (common in software UIs).
720
+ */
721
+
722
+ declare const russianDictionary: Dictionary;
723
+
724
+ declare const ruKeywords: KeywordProvider;
725
+
726
+ /**
727
+ * Ukrainian Dictionary
728
+ *
729
+ * Translations for Ukrainian language support.
730
+ * Uses infinitive verbs (common in software UIs).
731
+ */
732
+
733
+ declare const ukrainianDictionary: Dictionary;
734
+
735
+ declare const ukKeywords: KeywordProvider;
736
+
737
+ /**
738
+ * Hindi Dictionary
739
+ *
740
+ * Translations for Hindi language support.
741
+ * Uses imperative verb forms (common in software UIs).
742
+ */
743
+
744
+ declare const hindiDictionary: Dictionary;
745
+
746
+ declare const hiKeywords: KeywordProvider;
747
+
748
+ /**
749
+ * Bengali Dictionary
750
+ *
751
+ * Bengali translations for hyperscript keywords.
752
+ */
753
+
754
+ declare const bn: Dictionary;
755
+
756
+ declare const bnKeywords: KeywordProvider;
757
+
758
+ /**
759
+ * Thai Dictionary
760
+ *
761
+ * Thai translations for hyperscript keywords.
762
+ */
763
+
764
+ declare const th: Dictionary;
765
+
766
+ declare const thKeywords: KeywordProvider;
767
+
768
+ /**
769
+ * Malay Dictionary
770
+ *
771
+ * Malay translations for hyperscript keywords.
772
+ * Malay is an SVO (Subject-Verb-Object) language with prepositions.
773
+ */
774
+
775
+ declare const ms: Dictionary;
776
+
777
+ declare const msKeywords: KeywordProvider;
778
+
779
+ /**
780
+ * Tagalog Dictionary
781
+ *
782
+ * Tagalog translations for hyperscript keywords.
783
+ * Tagalog is a VSO (Verb-Subject-Object) language with rich verbal morphology.
784
+ */
785
+
786
+ declare const tl: Dictionary;
787
+
788
+ declare const tlKeywords: KeywordProvider;
789
+
697
790
  /**
698
791
  * LocaleManager - Centralized locale configuration for hyperscript parsing.
699
792
  *
@@ -806,7 +899,7 @@ declare class LocaleManager {
806
899
  * @example
807
900
  * ```typescript
808
901
  * import { detectBrowserLocale } from '@lokascript/i18n/parser';
809
- * import { Parser } from '@lokascript/core';
902
+ * import { Parser } from '@hyperfixi/core';
810
903
  *
811
904
  * // Auto-detect and use browser locale
812
905
  * const parser = new Parser({ keywords: detectBrowserLocale() });
@@ -919,4 +1012,4 @@ declare const examples: {
919
1012
  };
920
1013
  };
921
1014
 
922
- export { englishProfile as $, ptKeywords as A, pt as B, detectBrowserLocale as C, type AdpositionType as D, ENGLISH_COMMANDS as E, type LanguageProfile as F, type GrammaticalMarker as G, type GrammarRule as H, type PatternTransform as I, type ParsedStatement as J, type KeywordProvider as K, LocaleManager as L, type MorphologyType as M, type ParsedElement as N, UNIVERSAL_PATTERNS as O, type PatternMatcher as P, LANGUAGE_FAMILY_DEFAULTS as Q, reorderRoles as R, type SemanticRole as S, insertMarkers as T, UNIVERSAL_ENGLISH_KEYWORDS as U, joinTokens as V, type WordOrder as W, transformStatement as X, profiles as Y, getProfile as Z, getSupportedLocales as _, type KeywordProviderOptions as a, japaneseProfile as a0, koreanProfile as a1, chineseProfile as a2, arabicProfile as a3, turkishProfile as a4, spanishProfile as a5, germanProfile as a6, frenchProfile as a7, portugueseProfile as a8, indonesianProfile as a9, quechuaProfile as aa, swahiliProfile as ab, GrammarTransformer as ac, parseStatement as ad, toLocale as ae, toEnglish as af, translate as ag, examples as ah, createEnglishProvider as b, createKeywordProvider as c, ENGLISH_KEYWORDS as d, esKeywords as e, es as f, ja as g, frKeywords as h, fr as i, jaKeywords as j, deKeywords as k, de as l, arKeywords as m, ar as n, koKeywords as o, ko as p, zh as q, tr as r, idKeywords as s, trKeywords as t, id as u, quKeywords as v, qu as w, swKeywords as x, sw as y, zhKeywords as z };
1015
+ export { ko as $, type AdpositionType as A, frenchProfile as B, germanProfile as C, getProfile as D, ENGLISH_COMMANDS as E, getSupportedLocales as F, type GrammarRule as G, examples as H, hindiDictionary as I, hiKeywords as J, type KeywordProvider as K, LANGUAGE_FAMILY_DEFAULTS as L, type MorphologyType as M, id as N, idKeywords as O, type ParsedElement as P, indonesianProfile as Q, insertMarkers as R, type SemanticRole as S, it as T, UNIVERSAL_ENGLISH_KEYWORDS as U, itKeywords as V, type WordOrder as W, ja as X, jaKeywords as Y, japaneseProfile as Z, joinTokens as _, ENGLISH_KEYWORDS as a, koKeywords as a0, koreanProfile as a1, ms as a2, msKeywords as a3, parseStatement as a4, pl as a5, plKeywords as a6, portugueseProfile as a7, profiles as a8, pt as a9, zh as aA, zhKeywords as aB, ptKeywords as aa, qu as ab, quKeywords as ac, quechuaProfile as ad, reorderRoles as ae, russianDictionary as af, ruKeywords as ag, spanishProfile as ah, sw as ai, swKeywords as aj, swahiliProfile as ak, th as al, thKeywords as am, tl as an, tlKeywords as ao, toEnglish as ap, toLocale as aq, tr as ar, trKeywords as as, transformStatement as at, translate as au, turkishProfile as av, ukrainianDictionary as aw, ukKeywords as ax, vi as ay, viKeywords as az, GrammarTransformer as b, type GrammaticalMarker as c, type KeywordProviderOptions as d, type LanguageProfile as e, LocaleManager as f, type ParsedStatement as g, type PatternMatcher as h, type PatternTransform as i, UNIVERSAL_PATTERNS as j, ar as k, arKeywords as l, arabicProfile as m, bn as n, bnKeywords as o, chineseProfile as p, createEnglishProvider as q, createKeywordProvider as r, de as s, deKeywords as t, detectBrowserLocale as u, englishProfile as v, es as w, esKeywords as x, fr as y, frKeywords as z };
@@ -119,4 +119,4 @@ interface TranslationResult {
119
119
  warnings?: string[];
120
120
  }
121
121
 
122
- export { type Dictionary as D, type I18nConfig as I, type LocaleMetadata as L, type TranslationOptions as T, type ValidationResult as V, type TranslationResult as a, type Token as b, type DictionaryCategory as c, type ValidationError as d, type ValidationWarning as e, type TranslationContext as f, type TokenType as g, DICTIONARY_CATEGORIES as h, isDictionaryCategory as i, getDictionaryCategory as j, forEachCategory as k, findInDictionary as l, translateFromEnglish as t };
122
+ export { type Dictionary as D, type I18nConfig as I, type LocaleMetadata as L, type TranslationOptions as T, type ValidationResult as V, type TranslationResult as a, type Token as b, DICTIONARY_CATEGORIES as c, type DictionaryCategory as d, type TokenType as e, type TranslationContext as f, type ValidationError as g, type ValidationWarning as h, findInDictionary as i, forEachCategory as j, getDictionaryCategory as k, isDictionaryCategory as l, translateFromEnglish as t };
@@ -119,4 +119,4 @@ interface TranslationResult {
119
119
  warnings?: string[];
120
120
  }
121
121
 
122
- export { type Dictionary as D, type I18nConfig as I, type LocaleMetadata as L, type TranslationOptions as T, type ValidationResult as V, type TranslationResult as a, type Token as b, type DictionaryCategory as c, type ValidationError as d, type ValidationWarning as e, type TranslationContext as f, type TokenType as g, DICTIONARY_CATEGORIES as h, isDictionaryCategory as i, getDictionaryCategory as j, forEachCategory as k, findInDictionary as l, translateFromEnglish as t };
122
+ export { type Dictionary as D, type I18nConfig as I, type LocaleMetadata as L, type TranslationOptions as T, type ValidationResult as V, type TranslationResult as a, type Token as b, DICTIONARY_CATEGORIES as c, type DictionaryCategory as d, type TokenType as e, type TranslationContext as f, type ValidationError as g, type ValidationWarning as h, findInDictionary as i, forEachCategory as j, getDictionaryCategory as k, isDictionaryCategory as l, translateFromEnglish as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/i18n",
3
- "version": "1.3.0",
3
+ "version": "2.1.0",
4
4
  "description": "Grammar transformation and keyword translation for hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -38,6 +38,7 @@
38
38
  "build:browser": "rollup -c rollup.config.mjs",
39
39
  "dev": "tsup --watch",
40
40
  "test": "vitest",
41
+ "test:check": "vitest run --reporter=dot 2>&1 | tail -5",
41
42
  "test:coverage": "vitest run --coverage",
42
43
  "typecheck": "tsc --noEmit",
43
44
  "lint": "eslint src --ext ts,tsx",
@@ -52,21 +53,21 @@
52
53
  "translation",
53
54
  "localization"
54
55
  ],
55
- "author": "Hyperfixi Team",
56
+ "author": "LokaScript Contributors",
56
57
  "license": "MIT",
57
58
  "repository": {
58
59
  "type": "git",
59
- "url": "git+https://github.com/codetalcott/lokascript.git",
60
+ "url": "git+https://github.com/codetalcott/hyperfixi.git",
60
61
  "directory": "packages/i18n"
61
62
  },
62
63
  "bugs": {
63
- "url": "https://github.com/codetalcott/lokascript/issues"
64
+ "url": "https://github.com/codetalcott/hyperfixi/issues"
64
65
  },
65
- "homepage": "https://github.com/codetalcott/lokascript/tree/main/packages/i18n#readme",
66
+ "homepage": "https://github.com/codetalcott/hyperfixi/tree/main/packages/i18n#readme",
66
67
  "dependencies": {
67
- "@lokascript/core": "*",
68
+ "@hyperfixi/core": "*",
68
69
  "@lokascript/semantic": "*",
69
- "esbuild": "0.25.11",
70
+ "esbuild": "0.27.3",
70
71
  "happy-dom": "20.0.6",
71
72
  "vite": "^7.1.12"
72
73
  },
package/src/browser.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  * Usage with ES modules:
20
20
  * ```typescript
21
21
  * import { esKeywords } from '@lokascript/i18n';
22
- * import { Parser } from '@lokascript/core';
22
+ * import { Parser } from '@hyperfixi/core';
23
23
  *
24
24
  * const parser = new Parser(tokens, { keywords: esKeywords });
25
25
  * ```
@@ -49,11 +49,22 @@ export { idKeywords, idDictionary } from './parser/id';
49
49
  export { quKeywords, quDictionary } from './parser/qu';
50
50
  export { swKeywords, swDictionary } from './parser/sw';
51
51
  export { ptKeywords, ptDictionary } from './parser/pt';
52
+ export { itKeywords, itDictionary } from './parser/it';
53
+ export { viKeywords, viDictionary } from './parser/vi';
54
+ export { plKeywords, plDictionary } from './parser/pl';
55
+ export { ruKeywords, ruDictionary } from './parser/ru';
56
+ export { ukKeywords, ukDictionary } from './parser/uk';
57
+ export { hiKeywords, hiDictionary } from './parser/hi';
58
+ export { bnKeywords, bnDictionary } from './parser/bn';
59
+ export { thKeywords, thDictionary } from './parser/th';
60
+ export { msKeywords, msDictionary } from './parser/ms';
61
+ export { tlKeywords, tlDictionary } from './parser/tl';
52
62
 
53
63
  // Locale management
54
64
  export { LocaleManager, detectBrowserLocale } from './parser/locale-manager';
55
65
 
56
66
  // Re-export dictionaries for custom provider creation
67
+ export { en } from './dictionaries/en';
57
68
  export { es } from './dictionaries/es';
58
69
  export { ja } from './dictionaries/ja';
59
70
  export { fr } from './dictionaries/fr';
@@ -66,6 +77,16 @@ export { id } from './dictionaries/id';
66
77
  export { qu } from './dictionaries/qu';
67
78
  export { sw } from './dictionaries/sw';
68
79
  export { pt } from './dictionaries/pt';
80
+ export { it } from './dictionaries/it';
81
+ export { vi } from './dictionaries/vi';
82
+ export { pl } from './dictionaries/pl';
83
+ export { russianDictionary } from './dictionaries/ru';
84
+ export { ukrainianDictionary } from './dictionaries/uk';
85
+ export { hindiDictionary } from './dictionaries/hi';
86
+ export { bn } from './dictionaries/bn';
87
+ export { th } from './dictionaries/th';
88
+ export { ms } from './dictionaries/ms';
89
+ export { tl } from './dictionaries/tl';
69
90
 
70
91
  // Grammar-aware transformation system (Phase 2)
71
92
  export {
@@ -49,9 +49,7 @@ export const ar: Dictionary = {
49
49
  // Data Commands
50
50
  increment: 'زِد',
51
51
  decrement: 'أنقص',
52
- bind: 'اربط',
53
52
  default: 'افتراضي',
54
- persist: 'احفظ',
55
53
 
56
54
  // Navigation Commands
57
55
  go: 'اذهب',
@@ -49,9 +49,7 @@ export const de: Dictionary = {
49
49
  // Data Commands
50
50
  increment: 'erhöhen',
51
51
  decrement: 'verringern',
52
- bind: 'binden',
53
52
  default: 'standard',
54
- persist: 'speichern',
55
53
 
56
54
  // Navigation Commands
57
55
  go: 'gehen',
@@ -76,9 +76,7 @@ const COMMAND_KEYWORDS = [
76
76
  // Data commands
77
77
  'increment',
78
78
  'decrement',
79
- 'bind',
80
79
  'default',
81
- 'persist',
82
80
  // Navigation
83
81
  'go',
84
82
  'pushUrl',
@@ -53,9 +53,7 @@ export const en: Dictionary = {
53
53
  // Data Commands
54
54
  increment: 'increment',
55
55
  decrement: 'decrement',
56
- bind: 'bind',
57
56
  default: 'default',
58
- persist: 'persist',
59
57
 
60
58
  // Navigation Commands
61
59
  go: 'go',
@@ -49,9 +49,7 @@ export const es: Dictionary = {
49
49
  // Data Commands
50
50
  increment: 'incrementar',
51
51
  decrement: 'decrementar',
52
- bind: 'vincular',
53
52
  default: 'predeterminar',
54
- persist: 'persistir',
55
53
 
56
54
  // Navigation Commands
57
55
  go: 'ir',
@@ -49,9 +49,7 @@ export const fr: Dictionary = {
49
49
  // Data Commands
50
50
  increment: 'incrémenter',
51
51
  decrement: 'décrémenter',
52
- bind: 'lier',
53
52
  default: 'défaut',
54
- persist: 'persister',
55
53
 
56
54
  // Navigation Commands
57
55
  go: 'aller',
@@ -54,9 +54,7 @@ export const hindiDictionary: Dictionary = {
54
54
  // Data Commands
55
55
  increment: 'बढ़ाएं',
56
56
  decrement: 'घटाएं',
57
- bind: 'बाँधें',
58
57
  default: 'डिफ़ॉल्ट',
59
- persist: 'सहेजें',
60
58
 
61
59
  // Navigation Commands
62
60
  go: 'जाएं',
@@ -49,9 +49,7 @@ export const id: Dictionary = {
49
49
  // Data Commands
50
50
  increment: 'tambahkan',
51
51
  decrement: 'kurangi',
52
- bind: 'ikat',
53
52
  default: 'bawaan',
54
- persist: 'simpan',
55
53
 
56
54
  // Navigation Commands
57
55
  go: 'pergi',