@drghaliasri/butex 3.2.2 → 4.0.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/react.mjs CHANGED
@@ -565,6 +565,24 @@ var ATOMIC_OPERATOR_COMMANDS = {
565
565
  title: "\u0623\u0643\u0628\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A",
566
566
  svg_path: null
567
567
  },
568
+ coloneqq: {
569
+ id: "coloneqq",
570
+ category: "operators1",
571
+ Tex: "\\coloneqq",
572
+ mirror: true,
573
+ Label: "\u2254",
574
+ title: "\u064A\u0639\u0631\u0641 \u0628\u0623\u0646\u0647 \u064A\u0633\u0627\u0648\u064A",
575
+ svg_path: null
576
+ },
577
+ eqqcolon: {
578
+ id: "eqqcolon",
579
+ category: "operators1",
580
+ Tex: "\\eqqcolon",
581
+ mirror: true,
582
+ Label: "\u2255",
583
+ title: "\u064A\u0633\u0627\u0648\u064A \u0628\u0627\u0644\u062A\u0639\u0631\u064A\u0641",
584
+ svg_path: null
585
+ },
568
586
  ///// Operators 2
569
587
  propto: {
570
588
  id: "propto",
@@ -731,6 +749,60 @@ var ATOMIC_OPERATOR_COMMANDS = {
731
749
  title: "\u064A\u0643\u0627\u0641\u0626",
732
750
  svg_path: null
733
751
  },
752
+ implies: {
753
+ id: "implies",
754
+ category: "operators3",
755
+ Tex: "\\implies",
756
+ mirror: true,
757
+ Label: "\u21D2",
758
+ title: "\u064A\u0633\u062A\u0644\u0632\u0645",
759
+ svg_path: null
760
+ },
761
+ impliedby: {
762
+ id: "impliedby",
763
+ category: "operators3",
764
+ Tex: "\\impliedby",
765
+ mirror: true,
766
+ Label: "\u21D0",
767
+ title: "\u0645\u0633\u062A\u0644\u0632\u0645 \u0645\u0646",
768
+ svg_path: null
769
+ },
770
+ iff: {
771
+ id: "iff",
772
+ category: "operators3",
773
+ Tex: "\\iff",
774
+ mirror: false,
775
+ Label: "\u21D4",
776
+ title: "\u0625\u0630\u0627 \u0648\u0641\u0642\u0637 \u0625\u0630\u0627",
777
+ svg_path: null
778
+ },
779
+ Longrightarrow: {
780
+ id: "Longrightarrow",
781
+ category: "operators3",
782
+ Tex: "\\Longrightarrow",
783
+ mirror: true,
784
+ Label: "\u27F9",
785
+ title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0637\u0648\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
786
+ svg_path: null
787
+ },
788
+ Longleftarrow: {
789
+ id: "Longleftarrow",
790
+ category: "operators3",
791
+ Tex: "\\Longleftarrow",
792
+ mirror: true,
793
+ Label: "\u27F8",
794
+ title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0637\u0648\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
795
+ svg_path: null
796
+ },
797
+ to: {
798
+ id: "to",
799
+ category: "operators3",
800
+ Tex: "\\to",
801
+ mirror: true,
802
+ Label: "\u2192",
803
+ title: "\u064A\u0624\u0648\u0644 \u0625\u0644\u0649",
804
+ svg_path: null
805
+ },
734
806
  rightleftharpoons: {
735
807
  id: "rightleftharpoons",
736
808
  category: "operators3",
@@ -1650,6 +1722,321 @@ function undoRedoCanRedo(stacks) {
1650
1722
  return stacks.future.length > 0;
1651
1723
  }
1652
1724
 
1725
+ // src/editor/uiLocale.ts
1726
+ var ENGLISH_COMMAND_TITLES = {
1727
+ cos: "Cosine",
1728
+ sin: "Sine",
1729
+ tan: "Tangent",
1730
+ cot: "Cotangent",
1731
+ sec: "Secant",
1732
+ csc: "Cosecant",
1733
+ arccos: "Inverse cosine",
1734
+ arcsin: "Inverse sine",
1735
+ arctan: "Inverse tangent",
1736
+ arccot: "Inverse cotangent",
1737
+ arcsec: "Inverse secant",
1738
+ arccsc: "Inverse cosecant",
1739
+ cosh: "Hyperbolic cosine",
1740
+ sinh: "Hyperbolic sine",
1741
+ tanh: "Hyperbolic tangent",
1742
+ coth: "Hyperbolic cotangent",
1743
+ sum: "Sum",
1744
+ prod: "Product",
1745
+ lim: "Limit",
1746
+ max: "Maximum",
1747
+ min: "Minimum",
1748
+ sup: "Supremum",
1749
+ inf: "Infimum",
1750
+ pi: "Pi",
1751
+ exp: "Exponential",
1752
+ ln: "Natural logarithm",
1753
+ log: "Logarithm",
1754
+ det: "Determinant",
1755
+ N: "Natural numbers",
1756
+ Z: "Integers",
1757
+ Q: "Rational numbers",
1758
+ R: "Real numbers",
1759
+ C: "Complex numbers",
1760
+ H: "Quaternions",
1761
+ negThinSpace: "Negative thin space",
1762
+ mediumSpace: "Medium space",
1763
+ thickSpace: "Thick space",
1764
+ quadSpace: "Large space",
1765
+ qquadSpace: "Extra-large space"
1766
+ };
1767
+ var ENGLISH_OPERATOR_TITLES = {
1768
+ inf: "Infinity",
1769
+ times: "Multiplication",
1770
+ div: "Division",
1771
+ pm: "Plus or minus",
1772
+ mp: "Minus or plus",
1773
+ neq: "Not equal",
1774
+ approx: "Approximately equal",
1775
+ sim: "Similar",
1776
+ mid: "Divides",
1777
+ leq: "Less than or equal",
1778
+ geq: "Greater than or equal",
1779
+ coloneqq: "Defined as equal to",
1780
+ eqqcolon: "Equal by definition",
1781
+ propto: "Proportional to",
1782
+ in: "Element of",
1783
+ notin: "Not an element of",
1784
+ subset: "Subset of",
1785
+ supset: "Superset of",
1786
+ subseteq: "Subset of or equal",
1787
+ supseteq: "Superset of or equal",
1788
+ cap: "Intersection",
1789
+ cup: "Union",
1790
+ emptyset: "Empty set",
1791
+ nsubseteq: "Not a subset of or equal",
1792
+ nsupseteq: "Not a superset of or equal",
1793
+ ldots: "Horizontal dots",
1794
+ cdot: "Multiplication dot",
1795
+ cdots: "Centered horizontal dots",
1796
+ vdots: "Vertical dots",
1797
+ ddots: "Diagonal dots",
1798
+ leftrightarrowDouble: "Equivalent",
1799
+ implies: "Implies",
1800
+ impliedby: "Implied by",
1801
+ iff: "If and only if",
1802
+ Longrightarrow: "Long double arrow right",
1803
+ Longleftarrow: "Long double arrow left",
1804
+ to: "Maps to",
1805
+ rightleftharpoons: "Equilibrium",
1806
+ leftarrow: "Left arrow",
1807
+ rightarrow: "Right arrow",
1808
+ leftarrowDouble: "Double left arrow",
1809
+ rightarrowDouble: "Double right arrow",
1810
+ leftharpoonup: "Upper left harpoon",
1811
+ rightharpoonup: "Upper right harpoon",
1812
+ leftharpoondown: "Lower left harpoon",
1813
+ rightharpoondown: "Lower right harpoon",
1814
+ int: "Integral",
1815
+ iint: "Double integral",
1816
+ iiint: "Triple integral",
1817
+ iiiint: "Quadruple integral",
1818
+ oint: "Contour integral",
1819
+ oiint: "Closed surface integral",
1820
+ oiiint: "Closed volume integral"
1821
+ };
1822
+ var EQUATION_EDITOR_MESSAGES = {
1823
+ ar: {
1824
+ undoRedo: "\u062A\u0631\u0627\u062C\u0639 \u0648\u0625\u0639\u0627\u062F\u0629",
1825
+ undo: "\u062A\u0631\u0627\u062C\u0639",
1826
+ redo: "\u0625\u0639\u0627\u062F\u0629",
1827
+ clipboard: "\u0627\u0644\u062D\u0627\u0641\u0638\u0629",
1828
+ copy: "\u0646\u0633\u062E",
1829
+ cut: "\u0642\u0635",
1830
+ paste: "\u0644\u0635\u0642",
1831
+ editorSettings: "\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062D\u0631\u0631",
1832
+ toggleSide: "\u062A\u0628\u062F\u064A\u0644 \u0639\u0631\u0628\u064A / \u0625\u0646\u062C\u0644\u064A\u0632\u064A",
1833
+ structures: "\u0627\u0644\u0628\u0646\u0649",
1834
+ insertDelimiters: "\u0625\u062F\u0631\u0627\u062C \u0645\u062D\u062F\u062F\u0627\u062A",
1835
+ insertParentheses: "\u0625\u062F\u0631\u0627\u062C \u0642\u0648\u0633\u064A\u0646",
1836
+ insertBrackets: "\u0625\u062F\u0631\u0627\u062C \u0645\u0639\u0642\u0648\u0641\u064A\u0646",
1837
+ insertBraces: "\u0625\u062F\u0631\u0627\u062C \u062D\u0627\u0635\u0631\u062A\u064A\u0646",
1838
+ insertFraction: "\u0625\u062F\u0631\u0627\u062C \u0643\u0633\u0631",
1839
+ insertRoot: "\u0625\u062F\u0631\u0627\u062C \u062C\u0630\u0631",
1840
+ environments: "\u0627\u0644\u0628\u064A\u0626\u0627\u062A",
1841
+ insertEnvironment: "\u0625\u062F\u0631\u0627\u062C \u0628\u064A\u0626\u0629 \u0634\u0628\u0643\u064A\u0629",
1842
+ environmentType: "\u0646\u0648\u0639 \u0627\u0644\u0628\u064A\u0626\u0629",
1843
+ matrix: "\u0645\u0635\u0641\u0648\u0641\u0629",
1844
+ array: "\u062C\u062F\u0648\u0644",
1845
+ aligned: "\u0645\u062D\u0627\u0630\u0627\u0629",
1846
+ matrixType: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629",
1847
+ chooseEnvironmentSize: "\u0627\u062E\u062A\u064A\u0627\u0631 \u062D\u062C\u0645 \u0627\u0644\u0628\u064A\u0626\u0629",
1848
+ rows: "\u0635\u0641\u0648\u0641",
1849
+ columns: "\u0623\u0639\u0645\u062F\u0629",
1850
+ row: "\u0635\u0641",
1851
+ column: "\u0639\u0645\u0648\u062F",
1852
+ insert: "\u0625\u062F\u0631\u0627\u062C",
1853
+ editSelectedEnvironment: "\u062A\u0639\u062F\u064A\u0644 \u0627\u0644\u0628\u064A\u0626\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",
1854
+ applySelectedMatrixStyle: "\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0646\u0645\u0637 \u0639\u0644\u0649 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",
1855
+ applyStyle: "\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0646\u0645\u0637",
1856
+ addRow: "\u0625\u0636\u0627\u0641\u0629 \u0635\u0641",
1857
+ removeRow: "\u062D\u0630\u0641 \u0635\u0641",
1858
+ addColumn: "\u0625\u0636\u0627\u0641\u0629 \u0639\u0645\u0648\u062F",
1859
+ removeColumn: "\u062D\u0630\u0641 \u0639\u0645\u0648\u062F",
1860
+ spaces: "\u0627\u0644\u0641\u0631\u0627\u063A\u0627\u062A",
1861
+ insertSpace: "\u0625\u062F\u0631\u0627\u062C \u0641\u0631\u0627\u063A",
1862
+ functions: "\u0627\u0644\u062F\u0648\u0627\u0644",
1863
+ insertFunction: "\u0625\u062F\u0631\u0627\u062C \u062F\u0627\u0644\u0629",
1864
+ insertLimitsSeries: "\u0625\u062F\u0631\u0627\u062C \u062D\u062F\u0648\u062F \u0648\u0645\u062A\u0633\u0644\u0633\u0644\u0627\u062A",
1865
+ insertAdditionalFunctions: "\u0625\u062F\u0631\u0627\u062C \u062F\u0648\u0627\u0644 \u0625\u0636\u0627\u0641\u064A\u0629",
1866
+ insertNumberSets: "\u0625\u062F\u0631\u0627\u062C \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0623\u0639\u062F\u0627\u062F",
1867
+ operations: "\u0627\u0644\u0639\u0645\u0644\u064A\u0627\u062A",
1868
+ insertOperation: "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0632 \u0639\u0645\u0644\u064A\u0629",
1869
+ insertRelationsSets: "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0648\u0632 \u0639\u0644\u0627\u0642\u0627\u062A \u0648\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
1870
+ insertArrows: "\u0625\u062F\u0631\u0627\u062C \u0623\u0633\u0647\u0645",
1871
+ insertDots: "\u0625\u062F\u0631\u0627\u062C \u0646\u0642\u0627\u0637",
1872
+ insertIntegrals: "\u0625\u062F\u0631\u0627\u062C \u062A\u0643\u0627\u0645\u0644\u0627\u062A",
1873
+ scripts: "\u0627\u0644\u0623\u0633 \u0648\u0627\u0644\u0633\u0641\u0644\u064A",
1874
+ addSuperscript: "\u0625\u0636\u0627\u0641\u0629 \u0623\u0633",
1875
+ addSubscript: "\u0625\u0636\u0627\u0641\u0629 \u0633\u0641\u0644\u064A",
1876
+ removeSuperscript: "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0623\u0633",
1877
+ removeSubscript: "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0633\u0641\u0644\u064A",
1878
+ inputStyles: "\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u0625\u062F\u062E\u0627\u0644",
1879
+ deleteSelectedStructure: "\u062D\u0630\u0641 \u0627\u0644\u0628\u0646\u064A\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",
1880
+ toggleLetterMerging: "\u062A\u0628\u062F\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641",
1881
+ disableLetterMerging: "\u062A\u0639\u0637\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641",
1882
+ enableLetterMerging: "\u062A\u0641\u0639\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641",
1883
+ chooseWritingFont: "\u0627\u062E\u062A\u064A\u0627\u0631 \u062E\u0637 \u0627\u0644\u0643\u062A\u0627\u0628\u0629",
1884
+ chooseDigitForm: "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645",
1885
+ defaultFont: "\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A",
1886
+ takweenFont: "\u062E\u0637 \u062A\u0643\u0648\u064A\u0646",
1887
+ diwaniFont: "\u062E\u0637 \u062F\u064A\u0648\u0627\u0646\u064A",
1888
+ diwaniOutlineFont: "\u062E\u0637 \u062F\u064A\u0648\u0627\u0646\u064A \u0645\u0638\u0644\u0644",
1889
+ writeDefaultFont: "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A",
1890
+ writeTakweenFont: "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u062E\u0637 \u062A\u0643\u0648\u064A\u0646",
1891
+ westernDigits: "\u0623\u0631\u0642\u0627\u0645 \u063A\u0631\u0628\u064A\u0629",
1892
+ arabicIndicDigits: "\u0623\u0631\u0642\u0627\u0645 \u0639\u0631\u0628\u064A\u0629 \u0647\u0646\u062F\u064A\u0629",
1893
+ persianIndicDigits: "\u0623\u0631\u0642\u0627\u0645 \u0641\u0627\u0631\u0633\u064A\u0629 \u0647\u0646\u062F\u064A\u0629",
1894
+ equationEditor: "\u0645\u062D\u0631\u0631 \u0627\u0644\u0645\u0639\u0627\u062F\u0644\u0627\u062A",
1895
+ renderPreview: "\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0631\u0633\u0645",
1896
+ development: "\u062A\u0637\u0648\u064A\u0631",
1897
+ showDebugLog: "\u0625\u0638\u0647\u0627\u0631 \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",
1898
+ hideDebugLog: "\u0625\u062E\u0641\u0627\u0621 \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",
1899
+ copyDebugLog: "\u0646\u0633\u062E \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",
1900
+ empty: "\u0641\u0627\u0631\u063A",
1901
+ englishLatex: "LaTeX \u0625\u0646\u062C\u0644\u064A\u0632\u064A",
1902
+ arabicLatex: "LaTeX \u0639\u0631\u0628\u064A",
1903
+ inactiveEnglish: "\u0627\u0644\u0633\u0644\u0633\u0644\u0629 \u063A\u064A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629 (\u0625\u0646\u062C\u0644\u064A\u0632\u064A)",
1904
+ inactiveArabic: "\u0627\u0644\u0633\u0644\u0633\u0644\u0629 \u063A\u064A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629 (\u0639\u0631\u0628\u064A)",
1905
+ mathJaxError: "\u062E\u0637\u0623 MathJax",
1906
+ previewError: "\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629",
1907
+ activeSide: "\u0627\u0644\u062C\u0627\u0646\u0628 \u0627\u0644\u0646\u0634\u0637",
1908
+ syncState: "\u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629",
1909
+ arabicSide: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629",
1910
+ englishSide: "\u0627\u0644\u0625\u0646\u062C\u0644\u064A\u0632\u064A\u0629",
1911
+ synced: "\u0645\u062A\u0632\u0627\u0645\u0646",
1912
+ differentItems: "\u0639\u0646\u0627\u0635\u0631 \u0645\u062E\u062A\u0644\u0641\u0629",
1913
+ alignLeft: "\u064A\u0633\u0627\u0631",
1914
+ alignCenter: "\u0648\u0633\u0637",
1915
+ alignRight: "\u064A\u0645\u064A\u0646",
1916
+ alignColumnLeft: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
1917
+ alignColumnCenter: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0641\u064A \u0627\u0644\u0648\u0633\u0637",
1918
+ alignColumnRight: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
1919
+ matrixNoDelimiters: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u0644\u0627 \u0623\u0642\u0648\u0627\u0633",
1920
+ matrixParentheses: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u0642\u0648\u0633\u064A\u0646",
1921
+ matrixBrackets: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u0645\u0639\u0642\u0648\u0641\u064A\u0646",
1922
+ matrixBraces: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062D\u0627\u0635\u0631\u062A\u064A\u0646",
1923
+ matrixBars: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646",
1924
+ matrixDoubleBars: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646 \u0645\u0632\u062F\u0648\u062C\u064A\u0646"
1925
+ },
1926
+ en: {
1927
+ undoRedo: "Undo and redo",
1928
+ undo: "Undo",
1929
+ redo: "Redo",
1930
+ clipboard: "Clipboard",
1931
+ copy: "Copy",
1932
+ cut: "Cut",
1933
+ paste: "Paste",
1934
+ editorSettings: "Editor settings",
1935
+ toggleSide: "Switch Arabic / English equation side",
1936
+ structures: "Structures",
1937
+ insertDelimiters: "Insert delimiters",
1938
+ insertParentheses: "Insert parentheses",
1939
+ insertBrackets: "Insert brackets",
1940
+ insertBraces: "Insert braces",
1941
+ insertFraction: "Insert fraction",
1942
+ insertRoot: "Insert root",
1943
+ environments: "Environments",
1944
+ insertEnvironment: "Insert grid environment",
1945
+ environmentType: "Environment type",
1946
+ matrix: "Matrix",
1947
+ array: "Array",
1948
+ aligned: "Aligned",
1949
+ matrixType: "Matrix type",
1950
+ chooseEnvironmentSize: "Choose environment size",
1951
+ rows: "Rows",
1952
+ columns: "Columns",
1953
+ row: "Row",
1954
+ column: "Column",
1955
+ insert: "Insert",
1956
+ editSelectedEnvironment: "Edit selected environment",
1957
+ applySelectedMatrixStyle: "Apply style to selected matrix",
1958
+ applyStyle: "Apply style",
1959
+ addRow: "Add row",
1960
+ removeRow: "Remove row",
1961
+ addColumn: "Add column",
1962
+ removeColumn: "Remove column",
1963
+ spaces: "Spacing",
1964
+ insertSpace: "Insert space",
1965
+ functions: "Functions",
1966
+ insertFunction: "Insert function",
1967
+ insertLimitsSeries: "Insert limits and series",
1968
+ insertAdditionalFunctions: "Insert additional functions",
1969
+ insertNumberSets: "Insert number sets",
1970
+ operations: "Operators",
1971
+ insertOperation: "Insert operator",
1972
+ insertRelationsSets: "Insert relation or set symbol",
1973
+ insertArrows: "Insert arrow",
1974
+ insertDots: "Insert dots",
1975
+ insertIntegrals: "Insert integral",
1976
+ scripts: "Superscript and subscript",
1977
+ addSuperscript: "Add superscript",
1978
+ addSubscript: "Add subscript",
1979
+ removeSuperscript: "Remove superscript",
1980
+ removeSubscript: "Remove subscript",
1981
+ inputStyles: "Input styles",
1982
+ deleteSelectedStructure: "Delete selected structure",
1983
+ toggleLetterMerging: "Toggle letter merging",
1984
+ disableLetterMerging: "Disable letter merging",
1985
+ enableLetterMerging: "Enable letter merging",
1986
+ chooseWritingFont: "Choose writing font",
1987
+ chooseDigitForm: "Choose digit form",
1988
+ defaultFont: "Default font",
1989
+ takweenFont: "Takween font",
1990
+ diwaniFont: "Diwani font",
1991
+ diwaniOutlineFont: "Outlined Diwani font",
1992
+ writeDefaultFont: "Write with the default font",
1993
+ writeTakweenFont: "Write with Takween font",
1994
+ westernDigits: "Western digits",
1995
+ arabicIndicDigits: "Arabic-Indic digits",
1996
+ persianIndicDigits: "Persian digits",
1997
+ equationEditor: "Equation editor",
1998
+ renderPreview: "Rendered preview",
1999
+ development: "Development",
2000
+ showDebugLog: "Show debug log",
2001
+ hideDebugLog: "Hide debug log",
2002
+ copyDebugLog: "Copy debug log",
2003
+ empty: "Empty",
2004
+ englishLatex: "English LaTeX",
2005
+ arabicLatex: "Arabic LaTeX",
2006
+ inactiveEnglish: "Inactive chain (English)",
2007
+ inactiveArabic: "Inactive chain (Arabic)",
2008
+ mathJaxError: "MathJax error",
2009
+ previewError: "Preview error",
2010
+ activeSide: "Active side",
2011
+ syncState: "Sync state",
2012
+ arabicSide: "Arabic",
2013
+ englishSide: "English",
2014
+ synced: "Synced",
2015
+ differentItems: "different items",
2016
+ alignLeft: "Left",
2017
+ alignCenter: "Center",
2018
+ alignRight: "Right",
2019
+ alignColumnLeft: "Align column left",
2020
+ alignColumnCenter: "Align column center",
2021
+ alignColumnRight: "Align column right",
2022
+ matrixNoDelimiters: "Matrix without delimiters",
2023
+ matrixParentheses: "Matrix in parentheses",
2024
+ matrixBrackets: "Matrix in brackets",
2025
+ matrixBraces: "Matrix in braces",
2026
+ matrixBars: "Matrix between bars",
2027
+ matrixDoubleBars: "Matrix between double bars"
2028
+ }
2029
+ };
2030
+ function equationEditorMessages(locale) {
2031
+ return EQUATION_EDITOR_MESSAGES[locale];
2032
+ }
2033
+ function atomicCommandTitle(spec, locale) {
2034
+ return locale === "en" ? ENGLISH_COMMAND_TITLES[spec.id] ?? spec.title : spec.title;
2035
+ }
2036
+ function atomicOperatorCommandTitle(spec, locale) {
2037
+ return locale === "en" ? ENGLISH_OPERATOR_TITLES[spec.id] ?? spec.title : spec.title;
2038
+ }
2039
+
1653
2040
  // src/editor/state.ts
1654
2041
  function ensureSyncEntry(session, nodeId) {
1655
2042
  if (!session.sync[nodeId]) {
@@ -3346,8 +3733,8 @@ function spacingArrowForSide(spec, side) {
3346
3733
  }
3347
3734
  return side === "arabic" ? "\u2192" : "\u2190";
3348
3735
  }
3349
- function spacingTooltipForSide(spec, side) {
3350
- return `${spec.title} ${spacingArrowForSide(spec, side).repeat(spec.spacing.level)}`;
3736
+ function spacingTooltipForSide(spec, side, uiLocale = "ar") {
3737
+ return `${atomicCommandTitle(spec, uiLocale)} ${spacingArrowForSide(spec, side).repeat(spec.spacing.level)}`;
3351
3738
  }
3352
3739
  function buildFunctionAtomicCommandBody(node, side, spec) {
3353
3740
  const value = document.createElement("span");
@@ -3371,19 +3758,19 @@ function buildFunctionAtomicCommandBody(node, side, spec) {
3371
3758
  value.textContent = side === "arabic" ? spec?.arabicLabel ?? node.expr : spec?.englishTex.replace("\\", "") ?? node.expr;
3372
3759
  return value;
3373
3760
  }
3374
- function buildSpacingAtomicCommandBody(spec, side) {
3761
+ function buildSpacingAtomicCommandBody(spec, side, uiLocale) {
3375
3762
  const value = document.createElement("span");
3376
3763
  value.className = `atomic-spacing atomic-spacing--${spec.spacing.direction} atomic-spacing--level-${String(spec.spacing.level)}`;
3377
- value.title = spacingTooltipForSide(spec, side);
3764
+ value.title = spacingTooltipForSide(spec, side, uiLocale);
3378
3765
  const marker = document.createElement("span");
3379
3766
  marker.className = "atomic-spacing__marker";
3380
3767
  value.appendChild(marker);
3381
3768
  return value;
3382
3769
  }
3383
- function buildAtomicCommandNodeBody(node, side) {
3770
+ function buildAtomicCommandNodeBody(node, side, uiLocale = "ar") {
3384
3771
  const spec = atomicCommandSpec(node.expr);
3385
3772
  if (isSpacingCommandSpec(spec)) {
3386
- return buildSpacingAtomicCommandBody(spec, side);
3773
+ return buildSpacingAtomicCommandBody(spec, side, uiLocale);
3387
3774
  }
3388
3775
  return buildFunctionAtomicCommandBody(node, side, spec);
3389
3776
  }
@@ -3417,11 +3804,11 @@ function buildOperatorLabel(spec) {
3417
3804
  value.textContent = spec.Label;
3418
3805
  return value;
3419
3806
  }
3420
- function buildAtomicOperatorCommandNodeBody(node, side) {
3807
+ function buildAtomicOperatorCommandNodeBody(node, side, uiLocale = "ar") {
3421
3808
  const spec = atomicOperatorCommandSpec(node.expr);
3422
3809
  const value = document.createElement("span");
3423
3810
  value.className = "atomic-operator-command";
3424
- value.title = spec?.title ?? node.expr;
3811
+ value.title = spec ? atomicOperatorCommandTitle(spec, uiLocale) : node.expr;
3425
3812
  if (side === "arabic" && shouldMirrorOperatorDisplay(spec)) {
3426
3813
  value.classList.add("atomic-operator-command--mirrored");
3427
3814
  }
@@ -3475,7 +3862,7 @@ function buildNodeScripts(node, buildChain) {
3475
3862
  }
3476
3863
 
3477
3864
  // src/editor/display/index.ts
3478
- function buildNodeBody(node, buildChain, side, digitForm = "western") {
3865
+ function buildNodeBody(node, buildChain, side, digitForm = "western", uiLocale = "ar") {
3479
3866
  if (node.kind === "delimiter") {
3480
3867
  return buildDelimiterNodeBody(node, buildChain);
3481
3868
  }
@@ -3489,10 +3876,10 @@ function buildNodeBody(node, buildChain, side, digitForm = "western") {
3489
3876
  return buildMatrixEnvNodeBody(node, buildChain, side);
3490
3877
  }
3491
3878
  if (node.kind === "atomicCommand") {
3492
- return buildAtomicCommandNodeBody(node, side);
3879
+ return buildAtomicCommandNodeBody(node, side, uiLocale);
3493
3880
  }
3494
3881
  if (node.kind === "atomicOperatorCommand") {
3495
- return buildAtomicOperatorCommandNodeBody(node, side);
3882
+ return buildAtomicOperatorCommandNodeBody(node, side, uiLocale);
3496
3883
  }
3497
3884
  return buildBaseNodeBody(node, digitForm);
3498
3885
  }
@@ -3713,6 +4100,10 @@ function createEditorRuntime(options) {
3713
4100
  const buttonElements = options.buttonElements ?? {};
3714
4101
  const outsidePointerIgnoreSelectors = options.outsidePointerIgnoreSelectors ?? [];
3715
4102
  let session = options.initialSession ?? createStarterSession();
4103
+ let uiLocale = options.uiLocale ?? "ar";
4104
+ if (options.defaultSide) {
4105
+ session = { ...session, activeSide: options.defaultSide };
4106
+ }
3716
4107
  const undoRedo = createUndoRedoStacks();
3717
4108
  let lastInternalFragment = null;
3718
4109
  let initialKeyboardFocusPending = true;
@@ -3744,14 +4135,15 @@ function createEditorRuntime(options) {
3744
4135
  return index >= start && index < end;
3745
4136
  }
3746
4137
  function refreshUndoRedoButtons() {
4138
+ const messages = equationEditorMessages(uiLocale);
3747
4139
  if (buttonElements.undoBtn) {
3748
4140
  buttonElements.undoBtn.disabled = !undoRedoCanUndo(undoRedo);
3749
4141
  const arabicEquation = session.activeSide === "arabic";
3750
4142
  const undoArrow = arabicEquation ? "\u21B7" : "\u21B6";
3751
4143
  const vs = "\uFE0E";
3752
4144
  buttonElements.undoBtn.textContent = `${undoArrow}${vs}`;
3753
- buttonElements.undoBtn.title = "\u062A\u0631\u0627\u062C\u0639";
3754
- buttonElements.undoBtn.setAttribute("aria-label", "\u062A\u0631\u0627\u062C\u0639");
4145
+ buttonElements.undoBtn.title = messages.undo;
4146
+ buttonElements.undoBtn.setAttribute("aria-label", messages.undo);
3755
4147
  }
3756
4148
  if (buttonElements.redoBtn) {
3757
4149
  buttonElements.redoBtn.disabled = !undoRedoCanRedo(undoRedo);
@@ -3759,8 +4151,8 @@ function createEditorRuntime(options) {
3759
4151
  const redoArrow = arabicEquation ? "\u21B6" : "\u21B7";
3760
4152
  const vs = "\uFE0E";
3761
4153
  buttonElements.redoBtn.textContent = `${redoArrow}${vs}`;
3762
- buttonElements.redoBtn.title = "\u0625\u0639\u0627\u062F\u0629";
3763
- buttonElements.redoBtn.setAttribute("aria-label", "\u0625\u0639\u0627\u062F\u0629");
4154
+ buttonElements.redoBtn.title = messages.redo;
4155
+ buttonElements.redoBtn.setAttribute("aria-label", messages.redo);
3764
4156
  }
3765
4157
  }
3766
4158
  function refreshClipboardButtons() {
@@ -3779,9 +4171,10 @@ function createEditorRuntime(options) {
3779
4171
  return;
3780
4172
  }
3781
4173
  const mergeOn = !session.splitLeafTyping;
4174
+ const messages = equationEditorMessages(uiLocale);
3782
4175
  buttonElements.splitTypingBtn.textContent = mergeOn ? "\u0633\u0635\u0639" : "\u0633 \u0635 \u0639";
3783
- buttonElements.splitTypingBtn.title = mergeOn ? "\u062A\u0639\u0637\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641" : "\u062A\u0641\u0639\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641";
3784
- buttonElements.splitTypingBtn.setAttribute("aria-label", mergeOn ? "\u062A\u0639\u0637\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641" : "\u062A\u0641\u0639\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641");
4176
+ buttonElements.splitTypingBtn.title = mergeOn ? messages.disableLetterMerging : messages.enableLetterMerging;
4177
+ buttonElements.splitTypingBtn.setAttribute("aria-label", mergeOn ? messages.disableLetterMerging : messages.enableLetterMerging);
3785
4178
  buttonElements.splitTypingBtn.setAttribute("aria-pressed", mergeOn ? "true" : "false");
3786
4179
  buttonElements.splitTypingBtn.classList.toggle("accent", mergeOn);
3787
4180
  }
@@ -3790,9 +4183,10 @@ function createEditorRuntime(options) {
3790
4183
  return;
3791
4184
  }
3792
4185
  const takweenOn = (session.currentCharacterFont ?? "default") === "takween";
4186
+ const messages = equationEditorMessages(uiLocale);
3793
4187
  buttonElements.characterFontBtn.textContent = "\u062A\u0643";
3794
- buttonElements.characterFontBtn.title = takweenOn ? "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A" : "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u062E\u0637 \u062A\u0643\u0648\u064A\u0646";
3795
- buttonElements.characterFontBtn.setAttribute("aria-label", takweenOn ? "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A" : "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u062E\u0637 \u062A\u0643\u0648\u064A\u0646");
4188
+ buttonElements.characterFontBtn.title = takweenOn ? messages.writeDefaultFont : messages.writeTakweenFont;
4189
+ buttonElements.characterFontBtn.setAttribute("aria-label", takweenOn ? messages.writeDefaultFont : messages.writeTakweenFont);
3796
4190
  buttonElements.characterFontBtn.setAttribute("aria-pressed", takweenOn ? "true" : "false");
3797
4191
  buttonElements.characterFontBtn.classList.toggle("accent", takweenOn);
3798
4192
  }
@@ -3803,8 +4197,9 @@ function createEditorRuntime(options) {
3803
4197
  const digitForm = session.currentDigitForm ?? "western";
3804
4198
  const label = digitForm === "arabicIndic" ? "\u0664\u0665\u0666" : digitForm === "persianIndic" ? "\u06F4\u06F5\u06F6" : "456";
3805
4199
  buttonElements.digitFormBtn.textContent = label;
3806
- buttonElements.digitFormBtn.title = "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645";
3807
- buttonElements.digitFormBtn.setAttribute("aria-label", "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645");
4200
+ const messages = equationEditorMessages(uiLocale);
4201
+ buttonElements.digitFormBtn.title = messages.chooseDigitForm;
4202
+ buttonElements.digitFormBtn.setAttribute("aria-label", messages.chooseDigitForm);
3808
4203
  buttonElements.digitFormBtn.dataset.digitForm = digitForm;
3809
4204
  }
3810
4205
  function applyStructural(updater) {
@@ -4006,7 +4401,7 @@ function createEditorRuntime(options) {
4006
4401
  const atomicSpec = node.kind === "atomicCommand" ? atomicCommandSpec(node.expr) : null;
4007
4402
  if (isSpacingCommandSpec(atomicSpec)) {
4008
4403
  nodeEl.classList.add("node--atomic-spacing");
4009
- nodeEl.title = spacingTooltipForSide(atomicSpec, session.activeSide);
4404
+ nodeEl.title = spacingTooltipForSide(atomicSpec, session.activeSide, uiLocale);
4010
4405
  }
4011
4406
  if (session.selectedNodeId === node.id || session.selectedStructureNodeId === node.id) {
4012
4407
  nodeEl.classList.add("selected");
@@ -4036,7 +4431,7 @@ function createEditorRuntime(options) {
4036
4431
  });
4037
4432
  const body = document.createElement("span");
4038
4433
  body.className = "node-body";
4039
- body.appendChild(buildNodeBody(node, buildChain, session.activeSide, session.currentDigitForm ?? "western"));
4434
+ body.appendChild(buildNodeBody(node, buildChain, session.activeSide, session.currentDigitForm ?? "western", uiLocale));
4040
4435
  nodeEl.appendChild(body);
4041
4436
  const scripts = buildNodeScripts(node, buildChain);
4042
4437
  if (scripts) {
@@ -4317,6 +4712,13 @@ function createEditorRuntime(options) {
4317
4712
  session = next;
4318
4713
  render();
4319
4714
  },
4715
+ setUiLocale: (locale) => {
4716
+ if (uiLocale === locale) {
4717
+ return;
4718
+ }
4719
+ uiLocale = locale;
4720
+ render();
4721
+ },
4320
4722
  performUndo,
4321
4723
  performRedo,
4322
4724
  performCopy,
@@ -5710,18 +6112,23 @@ function injectWidgetChromeCss(doc) {
5710
6112
  d.head.appendChild(style);
5711
6113
  }
5712
6114
 
6115
+ // src/uiLocale.ts
6116
+ function uiLocaleDirection(locale) {
6117
+ return locale === "ar" ? "rtl" : "ltr";
6118
+ }
6119
+
5713
6120
  // src/react/ButexEditor.tsx
5714
6121
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5715
6122
  var DIGIT_FORM_OPTIONS = [
5716
- { id: "western", label: "456", title: "\u0623\u0631\u0642\u0627\u0645 \u063A\u0631\u0628\u064A\u0629" },
5717
- { id: "arabicIndic", label: "\u0664\u0665\u0666", title: "\u0623\u0631\u0642\u0627\u0645 \u0639\u0631\u0628\u064A\u0629 \u0647\u0646\u062F\u064A\u0629" },
5718
- { id: "persianIndic", label: "\u06F4\u06F5\u06F6", title: "\u0623\u0631\u0642\u0627\u0645 \u0641\u0627\u0631\u0633\u064A\u0629 \u0647\u0646\u062F\u064A\u0629" }
6123
+ { id: "western", label: "456" },
6124
+ { id: "arabicIndic", label: "\u0664\u0665\u0666" },
6125
+ { id: "persianIndic", label: "\u06F4\u06F5\u06F6" }
5719
6126
  ];
5720
6127
  var CHARACTER_FONT_OPTIONS = [
5721
- { id: "default", label: "\u0633", title: "\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A" },
5722
- { id: "takween", label: "\u062A\u0643", title: "\u062E\u0637 \u062A\u0643\u0648\u064A\u0646" },
5723
- { id: "diwani", label: "\u062F\u064A\u0648", title: "\u062E\u0637 \u062F\u064A\u0648\u0627\u0646\u064A" },
5724
- { id: "diwaniOutline", label: "\u0638\u0644", title: "\u062E\u0637 \u062F\u064A\u0648\u0627\u0646\u064A \u0645\u0638\u0644\u0644" }
6128
+ { id: "default", label: "\u0633" },
6129
+ { id: "takween", label: "\u062A\u0643" },
6130
+ { id: "diwani", label: "\u062F\u064A\u0648" },
6131
+ { id: "diwaniOutline", label: "\u0638\u0644" }
5725
6132
  ];
5726
6133
  var FUNCTION_COMMANDS = atomicCommandsByCategory("function");
5727
6134
  var LIMITS_SERIES_COMMANDS = atomicCommandsByCategory("limits_series");
@@ -5734,20 +6141,20 @@ var OPERATOR3_COMMANDS = atomicOperatorCommandsByCategory("operators3");
5734
6141
  var DOT_COMMANDS = atomicOperatorCommandsByCategory("dots");
5735
6142
  var INTEGRAL_COMMANDS = atomicOperatorCommandsByCategory("integrals");
5736
6143
  var MATRIX_STYLES = [
5737
- { id: "matrix", label: "\u25A1", title: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u0644\u0627 \u0623\u0642\u0648\u0627\u0633" },
5738
- { id: "pmatrix", label: "(\u25A1)", title: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u0642\u0648\u0633\u064A\u0646" },
5739
- { id: "bmatrix", label: "[\u25A1]", title: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u0645\u0639\u0642\u0648\u0641\u064A\u0646" },
5740
- { id: "Bmatrix", label: "{\u25A1}", title: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062D\u0627\u0635\u0631\u062A\u064A\u0646" },
5741
- { id: "vmatrix", label: "|\u25A1|", title: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646" },
5742
- { id: "Vmatrix", label: "||\u25A1||", title: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646 \u0645\u0632\u062F\u0648\u062C\u064A\u0646" }
6144
+ { id: "matrix", label: "\u25A1" },
6145
+ { id: "pmatrix", label: "(\u25A1)" },
6146
+ { id: "bmatrix", label: "[\u25A1]" },
6147
+ { id: "Bmatrix", label: "{\u25A1}" },
6148
+ { id: "vmatrix", label: "|\u25A1|" },
6149
+ { id: "Vmatrix", label: "||\u25A1||" }
5743
6150
  ];
5744
6151
  var ARRAY_ALIGNMENTS = [
5745
- { id: "l", label: "\u064A\u0633\u0627\u0631", title: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631" },
5746
- { id: "c", label: "\u0648\u0633\u0637", title: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0641\u064A \u0627\u0644\u0648\u0633\u0637" },
5747
- { id: "r", label: "\u064A\u0645\u064A\u0646", title: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646" }
6152
+ { id: "l" },
6153
+ { id: "c" },
6154
+ { id: "r" }
5748
6155
  ];
5749
- function matrixSizeLabel(rows, columns) {
5750
- return `${String(rows)} \u0635\u0641 \xD7 ${String(columns)} \u0639\u0645\u0648\u062F`;
6156
+ function matrixSizeLabel(rows, columns, messages) {
6157
+ return `${String(rows)} ${messages.row} \xD7 ${String(columns)} ${messages.column}`;
5751
6158
  }
5752
6159
  function clampMatrixSize(value) {
5753
6160
  return Math.max(1, Math.min(12, Math.trunc(value)));
@@ -5758,6 +6165,30 @@ function digitFormLabel(digitForm) {
5758
6165
  function characterFontOption(fontId) {
5759
6166
  return CHARACTER_FONT_OPTIONS.find((option) => option.id === fontId) ?? CHARACTER_FONT_OPTIONS[0];
5760
6167
  }
6168
+ function characterFontTitle(fontId, messages) {
6169
+ if (fontId === "takween") return messages.takweenFont;
6170
+ if (fontId === "diwani") return messages.diwaniFont;
6171
+ if (fontId === "diwaniOutline") return messages.diwaniOutlineFont;
6172
+ return messages.defaultFont;
6173
+ }
6174
+ function digitFormTitle(digitForm, messages) {
6175
+ if (digitForm === "arabicIndic") return messages.arabicIndicDigits;
6176
+ if (digitForm === "persianIndic") return messages.persianIndicDigits;
6177
+ return messages.westernDigits;
6178
+ }
6179
+ function matrixStyleTitle(style, messages) {
6180
+ if (style === "pmatrix") return messages.matrixParentheses;
6181
+ if (style === "bmatrix") return messages.matrixBrackets;
6182
+ if (style === "Bmatrix") return messages.matrixBraces;
6183
+ if (style === "vmatrix") return messages.matrixBars;
6184
+ if (style === "Vmatrix") return messages.matrixDoubleBars;
6185
+ return messages.matrixNoDelimiters;
6186
+ }
6187
+ function alignmentCopy(alignment, messages) {
6188
+ if (alignment === "l") return { label: messages.alignLeft, title: messages.alignColumnLeft };
6189
+ if (alignment === "r") return { label: messages.alignRight, title: messages.alignColumnRight };
6190
+ return { label: messages.alignCenter, title: messages.alignColumnCenter };
6191
+ }
5761
6192
  function spacingArrow(spec, side) {
5762
6193
  const pointsWithFlow = spec.spacing.direction === "positive";
5763
6194
  if (pointsWithFlow) {
@@ -5796,16 +6227,17 @@ function renderOperatorMenuButtonLabel(command, fallback) {
5796
6227
  }
5797
6228
  return /* @__PURE__ */ jsx("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) });
5798
6229
  }
5799
- function passiveTreeText(session) {
6230
+ function passiveTreeText(session, messages) {
5800
6231
  const passive = session.activeSide === "arabic" ? session.englishTree : session.arabicTree;
5801
- const title = session.activeSide === "arabic" ? "\u0627\u0644\u0633\u0644\u0633\u0644\u0629 \u063A\u064A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629 (\u0625\u0646\u062C\u0644\u064A\u0632\u064A)" : "\u0627\u0644\u0633\u0644\u0633\u0644\u0629 \u063A\u064A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629 (\u0639\u0631\u0628\u064A)";
6232
+ const title = session.activeSide === "arabic" ? messages.inactiveEnglish : messages.inactiveArabic;
5802
6233
  const latex = session.activeSide === "arabic" ? renderChainEnglish(passive) : renderChainArabic(passive);
5803
6234
  return `${title}
5804
6235
 
5805
- ${latex || "\u0641\u0627\u0631\u063A"}`;
6236
+ ${latex || messages.empty}`;
5806
6237
  }
5807
6238
  var ButexEditor = forwardRef(
5808
- function ButexEditor2({ className, debug = false, initialSession, onSessionChange }, ref) {
6239
+ function ButexEditor2({ className, debug = false, defaultSide, uiLocale = "ar", initialSession, onSessionChange }, ref) {
6240
+ const messages = equationEditorMessages(uiLocale);
5809
6241
  const wrapperRef = useRef(null);
5810
6242
  const surfaceRef = useRef(null);
5811
6243
  const mathOutputRef = useRef(null);
@@ -5823,6 +6255,8 @@ var ButexEditor = forwardRef(
5823
6255
  const runtimeRef = useRef(null);
5824
6256
  const debugRef = useRef(debug);
5825
6257
  debugRef.current = debug;
6258
+ const uiLocaleRef = useRef(uiLocale);
6259
+ uiLocaleRef.current = uiLocale;
5826
6260
  const onSessionChangeRef = useRef(onSessionChange);
5827
6261
  onSessionChangeRef.current = onSessionChange;
5828
6262
  const debugBodyHiddenRef = useRef(false);
@@ -5864,14 +6298,15 @@ var ButexEditor = forwardRef(
5864
6298
  const arabic = renderArabicLatexFromSession(session);
5865
6299
  const activeLatex = session.activeSide === "arabic" ? arabic : english;
5866
6300
  if (debugRef.current && latexLinesEl) {
5867
- latexLinesEl.textContent = `LaTeX \u0625\u0646\u062C\u0644\u064A\u0632\u064A:
5868
- ${english || "\u0641\u0627\u0631\u063A"}
6301
+ const currentMessages = equationEditorMessages(uiLocaleRef.current);
6302
+ latexLinesEl.textContent = `${currentMessages.englishLatex}:
6303
+ ${english || currentMessages.empty}
5869
6304
 
5870
- LaTeX \u0639\u0631\u0628\u064A:
5871
- ${arabic || "\u0641\u0627\u0631\u063A"}`;
6305
+ ${currentMessages.arabicLatex}:
6306
+ ${arabic || currentMessages.empty}`;
5872
6307
  }
5873
6308
  if (debugRef.current && passivePreviewEl) {
5874
- passivePreviewEl.textContent = passiveTreeText(session);
6309
+ passivePreviewEl.textContent = passiveTreeText(session, equationEditorMessages(uiLocaleRef.current));
5875
6310
  passivePreviewEl.classList.toggle("passive--ltr", session.activeSide === "arabic");
5876
6311
  }
5877
6312
  if (debugRef.current && debugLogEl) {
@@ -5897,7 +6332,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
5897
6332
  } catch (err) {
5898
6333
  const message = err instanceof Error ? err.message : String(err);
5899
6334
  renderErrorEl.hidden = false;
5900
- renderErrorEl.textContent = `\u062E\u0637\u0623 MathJax: ${message}`;
6335
+ renderErrorEl.textContent = `${equationEditorMessages(uiLocaleRef.current).mathJaxError}: ${message}`;
5901
6336
  if (runtimeRef.current) {
5902
6337
  runtimeRef.current.setSession(setRenderError(runtimeRef.current.getSession(), message));
5903
6338
  }
@@ -5915,6 +6350,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
5915
6350
  const runtime = createEditorRuntime({
5916
6351
  surfaceEl,
5917
6352
  initialSession,
6353
+ defaultSide,
6354
+ uiLocale,
5918
6355
  buttonElements: {
5919
6356
  undoBtn: undoBtnRef.current,
5920
6357
  redoBtn: redoBtnRef.current,
@@ -5934,7 +6371,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
5934
6371
  const el = renderErrorRef.current;
5935
6372
  if (el) {
5936
6373
  el.hidden = false;
5937
- el.textContent = `\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629: ${message}`;
6374
+ el.textContent = `${equationEditorMessages(uiLocaleRef.current).previewError}: ${message}`;
5938
6375
  }
5939
6376
  });
5940
6377
  }
@@ -5959,6 +6396,13 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
5959
6396
  runtimeRef.current = null;
5960
6397
  };
5961
6398
  }, []);
6399
+ useEffect(() => {
6400
+ runtimeRef.current?.setUiLocale(uiLocale);
6401
+ const session = runtimeRef.current?.getSession();
6402
+ if (session) {
6403
+ void updatePreviewRef.current(session);
6404
+ }
6405
+ }, [uiLocale]);
5962
6406
  function focusSurface() {
5963
6407
  surfaceRef.current?.focus();
5964
6408
  }
@@ -5976,26 +6420,26 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
5976
6420
  {
5977
6421
  ref: wrapperRef,
5978
6422
  className: `butex-widget ${className ?? ""}`.trim(),
5979
- dir: "rtl",
5980
- lang: "ar",
6423
+ dir: uiLocaleDirection(uiLocale),
6424
+ lang: uiLocale,
5981
6425
  children: /* @__PURE__ */ jsxs("div", { className: "butex-widget-layout", children: [
5982
6426
  /* @__PURE__ */ jsxs("section", { className: "panel", children: [
5983
6427
  /* @__PURE__ */ jsxs("div", { className: "toolbar", children: [
5984
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-history", role: "group", "aria-label": "\u062A\u0631\u0627\u062C\u0639 \u0648\u0625\u0639\u0627\u062F\u0629", children: [
5985
- /* @__PURE__ */ jsx("button", { ref: undoBtnRef, id: "btn-undo", type: "button", className: "icon-btn", title: "\u062A\u0631\u0627\u062C\u0639", "aria-label": "\u062A\u0631\u0627\u062C\u0639", children: "\u21B7" }),
5986
- /* @__PURE__ */ jsx("button", { ref: redoBtnRef, id: "btn-redo", type: "button", className: "icon-btn", title: "\u0625\u0639\u0627\u062F\u0629", "aria-label": "\u0625\u0639\u0627\u062F\u0629", children: "\u21B6" })
6428
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-history", role: "group", "aria-label": messages.undoRedo, children: [
6429
+ /* @__PURE__ */ jsx("button", { ref: undoBtnRef, id: "btn-undo", type: "button", className: "icon-btn", title: messages.undo, "aria-label": messages.undo, children: "\u21B7" }),
6430
+ /* @__PURE__ */ jsx("button", { ref: redoBtnRef, id: "btn-redo", type: "button", className: "icon-btn", title: messages.redo, "aria-label": messages.redo, children: "\u21B6" })
5987
6431
  ] }),
5988
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-clipboard", role: "group", "aria-label": "\u0627\u0644\u062D\u0627\u0641\u0638\u0629", children: [
5989
- /* @__PURE__ */ jsx("button", { ref: copyBtnRef, id: "btn-copy", type: "button", className: "icon-btn", title: "\u0646\u0633\u062E", "aria-label": "\u0646\u0633\u062E", disabled: true, children: "\u29C9" }),
5990
- /* @__PURE__ */ jsx("button", { ref: cutBtnRef, id: "btn-cut", type: "button", className: "icon-btn", title: "\u0642\u0635", "aria-label": "\u0642\u0635", disabled: true, children: "\u2702" }),
6432
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-clipboard", role: "group", "aria-label": messages.clipboard, children: [
6433
+ /* @__PURE__ */ jsx("button", { ref: copyBtnRef, id: "btn-copy", type: "button", className: "icon-btn", title: messages.copy, "aria-label": messages.copy, disabled: true, children: "\u29C9" }),
6434
+ /* @__PURE__ */ jsx("button", { ref: cutBtnRef, id: "btn-cut", type: "button", className: "icon-btn", title: messages.cut, "aria-label": messages.cut, disabled: true, children: "\u2702" }),
5991
6435
  /* @__PURE__ */ jsx(
5992
6436
  "button",
5993
6437
  {
5994
6438
  id: "btn-paste",
5995
6439
  type: "button",
5996
6440
  className: "icon-btn",
5997
- title: "\u0644\u0635\u0642",
5998
- "aria-label": "\u0644\u0635\u0642",
6441
+ title: messages.paste,
6442
+ "aria-label": messages.paste,
5999
6443
  onClick: () => {
6000
6444
  void runtimeRef.current?.performPaste().then(() => {
6001
6445
  focusSurface();
@@ -6005,8 +6449,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6005
6449
  }
6006
6450
  )
6007
6451
  ] }),
6008
- /* @__PURE__ */ jsx("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": "\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062D\u0631\u0631", children: /* @__PURE__ */ jsx("button", { className: "icon-btn accent", type: "button", title: "\u062A\u0628\u062F\u064A\u0644 \u0639\u0631\u0628\u064A / \u0625\u0646\u062C\u0644\u064A\u0632\u064A", "aria-label": "\u062A\u0628\u062F\u064A\u0644 \u0639\u0631\u0628\u064A / \u0625\u0646\u062C\u0644\u064A\u0632\u064A", onClick: () => runtimeRef.current?.toggleSide(), children: "\u21C4" }) }),
6009
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-structures", role: "group", "aria-label": "\u0627\u0644\u0628\u0646\u0649", children: [
6452
+ /* @__PURE__ */ jsx("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.editorSettings, children: /* @__PURE__ */ jsx("button", { className: "icon-btn accent", type: "button", title: messages.toggleSide, "aria-label": messages.toggleSide, onClick: () => runtimeRef.current?.toggleSide(), children: "\u21C4" }) }),
6453
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-structures", role: "group", "aria-label": messages.structures, children: [
6010
6454
  /* @__PURE__ */ jsxs(
6011
6455
  "div",
6012
6456
  {
@@ -6023,15 +6467,15 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6023
6467
  {
6024
6468
  className: "icon-btn delimiter-command-btn",
6025
6469
  type: "button",
6026
- title: "\u0625\u062F\u0631\u0627\u062C \u0645\u062D\u062F\u062F\u0627\u062A",
6027
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0645\u062D\u062F\u062F\u0627\u062A",
6470
+ title: messages.insertDelimiters,
6471
+ "aria-label": messages.insertDelimiters,
6028
6472
  "aria-haspopup": "listbox",
6029
6473
  "aria-expanded": delimiterMenuOpen,
6030
6474
  onClick: () => setDelimiterMenuOpen((open) => !open),
6031
6475
  children: "()"
6032
6476
  }
6033
6477
  ),
6034
- /* @__PURE__ */ jsxs("div", { className: "delimiter-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0645\u062D\u062F\u062F\u0627\u062A", hidden: !delimiterMenuOpen, children: [
6478
+ /* @__PURE__ */ jsxs("div", { className: "delimiter-command-options", role: "listbox", "aria-label": messages.insertDelimiters, hidden: !delimiterMenuOpen, children: [
6035
6479
  /* @__PURE__ */ jsx(
6036
6480
  "button",
6037
6481
  {
@@ -6039,8 +6483,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6039
6483
  "data-delim": "paren",
6040
6484
  type: "button",
6041
6485
  role: "option",
6042
- title: "\u0625\u062F\u0631\u0627\u062C \u0642\u0648\u0633\u064A\u0646",
6043
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0642\u0648\u0633\u064A\u0646",
6486
+ title: messages.insertParentheses,
6487
+ "aria-label": messages.insertParentheses,
6044
6488
  onMouseDown: (event) => event.preventDefault(),
6045
6489
  onClick: () => {
6046
6490
  runtimeRef.current?.insertDelimiterByKind("paren");
@@ -6057,8 +6501,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6057
6501
  "data-delim": "bracket",
6058
6502
  type: "button",
6059
6503
  role: "option",
6060
- title: "\u0625\u062F\u0631\u0627\u062C \u0645\u0639\u0642\u0648\u0641\u064A\u0646",
6061
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0645\u0639\u0642\u0648\u0641\u064A\u0646",
6504
+ title: messages.insertBrackets,
6505
+ "aria-label": messages.insertBrackets,
6062
6506
  onMouseDown: (event) => event.preventDefault(),
6063
6507
  onClick: () => {
6064
6508
  runtimeRef.current?.insertDelimiterByKind("bracket");
@@ -6075,8 +6519,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6075
6519
  "data-delim": "brace",
6076
6520
  type: "button",
6077
6521
  role: "option",
6078
- title: "\u0625\u062F\u0631\u0627\u062C \u062D\u0627\u0635\u0631\u062A\u064A\u0646",
6079
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062D\u0627\u0635\u0631\u062A\u064A\u0646",
6522
+ title: messages.insertBraces,
6523
+ "aria-label": messages.insertBraces,
6080
6524
  onMouseDown: (event) => event.preventDefault(),
6081
6525
  onClick: () => {
6082
6526
  runtimeRef.current?.insertDelimiterByKind("brace");
@@ -6090,19 +6534,19 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6090
6534
  ]
6091
6535
  }
6092
6536
  ),
6093
- /* @__PURE__ */ jsx("button", { id: "insert-frac", className: "icon-btn frac-icon-btn", type: "button", title: "\u0625\u062F\u0631\u0627\u062C \u0643\u0633\u0631", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0643\u0633\u0631", onClick: () => {
6537
+ /* @__PURE__ */ jsx("button", { id: "insert-frac", className: "icon-btn frac-icon-btn", type: "button", title: messages.insertFraction, "aria-label": messages.insertFraction, onClick: () => {
6094
6538
  runtimeRef.current?.insertFraction();
6095
6539
  focusSurface();
6096
6540
  }, children: /* @__PURE__ */ jsxs("span", { className: "toolbar-frac-icon", "aria-hidden": "true", children: [
6097
6541
  /* @__PURE__ */ jsx("span", { children: "\u0623" }),
6098
6542
  /* @__PURE__ */ jsx("span", { children: "\u0628" })
6099
6543
  ] }) }),
6100
- /* @__PURE__ */ jsx("button", { id: "insert-sqrt", className: "icon-btn", type: "button", title: "\u0625\u062F\u0631\u0627\u062C \u062C\u0630\u0631", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062C\u0630\u0631", onClick: () => {
6544
+ /* @__PURE__ */ jsx("button", { id: "insert-sqrt", className: "icon-btn", type: "button", title: messages.insertRoot, "aria-label": messages.insertRoot, onClick: () => {
6101
6545
  runtimeRef.current?.insertSqrt();
6102
6546
  focusSurface();
6103
6547
  }, children: /* @__PURE__ */ jsx("span", { className: "toolbar-sqrt-icon", "aria-hidden": "true", children: "\u221A" }) })
6104
6548
  ] }),
6105
- /* @__PURE__ */ jsx("div", { className: "toolbar-group toolbar-environments", role: "group", "aria-label": "\u0627\u0644\u0628\u064A\u0626\u0627\u062A", children: /* @__PURE__ */ jsxs(
6549
+ /* @__PURE__ */ jsx("div", { className: "toolbar-group toolbar-environments", role: "group", "aria-label": messages.environments, children: /* @__PURE__ */ jsxs(
6106
6550
  "div",
6107
6551
  {
6108
6552
  className: "matrix-command-menu",
@@ -6118,8 +6562,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6118
6562
  {
6119
6563
  className: "icon-btn matrix-command-btn",
6120
6564
  type: "button",
6121
- title: "\u0625\u062F\u0631\u0627\u062C \u0628\u064A\u0626\u0629 \u0634\u0628\u0643\u064A\u0629",
6122
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0628\u064A\u0626\u0629 \u0634\u0628\u0643\u064A\u0629",
6565
+ title: messages.insertEnvironment,
6566
+ "aria-label": messages.insertEnvironment,
6123
6567
  "aria-haspopup": "dialog",
6124
6568
  "aria-expanded": matrixMenuOpen,
6125
6569
  onClick: () => setMatrixMenuOpen((open) => !open),
@@ -6131,11 +6575,11 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6131
6575
  ] })
6132
6576
  }
6133
6577
  ),
6134
- /* @__PURE__ */ jsxs("div", { className: "matrix-command-popover", role: "dialog", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0628\u064A\u0626\u0629 \u0634\u0628\u0643\u064A\u0629", hidden: !matrixMenuOpen, children: [
6135
- /* @__PURE__ */ jsx("div", { className: "matrix-style-options", role: "listbox", "aria-label": "\u0646\u0648\u0639 \u0627\u0644\u0628\u064A\u0626\u0629", children: [
6136
- { id: "matrix", label: "\u0645\u0635\u0641\u0648\u0641\u0629" },
6137
- { id: "array", label: "\u062C\u062F\u0648\u0644" },
6138
- { id: "aligned", label: "\u0645\u062D\u0627\u0630\u0627\u0629" }
6578
+ /* @__PURE__ */ jsxs("div", { className: "matrix-command-popover", role: "dialog", "aria-label": messages.insertEnvironment, hidden: !matrixMenuOpen, children: [
6579
+ /* @__PURE__ */ jsx("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.environmentType, children: [
6580
+ { id: "matrix", label: messages.matrix },
6581
+ { id: "array", label: messages.array },
6582
+ { id: "aligned", label: messages.aligned }
6139
6583
  ].map((option) => /* @__PURE__ */ jsx(
6140
6584
  "button",
6141
6585
  {
@@ -6154,14 +6598,14 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6154
6598
  },
6155
6599
  option.id
6156
6600
  )) }),
6157
- envPaletteMode === "matrix" ? /* @__PURE__ */ jsx("div", { className: "matrix-style-options", role: "listbox", "aria-label": "\u0646\u0648\u0639 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629", children: MATRIX_STYLES.map((style) => /* @__PURE__ */ jsx(
6601
+ envPaletteMode === "matrix" ? /* @__PURE__ */ jsx("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.matrixType, children: MATRIX_STYLES.map((style) => /* @__PURE__ */ jsx(
6158
6602
  "button",
6159
6603
  {
6160
6604
  type: "button",
6161
6605
  role: "option",
6162
6606
  "aria-selected": matrixStyle === style.id,
6163
6607
  className: "matrix-style-option",
6164
- title: style.title,
6608
+ title: matrixStyleTitle(style.id, messages),
6165
6609
  onMouseDown: (event) => event.preventDefault(),
6166
6610
  onClick: () => {
6167
6611
  setMatrixStyle(style.id);
@@ -6170,8 +6614,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6170
6614
  },
6171
6615
  style.id
6172
6616
  )) }) : null,
6173
- /* @__PURE__ */ jsx("div", { className: "matrix-size-readout", children: matrixHover ? matrixSizeLabel(matrixHover.rows, matrixHover.columns) : matrixSizeLabel(matrixRows, matrixColumns) }),
6174
- /* @__PURE__ */ jsx("div", { className: "matrix-grid-picker", "aria-label": "\u0627\u062E\u062A\u064A\u0627\u0631 \u062D\u062C\u0645 \u0627\u0644\u0628\u064A\u0626\u0629", children: Array.from(
6617
+ /* @__PURE__ */ jsx("div", { className: "matrix-size-readout", children: matrixHover ? matrixSizeLabel(matrixHover.rows, matrixHover.columns, messages) : matrixSizeLabel(matrixRows, matrixColumns, messages) }),
6618
+ /* @__PURE__ */ jsx("div", { className: "matrix-grid-picker", "aria-label": messages.chooseEnvironmentSize, children: Array.from(
6175
6619
  { length: 8 },
6176
6620
  (_, rowIndex) => Array.from({ length: 8 }, (_2, columnIndex) => {
6177
6621
  const rows = rowIndex + 1;
@@ -6183,8 +6627,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6183
6627
  {
6184
6628
  type: "button",
6185
6629
  className: rows <= activeRows && columns <= activeColumns ? "matrix-grid-cell active" : "matrix-grid-cell",
6186
- title: matrixSizeLabel(rows, columns),
6187
- "aria-label": matrixSizeLabel(rows, columns),
6630
+ title: matrixSizeLabel(rows, columns, messages),
6631
+ "aria-label": matrixSizeLabel(rows, columns, messages),
6188
6632
  onMouseEnter: () => setMatrixHover({ rows, columns }),
6189
6633
  onMouseDown: (event) => event.preventDefault(),
6190
6634
  onClick: () => {
@@ -6202,7 +6646,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6202
6646
  ) }),
6203
6647
  /* @__PURE__ */ jsxs("div", { className: "matrix-custom-size", children: [
6204
6648
  /* @__PURE__ */ jsxs("label", { children: [
6205
- "\u0635\u0641",
6649
+ messages.row,
6206
6650
  /* @__PURE__ */ jsx(
6207
6651
  "input",
6208
6652
  {
@@ -6215,7 +6659,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6215
6659
  )
6216
6660
  ] }),
6217
6661
  /* @__PURE__ */ jsxs("label", { children: [
6218
- "\u0639\u0645\u0648\u062F",
6662
+ messages.column,
6219
6663
  /* @__PURE__ */ jsx(
6220
6664
  "input",
6221
6665
  {
@@ -6241,15 +6685,15 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6241
6685
  setMatrixHover(null);
6242
6686
  focusSurface();
6243
6687
  },
6244
- children: "\u0625\u062F\u0631\u0627\u062C"
6688
+ children: messages.insert
6245
6689
  }
6246
6690
  )
6247
6691
  ] }),
6248
- /* @__PURE__ */ jsxs("div", { className: "matrix-edit-actions", "aria-label": "\u062A\u0639\u062F\u064A\u0644 \u0627\u0644\u0628\u064A\u0626\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629", children: [
6249
- envPaletteMode === "matrix" ? /* @__PURE__ */ jsx("button", { type: "button", title: "\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0646\u0645\u0637 \u0639\u0644\u0649 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.setMatrixEnvStyle(matrixStyle), children: "\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0646\u0645\u0637" }) : null,
6692
+ /* @__PURE__ */ jsxs("div", { className: "matrix-edit-actions", "aria-label": messages.editSelectedEnvironment, children: [
6693
+ envPaletteMode === "matrix" ? /* @__PURE__ */ jsx("button", { type: "button", title: messages.applySelectedMatrixStyle, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.setMatrixEnvStyle(matrixStyle), children: messages.applyStyle }) : null,
6250
6694
  envPaletteMode === "array" ? /* @__PURE__ */ jsxs(Fragment, { children: [
6251
6695
  /* @__PURE__ */ jsxs("label", { children: [
6252
- "\u0639\u0645\u0648\u062F",
6696
+ messages.column,
6253
6697
  /* @__PURE__ */ jsx(
6254
6698
  "input",
6255
6699
  {
@@ -6265,24 +6709,36 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6265
6709
  "button",
6266
6710
  {
6267
6711
  type: "button",
6268
- title: alignment.title,
6712
+ title: alignmentCopy(alignment.id, messages).title,
6269
6713
  onMouseDown: (event) => event.preventDefault(),
6270
6714
  onClick: () => runtimeRef.current?.setArrayColumnAlignment(arrayAlignmentColumn - 1, alignment.id),
6271
- children: alignment.label
6715
+ children: alignmentCopy(alignment.id, messages).label
6272
6716
  },
6273
6717
  alignment.id
6274
6718
  ))
6275
6719
  ] }) : null,
6276
- /* @__PURE__ */ jsx("button", { type: "button", title: "\u0625\u0636\u0627\u0641\u0629 \u0635\u0641", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixRow(), children: "+\u0635\u0641" }),
6277
- /* @__PURE__ */ jsx("button", { type: "button", title: "\u062D\u0630\u0641 \u0635\u0641", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixRow(), children: "-\u0635\u0641" }),
6278
- /* @__PURE__ */ jsx("button", { type: "button", title: "\u0625\u0636\u0627\u0641\u0629 \u0639\u0645\u0648\u062F", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixColumn(), children: "+\u0639\u0645\u0648\u062F" }),
6279
- /* @__PURE__ */ jsx("button", { type: "button", title: "\u062D\u0630\u0641 \u0639\u0645\u0648\u062F", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixColumn(), children: "-\u0639\u0645\u0648\u062F" })
6720
+ /* @__PURE__ */ jsxs("button", { type: "button", title: messages.addRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixRow(), children: [
6721
+ "+",
6722
+ messages.row
6723
+ ] }),
6724
+ /* @__PURE__ */ jsxs("button", { type: "button", title: messages.removeRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixRow(), children: [
6725
+ "-",
6726
+ messages.row
6727
+ ] }),
6728
+ /* @__PURE__ */ jsxs("button", { type: "button", title: messages.addColumn, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixColumn(), children: [
6729
+ "+",
6730
+ messages.column
6731
+ ] }),
6732
+ /* @__PURE__ */ jsxs("button", { type: "button", title: messages.removeColumn, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixColumn(), children: [
6733
+ "-",
6734
+ messages.column
6735
+ ] })
6280
6736
  ] })
6281
6737
  ] })
6282
6738
  ]
6283
6739
  }
6284
6740
  ) }),
6285
- /* @__PURE__ */ jsx("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": "\u0627\u0644\u0641\u0631\u0627\u063A\u0627\u062A", children: /* @__PURE__ */ jsxs(
6741
+ /* @__PURE__ */ jsx("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.spaces, children: /* @__PURE__ */ jsxs(
6286
6742
  "div",
6287
6743
  {
6288
6744
  className: `spacing-command-menu spacing-command-menu--${activeEditorSide}`,
@@ -6298,8 +6754,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6298
6754
  {
6299
6755
  className: "icon-btn spacing-command-btn",
6300
6756
  type: "button",
6301
- title: "\u0625\u062F\u0631\u0627\u062C \u0641\u0631\u0627\u063A",
6302
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0641\u0631\u0627\u063A",
6757
+ title: messages.insertSpace,
6758
+ "aria-label": messages.insertSpace,
6303
6759
  "aria-haspopup": "listbox",
6304
6760
  "aria-expanded": spacingMenuOpen,
6305
6761
  onClick: () => setSpacingMenuOpen((open) => !open),
@@ -6309,13 +6765,13 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6309
6765
  ] })
6310
6766
  }
6311
6767
  ),
6312
- /* @__PURE__ */ jsx("div", { className: "spacing-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0641\u0631\u0627\u063A", hidden: !spacingMenuOpen, children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ jsxs(
6768
+ /* @__PURE__ */ jsx("div", { className: "spacing-command-options", role: "listbox", "aria-label": messages.insertSpace, hidden: !spacingMenuOpen, children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ jsxs(
6313
6769
  "button",
6314
6770
  {
6315
6771
  type: "button",
6316
6772
  role: "option",
6317
6773
  className: `spacing-command-option spacing-command-option--${command.spacing.direction}`,
6318
- title: command.title,
6774
+ title: atomicCommandTitle(command, uiLocale),
6319
6775
  onMouseDown: (event) => event.preventDefault(),
6320
6776
  onClick: () => {
6321
6777
  runtimeRef.current?.insertAtomicCommand(command.id);
@@ -6328,7 +6784,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6328
6784
  /* @__PURE__ */ jsx("span", { className: "spacing-command-glyph__bar" }),
6329
6785
  command.spacing.direction === "positive" ? /* @__PURE__ */ jsx("span", { className: "spacing-command-glyph__arrow", children: spacingArrow(command, activeEditorSide) }) : null
6330
6786
  ] }),
6331
- /* @__PURE__ */ jsx("span", { className: "spacing-command-option__name", children: command.title })
6787
+ /* @__PURE__ */ jsx("span", { className: "spacing-command-option__name", children: atomicCommandTitle(command, uiLocale) })
6332
6788
  ]
6333
6789
  },
6334
6790
  command.id
@@ -6336,7 +6792,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6336
6792
  ]
6337
6793
  }
6338
6794
  ) }),
6339
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-functions", role: "group", "aria-label": "\u0627\u0644\u062F\u0648\u0627\u0644", children: [
6795
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-functions", role: "group", "aria-label": messages.functions, children: [
6340
6796
  /* @__PURE__ */ jsxs(
6341
6797
  "div",
6342
6798
  {
@@ -6353,22 +6809,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6353
6809
  {
6354
6810
  className: "icon-btn function-command-btn",
6355
6811
  type: "button",
6356
- title: "\u0625\u062F\u0631\u0627\u062C \u062F\u0627\u0644\u0629",
6357
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062F\u0627\u0644\u0629",
6812
+ title: messages.insertFunction,
6813
+ "aria-label": messages.insertFunction,
6358
6814
  "aria-haspopup": "listbox",
6359
6815
  "aria-expanded": functionMenuOpen,
6360
6816
  onClick: () => setFunctionMenuOpen((open) => !open),
6361
6817
  children: FUNCTION_COMMANDS[0]?.arabicLabel ?? "\u062F"
6362
6818
  }
6363
6819
  ),
6364
- /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062F\u0627\u0644\u0629", hidden: !functionMenuOpen, children: FUNCTION_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6820
+ /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertFunction, hidden: !functionMenuOpen, children: FUNCTION_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6365
6821
  "button",
6366
6822
  {
6367
6823
  className: "function-command-option",
6368
6824
  type: "button",
6369
6825
  role: "option",
6370
- title: command.title,
6371
- "aria-label": command.title,
6826
+ title: atomicCommandTitle(command, uiLocale),
6827
+ "aria-label": atomicCommandTitle(command, uiLocale),
6372
6828
  onMouseDown: (event) => event.preventDefault(),
6373
6829
  onClick: () => {
6374
6830
  runtimeRef.current?.insertAtomicCommand(command.id);
@@ -6398,22 +6854,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6398
6854
  {
6399
6855
  className: "icon-btn function-command-btn",
6400
6856
  type: "button",
6401
- title: "\u0625\u062F\u0631\u0627\u062C \u062D\u062F\u0648\u062F \u0648\u0645\u062A\u0633\u0644\u0633\u0644\u0627\u062A",
6402
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062D\u062F\u0648\u062F \u0648\u0645\u062A\u0633\u0644\u0633\u0644\u0627\u062A",
6857
+ title: messages.insertLimitsSeries,
6858
+ "aria-label": messages.insertLimitsSeries,
6403
6859
  "aria-haspopup": "listbox",
6404
6860
  "aria-expanded": limitsSeriesMenuOpen,
6405
6861
  onClick: () => setLimitsSeriesMenuOpen((open) => !open),
6406
6862
  children: LIMITS_SERIES_COMMANDS[0]?.arabicLabel ?? "\u062D\u062F"
6407
6863
  }
6408
6864
  ),
6409
- /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062D\u062F\u0648\u062F \u0648\u0645\u062A\u0633\u0644\u0633\u0644\u0627\u062A", hidden: !limitsSeriesMenuOpen, children: LIMITS_SERIES_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6865
+ /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertLimitsSeries, hidden: !limitsSeriesMenuOpen, children: LIMITS_SERIES_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6410
6866
  "button",
6411
6867
  {
6412
6868
  className: "function-command-option",
6413
6869
  type: "button",
6414
6870
  role: "option",
6415
- title: command.title,
6416
- "aria-label": command.title,
6871
+ title: atomicCommandTitle(command, uiLocale),
6872
+ "aria-label": atomicCommandTitle(command, uiLocale),
6417
6873
  onMouseDown: (event) => event.preventDefault(),
6418
6874
  onClick: () => {
6419
6875
  runtimeRef.current?.insertAtomicCommand(command.id);
@@ -6443,22 +6899,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6443
6899
  {
6444
6900
  className: "icon-btn function-command-btn",
6445
6901
  type: "button",
6446
- title: "\u0625\u062F\u0631\u0627\u062C \u062F\u0648\u0627\u0644 \u0625\u0636\u0627\u0641\u064A\u0629",
6447
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062F\u0648\u0627\u0644 \u0625\u0636\u0627\u0641\u064A\u0629",
6902
+ title: messages.insertAdditionalFunctions,
6903
+ "aria-label": messages.insertAdditionalFunctions,
6448
6904
  "aria-haspopup": "listbox",
6449
6905
  "aria-expanded": function2MenuOpen,
6450
6906
  onClick: () => setFunction2MenuOpen((open) => !open),
6451
6907
  children: FUNCTION2_COMMANDS[0]?.arabicLabel ?? "\u062F"
6452
6908
  }
6453
6909
  ),
6454
- /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062F\u0648\u0627\u0644 \u0625\u0636\u0627\u0641\u064A\u0629", hidden: !function2MenuOpen, children: FUNCTION2_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6910
+ /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertAdditionalFunctions, hidden: !function2MenuOpen, children: FUNCTION2_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6455
6911
  "button",
6456
6912
  {
6457
6913
  className: "function-command-option",
6458
6914
  type: "button",
6459
6915
  role: "option",
6460
- title: command.title,
6461
- "aria-label": command.title,
6916
+ title: atomicCommandTitle(command, uiLocale),
6917
+ "aria-label": atomicCommandTitle(command, uiLocale),
6462
6918
  onMouseDown: (event) => event.preventDefault(),
6463
6919
  onClick: () => {
6464
6920
  runtimeRef.current?.insertAtomicCommand(command.id);
@@ -6488,22 +6944,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6488
6944
  {
6489
6945
  className: "icon-btn function-command-btn",
6490
6946
  type: "button",
6491
- title: "\u0625\u062F\u0631\u0627\u062C \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0623\u0639\u062F\u0627\u062F",
6492
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0623\u0639\u062F\u0627\u062F",
6947
+ title: messages.insertNumberSets,
6948
+ "aria-label": messages.insertNumberSets,
6493
6949
  "aria-haspopup": "listbox",
6494
6950
  "aria-expanded": groupMenuOpen,
6495
6951
  onClick: () => setGroupMenuOpen((open) => !open),
6496
6952
  children: GROUP_COMMANDS[0]?.arabicLabel ?? "\u0645"
6497
6953
  }
6498
6954
  ),
6499
- /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0623\u0639\u062F\u0627\u062F", hidden: !groupMenuOpen, children: GROUP_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6955
+ /* @__PURE__ */ jsx("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertNumberSets, hidden: !groupMenuOpen, children: GROUP_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6500
6956
  "button",
6501
6957
  {
6502
6958
  className: "function-command-option",
6503
6959
  type: "button",
6504
6960
  role: "option",
6505
- title: command.title,
6506
- "aria-label": command.title,
6961
+ title: atomicCommandTitle(command, uiLocale),
6962
+ "aria-label": atomicCommandTitle(command, uiLocale),
6507
6963
  onMouseDown: (event) => event.preventDefault(),
6508
6964
  onClick: () => {
6509
6965
  runtimeRef.current?.insertAtomicCommand(command.id);
@@ -6518,7 +6974,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6518
6974
  }
6519
6975
  )
6520
6976
  ] }),
6521
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-operators", role: "group", "aria-label": "\u0627\u0644\u0639\u0645\u0644\u064A\u0627\u062A", children: [
6977
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-operators", role: "group", "aria-label": messages.operations, children: [
6522
6978
  /* @__PURE__ */ jsxs(
6523
6979
  "div",
6524
6980
  {
@@ -6535,22 +6991,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6535
6991
  {
6536
6992
  className: "icon-btn function-command-btn operator-command-btn",
6537
6993
  type: "button",
6538
- title: "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0632 \u0639\u0645\u0644\u064A\u0629",
6539
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0632 \u0639\u0645\u0644\u064A\u0629",
6994
+ title: messages.insertOperation,
6995
+ "aria-label": messages.insertOperation,
6540
6996
  "aria-haspopup": "listbox",
6541
6997
  "aria-expanded": operatorMenuOpen,
6542
6998
  onClick: () => setOperatorMenuOpen((open) => !open),
6543
6999
  children: renderOperatorMenuButtonLabel(OPERATOR_COMMANDS[0], "\u2217")
6544
7000
  }
6545
7001
  ),
6546
- /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0632 \u0639\u0645\u0644\u064A\u0629", hidden: !operatorMenuOpen, children: OPERATOR_COMMANDS.map((command) => /* @__PURE__ */ jsx(
7002
+ /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertOperation, hidden: !operatorMenuOpen, children: OPERATOR_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6547
7003
  "button",
6548
7004
  {
6549
7005
  className: "function-command-option operator-command-option",
6550
7006
  type: "button",
6551
7007
  role: "option",
6552
- title: command.title,
6553
- "aria-label": command.title,
7008
+ title: atomicOperatorCommandTitle(command, uiLocale),
7009
+ "aria-label": atomicOperatorCommandTitle(command, uiLocale),
6554
7010
  onMouseDown: (event) => event.preventDefault(),
6555
7011
  onClick: () => {
6556
7012
  runtimeRef.current?.insertAtomicOperatorCommand(command.id);
@@ -6580,22 +7036,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6580
7036
  {
6581
7037
  className: "icon-btn function-command-btn operator-command-btn",
6582
7038
  type: "button",
6583
- title: "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0648\u0632 \u0639\u0644\u0627\u0642\u0627\u062A \u0648\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
6584
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0648\u0632 \u0639\u0644\u0627\u0642\u0627\u062A \u0648\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
7039
+ title: messages.insertRelationsSets,
7040
+ "aria-label": messages.insertRelationsSets,
6585
7041
  "aria-haspopup": "listbox",
6586
7042
  "aria-expanded": operator2MenuOpen,
6587
7043
  onClick: () => setOperator2MenuOpen((open) => !open),
6588
7044
  children: "\u2229"
6589
7045
  }
6590
7046
  ),
6591
- /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0648\u0632 \u0639\u0644\u0627\u0642\u0627\u062A \u0648\u0645\u062C\u0645\u0648\u0639\u0627\u062A", hidden: !operator2MenuOpen, children: OPERATOR2_COMMANDS.map((command) => /* @__PURE__ */ jsx(
7047
+ /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertRelationsSets, hidden: !operator2MenuOpen, children: OPERATOR2_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6592
7048
  "button",
6593
7049
  {
6594
7050
  className: "function-command-option operator-command-option",
6595
7051
  type: "button",
6596
7052
  role: "option",
6597
- title: command.title,
6598
- "aria-label": command.title,
7053
+ title: atomicOperatorCommandTitle(command, uiLocale),
7054
+ "aria-label": atomicOperatorCommandTitle(command, uiLocale),
6599
7055
  onMouseDown: (event) => event.preventDefault(),
6600
7056
  onClick: () => {
6601
7057
  runtimeRef.current?.insertAtomicOperatorCommand(command.id);
@@ -6625,22 +7081,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6625
7081
  {
6626
7082
  className: "icon-btn function-command-btn operator-command-btn",
6627
7083
  type: "button",
6628
- title: "\u0625\u062F\u0631\u0627\u062C \u0623\u0633\u0647\u0645",
6629
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0623\u0633\u0647\u0645",
7084
+ title: messages.insertArrows,
7085
+ "aria-label": messages.insertArrows,
6630
7086
  "aria-haspopup": "listbox",
6631
7087
  "aria-expanded": operator3MenuOpen,
6632
7088
  onClick: () => setOperator3MenuOpen((open) => !open),
6633
7089
  children: renderOperatorMenuButtonLabel(OPERATOR3_COMMANDS[0], "\u21D2")
6634
7090
  }
6635
7091
  ),
6636
- /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0623\u0633\u0647\u0645", hidden: !operator3MenuOpen, children: OPERATOR3_COMMANDS.map((command) => /* @__PURE__ */ jsx(
7092
+ /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertArrows, hidden: !operator3MenuOpen, children: OPERATOR3_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6637
7093
  "button",
6638
7094
  {
6639
7095
  className: "function-command-option operator-command-option",
6640
7096
  type: "button",
6641
7097
  role: "option",
6642
- title: command.title,
6643
- "aria-label": command.title,
7098
+ title: atomicOperatorCommandTitle(command, uiLocale),
7099
+ "aria-label": atomicOperatorCommandTitle(command, uiLocale),
6644
7100
  onMouseDown: (event) => event.preventDefault(),
6645
7101
  onClick: () => {
6646
7102
  runtimeRef.current?.insertAtomicOperatorCommand(command.id);
@@ -6670,22 +7126,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6670
7126
  {
6671
7127
  className: "icon-btn function-command-btn operator-command-btn",
6672
7128
  type: "button",
6673
- title: "\u0625\u062F\u0631\u0627\u062C \u0646\u0642\u0627\u0637",
6674
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0646\u0642\u0627\u0637",
7129
+ title: messages.insertDots,
7130
+ "aria-label": messages.insertDots,
6675
7131
  "aria-haspopup": "listbox",
6676
7132
  "aria-expanded": dotMenuOpen,
6677
7133
  onClick: () => setDotMenuOpen((open) => !open),
6678
7134
  children: renderOperatorMenuButtonLabel(DOT_COMMANDS[0], "\u2026")
6679
7135
  }
6680
7136
  ),
6681
- /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u0646\u0642\u0627\u0637", hidden: !dotMenuOpen, children: DOT_COMMANDS.map((command) => /* @__PURE__ */ jsx(
7137
+ /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertDots, hidden: !dotMenuOpen, children: DOT_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6682
7138
  "button",
6683
7139
  {
6684
7140
  className: "function-command-option operator-command-option",
6685
7141
  type: "button",
6686
7142
  role: "option",
6687
- title: command.title,
6688
- "aria-label": command.title,
7143
+ title: atomicOperatorCommandTitle(command, uiLocale),
7144
+ "aria-label": atomicOperatorCommandTitle(command, uiLocale),
6689
7145
  onMouseDown: (event) => event.preventDefault(),
6690
7146
  onClick: () => {
6691
7147
  runtimeRef.current?.insertAtomicOperatorCommand(command.id);
@@ -6715,22 +7171,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6715
7171
  {
6716
7172
  className: "icon-btn function-command-btn operator-command-btn",
6717
7173
  type: "button",
6718
- title: "\u0625\u062F\u0631\u0627\u062C \u062A\u0643\u0627\u0645\u0644\u0627\u062A",
6719
- "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062A\u0643\u0627\u0645\u0644\u0627\u062A",
7174
+ title: messages.insertIntegrals,
7175
+ "aria-label": messages.insertIntegrals,
6720
7176
  "aria-haspopup": "listbox",
6721
7177
  "aria-expanded": integralMenuOpen,
6722
7178
  onClick: () => setIntegralMenuOpen((open) => !open),
6723
7179
  children: renderOperatorMenuButtonLabel(INTEGRAL_COMMANDS[0], "\u222B")
6724
7180
  }
6725
7181
  ),
6726
- /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": "\u0625\u062F\u0631\u0627\u062C \u062A\u0643\u0627\u0645\u0644\u0627\u062A", hidden: !integralMenuOpen, children: INTEGRAL_COMMANDS.map((command) => /* @__PURE__ */ jsx(
7182
+ /* @__PURE__ */ jsx("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertIntegrals, hidden: !integralMenuOpen, children: INTEGRAL_COMMANDS.map((command) => /* @__PURE__ */ jsx(
6727
7183
  "button",
6728
7184
  {
6729
7185
  className: "function-command-option operator-command-option",
6730
7186
  type: "button",
6731
7187
  role: "option",
6732
- title: command.title,
6733
- "aria-label": command.title,
7188
+ title: atomicOperatorCommandTitle(command, uiLocale),
7189
+ "aria-label": atomicOperatorCommandTitle(command, uiLocale),
6734
7190
  onMouseDown: (event) => event.preventDefault(),
6735
7191
  onClick: () => {
6736
7192
  runtimeRef.current?.insertAtomicOperatorCommand(command.id);
@@ -6745,27 +7201,27 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6745
7201
  }
6746
7202
  )
6747
7203
  ] }),
6748
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-scripts", role: "group", "aria-label": "\u0627\u0644\u0623\u0633 \u0648\u0627\u0644\u0633\u0641\u0644\u064A", children: [
6749
- /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn", type: "button", title: "\u0625\u0636\u0627\u0641\u0629 \u0623\u0633", "aria-label": "\u0625\u0636\u0627\u0641\u0629 \u0623\u0633", onClick: () => runtimeRef.current?.addSup(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
7204
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-scripts", role: "group", "aria-label": messages.scripts, children: [
7205
+ /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSuperscript, "aria-label": messages.addSuperscript, onClick: () => runtimeRef.current?.addSup(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
6750
7206
  /* @__PURE__ */ jsx("span", { children: "\u0646" }),
6751
7207
  /* @__PURE__ */ jsx("span", { children: "\u0633" })
6752
7208
  ] }) }),
6753
- /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn", type: "button", title: "\u0625\u0636\u0627\u0641\u0629 \u0633\u0641\u0644\u064A", "aria-label": "\u0625\u0636\u0627\u0641\u0629 \u0633\u0641\u0644\u064A", onClick: () => runtimeRef.current?.addSub(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
7209
+ /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSubscript, "aria-label": messages.addSubscript, onClick: () => runtimeRef.current?.addSub(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
6754
7210
  /* @__PURE__ */ jsx("span", { children: "\u0646" }),
6755
7211
  /* @__PURE__ */ jsx("span", { children: "\u0633" })
6756
7212
  ] }) }),
6757
- /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title: "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0623\u0633", "aria-label": "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0623\u0633", onClick: () => runtimeRef.current?.removeSup(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sup", "aria-hidden": "true", children: [
7213
+ /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title: messages.removeSuperscript, "aria-label": messages.removeSuperscript, onClick: () => runtimeRef.current?.removeSup(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sup", "aria-hidden": "true", children: [
6758
7214
  /* @__PURE__ */ jsx("span", { children: "\u0646" }),
6759
7215
  /* @__PURE__ */ jsx("span", { children: "\xD7" })
6760
7216
  ] }) }),
6761
- /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title: "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0633\u0641\u0644\u064A", "aria-label": "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0633\u0641\u0644\u064A", onClick: () => runtimeRef.current?.removeSub(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sub", "aria-hidden": "true", children: [
7217
+ /* @__PURE__ */ jsx("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title: messages.removeSubscript, "aria-label": messages.removeSubscript, onClick: () => runtimeRef.current?.removeSub(), children: /* @__PURE__ */ jsxs("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sub", "aria-hidden": "true", children: [
6762
7218
  /* @__PURE__ */ jsx("span", { children: "\u0646" }),
6763
7219
  /* @__PURE__ */ jsx("span", { children: "\xD7" })
6764
7220
  ] }) })
6765
7221
  ] }),
6766
- /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": "\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u0625\u062F\u062E\u0627\u0644", children: [
6767
- /* @__PURE__ */ jsx("button", { className: "icon-btn delete-node-btn", type: "button", title: "\u062D\u0630\u0641 \u0627\u0644\u0628\u0646\u064A\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629", "aria-label": "\u062D\u0630\u0641 \u0627\u0644\u0628\u0646\u064A\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629", onClick: () => runtimeRef.current?.deleteStructure(), children: "\xD7" }),
6768
- /* @__PURE__ */ jsx("button", { ref: splitTypingBtnRef, id: "toggle-split-leaf-typing", className: "icon-btn ligature-btn", type: "button", title: "\u062A\u0628\u062F\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641", "aria-label": "\u062A\u0628\u062F\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641", onClick: () => runtimeRef.current?.toggleSplitLeafTyping(), children: "\u0633\u0635\u0639" }),
7222
+ /* @__PURE__ */ jsxs("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.inputStyles, children: [
7223
+ /* @__PURE__ */ jsx("button", { className: "icon-btn delete-node-btn", type: "button", title: messages.deleteSelectedStructure, "aria-label": messages.deleteSelectedStructure, onClick: () => runtimeRef.current?.deleteStructure(), children: "\xD7" }),
7224
+ /* @__PURE__ */ jsx("button", { ref: splitTypingBtnRef, id: "toggle-split-leaf-typing", className: "icon-btn ligature-btn", type: "button", title: messages.toggleLetterMerging, "aria-label": messages.toggleLetterMerging, onClick: () => runtimeRef.current?.toggleSplitLeafTyping(), children: "\u0633\u0635\u0639" }),
6769
7225
  /* @__PURE__ */ jsxs(
6770
7226
  "div",
6771
7227
  {
@@ -6784,22 +7240,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6784
7240
  id: "select-character-font",
6785
7241
  className: `icon-btn font-mode-btn font-mode-btn--${selectedCharacterFont}`,
6786
7242
  type: "button",
6787
- title: characterFontOption(selectedCharacterFont).title,
6788
- "aria-label": "\u0627\u062E\u062A\u064A\u0627\u0631 \u062E\u0637 \u0627\u0644\u0643\u062A\u0627\u0628\u0629",
7243
+ title: characterFontTitle(selectedCharacterFont, messages),
7244
+ "aria-label": messages.chooseWritingFont,
6789
7245
  "aria-haspopup": "listbox",
6790
7246
  "aria-expanded": characterFontMenuOpen,
6791
7247
  onClick: () => setCharacterFontMenuOpen((open) => !open),
6792
7248
  children: characterFontOption(selectedCharacterFont).label
6793
7249
  }
6794
7250
  ),
6795
- /* @__PURE__ */ jsx("div", { className: "character-font-options", role: "listbox", "aria-label": "\u0627\u062E\u062A\u064A\u0627\u0631 \u062E\u0637 \u0627\u0644\u0643\u062A\u0627\u0628\u0629", hidden: !characterFontMenuOpen, children: CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ jsx(
7251
+ /* @__PURE__ */ jsx("div", { className: "character-font-options", role: "listbox", "aria-label": messages.chooseWritingFont, hidden: !characterFontMenuOpen, children: CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ jsx(
6796
7252
  "button",
6797
7253
  {
6798
7254
  type: "button",
6799
7255
  role: "option",
6800
7256
  "aria-selected": selectedCharacterFont === option.id,
6801
7257
  className: `character-font-option character-font-option--${option.id}`,
6802
- title: option.title,
7258
+ title: characterFontTitle(option.id, messages),
6803
7259
  onMouseDown: (event) => event.preventDefault(),
6804
7260
  onClick: () => {
6805
7261
  runtimeRef.current?.setCurrentCharacterFont(option.id);
@@ -6832,22 +7288,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6832
7288
  id: "select-digit-form",
6833
7289
  className: "icon-btn digit-form-btn",
6834
7290
  type: "button",
6835
- title: "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645",
6836
- "aria-label": "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645",
7291
+ title: messages.chooseDigitForm,
7292
+ "aria-label": messages.chooseDigitForm,
6837
7293
  "aria-haspopup": "listbox",
6838
7294
  "aria-expanded": digitMenuOpen,
6839
7295
  onClick: () => setDigitMenuOpen((open) => !open),
6840
7296
  children: digitFormLabel(selectedDigitForm2)
6841
7297
  }
6842
7298
  ),
6843
- /* @__PURE__ */ jsx("div", { className: "digit-form-options", role: "listbox", "aria-label": "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645", hidden: !digitMenuOpen, children: DIGIT_FORM_OPTIONS.map((option) => /* @__PURE__ */ jsx(
7299
+ /* @__PURE__ */ jsx("div", { className: "digit-form-options", role: "listbox", "aria-label": messages.chooseDigitForm, hidden: !digitMenuOpen, children: DIGIT_FORM_OPTIONS.map((option) => /* @__PURE__ */ jsx(
6844
7300
  "button",
6845
7301
  {
6846
7302
  type: "button",
6847
7303
  role: "option",
6848
7304
  "aria-selected": selectedDigitForm2 === option.id,
6849
7305
  className: "digit-form-option",
6850
- title: option.title,
7306
+ title: digitFormTitle(option.id, messages),
6851
7307
  onMouseDown: (event) => event.preventDefault(),
6852
7308
  onClick: () => {
6853
7309
  runtimeRef.current?.setCurrentDigitForm(option.id);
@@ -6871,15 +7327,15 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6871
7327
  id: "butex-editor-surface",
6872
7328
  className: "surface surface--arabic",
6873
7329
  tabIndex: 0,
6874
- "aria-label": "\u0645\u062D\u0631\u0631 \u0627\u0644\u0645\u0639\u0627\u062F\u0644\u0627\u062A"
7330
+ "aria-label": messages.equationEditor
6875
7331
  }
6876
7332
  ),
6877
7333
  /* @__PURE__ */ jsx("div", { ref: renderErrorRef, className: "error", hidden: true })
6878
7334
  ] }),
6879
- /* @__PURE__ */ jsx("section", { className: "panel panel-preview", "aria-label": "\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0631\u0633\u0645", children: /* @__PURE__ */ jsx("div", { ref: mathOutputRef, className: "preview-box" }) }),
7335
+ /* @__PURE__ */ jsx("section", { className: "panel panel-preview", "aria-label": messages.renderPreview, children: /* @__PURE__ */ jsx("div", { ref: mathOutputRef, className: "preview-box" }) }),
6880
7336
  debug ? /* @__PURE__ */ jsxs("section", { className: "panel", children: [
6881
7337
  /* @__PURE__ */ jsxs("div", { className: "dev-strip", children: [
6882
- /* @__PURE__ */ jsx("span", { className: "dev-badge", children: "\u062A\u0637\u0648\u064A\u0631" }),
7338
+ /* @__PURE__ */ jsx("span", { className: "dev-badge", children: messages.development }),
6883
7339
  /* @__PURE__ */ jsx("div", { ref: latexLinesRef, className: "ascii" }),
6884
7340
  /* @__PURE__ */ jsx("div", { ref: passivePreviewRef, className: "passive-preview-text" })
6885
7341
  ] }),
@@ -6902,7 +7358,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6902
7358
  return next;
6903
7359
  });
6904
7360
  },
6905
- children: debugBodyHidden ? "\u0625\u0638\u0647\u0627\u0631 \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D" : "\u0625\u062E\u0641\u0627\u0621 \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D"
7361
+ children: debugBodyHidden ? messages.showDebugLog : messages.hideDebugLog
6906
7362
  }
6907
7363
  ),
6908
7364
  /* @__PURE__ */ jsx(
@@ -6916,7 +7372,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
6916
7372
  } catch {
6917
7373
  }
6918
7374
  },
6919
- children: "\u0646\u0633\u062E \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D"
7375
+ children: messages.copyDebugLog
6920
7376
  }
6921
7377
  )
6922
7378
  ] }),