@drghaliasri/butex 3.2.2 → 4.0.1
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/README.md +8 -2
- package/dist/document.js +72 -0
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +72 -0
- package/dist/document.mjs.map +1 -1
- package/dist/document2.d.mts +11 -5
- package/dist/document2.d.ts +11 -5
- package/dist/document2.js +207 -35
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs +202 -35
- package/dist/document2.mjs.map +1 -1
- package/dist/index.d.mts +81 -4
- package/dist/index.d.ts +81 -4
- package/dist/index.global.js +436 -31
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +436 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +436 -31
- package/dist/index.mjs.map +1 -1
- package/dist/react-document.d.mts +1 -1
- package/dist/react-document.d.ts +1 -1
- package/dist/react-document.js +649 -175
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +649 -175
- package/dist/react-document.mjs.map +1 -1
- package/dist/react-document2.d.mts +31 -9
- package/dist/react-document2.d.ts +31 -9
- package/dist/react-document2.js +1196 -411
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +1196 -411
- package/dist/react-document2.mjs.map +1 -1
- package/dist/react.d.mts +80 -1
- package/dist/react.d.ts +80 -1
- package/dist/react.js +631 -175
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +631 -175
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react-document.js
CHANGED
|
@@ -1154,6 +1154,24 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1154
1154
|
title: "\u0623\u0643\u0628\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A",
|
|
1155
1155
|
svg_path: null
|
|
1156
1156
|
},
|
|
1157
|
+
coloneqq: {
|
|
1158
|
+
id: "coloneqq",
|
|
1159
|
+
category: "operators1",
|
|
1160
|
+
Tex: "\\coloneqq",
|
|
1161
|
+
mirror: true,
|
|
1162
|
+
Label: "\u2254",
|
|
1163
|
+
title: "\u064A\u0639\u0631\u0641 \u0628\u0623\u0646\u0647 \u064A\u0633\u0627\u0648\u064A",
|
|
1164
|
+
svg_path: null
|
|
1165
|
+
},
|
|
1166
|
+
eqqcolon: {
|
|
1167
|
+
id: "eqqcolon",
|
|
1168
|
+
category: "operators1",
|
|
1169
|
+
Tex: "\\eqqcolon",
|
|
1170
|
+
mirror: true,
|
|
1171
|
+
Label: "\u2255",
|
|
1172
|
+
title: "\u064A\u0633\u0627\u0648\u064A \u0628\u0627\u0644\u062A\u0639\u0631\u064A\u0641",
|
|
1173
|
+
svg_path: null
|
|
1174
|
+
},
|
|
1157
1175
|
///// Operators 2
|
|
1158
1176
|
propto: {
|
|
1159
1177
|
id: "propto",
|
|
@@ -1320,6 +1338,60 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1320
1338
|
title: "\u064A\u0643\u0627\u0641\u0626",
|
|
1321
1339
|
svg_path: null
|
|
1322
1340
|
},
|
|
1341
|
+
implies: {
|
|
1342
|
+
id: "implies",
|
|
1343
|
+
category: "operators3",
|
|
1344
|
+
Tex: "\\implies",
|
|
1345
|
+
mirror: true,
|
|
1346
|
+
Label: "\u21D2",
|
|
1347
|
+
title: "\u064A\u0633\u062A\u0644\u0632\u0645",
|
|
1348
|
+
svg_path: null
|
|
1349
|
+
},
|
|
1350
|
+
impliedby: {
|
|
1351
|
+
id: "impliedby",
|
|
1352
|
+
category: "operators3",
|
|
1353
|
+
Tex: "\\impliedby",
|
|
1354
|
+
mirror: true,
|
|
1355
|
+
Label: "\u21D0",
|
|
1356
|
+
title: "\u0645\u0633\u062A\u0644\u0632\u0645 \u0645\u0646",
|
|
1357
|
+
svg_path: null
|
|
1358
|
+
},
|
|
1359
|
+
iff: {
|
|
1360
|
+
id: "iff",
|
|
1361
|
+
category: "operators3",
|
|
1362
|
+
Tex: "\\iff",
|
|
1363
|
+
mirror: false,
|
|
1364
|
+
Label: "\u21D4",
|
|
1365
|
+
title: "\u0625\u0630\u0627 \u0648\u0641\u0642\u0637 \u0625\u0630\u0627",
|
|
1366
|
+
svg_path: null
|
|
1367
|
+
},
|
|
1368
|
+
Longrightarrow: {
|
|
1369
|
+
id: "Longrightarrow",
|
|
1370
|
+
category: "operators3",
|
|
1371
|
+
Tex: "\\Longrightarrow",
|
|
1372
|
+
mirror: true,
|
|
1373
|
+
Label: "\u27F9",
|
|
1374
|
+
title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0637\u0648\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
1375
|
+
svg_path: null
|
|
1376
|
+
},
|
|
1377
|
+
Longleftarrow: {
|
|
1378
|
+
id: "Longleftarrow",
|
|
1379
|
+
category: "operators3",
|
|
1380
|
+
Tex: "\\Longleftarrow",
|
|
1381
|
+
mirror: true,
|
|
1382
|
+
Label: "\u27F8",
|
|
1383
|
+
title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0637\u0648\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
1384
|
+
svg_path: null
|
|
1385
|
+
},
|
|
1386
|
+
to: {
|
|
1387
|
+
id: "to",
|
|
1388
|
+
category: "operators3",
|
|
1389
|
+
Tex: "\\to",
|
|
1390
|
+
mirror: true,
|
|
1391
|
+
Label: "\u2192",
|
|
1392
|
+
title: "\u064A\u0624\u0648\u0644 \u0625\u0644\u0649",
|
|
1393
|
+
svg_path: null
|
|
1394
|
+
},
|
|
1323
1395
|
rightleftharpoons: {
|
|
1324
1396
|
id: "rightleftharpoons",
|
|
1325
1397
|
category: "operators3",
|
|
@@ -2402,6 +2474,321 @@ function undoRedoCanRedo(stacks) {
|
|
|
2402
2474
|
return stacks.future.length > 0;
|
|
2403
2475
|
}
|
|
2404
2476
|
|
|
2477
|
+
// src/editor/uiLocale.ts
|
|
2478
|
+
var ENGLISH_COMMAND_TITLES = {
|
|
2479
|
+
cos: "Cosine",
|
|
2480
|
+
sin: "Sine",
|
|
2481
|
+
tan: "Tangent",
|
|
2482
|
+
cot: "Cotangent",
|
|
2483
|
+
sec: "Secant",
|
|
2484
|
+
csc: "Cosecant",
|
|
2485
|
+
arccos: "Inverse cosine",
|
|
2486
|
+
arcsin: "Inverse sine",
|
|
2487
|
+
arctan: "Inverse tangent",
|
|
2488
|
+
arccot: "Inverse cotangent",
|
|
2489
|
+
arcsec: "Inverse secant",
|
|
2490
|
+
arccsc: "Inverse cosecant",
|
|
2491
|
+
cosh: "Hyperbolic cosine",
|
|
2492
|
+
sinh: "Hyperbolic sine",
|
|
2493
|
+
tanh: "Hyperbolic tangent",
|
|
2494
|
+
coth: "Hyperbolic cotangent",
|
|
2495
|
+
sum: "Sum",
|
|
2496
|
+
prod: "Product",
|
|
2497
|
+
lim: "Limit",
|
|
2498
|
+
max: "Maximum",
|
|
2499
|
+
min: "Minimum",
|
|
2500
|
+
sup: "Supremum",
|
|
2501
|
+
inf: "Infimum",
|
|
2502
|
+
pi: "Pi",
|
|
2503
|
+
exp: "Exponential",
|
|
2504
|
+
ln: "Natural logarithm",
|
|
2505
|
+
log: "Logarithm",
|
|
2506
|
+
det: "Determinant",
|
|
2507
|
+
N: "Natural numbers",
|
|
2508
|
+
Z: "Integers",
|
|
2509
|
+
Q: "Rational numbers",
|
|
2510
|
+
R: "Real numbers",
|
|
2511
|
+
C: "Complex numbers",
|
|
2512
|
+
H: "Quaternions",
|
|
2513
|
+
negThinSpace: "Negative thin space",
|
|
2514
|
+
mediumSpace: "Medium space",
|
|
2515
|
+
thickSpace: "Thick space",
|
|
2516
|
+
quadSpace: "Large space",
|
|
2517
|
+
qquadSpace: "Extra-large space"
|
|
2518
|
+
};
|
|
2519
|
+
var ENGLISH_OPERATOR_TITLES = {
|
|
2520
|
+
inf: "Infinity",
|
|
2521
|
+
times: "Multiplication",
|
|
2522
|
+
div: "Division",
|
|
2523
|
+
pm: "Plus or minus",
|
|
2524
|
+
mp: "Minus or plus",
|
|
2525
|
+
neq: "Not equal",
|
|
2526
|
+
approx: "Approximately equal",
|
|
2527
|
+
sim: "Similar",
|
|
2528
|
+
mid: "Divides",
|
|
2529
|
+
leq: "Less than or equal",
|
|
2530
|
+
geq: "Greater than or equal",
|
|
2531
|
+
coloneqq: "Defined as equal to",
|
|
2532
|
+
eqqcolon: "Equal by definition",
|
|
2533
|
+
propto: "Proportional to",
|
|
2534
|
+
in: "Element of",
|
|
2535
|
+
notin: "Not an element of",
|
|
2536
|
+
subset: "Subset of",
|
|
2537
|
+
supset: "Superset of",
|
|
2538
|
+
subseteq: "Subset of or equal",
|
|
2539
|
+
supseteq: "Superset of or equal",
|
|
2540
|
+
cap: "Intersection",
|
|
2541
|
+
cup: "Union",
|
|
2542
|
+
emptyset: "Empty set",
|
|
2543
|
+
nsubseteq: "Not a subset of or equal",
|
|
2544
|
+
nsupseteq: "Not a superset of or equal",
|
|
2545
|
+
ldots: "Horizontal dots",
|
|
2546
|
+
cdot: "Multiplication dot",
|
|
2547
|
+
cdots: "Centered horizontal dots",
|
|
2548
|
+
vdots: "Vertical dots",
|
|
2549
|
+
ddots: "Diagonal dots",
|
|
2550
|
+
leftrightarrowDouble: "Equivalent",
|
|
2551
|
+
implies: "Implies",
|
|
2552
|
+
impliedby: "Implied by",
|
|
2553
|
+
iff: "If and only if",
|
|
2554
|
+
Longrightarrow: "Long double arrow right",
|
|
2555
|
+
Longleftarrow: "Long double arrow left",
|
|
2556
|
+
to: "Maps to",
|
|
2557
|
+
rightleftharpoons: "Equilibrium",
|
|
2558
|
+
leftarrow: "Left arrow",
|
|
2559
|
+
rightarrow: "Right arrow",
|
|
2560
|
+
leftarrowDouble: "Double left arrow",
|
|
2561
|
+
rightarrowDouble: "Double right arrow",
|
|
2562
|
+
leftharpoonup: "Upper left harpoon",
|
|
2563
|
+
rightharpoonup: "Upper right harpoon",
|
|
2564
|
+
leftharpoondown: "Lower left harpoon",
|
|
2565
|
+
rightharpoondown: "Lower right harpoon",
|
|
2566
|
+
int: "Integral",
|
|
2567
|
+
iint: "Double integral",
|
|
2568
|
+
iiint: "Triple integral",
|
|
2569
|
+
iiiint: "Quadruple integral",
|
|
2570
|
+
oint: "Contour integral",
|
|
2571
|
+
oiint: "Closed surface integral",
|
|
2572
|
+
oiiint: "Closed volume integral"
|
|
2573
|
+
};
|
|
2574
|
+
var EQUATION_EDITOR_MESSAGES = {
|
|
2575
|
+
ar: {
|
|
2576
|
+
undoRedo: "\u062A\u0631\u0627\u062C\u0639 \u0648\u0625\u0639\u0627\u062F\u0629",
|
|
2577
|
+
undo: "\u062A\u0631\u0627\u062C\u0639",
|
|
2578
|
+
redo: "\u0625\u0639\u0627\u062F\u0629",
|
|
2579
|
+
clipboard: "\u0627\u0644\u062D\u0627\u0641\u0638\u0629",
|
|
2580
|
+
copy: "\u0646\u0633\u062E",
|
|
2581
|
+
cut: "\u0642\u0635",
|
|
2582
|
+
paste: "\u0644\u0635\u0642",
|
|
2583
|
+
editorSettings: "\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062D\u0631\u0631",
|
|
2584
|
+
toggleSide: "\u062A\u0628\u062F\u064A\u0644 \u0639\u0631\u0628\u064A / \u0625\u0646\u062C\u0644\u064A\u0632\u064A",
|
|
2585
|
+
structures: "\u0627\u0644\u0628\u0646\u0649",
|
|
2586
|
+
insertDelimiters: "\u0625\u062F\u0631\u0627\u062C \u0645\u062D\u062F\u062F\u0627\u062A",
|
|
2587
|
+
insertParentheses: "\u0625\u062F\u0631\u0627\u062C \u0642\u0648\u0633\u064A\u0646",
|
|
2588
|
+
insertBrackets: "\u0625\u062F\u0631\u0627\u062C \u0645\u0639\u0642\u0648\u0641\u064A\u0646",
|
|
2589
|
+
insertBraces: "\u0625\u062F\u0631\u0627\u062C \u062D\u0627\u0635\u0631\u062A\u064A\u0646",
|
|
2590
|
+
insertFraction: "\u0625\u062F\u0631\u0627\u062C \u0643\u0633\u0631",
|
|
2591
|
+
insertRoot: "\u0625\u062F\u0631\u0627\u062C \u062C\u0630\u0631",
|
|
2592
|
+
environments: "\u0627\u0644\u0628\u064A\u0626\u0627\u062A",
|
|
2593
|
+
insertEnvironment: "\u0625\u062F\u0631\u0627\u062C \u0628\u064A\u0626\u0629 \u0634\u0628\u0643\u064A\u0629",
|
|
2594
|
+
environmentType: "\u0646\u0648\u0639 \u0627\u0644\u0628\u064A\u0626\u0629",
|
|
2595
|
+
matrix: "\u0645\u0635\u0641\u0648\u0641\u0629",
|
|
2596
|
+
array: "\u062C\u062F\u0648\u0644",
|
|
2597
|
+
aligned: "\u0645\u062D\u0627\u0630\u0627\u0629",
|
|
2598
|
+
matrixType: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629",
|
|
2599
|
+
chooseEnvironmentSize: "\u0627\u062E\u062A\u064A\u0627\u0631 \u062D\u062C\u0645 \u0627\u0644\u0628\u064A\u0626\u0629",
|
|
2600
|
+
rows: "\u0635\u0641\u0648\u0641",
|
|
2601
|
+
columns: "\u0623\u0639\u0645\u062F\u0629",
|
|
2602
|
+
row: "\u0635\u0641",
|
|
2603
|
+
column: "\u0639\u0645\u0648\u062F",
|
|
2604
|
+
insert: "\u0625\u062F\u0631\u0627\u062C",
|
|
2605
|
+
editSelectedEnvironment: "\u062A\u0639\u062F\u064A\u0644 \u0627\u0644\u0628\u064A\u0626\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",
|
|
2606
|
+
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",
|
|
2607
|
+
applyStyle: "\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0646\u0645\u0637",
|
|
2608
|
+
addRow: "\u0625\u0636\u0627\u0641\u0629 \u0635\u0641",
|
|
2609
|
+
removeRow: "\u062D\u0630\u0641 \u0635\u0641",
|
|
2610
|
+
addColumn: "\u0625\u0636\u0627\u0641\u0629 \u0639\u0645\u0648\u062F",
|
|
2611
|
+
removeColumn: "\u062D\u0630\u0641 \u0639\u0645\u0648\u062F",
|
|
2612
|
+
spaces: "\u0627\u0644\u0641\u0631\u0627\u063A\u0627\u062A",
|
|
2613
|
+
insertSpace: "\u0625\u062F\u0631\u0627\u062C \u0641\u0631\u0627\u063A",
|
|
2614
|
+
functions: "\u0627\u0644\u062F\u0648\u0627\u0644",
|
|
2615
|
+
insertFunction: "\u0625\u062F\u0631\u0627\u062C \u062F\u0627\u0644\u0629",
|
|
2616
|
+
insertLimitsSeries: "\u0625\u062F\u0631\u0627\u062C \u062D\u062F\u0648\u062F \u0648\u0645\u062A\u0633\u0644\u0633\u0644\u0627\u062A",
|
|
2617
|
+
insertAdditionalFunctions: "\u0625\u062F\u0631\u0627\u062C \u062F\u0648\u0627\u0644 \u0625\u0636\u0627\u0641\u064A\u0629",
|
|
2618
|
+
insertNumberSets: "\u0625\u062F\u0631\u0627\u062C \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0623\u0639\u062F\u0627\u062F",
|
|
2619
|
+
operations: "\u0627\u0644\u0639\u0645\u0644\u064A\u0627\u062A",
|
|
2620
|
+
insertOperation: "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0632 \u0639\u0645\u0644\u064A\u0629",
|
|
2621
|
+
insertRelationsSets: "\u0625\u062F\u0631\u0627\u062C \u0631\u0645\u0648\u0632 \u0639\u0644\u0627\u0642\u0627\u062A \u0648\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
|
|
2622
|
+
insertArrows: "\u0625\u062F\u0631\u0627\u062C \u0623\u0633\u0647\u0645",
|
|
2623
|
+
insertDots: "\u0625\u062F\u0631\u0627\u062C \u0646\u0642\u0627\u0637",
|
|
2624
|
+
insertIntegrals: "\u0625\u062F\u0631\u0627\u062C \u062A\u0643\u0627\u0645\u0644\u0627\u062A",
|
|
2625
|
+
scripts: "\u0627\u0644\u0623\u0633 \u0648\u0627\u0644\u0633\u0641\u0644\u064A",
|
|
2626
|
+
addSuperscript: "\u0625\u0636\u0627\u0641\u0629 \u0623\u0633",
|
|
2627
|
+
addSubscript: "\u0625\u0636\u0627\u0641\u0629 \u0633\u0641\u0644\u064A",
|
|
2628
|
+
removeSuperscript: "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0623\u0633",
|
|
2629
|
+
removeSubscript: "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0633\u0641\u0644\u064A",
|
|
2630
|
+
inputStyles: "\u0623\u0646\u0645\u0627\u0637 \u0627\u0644\u0625\u062F\u062E\u0627\u0644",
|
|
2631
|
+
deleteSelectedStructure: "\u062D\u0630\u0641 \u0627\u0644\u0628\u0646\u064A\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629",
|
|
2632
|
+
toggleLetterMerging: "\u062A\u0628\u062F\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641",
|
|
2633
|
+
disableLetterMerging: "\u062A\u0639\u0637\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641",
|
|
2634
|
+
enableLetterMerging: "\u062A\u0641\u0639\u064A\u0644 \u062F\u0645\u062C \u0627\u0644\u062D\u0631\u0648\u0641",
|
|
2635
|
+
chooseWritingFont: "\u0627\u062E\u062A\u064A\u0627\u0631 \u062E\u0637 \u0627\u0644\u0643\u062A\u0627\u0628\u0629",
|
|
2636
|
+
chooseDigitForm: "\u0627\u062E\u062A\u064A\u0627\u0631 \u0634\u0643\u0644 \u0627\u0644\u0623\u0631\u0642\u0627\u0645",
|
|
2637
|
+
defaultFont: "\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A",
|
|
2638
|
+
takweenFont: "\u062E\u0637 \u062A\u0643\u0648\u064A\u0646",
|
|
2639
|
+
diwaniFont: "\u062E\u0637 \u062F\u064A\u0648\u0627\u0646\u064A",
|
|
2640
|
+
diwaniOutlineFont: "\u062E\u0637 \u062F\u064A\u0648\u0627\u0646\u064A \u0645\u0638\u0644\u0644",
|
|
2641
|
+
writeDefaultFont: "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u0627\u0644\u062E\u0637 \u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A",
|
|
2642
|
+
writeTakweenFont: "\u0627\u0644\u0643\u062A\u0627\u0628\u0629 \u0628\u062E\u0637 \u062A\u0643\u0648\u064A\u0646",
|
|
2643
|
+
westernDigits: "\u0623\u0631\u0642\u0627\u0645 \u063A\u0631\u0628\u064A\u0629",
|
|
2644
|
+
arabicIndicDigits: "\u0623\u0631\u0642\u0627\u0645 \u0639\u0631\u0628\u064A\u0629 \u0647\u0646\u062F\u064A\u0629",
|
|
2645
|
+
persianIndicDigits: "\u0623\u0631\u0642\u0627\u0645 \u0641\u0627\u0631\u0633\u064A\u0629 \u0647\u0646\u062F\u064A\u0629",
|
|
2646
|
+
equationEditor: "\u0645\u062D\u0631\u0631 \u0627\u0644\u0645\u0639\u0627\u062F\u0644\u0627\u062A",
|
|
2647
|
+
renderPreview: "\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0631\u0633\u0645",
|
|
2648
|
+
development: "\u062A\u0637\u0648\u064A\u0631",
|
|
2649
|
+
showDebugLog: "\u0625\u0638\u0647\u0627\u0631 \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",
|
|
2650
|
+
hideDebugLog: "\u0625\u062E\u0641\u0627\u0621 \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",
|
|
2651
|
+
copyDebugLog: "\u0646\u0633\u062E \u0633\u062C\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",
|
|
2652
|
+
empty: "\u0641\u0627\u0631\u063A",
|
|
2653
|
+
englishLatex: "LaTeX \u0625\u0646\u062C\u0644\u064A\u0632\u064A",
|
|
2654
|
+
arabicLatex: "LaTeX \u0639\u0631\u0628\u064A",
|
|
2655
|
+
inactiveEnglish: "\u0627\u0644\u0633\u0644\u0633\u0644\u0629 \u063A\u064A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629 (\u0625\u0646\u062C\u0644\u064A\u0632\u064A)",
|
|
2656
|
+
inactiveArabic: "\u0627\u0644\u0633\u0644\u0633\u0644\u0629 \u063A\u064A\u0631 \u0627\u0644\u0646\u0634\u0637\u0629 (\u0639\u0631\u0628\u064A)",
|
|
2657
|
+
mathJaxError: "\u062E\u0637\u0623 MathJax",
|
|
2658
|
+
previewError: "\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629",
|
|
2659
|
+
activeSide: "\u0627\u0644\u062C\u0627\u0646\u0628 \u0627\u0644\u0646\u0634\u0637",
|
|
2660
|
+
syncState: "\u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629",
|
|
2661
|
+
arabicSide: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629",
|
|
2662
|
+
englishSide: "\u0627\u0644\u0625\u0646\u062C\u0644\u064A\u0632\u064A\u0629",
|
|
2663
|
+
synced: "\u0645\u062A\u0632\u0627\u0645\u0646",
|
|
2664
|
+
differentItems: "\u0639\u0646\u0627\u0635\u0631 \u0645\u062E\u062A\u0644\u0641\u0629",
|
|
2665
|
+
alignLeft: "\u064A\u0633\u0627\u0631",
|
|
2666
|
+
alignCenter: "\u0648\u0633\u0637",
|
|
2667
|
+
alignRight: "\u064A\u0645\u064A\u0646",
|
|
2668
|
+
alignColumnLeft: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
2669
|
+
alignColumnCenter: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0641\u064A \u0627\u0644\u0648\u0633\u0637",
|
|
2670
|
+
alignColumnRight: "\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
2671
|
+
matrixNoDelimiters: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u0644\u0627 \u0623\u0642\u0648\u0627\u0633",
|
|
2672
|
+
matrixParentheses: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u0642\u0648\u0633\u064A\u0646",
|
|
2673
|
+
matrixBrackets: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u0645\u0639\u0642\u0648\u0641\u064A\u0646",
|
|
2674
|
+
matrixBraces: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062D\u0627\u0635\u0631\u062A\u064A\u0646",
|
|
2675
|
+
matrixBars: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646",
|
|
2676
|
+
matrixDoubleBars: "\u0645\u0635\u0641\u0648\u0641\u0629 \u0628\u064A\u0646 \u062E\u0637\u064A\u0646 \u0645\u0632\u062F\u0648\u062C\u064A\u0646"
|
|
2677
|
+
},
|
|
2678
|
+
en: {
|
|
2679
|
+
undoRedo: "Undo and redo",
|
|
2680
|
+
undo: "Undo",
|
|
2681
|
+
redo: "Redo",
|
|
2682
|
+
clipboard: "Clipboard",
|
|
2683
|
+
copy: "Copy",
|
|
2684
|
+
cut: "Cut",
|
|
2685
|
+
paste: "Paste",
|
|
2686
|
+
editorSettings: "Editor settings",
|
|
2687
|
+
toggleSide: "Switch Arabic / English equation side",
|
|
2688
|
+
structures: "Structures",
|
|
2689
|
+
insertDelimiters: "Insert delimiters",
|
|
2690
|
+
insertParentheses: "Insert parentheses",
|
|
2691
|
+
insertBrackets: "Insert brackets",
|
|
2692
|
+
insertBraces: "Insert braces",
|
|
2693
|
+
insertFraction: "Insert fraction",
|
|
2694
|
+
insertRoot: "Insert root",
|
|
2695
|
+
environments: "Environments",
|
|
2696
|
+
insertEnvironment: "Insert grid environment",
|
|
2697
|
+
environmentType: "Environment type",
|
|
2698
|
+
matrix: "Matrix",
|
|
2699
|
+
array: "Array",
|
|
2700
|
+
aligned: "Aligned",
|
|
2701
|
+
matrixType: "Matrix type",
|
|
2702
|
+
chooseEnvironmentSize: "Choose environment size",
|
|
2703
|
+
rows: "Rows",
|
|
2704
|
+
columns: "Columns",
|
|
2705
|
+
row: "Row",
|
|
2706
|
+
column: "Column",
|
|
2707
|
+
insert: "Insert",
|
|
2708
|
+
editSelectedEnvironment: "Edit selected environment",
|
|
2709
|
+
applySelectedMatrixStyle: "Apply style to selected matrix",
|
|
2710
|
+
applyStyle: "Apply style",
|
|
2711
|
+
addRow: "Add row",
|
|
2712
|
+
removeRow: "Remove row",
|
|
2713
|
+
addColumn: "Add column",
|
|
2714
|
+
removeColumn: "Remove column",
|
|
2715
|
+
spaces: "Spacing",
|
|
2716
|
+
insertSpace: "Insert space",
|
|
2717
|
+
functions: "Functions",
|
|
2718
|
+
insertFunction: "Insert function",
|
|
2719
|
+
insertLimitsSeries: "Insert limits and series",
|
|
2720
|
+
insertAdditionalFunctions: "Insert additional functions",
|
|
2721
|
+
insertNumberSets: "Insert number sets",
|
|
2722
|
+
operations: "Operators",
|
|
2723
|
+
insertOperation: "Insert operator",
|
|
2724
|
+
insertRelationsSets: "Insert relation or set symbol",
|
|
2725
|
+
insertArrows: "Insert arrow",
|
|
2726
|
+
insertDots: "Insert dots",
|
|
2727
|
+
insertIntegrals: "Insert integral",
|
|
2728
|
+
scripts: "Superscript and subscript",
|
|
2729
|
+
addSuperscript: "Add superscript",
|
|
2730
|
+
addSubscript: "Add subscript",
|
|
2731
|
+
removeSuperscript: "Remove superscript",
|
|
2732
|
+
removeSubscript: "Remove subscript",
|
|
2733
|
+
inputStyles: "Input styles",
|
|
2734
|
+
deleteSelectedStructure: "Delete selected structure",
|
|
2735
|
+
toggleLetterMerging: "Toggle letter merging",
|
|
2736
|
+
disableLetterMerging: "Disable letter merging",
|
|
2737
|
+
enableLetterMerging: "Enable letter merging",
|
|
2738
|
+
chooseWritingFont: "Choose writing font",
|
|
2739
|
+
chooseDigitForm: "Choose digit form",
|
|
2740
|
+
defaultFont: "Default font",
|
|
2741
|
+
takweenFont: "Takween font",
|
|
2742
|
+
diwaniFont: "Diwani font",
|
|
2743
|
+
diwaniOutlineFont: "Outlined Diwani font",
|
|
2744
|
+
writeDefaultFont: "Write with the default font",
|
|
2745
|
+
writeTakweenFont: "Write with Takween font",
|
|
2746
|
+
westernDigits: "Western digits",
|
|
2747
|
+
arabicIndicDigits: "Arabic-Indic digits",
|
|
2748
|
+
persianIndicDigits: "Persian digits",
|
|
2749
|
+
equationEditor: "Equation editor",
|
|
2750
|
+
renderPreview: "Rendered preview",
|
|
2751
|
+
development: "Development",
|
|
2752
|
+
showDebugLog: "Show debug log",
|
|
2753
|
+
hideDebugLog: "Hide debug log",
|
|
2754
|
+
copyDebugLog: "Copy debug log",
|
|
2755
|
+
empty: "Empty",
|
|
2756
|
+
englishLatex: "English LaTeX",
|
|
2757
|
+
arabicLatex: "Arabic LaTeX",
|
|
2758
|
+
inactiveEnglish: "Inactive chain (English)",
|
|
2759
|
+
inactiveArabic: "Inactive chain (Arabic)",
|
|
2760
|
+
mathJaxError: "MathJax error",
|
|
2761
|
+
previewError: "Preview error",
|
|
2762
|
+
activeSide: "Active side",
|
|
2763
|
+
syncState: "Sync state",
|
|
2764
|
+
arabicSide: "Arabic",
|
|
2765
|
+
englishSide: "English",
|
|
2766
|
+
synced: "Synced",
|
|
2767
|
+
differentItems: "different items",
|
|
2768
|
+
alignLeft: "Left",
|
|
2769
|
+
alignCenter: "Center",
|
|
2770
|
+
alignRight: "Right",
|
|
2771
|
+
alignColumnLeft: "Align column left",
|
|
2772
|
+
alignColumnCenter: "Align column center",
|
|
2773
|
+
alignColumnRight: "Align column right",
|
|
2774
|
+
matrixNoDelimiters: "Matrix without delimiters",
|
|
2775
|
+
matrixParentheses: "Matrix in parentheses",
|
|
2776
|
+
matrixBrackets: "Matrix in brackets",
|
|
2777
|
+
matrixBraces: "Matrix in braces",
|
|
2778
|
+
matrixBars: "Matrix between bars",
|
|
2779
|
+
matrixDoubleBars: "Matrix between double bars"
|
|
2780
|
+
}
|
|
2781
|
+
};
|
|
2782
|
+
function equationEditorMessages(locale) {
|
|
2783
|
+
return EQUATION_EDITOR_MESSAGES[locale];
|
|
2784
|
+
}
|
|
2785
|
+
function atomicCommandTitle(spec, locale) {
|
|
2786
|
+
return locale === "en" ? ENGLISH_COMMAND_TITLES[spec.id] ?? spec.title : spec.title;
|
|
2787
|
+
}
|
|
2788
|
+
function atomicOperatorCommandTitle(spec, locale) {
|
|
2789
|
+
return locale === "en" ? ENGLISH_OPERATOR_TITLES[spec.id] ?? spec.title : spec.title;
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2405
2792
|
// src/editor/state.ts
|
|
2406
2793
|
function ensureSyncEntry(session, nodeId) {
|
|
2407
2794
|
if (!session.sync[nodeId]) {
|
|
@@ -4098,8 +4485,8 @@ function spacingArrowForSide(spec, side) {
|
|
|
4098
4485
|
}
|
|
4099
4486
|
return side === "arabic" ? "\u2192" : "\u2190";
|
|
4100
4487
|
}
|
|
4101
|
-
function spacingTooltipForSide(spec, side) {
|
|
4102
|
-
return `${spec
|
|
4488
|
+
function spacingTooltipForSide(spec, side, uiLocale = "ar") {
|
|
4489
|
+
return `${atomicCommandTitle(spec, uiLocale)} ${spacingArrowForSide(spec, side).repeat(spec.spacing.level)}`;
|
|
4103
4490
|
}
|
|
4104
4491
|
function buildFunctionAtomicCommandBody(node, side, spec) {
|
|
4105
4492
|
const value = document.createElement("span");
|
|
@@ -4123,19 +4510,19 @@ function buildFunctionAtomicCommandBody(node, side, spec) {
|
|
|
4123
4510
|
value.textContent = side === "arabic" ? spec?.arabicLabel ?? node.expr : spec?.englishTex.replace("\\", "") ?? node.expr;
|
|
4124
4511
|
return value;
|
|
4125
4512
|
}
|
|
4126
|
-
function buildSpacingAtomicCommandBody(spec, side) {
|
|
4513
|
+
function buildSpacingAtomicCommandBody(spec, side, uiLocale) {
|
|
4127
4514
|
const value = document.createElement("span");
|
|
4128
4515
|
value.className = `atomic-spacing atomic-spacing--${spec.spacing.direction} atomic-spacing--level-${String(spec.spacing.level)}`;
|
|
4129
|
-
value.title = spacingTooltipForSide(spec, side);
|
|
4516
|
+
value.title = spacingTooltipForSide(spec, side, uiLocale);
|
|
4130
4517
|
const marker = document.createElement("span");
|
|
4131
4518
|
marker.className = "atomic-spacing__marker";
|
|
4132
4519
|
value.appendChild(marker);
|
|
4133
4520
|
return value;
|
|
4134
4521
|
}
|
|
4135
|
-
function buildAtomicCommandNodeBody(node, side) {
|
|
4522
|
+
function buildAtomicCommandNodeBody(node, side, uiLocale = "ar") {
|
|
4136
4523
|
const spec = atomicCommandSpec(node.expr);
|
|
4137
4524
|
if (isSpacingCommandSpec(spec)) {
|
|
4138
|
-
return buildSpacingAtomicCommandBody(spec, side);
|
|
4525
|
+
return buildSpacingAtomicCommandBody(spec, side, uiLocale);
|
|
4139
4526
|
}
|
|
4140
4527
|
return buildFunctionAtomicCommandBody(node, side, spec);
|
|
4141
4528
|
}
|
|
@@ -4169,11 +4556,11 @@ function buildOperatorLabel(spec) {
|
|
|
4169
4556
|
value.textContent = spec.Label;
|
|
4170
4557
|
return value;
|
|
4171
4558
|
}
|
|
4172
|
-
function buildAtomicOperatorCommandNodeBody(node, side) {
|
|
4559
|
+
function buildAtomicOperatorCommandNodeBody(node, side, uiLocale = "ar") {
|
|
4173
4560
|
const spec = atomicOperatorCommandSpec(node.expr);
|
|
4174
4561
|
const value = document.createElement("span");
|
|
4175
4562
|
value.className = "atomic-operator-command";
|
|
4176
|
-
value.title = spec
|
|
4563
|
+
value.title = spec ? atomicOperatorCommandTitle(spec, uiLocale) : node.expr;
|
|
4177
4564
|
if (side === "arabic" && shouldMirrorOperatorDisplay(spec)) {
|
|
4178
4565
|
value.classList.add("atomic-operator-command--mirrored");
|
|
4179
4566
|
}
|
|
@@ -4227,7 +4614,7 @@ function buildNodeScripts(node, buildChain) {
|
|
|
4227
4614
|
}
|
|
4228
4615
|
|
|
4229
4616
|
// src/editor/display/index.ts
|
|
4230
|
-
function buildNodeBody(node, buildChain, side, digitForm = "western") {
|
|
4617
|
+
function buildNodeBody(node, buildChain, side, digitForm = "western", uiLocale = "ar") {
|
|
4231
4618
|
if (node.kind === "delimiter") {
|
|
4232
4619
|
return buildDelimiterNodeBody(node, buildChain);
|
|
4233
4620
|
}
|
|
@@ -4241,10 +4628,10 @@ function buildNodeBody(node, buildChain, side, digitForm = "western") {
|
|
|
4241
4628
|
return buildMatrixEnvNodeBody(node, buildChain, side);
|
|
4242
4629
|
}
|
|
4243
4630
|
if (node.kind === "atomicCommand") {
|
|
4244
|
-
return buildAtomicCommandNodeBody(node, side);
|
|
4631
|
+
return buildAtomicCommandNodeBody(node, side, uiLocale);
|
|
4245
4632
|
}
|
|
4246
4633
|
if (node.kind === "atomicOperatorCommand") {
|
|
4247
|
-
return buildAtomicOperatorCommandNodeBody(node, side);
|
|
4634
|
+
return buildAtomicOperatorCommandNodeBody(node, side, uiLocale);
|
|
4248
4635
|
}
|
|
4249
4636
|
return buildBaseNodeBody(node, digitForm);
|
|
4250
4637
|
}
|
|
@@ -4465,6 +4852,10 @@ function createEditorRuntime(options) {
|
|
|
4465
4852
|
const buttonElements = options.buttonElements ?? {};
|
|
4466
4853
|
const outsidePointerIgnoreSelectors = options.outsidePointerIgnoreSelectors ?? [];
|
|
4467
4854
|
let session = options.initialSession ?? createStarterSession();
|
|
4855
|
+
let uiLocale = options.uiLocale ?? "ar";
|
|
4856
|
+
if (options.defaultSide) {
|
|
4857
|
+
session = { ...session, activeSide: options.defaultSide };
|
|
4858
|
+
}
|
|
4468
4859
|
const undoRedo = createUndoRedoStacks();
|
|
4469
4860
|
let lastInternalFragment = null;
|
|
4470
4861
|
let initialKeyboardFocusPending = true;
|
|
@@ -4496,14 +4887,15 @@ function createEditorRuntime(options) {
|
|
|
4496
4887
|
return index >= start && index < end;
|
|
4497
4888
|
}
|
|
4498
4889
|
function refreshUndoRedoButtons() {
|
|
4890
|
+
const messages = equationEditorMessages(uiLocale);
|
|
4499
4891
|
if (buttonElements.undoBtn) {
|
|
4500
4892
|
buttonElements.undoBtn.disabled = !undoRedoCanUndo(undoRedo);
|
|
4501
4893
|
const arabicEquation = session.activeSide === "arabic";
|
|
4502
4894
|
const undoArrow = arabicEquation ? "\u21B7" : "\u21B6";
|
|
4503
4895
|
const vs = "\uFE0E";
|
|
4504
4896
|
buttonElements.undoBtn.textContent = `${undoArrow}${vs}`;
|
|
4505
|
-
buttonElements.undoBtn.title =
|
|
4506
|
-
buttonElements.undoBtn.setAttribute("aria-label",
|
|
4897
|
+
buttonElements.undoBtn.title = messages.undo;
|
|
4898
|
+
buttonElements.undoBtn.setAttribute("aria-label", messages.undo);
|
|
4507
4899
|
}
|
|
4508
4900
|
if (buttonElements.redoBtn) {
|
|
4509
4901
|
buttonElements.redoBtn.disabled = !undoRedoCanRedo(undoRedo);
|
|
@@ -4511,8 +4903,8 @@ function createEditorRuntime(options) {
|
|
|
4511
4903
|
const redoArrow = arabicEquation ? "\u21B6" : "\u21B7";
|
|
4512
4904
|
const vs = "\uFE0E";
|
|
4513
4905
|
buttonElements.redoBtn.textContent = `${redoArrow}${vs}`;
|
|
4514
|
-
buttonElements.redoBtn.title =
|
|
4515
|
-
buttonElements.redoBtn.setAttribute("aria-label",
|
|
4906
|
+
buttonElements.redoBtn.title = messages.redo;
|
|
4907
|
+
buttonElements.redoBtn.setAttribute("aria-label", messages.redo);
|
|
4516
4908
|
}
|
|
4517
4909
|
}
|
|
4518
4910
|
function refreshClipboardButtons() {
|
|
@@ -4531,9 +4923,10 @@ function createEditorRuntime(options) {
|
|
|
4531
4923
|
return;
|
|
4532
4924
|
}
|
|
4533
4925
|
const mergeOn = !session.splitLeafTyping;
|
|
4926
|
+
const messages = equationEditorMessages(uiLocale);
|
|
4534
4927
|
buttonElements.splitTypingBtn.textContent = mergeOn ? "\u0633\u0635\u0639" : "\u0633 \u0635 \u0639";
|
|
4535
|
-
buttonElements.splitTypingBtn.title = mergeOn ?
|
|
4536
|
-
buttonElements.splitTypingBtn.setAttribute("aria-label", mergeOn ?
|
|
4928
|
+
buttonElements.splitTypingBtn.title = mergeOn ? messages.disableLetterMerging : messages.enableLetterMerging;
|
|
4929
|
+
buttonElements.splitTypingBtn.setAttribute("aria-label", mergeOn ? messages.disableLetterMerging : messages.enableLetterMerging);
|
|
4537
4930
|
buttonElements.splitTypingBtn.setAttribute("aria-pressed", mergeOn ? "true" : "false");
|
|
4538
4931
|
buttonElements.splitTypingBtn.classList.toggle("accent", mergeOn);
|
|
4539
4932
|
}
|
|
@@ -4542,9 +4935,10 @@ function createEditorRuntime(options) {
|
|
|
4542
4935
|
return;
|
|
4543
4936
|
}
|
|
4544
4937
|
const takweenOn = (session.currentCharacterFont ?? "default") === "takween";
|
|
4938
|
+
const messages = equationEditorMessages(uiLocale);
|
|
4545
4939
|
buttonElements.characterFontBtn.textContent = "\u062A\u0643";
|
|
4546
|
-
buttonElements.characterFontBtn.title = takweenOn ?
|
|
4547
|
-
buttonElements.characterFontBtn.setAttribute("aria-label", takweenOn ?
|
|
4940
|
+
buttonElements.characterFontBtn.title = takweenOn ? messages.writeDefaultFont : messages.writeTakweenFont;
|
|
4941
|
+
buttonElements.characterFontBtn.setAttribute("aria-label", takweenOn ? messages.writeDefaultFont : messages.writeTakweenFont);
|
|
4548
4942
|
buttonElements.characterFontBtn.setAttribute("aria-pressed", takweenOn ? "true" : "false");
|
|
4549
4943
|
buttonElements.characterFontBtn.classList.toggle("accent", takweenOn);
|
|
4550
4944
|
}
|
|
@@ -4555,8 +4949,9 @@ function createEditorRuntime(options) {
|
|
|
4555
4949
|
const digitForm = session.currentDigitForm ?? "western";
|
|
4556
4950
|
const label = digitForm === "arabicIndic" ? "\u0664\u0665\u0666" : digitForm === "persianIndic" ? "\u06F4\u06F5\u06F6" : "456";
|
|
4557
4951
|
buttonElements.digitFormBtn.textContent = label;
|
|
4558
|
-
|
|
4559
|
-
buttonElements.digitFormBtn.
|
|
4952
|
+
const messages = equationEditorMessages(uiLocale);
|
|
4953
|
+
buttonElements.digitFormBtn.title = messages.chooseDigitForm;
|
|
4954
|
+
buttonElements.digitFormBtn.setAttribute("aria-label", messages.chooseDigitForm);
|
|
4560
4955
|
buttonElements.digitFormBtn.dataset.digitForm = digitForm;
|
|
4561
4956
|
}
|
|
4562
4957
|
function applyStructural(updater) {
|
|
@@ -4758,7 +5153,7 @@ function createEditorRuntime(options) {
|
|
|
4758
5153
|
const atomicSpec = node.kind === "atomicCommand" ? atomicCommandSpec(node.expr) : null;
|
|
4759
5154
|
if (isSpacingCommandSpec(atomicSpec)) {
|
|
4760
5155
|
nodeEl.classList.add("node--atomic-spacing");
|
|
4761
|
-
nodeEl.title = spacingTooltipForSide(atomicSpec, session.activeSide);
|
|
5156
|
+
nodeEl.title = spacingTooltipForSide(atomicSpec, session.activeSide, uiLocale);
|
|
4762
5157
|
}
|
|
4763
5158
|
if (session.selectedNodeId === node.id || session.selectedStructureNodeId === node.id) {
|
|
4764
5159
|
nodeEl.classList.add("selected");
|
|
@@ -4788,7 +5183,7 @@ function createEditorRuntime(options) {
|
|
|
4788
5183
|
});
|
|
4789
5184
|
const body = document.createElement("span");
|
|
4790
5185
|
body.className = "node-body";
|
|
4791
|
-
body.appendChild(buildNodeBody(node, buildChain, session.activeSide, session.currentDigitForm ?? "western"));
|
|
5186
|
+
body.appendChild(buildNodeBody(node, buildChain, session.activeSide, session.currentDigitForm ?? "western", uiLocale));
|
|
4792
5187
|
nodeEl.appendChild(body);
|
|
4793
5188
|
const scripts = buildNodeScripts(node, buildChain);
|
|
4794
5189
|
if (scripts) {
|
|
@@ -5069,6 +5464,13 @@ function createEditorRuntime(options) {
|
|
|
5069
5464
|
session = next;
|
|
5070
5465
|
render();
|
|
5071
5466
|
},
|
|
5467
|
+
setUiLocale: (locale) => {
|
|
5468
|
+
if (uiLocale === locale) {
|
|
5469
|
+
return;
|
|
5470
|
+
}
|
|
5471
|
+
uiLocale = locale;
|
|
5472
|
+
render();
|
|
5473
|
+
},
|
|
5072
5474
|
performUndo,
|
|
5073
5475
|
performRedo,
|
|
5074
5476
|
performCopy,
|
|
@@ -7311,18 +7713,23 @@ function injectWidgetChromeCss(doc) {
|
|
|
7311
7713
|
d.head.appendChild(style);
|
|
7312
7714
|
}
|
|
7313
7715
|
|
|
7716
|
+
// src/uiLocale.ts
|
|
7717
|
+
function uiLocaleDirection(locale) {
|
|
7718
|
+
return locale === "ar" ? "rtl" : "ltr";
|
|
7719
|
+
}
|
|
7720
|
+
|
|
7314
7721
|
// src/react/ButexEditor.tsx
|
|
7315
7722
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
7316
7723
|
var DIGIT_FORM_OPTIONS = [
|
|
7317
|
-
{ id: "western", label: "456"
|
|
7318
|
-
{ id: "arabicIndic", label: "\u0664\u0665\u0666"
|
|
7319
|
-
{ id: "persianIndic", label: "\u06F4\u06F5\u06F6"
|
|
7724
|
+
{ id: "western", label: "456" },
|
|
7725
|
+
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
7726
|
+
{ id: "persianIndic", label: "\u06F4\u06F5\u06F6" }
|
|
7320
7727
|
];
|
|
7321
7728
|
var CHARACTER_FONT_OPTIONS = [
|
|
7322
|
-
{ id: "default", label: "\u0633"
|
|
7323
|
-
{ id: "takween", label: "\u062A\u0643"
|
|
7324
|
-
{ id: "diwani", label: "\u062F\u064A\u0648"
|
|
7325
|
-
{ id: "diwaniOutline", label: "\u0638\u0644"
|
|
7729
|
+
{ id: "default", label: "\u0633" },
|
|
7730
|
+
{ id: "takween", label: "\u062A\u0643" },
|
|
7731
|
+
{ id: "diwani", label: "\u062F\u064A\u0648" },
|
|
7732
|
+
{ id: "diwaniOutline", label: "\u0638\u0644" }
|
|
7326
7733
|
];
|
|
7327
7734
|
var FUNCTION_COMMANDS = atomicCommandsByCategory("function");
|
|
7328
7735
|
var LIMITS_SERIES_COMMANDS = atomicCommandsByCategory("limits_series");
|
|
@@ -7335,20 +7742,20 @@ var OPERATOR3_COMMANDS = atomicOperatorCommandsByCategory("operators3");
|
|
|
7335
7742
|
var DOT_COMMANDS = atomicOperatorCommandsByCategory("dots");
|
|
7336
7743
|
var INTEGRAL_COMMANDS = atomicOperatorCommandsByCategory("integrals");
|
|
7337
7744
|
var MATRIX_STYLES = [
|
|
7338
|
-
{ id: "matrix", label: "\u25A1"
|
|
7339
|
-
{ id: "pmatrix", label: "(\u25A1)"
|
|
7340
|
-
{ id: "bmatrix", label: "[\u25A1]"
|
|
7341
|
-
{ id: "Bmatrix", label: "{\u25A1}"
|
|
7342
|
-
{ id: "vmatrix", label: "|\u25A1|"
|
|
7343
|
-
{ id: "Vmatrix", label: "||\u25A1||"
|
|
7745
|
+
{ id: "matrix", label: "\u25A1" },
|
|
7746
|
+
{ id: "pmatrix", label: "(\u25A1)" },
|
|
7747
|
+
{ id: "bmatrix", label: "[\u25A1]" },
|
|
7748
|
+
{ id: "Bmatrix", label: "{\u25A1}" },
|
|
7749
|
+
{ id: "vmatrix", label: "|\u25A1|" },
|
|
7750
|
+
{ id: "Vmatrix", label: "||\u25A1||" }
|
|
7344
7751
|
];
|
|
7345
7752
|
var ARRAY_ALIGNMENTS = [
|
|
7346
|
-
{ id: "l"
|
|
7347
|
-
{ id: "c"
|
|
7348
|
-
{ id: "r"
|
|
7753
|
+
{ id: "l" },
|
|
7754
|
+
{ id: "c" },
|
|
7755
|
+
{ id: "r" }
|
|
7349
7756
|
];
|
|
7350
|
-
function matrixSizeLabel(rows, columns) {
|
|
7351
|
-
return `${String(rows)}
|
|
7757
|
+
function matrixSizeLabel(rows, columns, messages) {
|
|
7758
|
+
return `${String(rows)} ${messages.row} \xD7 ${String(columns)} ${messages.column}`;
|
|
7352
7759
|
}
|
|
7353
7760
|
function clampMatrixSize(value) {
|
|
7354
7761
|
return Math.max(1, Math.min(12, Math.trunc(value)));
|
|
@@ -7359,6 +7766,30 @@ function digitFormLabel(digitForm) {
|
|
|
7359
7766
|
function characterFontOption(fontId) {
|
|
7360
7767
|
return CHARACTER_FONT_OPTIONS.find((option) => option.id === fontId) ?? CHARACTER_FONT_OPTIONS[0];
|
|
7361
7768
|
}
|
|
7769
|
+
function characterFontTitle(fontId, messages) {
|
|
7770
|
+
if (fontId === "takween") return messages.takweenFont;
|
|
7771
|
+
if (fontId === "diwani") return messages.diwaniFont;
|
|
7772
|
+
if (fontId === "diwaniOutline") return messages.diwaniOutlineFont;
|
|
7773
|
+
return messages.defaultFont;
|
|
7774
|
+
}
|
|
7775
|
+
function digitFormTitle(digitForm, messages) {
|
|
7776
|
+
if (digitForm === "arabicIndic") return messages.arabicIndicDigits;
|
|
7777
|
+
if (digitForm === "persianIndic") return messages.persianIndicDigits;
|
|
7778
|
+
return messages.westernDigits;
|
|
7779
|
+
}
|
|
7780
|
+
function matrixStyleTitle(style, messages) {
|
|
7781
|
+
if (style === "pmatrix") return messages.matrixParentheses;
|
|
7782
|
+
if (style === "bmatrix") return messages.matrixBrackets;
|
|
7783
|
+
if (style === "Bmatrix") return messages.matrixBraces;
|
|
7784
|
+
if (style === "vmatrix") return messages.matrixBars;
|
|
7785
|
+
if (style === "Vmatrix") return messages.matrixDoubleBars;
|
|
7786
|
+
return messages.matrixNoDelimiters;
|
|
7787
|
+
}
|
|
7788
|
+
function alignmentCopy(alignment, messages) {
|
|
7789
|
+
if (alignment === "l") return { label: messages.alignLeft, title: messages.alignColumnLeft };
|
|
7790
|
+
if (alignment === "r") return { label: messages.alignRight, title: messages.alignColumnRight };
|
|
7791
|
+
return { label: messages.alignCenter, title: messages.alignColumnCenter };
|
|
7792
|
+
}
|
|
7362
7793
|
function spacingArrow(spec, side) {
|
|
7363
7794
|
const pointsWithFlow = spec.spacing.direction === "positive";
|
|
7364
7795
|
if (pointsWithFlow) {
|
|
@@ -7397,16 +7828,17 @@ function renderOperatorMenuButtonLabel(command, fallback) {
|
|
|
7397
7828
|
}
|
|
7398
7829
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) });
|
|
7399
7830
|
}
|
|
7400
|
-
function passiveTreeText(session) {
|
|
7831
|
+
function passiveTreeText(session, messages) {
|
|
7401
7832
|
const passive = session.activeSide === "arabic" ? session.englishTree : session.arabicTree;
|
|
7402
|
-
const title = session.activeSide === "arabic" ?
|
|
7833
|
+
const title = session.activeSide === "arabic" ? messages.inactiveEnglish : messages.inactiveArabic;
|
|
7403
7834
|
const latex = session.activeSide === "arabic" ? renderChainEnglish(passive) : renderChainArabic(passive);
|
|
7404
7835
|
return `${title}
|
|
7405
7836
|
|
|
7406
|
-
${latex ||
|
|
7837
|
+
${latex || messages.empty}`;
|
|
7407
7838
|
}
|
|
7408
7839
|
var ButexEditor = (0, import_react.forwardRef)(
|
|
7409
|
-
function ButexEditor2({ className, debug = false, initialSession, onSessionChange }, ref) {
|
|
7840
|
+
function ButexEditor2({ className, debug = false, defaultSide, uiLocale = "ar", initialSession, onSessionChange }, ref) {
|
|
7841
|
+
const messages = equationEditorMessages(uiLocale);
|
|
7410
7842
|
const wrapperRef = (0, import_react.useRef)(null);
|
|
7411
7843
|
const surfaceRef = (0, import_react.useRef)(null);
|
|
7412
7844
|
const mathOutputRef = (0, import_react.useRef)(null);
|
|
@@ -7424,6 +7856,8 @@ var ButexEditor = (0, import_react.forwardRef)(
|
|
|
7424
7856
|
const runtimeRef = (0, import_react.useRef)(null);
|
|
7425
7857
|
const debugRef = (0, import_react.useRef)(debug);
|
|
7426
7858
|
debugRef.current = debug;
|
|
7859
|
+
const uiLocaleRef = (0, import_react.useRef)(uiLocale);
|
|
7860
|
+
uiLocaleRef.current = uiLocale;
|
|
7427
7861
|
const onSessionChangeRef = (0, import_react.useRef)(onSessionChange);
|
|
7428
7862
|
onSessionChangeRef.current = onSessionChange;
|
|
7429
7863
|
const debugBodyHiddenRef = (0, import_react.useRef)(false);
|
|
@@ -7465,14 +7899,15 @@ var ButexEditor = (0, import_react.forwardRef)(
|
|
|
7465
7899
|
const arabic = renderArabicLatexFromSession(session);
|
|
7466
7900
|
const activeLatex = session.activeSide === "arabic" ? arabic : english;
|
|
7467
7901
|
if (debugRef.current && latexLinesEl) {
|
|
7468
|
-
|
|
7469
|
-
|
|
7902
|
+
const currentMessages = equationEditorMessages(uiLocaleRef.current);
|
|
7903
|
+
latexLinesEl.textContent = `${currentMessages.englishLatex}:
|
|
7904
|
+
${english || currentMessages.empty}
|
|
7470
7905
|
|
|
7471
|
-
|
|
7472
|
-
${arabic ||
|
|
7906
|
+
${currentMessages.arabicLatex}:
|
|
7907
|
+
${arabic || currentMessages.empty}`;
|
|
7473
7908
|
}
|
|
7474
7909
|
if (debugRef.current && passivePreviewEl) {
|
|
7475
|
-
passivePreviewEl.textContent = passiveTreeText(session);
|
|
7910
|
+
passivePreviewEl.textContent = passiveTreeText(session, equationEditorMessages(uiLocaleRef.current));
|
|
7476
7911
|
passivePreviewEl.classList.toggle("passive--ltr", session.activeSide === "arabic");
|
|
7477
7912
|
}
|
|
7478
7913
|
if (debugRef.current && debugLogEl) {
|
|
@@ -7498,7 +7933,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7498
7933
|
} catch (err) {
|
|
7499
7934
|
const message = err instanceof Error ? err.message : String(err);
|
|
7500
7935
|
renderErrorEl.hidden = false;
|
|
7501
|
-
renderErrorEl.textContent =
|
|
7936
|
+
renderErrorEl.textContent = `${equationEditorMessages(uiLocaleRef.current).mathJaxError}: ${message}`;
|
|
7502
7937
|
if (runtimeRef.current) {
|
|
7503
7938
|
runtimeRef.current.setSession(setRenderError(runtimeRef.current.getSession(), message));
|
|
7504
7939
|
}
|
|
@@ -7516,6 +7951,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7516
7951
|
const runtime = createEditorRuntime({
|
|
7517
7952
|
surfaceEl,
|
|
7518
7953
|
initialSession,
|
|
7954
|
+
defaultSide,
|
|
7955
|
+
uiLocale,
|
|
7519
7956
|
buttonElements: {
|
|
7520
7957
|
undoBtn: undoBtnRef.current,
|
|
7521
7958
|
redoBtn: redoBtnRef.current,
|
|
@@ -7535,7 +7972,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7535
7972
|
const el = renderErrorRef.current;
|
|
7536
7973
|
if (el) {
|
|
7537
7974
|
el.hidden = false;
|
|
7538
|
-
el.textContent =
|
|
7975
|
+
el.textContent = `${equationEditorMessages(uiLocaleRef.current).previewError}: ${message}`;
|
|
7539
7976
|
}
|
|
7540
7977
|
});
|
|
7541
7978
|
}
|
|
@@ -7560,6 +7997,13 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7560
7997
|
runtimeRef.current = null;
|
|
7561
7998
|
};
|
|
7562
7999
|
}, []);
|
|
8000
|
+
(0, import_react.useEffect)(() => {
|
|
8001
|
+
runtimeRef.current?.setUiLocale(uiLocale);
|
|
8002
|
+
const session = runtimeRef.current?.getSession();
|
|
8003
|
+
if (session) {
|
|
8004
|
+
void updatePreviewRef.current(session);
|
|
8005
|
+
}
|
|
8006
|
+
}, [uiLocale]);
|
|
7563
8007
|
function focusSurface() {
|
|
7564
8008
|
surfaceRef.current?.focus();
|
|
7565
8009
|
}
|
|
@@ -7577,26 +8021,26 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7577
8021
|
{
|
|
7578
8022
|
ref: wrapperRef,
|
|
7579
8023
|
className: `butex-widget ${className ?? ""}`.trim(),
|
|
7580
|
-
dir:
|
|
7581
|
-
lang:
|
|
8024
|
+
dir: uiLocaleDirection(uiLocale),
|
|
8025
|
+
lang: uiLocale,
|
|
7582
8026
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "butex-widget-layout", children: [
|
|
7583
8027
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "panel", children: [
|
|
7584
8028
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar", children: [
|
|
7585
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-history", role: "group", "aria-label":
|
|
7586
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: undoBtnRef, id: "btn-undo", type: "button", className: "icon-btn", title:
|
|
7587
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: redoBtnRef, id: "btn-redo", type: "button", className: "icon-btn", title:
|
|
8029
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-history", role: "group", "aria-label": messages.undoRedo, children: [
|
|
8030
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: undoBtnRef, id: "btn-undo", type: "button", className: "icon-btn", title: messages.undo, "aria-label": messages.undo, children: "\u21B7" }),
|
|
8031
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: redoBtnRef, id: "btn-redo", type: "button", className: "icon-btn", title: messages.redo, "aria-label": messages.redo, children: "\u21B6" })
|
|
7588
8032
|
] }),
|
|
7589
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-clipboard", role: "group", "aria-label":
|
|
7590
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: copyBtnRef, id: "btn-copy", type: "button", className: "icon-btn", title:
|
|
7591
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: cutBtnRef, id: "btn-cut", type: "button", className: "icon-btn", title:
|
|
8033
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-clipboard", role: "group", "aria-label": messages.clipboard, children: [
|
|
8034
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: copyBtnRef, id: "btn-copy", type: "button", className: "icon-btn", title: messages.copy, "aria-label": messages.copy, disabled: true, children: "\u29C9" }),
|
|
8035
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: cutBtnRef, id: "btn-cut", type: "button", className: "icon-btn", title: messages.cut, "aria-label": messages.cut, disabled: true, children: "\u2702" }),
|
|
7592
8036
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7593
8037
|
"button",
|
|
7594
8038
|
{
|
|
7595
8039
|
id: "btn-paste",
|
|
7596
8040
|
type: "button",
|
|
7597
8041
|
className: "icon-btn",
|
|
7598
|
-
title:
|
|
7599
|
-
"aria-label":
|
|
8042
|
+
title: messages.paste,
|
|
8043
|
+
"aria-label": messages.paste,
|
|
7600
8044
|
onClick: () => {
|
|
7601
8045
|
void runtimeRef.current?.performPaste().then(() => {
|
|
7602
8046
|
focusSurface();
|
|
@@ -7606,8 +8050,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7606
8050
|
}
|
|
7607
8051
|
)
|
|
7608
8052
|
] }),
|
|
7609
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label":
|
|
7610
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-structures", role: "group", "aria-label":
|
|
8053
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.editorSettings, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn accent", type: "button", title: messages.toggleSide, "aria-label": messages.toggleSide, onClick: () => runtimeRef.current?.toggleSide(), children: "\u21C4" }) }),
|
|
8054
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-structures", role: "group", "aria-label": messages.structures, children: [
|
|
7611
8055
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
7612
8056
|
"div",
|
|
7613
8057
|
{
|
|
@@ -7624,15 +8068,15 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7624
8068
|
{
|
|
7625
8069
|
className: "icon-btn delimiter-command-btn",
|
|
7626
8070
|
type: "button",
|
|
7627
|
-
title:
|
|
7628
|
-
"aria-label":
|
|
8071
|
+
title: messages.insertDelimiters,
|
|
8072
|
+
"aria-label": messages.insertDelimiters,
|
|
7629
8073
|
"aria-haspopup": "listbox",
|
|
7630
8074
|
"aria-expanded": delimiterMenuOpen,
|
|
7631
8075
|
onClick: () => setDelimiterMenuOpen((open) => !open),
|
|
7632
8076
|
children: "()"
|
|
7633
8077
|
}
|
|
7634
8078
|
),
|
|
7635
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "delimiter-command-options", role: "listbox", "aria-label":
|
|
8079
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "delimiter-command-options", role: "listbox", "aria-label": messages.insertDelimiters, hidden: !delimiterMenuOpen, children: [
|
|
7636
8080
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7637
8081
|
"button",
|
|
7638
8082
|
{
|
|
@@ -7640,8 +8084,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7640
8084
|
"data-delim": "paren",
|
|
7641
8085
|
type: "button",
|
|
7642
8086
|
role: "option",
|
|
7643
|
-
title:
|
|
7644
|
-
"aria-label":
|
|
8087
|
+
title: messages.insertParentheses,
|
|
8088
|
+
"aria-label": messages.insertParentheses,
|
|
7645
8089
|
onMouseDown: (event) => event.preventDefault(),
|
|
7646
8090
|
onClick: () => {
|
|
7647
8091
|
runtimeRef.current?.insertDelimiterByKind("paren");
|
|
@@ -7658,8 +8102,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7658
8102
|
"data-delim": "bracket",
|
|
7659
8103
|
type: "button",
|
|
7660
8104
|
role: "option",
|
|
7661
|
-
title:
|
|
7662
|
-
"aria-label":
|
|
8105
|
+
title: messages.insertBrackets,
|
|
8106
|
+
"aria-label": messages.insertBrackets,
|
|
7663
8107
|
onMouseDown: (event) => event.preventDefault(),
|
|
7664
8108
|
onClick: () => {
|
|
7665
8109
|
runtimeRef.current?.insertDelimiterByKind("bracket");
|
|
@@ -7676,8 +8120,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7676
8120
|
"data-delim": "brace",
|
|
7677
8121
|
type: "button",
|
|
7678
8122
|
role: "option",
|
|
7679
|
-
title:
|
|
7680
|
-
"aria-label":
|
|
8123
|
+
title: messages.insertBraces,
|
|
8124
|
+
"aria-label": messages.insertBraces,
|
|
7681
8125
|
onMouseDown: (event) => event.preventDefault(),
|
|
7682
8126
|
onClick: () => {
|
|
7683
8127
|
runtimeRef.current?.insertDelimiterByKind("brace");
|
|
@@ -7691,19 +8135,19 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7691
8135
|
]
|
|
7692
8136
|
}
|
|
7693
8137
|
),
|
|
7694
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { id: "insert-frac", className: "icon-btn frac-icon-btn", type: "button", title:
|
|
8138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { id: "insert-frac", className: "icon-btn frac-icon-btn", type: "button", title: messages.insertFraction, "aria-label": messages.insertFraction, onClick: () => {
|
|
7695
8139
|
runtimeRef.current?.insertFraction();
|
|
7696
8140
|
focusSurface();
|
|
7697
8141
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "toolbar-frac-icon", "aria-hidden": "true", children: [
|
|
7698
8142
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0623" }),
|
|
7699
8143
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0628" })
|
|
7700
8144
|
] }) }),
|
|
7701
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { id: "insert-sqrt", className: "icon-btn", type: "button", title:
|
|
8145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { id: "insert-sqrt", className: "icon-btn", type: "button", title: messages.insertRoot, "aria-label": messages.insertRoot, onClick: () => {
|
|
7702
8146
|
runtimeRef.current?.insertSqrt();
|
|
7703
8147
|
focusSurface();
|
|
7704
8148
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "toolbar-sqrt-icon", "aria-hidden": "true", children: "\u221A" }) })
|
|
7705
8149
|
] }),
|
|
7706
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "toolbar-group toolbar-environments", role: "group", "aria-label":
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "toolbar-group toolbar-environments", role: "group", "aria-label": messages.environments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
7707
8151
|
"div",
|
|
7708
8152
|
{
|
|
7709
8153
|
className: "matrix-command-menu",
|
|
@@ -7719,8 +8163,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7719
8163
|
{
|
|
7720
8164
|
className: "icon-btn matrix-command-btn",
|
|
7721
8165
|
type: "button",
|
|
7722
|
-
title:
|
|
7723
|
-
"aria-label":
|
|
8166
|
+
title: messages.insertEnvironment,
|
|
8167
|
+
"aria-label": messages.insertEnvironment,
|
|
7724
8168
|
"aria-haspopup": "dialog",
|
|
7725
8169
|
"aria-expanded": matrixMenuOpen,
|
|
7726
8170
|
onClick: () => setMatrixMenuOpen((open) => !open),
|
|
@@ -7732,11 +8176,11 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7732
8176
|
] })
|
|
7733
8177
|
}
|
|
7734
8178
|
),
|
|
7735
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "matrix-command-popover", role: "dialog", "aria-label":
|
|
7736
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-style-options", role: "listbox", "aria-label":
|
|
7737
|
-
{ id: "matrix", label:
|
|
7738
|
-
{ id: "array", label:
|
|
7739
|
-
{ id: "aligned", label:
|
|
8179
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "matrix-command-popover", role: "dialog", "aria-label": messages.insertEnvironment, hidden: !matrixMenuOpen, children: [
|
|
8180
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.environmentType, children: [
|
|
8181
|
+
{ id: "matrix", label: messages.matrix },
|
|
8182
|
+
{ id: "array", label: messages.array },
|
|
8183
|
+
{ id: "aligned", label: messages.aligned }
|
|
7740
8184
|
].map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7741
8185
|
"button",
|
|
7742
8186
|
{
|
|
@@ -7755,14 +8199,14 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7755
8199
|
},
|
|
7756
8200
|
option.id
|
|
7757
8201
|
)) }),
|
|
7758
|
-
envPaletteMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-style-options", role: "listbox", "aria-label":
|
|
8202
|
+
envPaletteMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.matrixType, children: MATRIX_STYLES.map((style) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7759
8203
|
"button",
|
|
7760
8204
|
{
|
|
7761
8205
|
type: "button",
|
|
7762
8206
|
role: "option",
|
|
7763
8207
|
"aria-selected": matrixStyle === style.id,
|
|
7764
8208
|
className: "matrix-style-option",
|
|
7765
|
-
title: style.
|
|
8209
|
+
title: matrixStyleTitle(style.id, messages),
|
|
7766
8210
|
onMouseDown: (event) => event.preventDefault(),
|
|
7767
8211
|
onClick: () => {
|
|
7768
8212
|
setMatrixStyle(style.id);
|
|
@@ -7771,8 +8215,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7771
8215
|
},
|
|
7772
8216
|
style.id
|
|
7773
8217
|
)) }) : null,
|
|
7774
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-size-readout", children: matrixHover ? matrixSizeLabel(matrixHover.rows, matrixHover.columns) : matrixSizeLabel(matrixRows, matrixColumns) }),
|
|
7775
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-grid-picker", "aria-label":
|
|
8218
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-size-readout", children: matrixHover ? matrixSizeLabel(matrixHover.rows, matrixHover.columns, messages) : matrixSizeLabel(matrixRows, matrixColumns, messages) }),
|
|
8219
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "matrix-grid-picker", "aria-label": messages.chooseEnvironmentSize, children: Array.from(
|
|
7776
8220
|
{ length: 8 },
|
|
7777
8221
|
(_, rowIndex) => Array.from({ length: 8 }, (_2, columnIndex) => {
|
|
7778
8222
|
const rows = rowIndex + 1;
|
|
@@ -7784,8 +8228,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7784
8228
|
{
|
|
7785
8229
|
type: "button",
|
|
7786
8230
|
className: rows <= activeRows && columns <= activeColumns ? "matrix-grid-cell active" : "matrix-grid-cell",
|
|
7787
|
-
title: matrixSizeLabel(rows, columns),
|
|
7788
|
-
"aria-label": matrixSizeLabel(rows, columns),
|
|
8231
|
+
title: matrixSizeLabel(rows, columns, messages),
|
|
8232
|
+
"aria-label": matrixSizeLabel(rows, columns, messages),
|
|
7789
8233
|
onMouseEnter: () => setMatrixHover({ rows, columns }),
|
|
7790
8234
|
onMouseDown: (event) => event.preventDefault(),
|
|
7791
8235
|
onClick: () => {
|
|
@@ -7803,7 +8247,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7803
8247
|
) }),
|
|
7804
8248
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "matrix-custom-size", children: [
|
|
7805
8249
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
|
|
7806
|
-
|
|
8250
|
+
messages.row,
|
|
7807
8251
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7808
8252
|
"input",
|
|
7809
8253
|
{
|
|
@@ -7816,7 +8260,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7816
8260
|
)
|
|
7817
8261
|
] }),
|
|
7818
8262
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
|
|
7819
|
-
|
|
8263
|
+
messages.column,
|
|
7820
8264
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7821
8265
|
"input",
|
|
7822
8266
|
{
|
|
@@ -7842,15 +8286,15 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7842
8286
|
setMatrixHover(null);
|
|
7843
8287
|
focusSurface();
|
|
7844
8288
|
},
|
|
7845
|
-
children:
|
|
8289
|
+
children: messages.insert
|
|
7846
8290
|
}
|
|
7847
8291
|
)
|
|
7848
8292
|
] }),
|
|
7849
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "matrix-edit-actions", "aria-label":
|
|
7850
|
-
envPaletteMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", title:
|
|
8293
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "matrix-edit-actions", "aria-label": messages.editSelectedEnvironment, children: [
|
|
8294
|
+
envPaletteMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", title: messages.applySelectedMatrixStyle, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.setMatrixEnvStyle(matrixStyle), children: messages.applyStyle }) : null,
|
|
7851
8295
|
envPaletteMode === "array" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
7852
8296
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
|
|
7853
|
-
|
|
8297
|
+
messages.column,
|
|
7854
8298
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7855
8299
|
"input",
|
|
7856
8300
|
{
|
|
@@ -7866,24 +8310,36 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7866
8310
|
"button",
|
|
7867
8311
|
{
|
|
7868
8312
|
type: "button",
|
|
7869
|
-
title: alignment.title,
|
|
8313
|
+
title: alignmentCopy(alignment.id, messages).title,
|
|
7870
8314
|
onMouseDown: (event) => event.preventDefault(),
|
|
7871
8315
|
onClick: () => runtimeRef.current?.setArrayColumnAlignment(arrayAlignmentColumn - 1, alignment.id),
|
|
7872
|
-
children: alignment.label
|
|
8316
|
+
children: alignmentCopy(alignment.id, messages).label
|
|
7873
8317
|
},
|
|
7874
8318
|
alignment.id
|
|
7875
8319
|
))
|
|
7876
8320
|
] }) : null,
|
|
7877
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
8321
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", title: messages.addRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixRow(), children: [
|
|
8322
|
+
"+",
|
|
8323
|
+
messages.row
|
|
8324
|
+
] }),
|
|
8325
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", title: messages.removeRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixRow(), children: [
|
|
8326
|
+
"-",
|
|
8327
|
+
messages.row
|
|
8328
|
+
] }),
|
|
8329
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", title: messages.addColumn, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixColumn(), children: [
|
|
8330
|
+
"+",
|
|
8331
|
+
messages.column
|
|
8332
|
+
] }),
|
|
8333
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", title: messages.removeColumn, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixColumn(), children: [
|
|
8334
|
+
"-",
|
|
8335
|
+
messages.column
|
|
8336
|
+
] })
|
|
7881
8337
|
] })
|
|
7882
8338
|
] })
|
|
7883
8339
|
]
|
|
7884
8340
|
}
|
|
7885
8341
|
) }),
|
|
7886
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label":
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.spaces, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
7887
8343
|
"div",
|
|
7888
8344
|
{
|
|
7889
8345
|
className: `spacing-command-menu spacing-command-menu--${activeEditorSide}`,
|
|
@@ -7899,8 +8355,8 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7899
8355
|
{
|
|
7900
8356
|
className: "icon-btn spacing-command-btn",
|
|
7901
8357
|
type: "button",
|
|
7902
|
-
title:
|
|
7903
|
-
"aria-label":
|
|
8358
|
+
title: messages.insertSpace,
|
|
8359
|
+
"aria-label": messages.insertSpace,
|
|
7904
8360
|
"aria-haspopup": "listbox",
|
|
7905
8361
|
"aria-expanded": spacingMenuOpen,
|
|
7906
8362
|
onClick: () => setSpacingMenuOpen((open) => !open),
|
|
@@ -7910,13 +8366,13 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7910
8366
|
] })
|
|
7911
8367
|
}
|
|
7912
8368
|
),
|
|
7913
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "spacing-command-options", role: "listbox", "aria-label":
|
|
8369
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "spacing-command-options", role: "listbox", "aria-label": messages.insertSpace, hidden: !spacingMenuOpen, children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
7914
8370
|
"button",
|
|
7915
8371
|
{
|
|
7916
8372
|
type: "button",
|
|
7917
8373
|
role: "option",
|
|
7918
8374
|
className: `spacing-command-option spacing-command-option--${command.spacing.direction}`,
|
|
7919
|
-
title: command
|
|
8375
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
7920
8376
|
onMouseDown: (event) => event.preventDefault(),
|
|
7921
8377
|
onClick: () => {
|
|
7922
8378
|
runtimeRef.current?.insertAtomicCommand(command.id);
|
|
@@ -7929,7 +8385,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7929
8385
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "spacing-command-glyph__bar" }),
|
|
7930
8386
|
command.spacing.direction === "positive" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "spacing-command-glyph__arrow", children: spacingArrow(command, activeEditorSide) }) : null
|
|
7931
8387
|
] }),
|
|
7932
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "spacing-command-option__name", children: command
|
|
8388
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "spacing-command-option__name", children: atomicCommandTitle(command, uiLocale) })
|
|
7933
8389
|
]
|
|
7934
8390
|
},
|
|
7935
8391
|
command.id
|
|
@@ -7937,7 +8393,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7937
8393
|
]
|
|
7938
8394
|
}
|
|
7939
8395
|
) }),
|
|
7940
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-functions", role: "group", "aria-label":
|
|
8396
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-functions", role: "group", "aria-label": messages.functions, children: [
|
|
7941
8397
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
7942
8398
|
"div",
|
|
7943
8399
|
{
|
|
@@ -7954,22 +8410,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7954
8410
|
{
|
|
7955
8411
|
className: "icon-btn function-command-btn",
|
|
7956
8412
|
type: "button",
|
|
7957
|
-
title:
|
|
7958
|
-
"aria-label":
|
|
8413
|
+
title: messages.insertFunction,
|
|
8414
|
+
"aria-label": messages.insertFunction,
|
|
7959
8415
|
"aria-haspopup": "listbox",
|
|
7960
8416
|
"aria-expanded": functionMenuOpen,
|
|
7961
8417
|
onClick: () => setFunctionMenuOpen((open) => !open),
|
|
7962
8418
|
children: FUNCTION_COMMANDS[0]?.arabicLabel ?? "\u062F"
|
|
7963
8419
|
}
|
|
7964
8420
|
),
|
|
7965
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label":
|
|
8421
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertFunction, hidden: !functionMenuOpen, children: FUNCTION_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7966
8422
|
"button",
|
|
7967
8423
|
{
|
|
7968
8424
|
className: "function-command-option",
|
|
7969
8425
|
type: "button",
|
|
7970
8426
|
role: "option",
|
|
7971
|
-
title: command
|
|
7972
|
-
"aria-label": command
|
|
8427
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
8428
|
+
"aria-label": atomicCommandTitle(command, uiLocale),
|
|
7973
8429
|
onMouseDown: (event) => event.preventDefault(),
|
|
7974
8430
|
onClick: () => {
|
|
7975
8431
|
runtimeRef.current?.insertAtomicCommand(command.id);
|
|
@@ -7999,22 +8455,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
7999
8455
|
{
|
|
8000
8456
|
className: "icon-btn function-command-btn",
|
|
8001
8457
|
type: "button",
|
|
8002
|
-
title:
|
|
8003
|
-
"aria-label":
|
|
8458
|
+
title: messages.insertLimitsSeries,
|
|
8459
|
+
"aria-label": messages.insertLimitsSeries,
|
|
8004
8460
|
"aria-haspopup": "listbox",
|
|
8005
8461
|
"aria-expanded": limitsSeriesMenuOpen,
|
|
8006
8462
|
onClick: () => setLimitsSeriesMenuOpen((open) => !open),
|
|
8007
8463
|
children: LIMITS_SERIES_COMMANDS[0]?.arabicLabel ?? "\u062D\u062F"
|
|
8008
8464
|
}
|
|
8009
8465
|
),
|
|
8010
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label":
|
|
8466
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertLimitsSeries, hidden: !limitsSeriesMenuOpen, children: LIMITS_SERIES_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8011
8467
|
"button",
|
|
8012
8468
|
{
|
|
8013
8469
|
className: "function-command-option",
|
|
8014
8470
|
type: "button",
|
|
8015
8471
|
role: "option",
|
|
8016
|
-
title: command
|
|
8017
|
-
"aria-label": command
|
|
8472
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
8473
|
+
"aria-label": atomicCommandTitle(command, uiLocale),
|
|
8018
8474
|
onMouseDown: (event) => event.preventDefault(),
|
|
8019
8475
|
onClick: () => {
|
|
8020
8476
|
runtimeRef.current?.insertAtomicCommand(command.id);
|
|
@@ -8044,22 +8500,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8044
8500
|
{
|
|
8045
8501
|
className: "icon-btn function-command-btn",
|
|
8046
8502
|
type: "button",
|
|
8047
|
-
title:
|
|
8048
|
-
"aria-label":
|
|
8503
|
+
title: messages.insertAdditionalFunctions,
|
|
8504
|
+
"aria-label": messages.insertAdditionalFunctions,
|
|
8049
8505
|
"aria-haspopup": "listbox",
|
|
8050
8506
|
"aria-expanded": function2MenuOpen,
|
|
8051
8507
|
onClick: () => setFunction2MenuOpen((open) => !open),
|
|
8052
8508
|
children: FUNCTION2_COMMANDS[0]?.arabicLabel ?? "\u062F"
|
|
8053
8509
|
}
|
|
8054
8510
|
),
|
|
8055
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label":
|
|
8511
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertAdditionalFunctions, hidden: !function2MenuOpen, children: FUNCTION2_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8056
8512
|
"button",
|
|
8057
8513
|
{
|
|
8058
8514
|
className: "function-command-option",
|
|
8059
8515
|
type: "button",
|
|
8060
8516
|
role: "option",
|
|
8061
|
-
title: command
|
|
8062
|
-
"aria-label": command
|
|
8517
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
8518
|
+
"aria-label": atomicCommandTitle(command, uiLocale),
|
|
8063
8519
|
onMouseDown: (event) => event.preventDefault(),
|
|
8064
8520
|
onClick: () => {
|
|
8065
8521
|
runtimeRef.current?.insertAtomicCommand(command.id);
|
|
@@ -8089,22 +8545,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8089
8545
|
{
|
|
8090
8546
|
className: "icon-btn function-command-btn",
|
|
8091
8547
|
type: "button",
|
|
8092
|
-
title:
|
|
8093
|
-
"aria-label":
|
|
8548
|
+
title: messages.insertNumberSets,
|
|
8549
|
+
"aria-label": messages.insertNumberSets,
|
|
8094
8550
|
"aria-haspopup": "listbox",
|
|
8095
8551
|
"aria-expanded": groupMenuOpen,
|
|
8096
8552
|
onClick: () => setGroupMenuOpen((open) => !open),
|
|
8097
8553
|
children: GROUP_COMMANDS[0]?.arabicLabel ?? "\u0645"
|
|
8098
8554
|
}
|
|
8099
8555
|
),
|
|
8100
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label":
|
|
8556
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options", role: "listbox", "aria-label": messages.insertNumberSets, hidden: !groupMenuOpen, children: GROUP_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8101
8557
|
"button",
|
|
8102
8558
|
{
|
|
8103
8559
|
className: "function-command-option",
|
|
8104
8560
|
type: "button",
|
|
8105
8561
|
role: "option",
|
|
8106
|
-
title: command
|
|
8107
|
-
"aria-label": command
|
|
8562
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
8563
|
+
"aria-label": atomicCommandTitle(command, uiLocale),
|
|
8108
8564
|
onMouseDown: (event) => event.preventDefault(),
|
|
8109
8565
|
onClick: () => {
|
|
8110
8566
|
runtimeRef.current?.insertAtomicCommand(command.id);
|
|
@@ -8119,7 +8575,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8119
8575
|
}
|
|
8120
8576
|
)
|
|
8121
8577
|
] }),
|
|
8122
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-operators", role: "group", "aria-label":
|
|
8578
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-operators", role: "group", "aria-label": messages.operations, children: [
|
|
8123
8579
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
8124
8580
|
"div",
|
|
8125
8581
|
{
|
|
@@ -8136,22 +8592,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8136
8592
|
{
|
|
8137
8593
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
8138
8594
|
type: "button",
|
|
8139
|
-
title:
|
|
8140
|
-
"aria-label":
|
|
8595
|
+
title: messages.insertOperation,
|
|
8596
|
+
"aria-label": messages.insertOperation,
|
|
8141
8597
|
"aria-haspopup": "listbox",
|
|
8142
8598
|
"aria-expanded": operatorMenuOpen,
|
|
8143
8599
|
onClick: () => setOperatorMenuOpen((open) => !open),
|
|
8144
8600
|
children: renderOperatorMenuButtonLabel(OPERATOR_COMMANDS[0], "\u2217")
|
|
8145
8601
|
}
|
|
8146
8602
|
),
|
|
8147
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label":
|
|
8603
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertOperation, hidden: !operatorMenuOpen, children: OPERATOR_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8148
8604
|
"button",
|
|
8149
8605
|
{
|
|
8150
8606
|
className: "function-command-option operator-command-option",
|
|
8151
8607
|
type: "button",
|
|
8152
8608
|
role: "option",
|
|
8153
|
-
title: command
|
|
8154
|
-
"aria-label": command
|
|
8609
|
+
title: atomicOperatorCommandTitle(command, uiLocale),
|
|
8610
|
+
"aria-label": atomicOperatorCommandTitle(command, uiLocale),
|
|
8155
8611
|
onMouseDown: (event) => event.preventDefault(),
|
|
8156
8612
|
onClick: () => {
|
|
8157
8613
|
runtimeRef.current?.insertAtomicOperatorCommand(command.id);
|
|
@@ -8181,22 +8637,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8181
8637
|
{
|
|
8182
8638
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
8183
8639
|
type: "button",
|
|
8184
|
-
title:
|
|
8185
|
-
"aria-label":
|
|
8640
|
+
title: messages.insertRelationsSets,
|
|
8641
|
+
"aria-label": messages.insertRelationsSets,
|
|
8186
8642
|
"aria-haspopup": "listbox",
|
|
8187
8643
|
"aria-expanded": operator2MenuOpen,
|
|
8188
8644
|
onClick: () => setOperator2MenuOpen((open) => !open),
|
|
8189
8645
|
children: "\u2229"
|
|
8190
8646
|
}
|
|
8191
8647
|
),
|
|
8192
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label":
|
|
8648
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertRelationsSets, hidden: !operator2MenuOpen, children: OPERATOR2_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8193
8649
|
"button",
|
|
8194
8650
|
{
|
|
8195
8651
|
className: "function-command-option operator-command-option",
|
|
8196
8652
|
type: "button",
|
|
8197
8653
|
role: "option",
|
|
8198
|
-
title: command
|
|
8199
|
-
"aria-label": command
|
|
8654
|
+
title: atomicOperatorCommandTitle(command, uiLocale),
|
|
8655
|
+
"aria-label": atomicOperatorCommandTitle(command, uiLocale),
|
|
8200
8656
|
onMouseDown: (event) => event.preventDefault(),
|
|
8201
8657
|
onClick: () => {
|
|
8202
8658
|
runtimeRef.current?.insertAtomicOperatorCommand(command.id);
|
|
@@ -8226,22 +8682,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8226
8682
|
{
|
|
8227
8683
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
8228
8684
|
type: "button",
|
|
8229
|
-
title:
|
|
8230
|
-
"aria-label":
|
|
8685
|
+
title: messages.insertArrows,
|
|
8686
|
+
"aria-label": messages.insertArrows,
|
|
8231
8687
|
"aria-haspopup": "listbox",
|
|
8232
8688
|
"aria-expanded": operator3MenuOpen,
|
|
8233
8689
|
onClick: () => setOperator3MenuOpen((open) => !open),
|
|
8234
8690
|
children: renderOperatorMenuButtonLabel(OPERATOR3_COMMANDS[0], "\u21D2")
|
|
8235
8691
|
}
|
|
8236
8692
|
),
|
|
8237
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label":
|
|
8693
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertArrows, hidden: !operator3MenuOpen, children: OPERATOR3_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8238
8694
|
"button",
|
|
8239
8695
|
{
|
|
8240
8696
|
className: "function-command-option operator-command-option",
|
|
8241
8697
|
type: "button",
|
|
8242
8698
|
role: "option",
|
|
8243
|
-
title: command
|
|
8244
|
-
"aria-label": command
|
|
8699
|
+
title: atomicOperatorCommandTitle(command, uiLocale),
|
|
8700
|
+
"aria-label": atomicOperatorCommandTitle(command, uiLocale),
|
|
8245
8701
|
onMouseDown: (event) => event.preventDefault(),
|
|
8246
8702
|
onClick: () => {
|
|
8247
8703
|
runtimeRef.current?.insertAtomicOperatorCommand(command.id);
|
|
@@ -8271,22 +8727,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8271
8727
|
{
|
|
8272
8728
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
8273
8729
|
type: "button",
|
|
8274
|
-
title:
|
|
8275
|
-
"aria-label":
|
|
8730
|
+
title: messages.insertDots,
|
|
8731
|
+
"aria-label": messages.insertDots,
|
|
8276
8732
|
"aria-haspopup": "listbox",
|
|
8277
8733
|
"aria-expanded": dotMenuOpen,
|
|
8278
8734
|
onClick: () => setDotMenuOpen((open) => !open),
|
|
8279
8735
|
children: renderOperatorMenuButtonLabel(DOT_COMMANDS[0], "\u2026")
|
|
8280
8736
|
}
|
|
8281
8737
|
),
|
|
8282
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label":
|
|
8738
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertDots, hidden: !dotMenuOpen, children: DOT_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8283
8739
|
"button",
|
|
8284
8740
|
{
|
|
8285
8741
|
className: "function-command-option operator-command-option",
|
|
8286
8742
|
type: "button",
|
|
8287
8743
|
role: "option",
|
|
8288
|
-
title: command
|
|
8289
|
-
"aria-label": command
|
|
8744
|
+
title: atomicOperatorCommandTitle(command, uiLocale),
|
|
8745
|
+
"aria-label": atomicOperatorCommandTitle(command, uiLocale),
|
|
8290
8746
|
onMouseDown: (event) => event.preventDefault(),
|
|
8291
8747
|
onClick: () => {
|
|
8292
8748
|
runtimeRef.current?.insertAtomicOperatorCommand(command.id);
|
|
@@ -8316,22 +8772,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8316
8772
|
{
|
|
8317
8773
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
8318
8774
|
type: "button",
|
|
8319
|
-
title:
|
|
8320
|
-
"aria-label":
|
|
8775
|
+
title: messages.insertIntegrals,
|
|
8776
|
+
"aria-label": messages.insertIntegrals,
|
|
8321
8777
|
"aria-haspopup": "listbox",
|
|
8322
8778
|
"aria-expanded": integralMenuOpen,
|
|
8323
8779
|
onClick: () => setIntegralMenuOpen((open) => !open),
|
|
8324
8780
|
children: renderOperatorMenuButtonLabel(INTEGRAL_COMMANDS[0], "\u222B")
|
|
8325
8781
|
}
|
|
8326
8782
|
),
|
|
8327
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label":
|
|
8783
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "function-command-options operator-command-options", role: "listbox", "aria-label": messages.insertIntegrals, hidden: !integralMenuOpen, children: INTEGRAL_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8328
8784
|
"button",
|
|
8329
8785
|
{
|
|
8330
8786
|
className: "function-command-option operator-command-option",
|
|
8331
8787
|
type: "button",
|
|
8332
8788
|
role: "option",
|
|
8333
|
-
title: command
|
|
8334
|
-
"aria-label": command
|
|
8789
|
+
title: atomicOperatorCommandTitle(command, uiLocale),
|
|
8790
|
+
"aria-label": atomicOperatorCommandTitle(command, uiLocale),
|
|
8335
8791
|
onMouseDown: (event) => event.preventDefault(),
|
|
8336
8792
|
onClick: () => {
|
|
8337
8793
|
runtimeRef.current?.insertAtomicOperatorCommand(command.id);
|
|
@@ -8346,27 +8802,27 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8346
8802
|
}
|
|
8347
8803
|
)
|
|
8348
8804
|
] }),
|
|
8349
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-scripts", role: "group", "aria-label":
|
|
8350
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn script-icon-btn", type: "button", title:
|
|
8805
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-scripts", role: "group", "aria-label": messages.scripts, children: [
|
|
8806
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSuperscript, "aria-label": messages.addSuperscript, onClick: () => runtimeRef.current?.addSup(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
|
|
8351
8807
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0646" }),
|
|
8352
8808
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0633" })
|
|
8353
8809
|
] }) }),
|
|
8354
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn script-icon-btn", type: "button", title:
|
|
8810
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSubscript, "aria-label": messages.addSubscript, onClick: () => runtimeRef.current?.addSub(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
|
|
8355
8811
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0646" }),
|
|
8356
8812
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0633" })
|
|
8357
8813
|
] }) }),
|
|
8358
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title:
|
|
8814
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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__ */ (0, import_jsx_runtime.jsxs)("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sup", "aria-hidden": "true", children: [
|
|
8359
8815
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0646" }),
|
|
8360
8816
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xD7" })
|
|
8361
8817
|
] }) }),
|
|
8362
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title:
|
|
8818
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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__ */ (0, import_jsx_runtime.jsxs)("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sub", "aria-hidden": "true", children: [
|
|
8363
8819
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u0646" }),
|
|
8364
8820
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xD7" })
|
|
8365
8821
|
] }) })
|
|
8366
8822
|
] }),
|
|
8367
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label":
|
|
8368
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn delete-node-btn", type: "button", title:
|
|
8369
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref: splitTypingBtnRef, id: "toggle-split-leaf-typing", className: "icon-btn ligature-btn", type: "button", title:
|
|
8823
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.inputStyles, children: [
|
|
8824
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "icon-btn delete-node-btn", type: "button", title: messages.deleteSelectedStructure, "aria-label": messages.deleteSelectedStructure, onClick: () => runtimeRef.current?.deleteStructure(), children: "\xD7" }),
|
|
8825
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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" }),
|
|
8370
8826
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
8371
8827
|
"div",
|
|
8372
8828
|
{
|
|
@@ -8385,22 +8841,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8385
8841
|
id: "select-character-font",
|
|
8386
8842
|
className: `icon-btn font-mode-btn font-mode-btn--${selectedCharacterFont}`,
|
|
8387
8843
|
type: "button",
|
|
8388
|
-
title:
|
|
8389
|
-
"aria-label":
|
|
8844
|
+
title: characterFontTitle(selectedCharacterFont, messages),
|
|
8845
|
+
"aria-label": messages.chooseWritingFont,
|
|
8390
8846
|
"aria-haspopup": "listbox",
|
|
8391
8847
|
"aria-expanded": characterFontMenuOpen,
|
|
8392
8848
|
onClick: () => setCharacterFontMenuOpen((open) => !open),
|
|
8393
8849
|
children: characterFontOption(selectedCharacterFont).label
|
|
8394
8850
|
}
|
|
8395
8851
|
),
|
|
8396
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "character-font-options", role: "listbox", "aria-label":
|
|
8852
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "character-font-options", role: "listbox", "aria-label": messages.chooseWritingFont, hidden: !characterFontMenuOpen, children: CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8397
8853
|
"button",
|
|
8398
8854
|
{
|
|
8399
8855
|
type: "button",
|
|
8400
8856
|
role: "option",
|
|
8401
8857
|
"aria-selected": selectedCharacterFont === option.id,
|
|
8402
8858
|
className: `character-font-option character-font-option--${option.id}`,
|
|
8403
|
-
title: option.
|
|
8859
|
+
title: characterFontTitle(option.id, messages),
|
|
8404
8860
|
onMouseDown: (event) => event.preventDefault(),
|
|
8405
8861
|
onClick: () => {
|
|
8406
8862
|
runtimeRef.current?.setCurrentCharacterFont(option.id);
|
|
@@ -8433,22 +8889,22 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8433
8889
|
id: "select-digit-form",
|
|
8434
8890
|
className: "icon-btn digit-form-btn",
|
|
8435
8891
|
type: "button",
|
|
8436
|
-
title:
|
|
8437
|
-
"aria-label":
|
|
8892
|
+
title: messages.chooseDigitForm,
|
|
8893
|
+
"aria-label": messages.chooseDigitForm,
|
|
8438
8894
|
"aria-haspopup": "listbox",
|
|
8439
8895
|
"aria-expanded": digitMenuOpen,
|
|
8440
8896
|
onClick: () => setDigitMenuOpen((open) => !open),
|
|
8441
8897
|
children: digitFormLabel(selectedDigitForm2)
|
|
8442
8898
|
}
|
|
8443
8899
|
),
|
|
8444
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "digit-form-options", role: "listbox", "aria-label":
|
|
8900
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "digit-form-options", role: "listbox", "aria-label": messages.chooseDigitForm, hidden: !digitMenuOpen, children: DIGIT_FORM_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
8445
8901
|
"button",
|
|
8446
8902
|
{
|
|
8447
8903
|
type: "button",
|
|
8448
8904
|
role: "option",
|
|
8449
8905
|
"aria-selected": selectedDigitForm2 === option.id,
|
|
8450
8906
|
className: "digit-form-option",
|
|
8451
|
-
title: option.
|
|
8907
|
+
title: digitFormTitle(option.id, messages),
|
|
8452
8908
|
onMouseDown: (event) => event.preventDefault(),
|
|
8453
8909
|
onClick: () => {
|
|
8454
8910
|
runtimeRef.current?.setCurrentDigitForm(option.id);
|
|
@@ -8472,15 +8928,15 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8472
8928
|
id: "butex-editor-surface",
|
|
8473
8929
|
className: "surface surface--arabic",
|
|
8474
8930
|
tabIndex: 0,
|
|
8475
|
-
"aria-label":
|
|
8931
|
+
"aria-label": messages.equationEditor
|
|
8476
8932
|
}
|
|
8477
8933
|
),
|
|
8478
8934
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: renderErrorRef, className: "error", hidden: true })
|
|
8479
8935
|
] }),
|
|
8480
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: "panel panel-preview", "aria-label":
|
|
8936
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: "panel panel-preview", "aria-label": messages.renderPreview, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: mathOutputRef, className: "preview-box" }) }),
|
|
8481
8937
|
debug ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "panel", children: [
|
|
8482
8938
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dev-strip", children: [
|
|
8483
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dev-badge", children:
|
|
8939
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dev-badge", children: messages.development }),
|
|
8484
8940
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: latexLinesRef, className: "ascii" }),
|
|
8485
8941
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: passivePreviewRef, className: "passive-preview-text" })
|
|
8486
8942
|
] }),
|
|
@@ -8503,7 +8959,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8503
8959
|
return next;
|
|
8504
8960
|
});
|
|
8505
8961
|
},
|
|
8506
|
-
children: debugBodyHidden ?
|
|
8962
|
+
children: debugBodyHidden ? messages.showDebugLog : messages.hideDebugLog
|
|
8507
8963
|
}
|
|
8508
8964
|
),
|
|
8509
8965
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -8517,7 +8973,7 @@ ${arabic || "\u0641\u0627\u0631\u063A"}`;
|
|
|
8517
8973
|
} catch {
|
|
8518
8974
|
}
|
|
8519
8975
|
},
|
|
8520
|
-
children:
|
|
8976
|
+
children: messages.copyDebugLog
|
|
8521
8977
|
}
|
|
8522
8978
|
)
|
|
8523
8979
|
] }),
|
|
@@ -8846,6 +9302,24 @@ var DOCUMENT_WIDGET_CSS = `
|
|
|
8846
9302
|
margin: 0 0 12px;
|
|
8847
9303
|
}
|
|
8848
9304
|
|
|
9305
|
+
.butex-document-widget__preview h1 {
|
|
9306
|
+
font-size: 1.75rem;
|
|
9307
|
+
font-weight: 700;
|
|
9308
|
+
line-height: 1.35;
|
|
9309
|
+
}
|
|
9310
|
+
|
|
9311
|
+
.butex-document-widget__preview h2 {
|
|
9312
|
+
font-size: 1.4rem;
|
|
9313
|
+
font-weight: 600;
|
|
9314
|
+
line-height: 1.4;
|
|
9315
|
+
}
|
|
9316
|
+
|
|
9317
|
+
.butex-document-widget__preview h3 {
|
|
9318
|
+
font-size: 1.2rem;
|
|
9319
|
+
font-weight: 600;
|
|
9320
|
+
line-height: 1.45;
|
|
9321
|
+
}
|
|
9322
|
+
|
|
8849
9323
|
.butex-document-widget__preview ul,
|
|
8850
9324
|
.butex-document-widget__preview ol {
|
|
8851
9325
|
margin: 0 0 12px;
|