@drghaliasri/butex 8.1.5 → 8.2.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/dist/document-cli.js +2 -2
- package/dist/document-cli.js.map +1 -1
- package/dist/react-book.d.mts +11 -1
- package/dist/react-book.d.ts +11 -1
- package/dist/react-book.js +2622 -1915
- package/dist/react-book.js.map +1 -1
- package/dist/react-book.mjs +2465 -1758
- package/dist/react-book.mjs.map +1 -1
- package/dist/react-document-preview.d.mts +1 -1
- package/dist/react-document-preview.d.ts +1 -1
- package/dist/react-document-preview.js +6 -110
- package/dist/react-document-preview.js.map +1 -1
- package/dist/react-document-preview.mjs +6 -110
- package/dist/react-document-preview.mjs.map +1 -1
- package/dist/react-document.d.mts +4 -3
- package/dist/react-document.d.ts +4 -3
- package/dist/react-document.js +1809 -1454
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +1565 -1210
- package/dist/react-document.mjs.map +1 -1
- package/dist/react.js +1274 -818
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1232 -776
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useId as useId2,
|
|
7
7
|
useImperativeHandle,
|
|
8
8
|
useRef as useRef3,
|
|
9
|
-
useState as
|
|
9
|
+
useState as useState3
|
|
10
10
|
} from "react";
|
|
11
11
|
|
|
12
12
|
// src/editor/factory.ts
|
|
@@ -7418,95 +7418,6 @@ var WIDGET_CHROME_CSS = `
|
|
|
7418
7418
|
margin-top: 8px;
|
|
7419
7419
|
}
|
|
7420
7420
|
|
|
7421
|
-
.butex-widget .butex-widget__command-sheet-backdrop {
|
|
7422
|
-
align-items: flex-end;
|
|
7423
|
-
background: rgba(15, 23, 42, 0.38);
|
|
7424
|
-
inset: 0;
|
|
7425
|
-
justify-content: center;
|
|
7426
|
-
padding-bottom: var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px));
|
|
7427
|
-
padding-left: max(12px, var(--butex-safe-area-left, env(safe-area-inset-left, 0px)));
|
|
7428
|
-
padding-right: max(12px, var(--butex-safe-area-right, env(safe-area-inset-right, 0px)));
|
|
7429
|
-
padding-top: max(12px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px)));
|
|
7430
|
-
position: fixed;
|
|
7431
|
-
z-index: var(--butex-z-popover);
|
|
7432
|
-
}
|
|
7433
|
-
|
|
7434
|
-
.butex-widget .butex-widget__command-sheet {
|
|
7435
|
-
background: var(--butex-panel);
|
|
7436
|
-
border: 1px solid var(--butex-border);
|
|
7437
|
-
border-radius: 16px 16px 0 0;
|
|
7438
|
-
box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.22);
|
|
7439
|
-
display: grid;
|
|
7440
|
-
grid-template-rows: auto minmax(0, 1fr);
|
|
7441
|
-
max-height: min(78vh, 720px);
|
|
7442
|
-
max-height: min(720px, calc(100dvh - max(12px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px))) - var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px))));
|
|
7443
|
-
max-width: 640px;
|
|
7444
|
-
min-width: 0;
|
|
7445
|
-
overflow: hidden;
|
|
7446
|
-
width: 100%;
|
|
7447
|
-
}
|
|
7448
|
-
|
|
7449
|
-
.butex-widget .butex-widget__command-sheet-header {
|
|
7450
|
-
align-items: center;
|
|
7451
|
-
border-bottom: 1px solid var(--butex-border);
|
|
7452
|
-
display: grid;
|
|
7453
|
-
gap: 8px;
|
|
7454
|
-
grid-template-columns: minmax(44px, auto) minmax(0, 1fr) minmax(44px, auto);
|
|
7455
|
-
padding: 10px 12px;
|
|
7456
|
-
text-align: center;
|
|
7457
|
-
}
|
|
7458
|
-
|
|
7459
|
-
.butex-widget .butex-widget__command-sheet-header strong {
|
|
7460
|
-
overflow-wrap: anywhere;
|
|
7461
|
-
}
|
|
7462
|
-
|
|
7463
|
-
.butex-widget .butex-widget__command-sheet-body {
|
|
7464
|
-
display: grid;
|
|
7465
|
-
gap: 14px;
|
|
7466
|
-
min-height: 0;
|
|
7467
|
-
min-width: 0;
|
|
7468
|
-
overflow-y: auto;
|
|
7469
|
-
overscroll-behavior: contain;
|
|
7470
|
-
padding: 12px;
|
|
7471
|
-
}
|
|
7472
|
-
|
|
7473
|
-
.butex-widget .butex-widget__sheet-section {
|
|
7474
|
-
display: grid;
|
|
7475
|
-
gap: 8px;
|
|
7476
|
-
min-width: 0;
|
|
7477
|
-
}
|
|
7478
|
-
|
|
7479
|
-
.butex-widget .butex-widget__sheet-section h4 {
|
|
7480
|
-
font-size: 13px;
|
|
7481
|
-
margin: 0;
|
|
7482
|
-
}
|
|
7483
|
-
|
|
7484
|
-
.butex-widget .butex-widget__sheet-categories,
|
|
7485
|
-
.butex-widget .butex-widget__sheet-command-grid,
|
|
7486
|
-
.butex-widget .butex-widget__sheet-command-list,
|
|
7487
|
-
.butex-widget .butex-widget__sheet-choice-row {
|
|
7488
|
-
display: grid;
|
|
7489
|
-
gap: 8px;
|
|
7490
|
-
min-width: 0;
|
|
7491
|
-
}
|
|
7492
|
-
|
|
7493
|
-
.butex-widget .butex-widget__sheet-categories,
|
|
7494
|
-
.butex-widget .butex-widget__sheet-command-grid {
|
|
7495
|
-
grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
|
|
7496
|
-
}
|
|
7497
|
-
|
|
7498
|
-
.butex-widget .butex-widget__sheet-command-grid--three,
|
|
7499
|
-
.butex-widget .butex-widget__sheet-choice-row {
|
|
7500
|
-
grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
|
|
7501
|
-
}
|
|
7502
|
-
|
|
7503
|
-
.butex-widget .butex-widget__sheet-categories button,
|
|
7504
|
-
.butex-widget .butex-widget__sheet-command-list button {
|
|
7505
|
-
justify-content: flex-start;
|
|
7506
|
-
overflow-wrap: anywhere;
|
|
7507
|
-
text-align: start;
|
|
7508
|
-
}
|
|
7509
|
-
|
|
7510
7421
|
.butex-widget .butex-widget__command-sheet .operator-command-svg-label {
|
|
7511
7422
|
background-color: currentColor;
|
|
7512
7423
|
display: inline-block;
|
|
@@ -8411,19 +8322,6 @@ ${MATRIX_PICKER_CSS}
|
|
|
8411
8322
|
grid-template-columns: repeat(4, minmax(44px, 1fr));
|
|
8412
8323
|
}
|
|
8413
8324
|
|
|
8414
|
-
.butex-widget:not([data-responsive-mode="desktop"]) .butex-widget__command-sheet-backdrop {
|
|
8415
|
-
padding-bottom: var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px));
|
|
8416
|
-
padding-left: var(--butex-safe-area-left, env(safe-area-inset-left, 0px));
|
|
8417
|
-
padding-right: var(--butex-safe-area-right, env(safe-area-inset-right, 0px));
|
|
8418
|
-
padding-top: max(8px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px)));
|
|
8419
|
-
}
|
|
8420
|
-
|
|
8421
|
-
.butex-widget:not([data-responsive-mode="desktop"]) .butex-widget__command-sheet {
|
|
8422
|
-
border-bottom: 0;
|
|
8423
|
-
max-height: calc(100dvh - max(8px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px))) - var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px)));
|
|
8424
|
-
max-width: none;
|
|
8425
|
-
}
|
|
8426
|
-
|
|
8427
8325
|
.butex-widget:not([data-responsive-mode="desktop"]) .delimiter-command-menu,
|
|
8428
8326
|
.butex-widget:not([data-responsive-mode="desktop"]) .matrix-command-menu,
|
|
8429
8327
|
.butex-widget:not([data-responsive-mode="desktop"]) .character-font-menu,
|
|
@@ -9704,7 +9602,7 @@ function parseJsonDebugInput(text) {
|
|
|
9704
9602
|
}
|
|
9705
9603
|
|
|
9706
9604
|
// src/react/EquationMobileToolbar.tsx
|
|
9707
|
-
import { useEffect as useEffect2, useId, useRef as useRef2, useState } from "react";
|
|
9605
|
+
import { useEffect as useEffect2, useId, useRef as useRef2, useState as useState2 } from "react";
|
|
9708
9606
|
|
|
9709
9607
|
// src/react/dialogFocus.ts
|
|
9710
9608
|
import { useEffect, useRef } from "react";
|
|
@@ -9815,94 +9713,744 @@ function useDialogFocus({ open, dialogRef, onClose, triggerRef }) {
|
|
|
9815
9713
|
}, [dialogRef, open, triggerRef]);
|
|
9816
9714
|
}
|
|
9817
9715
|
|
|
9818
|
-
// src/react/
|
|
9819
|
-
import {
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
atomicOperatorCommandsByCategory("operators1"),
|
|
9829
|
-
atomicOperatorCommandsByCategory("operators2"),
|
|
9830
|
-
atomicOperatorCommandsByCategory("operators3"),
|
|
9831
|
-
atomicOperatorCommandsByCategory("dots"),
|
|
9832
|
-
atomicOperatorCommandsByCategory("integrals")
|
|
9833
|
-
];
|
|
9834
|
-
var MATRIX_STYLES = [
|
|
9835
|
-
{ id: "matrix", label: "\u25A1" },
|
|
9836
|
-
{ id: "pmatrix", label: "(\u25A1)" },
|
|
9837
|
-
{ id: "bmatrix", label: "[\u25A1]" },
|
|
9838
|
-
{ id: "Bmatrix", label: "{\u25A1}" },
|
|
9839
|
-
{ id: "vmatrix", label: "|\u25A1|" },
|
|
9840
|
-
{ id: "Vmatrix", label: "||\u25A1||" }
|
|
9841
|
-
];
|
|
9842
|
-
var MATRIX_PRESETS = [
|
|
9843
|
-
{ rows: 2, columns: 2 },
|
|
9844
|
-
{ rows: 2, columns: 3 },
|
|
9845
|
-
{ rows: 3, columns: 2 },
|
|
9846
|
-
{ rows: 3, columns: 3 }
|
|
9847
|
-
];
|
|
9848
|
-
var ARRAY_ALIGNMENTS = ["l", "c", "r"];
|
|
9849
|
-
function clampMatrixSize(value) {
|
|
9850
|
-
return Math.max(1, Math.min(12, Math.trunc(value)));
|
|
9716
|
+
// src/react/mobileCommandUi.tsx
|
|
9717
|
+
import { useLayoutEffect as useLayoutEffect2 } from "react";
|
|
9718
|
+
|
|
9719
|
+
// src/react/mobileCommandPortal.tsx
|
|
9720
|
+
import { useLayoutEffect, useState } from "react";
|
|
9721
|
+
import { createPortal } from "react-dom";
|
|
9722
|
+
|
|
9723
|
+
// src/react/visibleViewport.ts
|
|
9724
|
+
function positiveFinite(value, fallback) {
|
|
9725
|
+
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
9851
9726
|
}
|
|
9852
|
-
function
|
|
9853
|
-
|
|
9854
|
-
const columnLabel = columns === 1 ? messages.column : messages.columns;
|
|
9855
|
-
return `${String(rows)} ${rowLabel} \xD7 ${String(columns)} ${columnLabel}`;
|
|
9727
|
+
function finiteOffset(value) {
|
|
9728
|
+
return Number.isFinite(value) ? value : 0;
|
|
9856
9729
|
}
|
|
9857
|
-
function
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
if (
|
|
9862
|
-
|
|
9863
|
-
|
|
9730
|
+
function visibleViewportSnapshot(view) {
|
|
9731
|
+
const fallbackWidth = positiveFinite(view.innerWidth, 1);
|
|
9732
|
+
const fallbackHeight = positiveFinite(view.innerHeight, 1);
|
|
9733
|
+
const visualViewport = view.visualViewport;
|
|
9734
|
+
if (visualViewport && Number.isFinite(visualViewport.width) && visualViewport.width > 0 && Number.isFinite(visualViewport.height) && visualViewport.height > 0) {
|
|
9735
|
+
return {
|
|
9736
|
+
width: visualViewport.width,
|
|
9737
|
+
height: visualViewport.height,
|
|
9738
|
+
offsetLeft: finiteOffset(visualViewport.offsetLeft),
|
|
9739
|
+
offsetTop: finiteOffset(visualViewport.offsetTop),
|
|
9740
|
+
scale: positiveFinite(visualViewport.scale, 1),
|
|
9741
|
+
source: "visual-viewport"
|
|
9742
|
+
};
|
|
9743
|
+
}
|
|
9744
|
+
return {
|
|
9745
|
+
width: fallbackWidth,
|
|
9746
|
+
height: fallbackHeight,
|
|
9747
|
+
offsetLeft: 0,
|
|
9748
|
+
offsetTop: 0,
|
|
9749
|
+
scale: 1,
|
|
9750
|
+
source: "layout-viewport"
|
|
9751
|
+
};
|
|
9864
9752
|
}
|
|
9865
|
-
function
|
|
9866
|
-
if (
|
|
9867
|
-
if (
|
|
9868
|
-
return
|
|
9753
|
+
function reasonPriority(reason) {
|
|
9754
|
+
if (reason === "orientation") return 3;
|
|
9755
|
+
if (reason === "resize") return 2;
|
|
9756
|
+
if (reason === "scroll") return 1;
|
|
9757
|
+
return 0;
|
|
9869
9758
|
}
|
|
9870
|
-
function
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9759
|
+
function observeVisibleViewport(view, onChange) {
|
|
9760
|
+
let previous = visibleViewportSnapshot(view);
|
|
9761
|
+
let frame = null;
|
|
9762
|
+
let pendingReason = "scroll";
|
|
9763
|
+
onChange({
|
|
9764
|
+
snapshot: previous,
|
|
9765
|
+
initial: true,
|
|
9766
|
+
sizeChanged: false,
|
|
9767
|
+
offsetChanged: false,
|
|
9768
|
+
reason: "initial"
|
|
9769
|
+
});
|
|
9770
|
+
const emit = () => {
|
|
9771
|
+
frame = null;
|
|
9772
|
+
const next = visibleViewportSnapshot(view);
|
|
9773
|
+
const sizeChanged = next.width !== previous.width || next.height !== previous.height || next.scale !== previous.scale || next.source !== previous.source;
|
|
9774
|
+
const offsetChanged = next.offsetLeft !== previous.offsetLeft || next.offsetTop !== previous.offsetTop;
|
|
9775
|
+
const reason = pendingReason;
|
|
9776
|
+
pendingReason = "scroll";
|
|
9777
|
+
previous = next;
|
|
9778
|
+
onChange({ snapshot: next, initial: false, sizeChanged, offsetChanged, reason });
|
|
9779
|
+
};
|
|
9780
|
+
const schedule = (reason) => {
|
|
9781
|
+
if (reasonPriority(reason) > reasonPriority(pendingReason)) {
|
|
9782
|
+
pendingReason = reason;
|
|
9783
|
+
}
|
|
9784
|
+
if (frame !== null) {
|
|
9785
|
+
return;
|
|
9786
|
+
}
|
|
9787
|
+
frame = view.requestAnimationFrame(emit);
|
|
9788
|
+
};
|
|
9789
|
+
const onResize = () => schedule("resize");
|
|
9790
|
+
const onScroll = () => schedule("scroll");
|
|
9791
|
+
const onOrientation = () => schedule("orientation");
|
|
9792
|
+
const visualViewport = view.visualViewport;
|
|
9793
|
+
visualViewport?.addEventListener("resize", onResize);
|
|
9794
|
+
visualViewport?.addEventListener("scroll", onScroll);
|
|
9795
|
+
view.addEventListener("resize", onResize);
|
|
9796
|
+
view.addEventListener("orientationchange", onOrientation);
|
|
9797
|
+
return () => {
|
|
9798
|
+
visualViewport?.removeEventListener("resize", onResize);
|
|
9799
|
+
visualViewport?.removeEventListener("scroll", onScroll);
|
|
9800
|
+
view.removeEventListener("resize", onResize);
|
|
9801
|
+
view.removeEventListener("orientationchange", onOrientation);
|
|
9802
|
+
if (frame !== null) {
|
|
9803
|
+
view.cancelAnimationFrame(frame);
|
|
9804
|
+
frame = null;
|
|
9805
|
+
}
|
|
9806
|
+
};
|
|
9874
9807
|
}
|
|
9875
|
-
|
|
9876
|
-
|
|
9808
|
+
|
|
9809
|
+
// src/react/mobileCommandPortal.tsx
|
|
9810
|
+
var scrollLocks = /* @__PURE__ */ new WeakMap();
|
|
9811
|
+
function lockBackground(doc) {
|
|
9812
|
+
let lock = scrollLocks.get(doc);
|
|
9813
|
+
if (!lock) {
|
|
9814
|
+
lock = {
|
|
9815
|
+
count: 0,
|
|
9816
|
+
overflow: doc.body.style.overflow,
|
|
9817
|
+
overscroll: doc.documentElement.style.overscrollBehavior
|
|
9818
|
+
};
|
|
9819
|
+
scrollLocks.set(doc, lock);
|
|
9820
|
+
doc.body.style.overflow = "hidden";
|
|
9821
|
+
doc.documentElement.style.overscrollBehavior = "none";
|
|
9822
|
+
}
|
|
9823
|
+
lock.count += 1;
|
|
9824
|
+
return () => {
|
|
9825
|
+
if (!lock) return;
|
|
9826
|
+
lock.count -= 1;
|
|
9827
|
+
if (lock.count === 0) {
|
|
9828
|
+
doc.body.style.overflow = lock.overflow;
|
|
9829
|
+
doc.documentElement.style.overscrollBehavior = lock.overscroll;
|
|
9830
|
+
scrollLocks.delete(doc);
|
|
9831
|
+
}
|
|
9832
|
+
};
|
|
9877
9833
|
}
|
|
9878
|
-
function
|
|
9879
|
-
const
|
|
9880
|
-
|
|
9834
|
+
function ViewportModalPortal({ sourceRef, scopeClassName, children }) {
|
|
9835
|
+
const [host, setHost] = useState(null);
|
|
9836
|
+
useLayoutEffect(() => {
|
|
9837
|
+
const doc = sourceRef?.current?.ownerDocument ?? document;
|
|
9838
|
+
const source = sourceRef?.current?.closest(`.${scopeClassName}`) ?? doc.documentElement;
|
|
9839
|
+
const view = doc.defaultView;
|
|
9840
|
+
if (!view) return;
|
|
9841
|
+
const computed = view.getComputedStyle(source);
|
|
9842
|
+
const layer = doc.createElement("div");
|
|
9843
|
+
layer.className = `${scopeClassName} butex-mobile-command-portal`;
|
|
9844
|
+
layer.dataset.responsiveMode = source.dataset.responsiveMode ?? "auto";
|
|
9845
|
+
layer.dir = source.dir || computed.direction;
|
|
9846
|
+
layer.lang = source.lang || doc.documentElement.lang;
|
|
9847
|
+
for (let i = 0; i < computed.length; i += 1) {
|
|
9848
|
+
const name = computed.item(i);
|
|
9849
|
+
if (name.startsWith("--")) layer.style.setProperty(name, computed.getPropertyValue(name));
|
|
9850
|
+
}
|
|
9851
|
+
layer.style.fontFamily = computed.fontFamily;
|
|
9852
|
+
layer.style.fontSize = computed.fontSize;
|
|
9853
|
+
layer.style.lineHeight = computed.lineHeight;
|
|
9854
|
+
layer.style.color = computed.color;
|
|
9855
|
+
layer.style.direction = computed.direction;
|
|
9856
|
+
layer.style.position = "fixed";
|
|
9857
|
+
layer.style.inset = "auto";
|
|
9858
|
+
layer.style.maxWidth = "none";
|
|
9859
|
+
layer.style.minWidth = "0";
|
|
9860
|
+
layer.style.containerType = "normal";
|
|
9861
|
+
layer.style.contain = "none";
|
|
9862
|
+
layer.style.isolation = "isolate";
|
|
9863
|
+
layer.style.zIndex = "2147483000";
|
|
9864
|
+
const stopObserving = observeVisibleViewport(view, ({ snapshot }) => {
|
|
9865
|
+
layer.style.left = `${String(snapshot.offsetLeft)}px`;
|
|
9866
|
+
layer.style.top = `${String(snapshot.offsetTop)}px`;
|
|
9867
|
+
layer.style.width = `${String(snapshot.width)}px`;
|
|
9868
|
+
layer.style.height = `${String(snapshot.height)}px`;
|
|
9869
|
+
});
|
|
9870
|
+
doc.body.appendChild(layer);
|
|
9871
|
+
const unlock = lockBackground(doc);
|
|
9872
|
+
setHost(layer);
|
|
9873
|
+
return () => {
|
|
9874
|
+
stopObserving();
|
|
9875
|
+
unlock();
|
|
9876
|
+
layer.remove();
|
|
9877
|
+
};
|
|
9878
|
+
}, [sourceRef, scopeClassName]);
|
|
9879
|
+
return host ? createPortal(children, host) : null;
|
|
9880
|
+
}
|
|
9881
|
+
var mobileCommandBackdropStyle = { position: "absolute" };
|
|
9882
|
+
var mobileCommandSheetStyle = { maxHeight: "min(720px, 100%)" };
|
|
9883
|
+
var MobileCommandPortal = ViewportModalPortal;
|
|
9884
|
+
|
|
9885
|
+
// src/react/mobileCommandCss.ts
|
|
9886
|
+
var MOBILE_COMMAND_CSS = String.raw`
|
|
9887
|
+
/* A single visual language for document and equation command portals (mobile only). */
|
|
9888
|
+
.butex-document-widget.butex-mobile-command-portal {
|
|
9889
|
+
--butex-mobile-panel: var(--butex-document-panel);
|
|
9890
|
+
--butex-mobile-fg: var(--butex-document-fg);
|
|
9891
|
+
--butex-mobile-muted: var(--butex-document-muted);
|
|
9892
|
+
--butex-mobile-border: var(--butex-document-border);
|
|
9893
|
+
--butex-mobile-accent: var(--butex-document-accent);
|
|
9894
|
+
--butex-mobile-soft: var(--butex-document-accent-bg);
|
|
9895
|
+
--butex-mobile-danger: var(--butex-document-danger);
|
|
9896
|
+
}
|
|
9897
|
+
.butex-widget.butex-mobile-command-portal {
|
|
9898
|
+
--butex-mobile-panel: var(--butex-panel);
|
|
9899
|
+
--butex-mobile-fg: var(--butex-fg);
|
|
9900
|
+
--butex-mobile-muted: var(--butex-muted);
|
|
9901
|
+
--butex-mobile-border: var(--butex-border);
|
|
9902
|
+
--butex-mobile-accent: var(--butex-accent);
|
|
9903
|
+
--butex-mobile-soft: var(--butex-toolbar-hover-bg);
|
|
9904
|
+
--butex-mobile-danger: var(--butex-danger);
|
|
9905
|
+
}
|
|
9906
|
+
.butex-mobile-command-portal .butex-mobile-sheet__backdrop {
|
|
9907
|
+
display: flex;
|
|
9908
|
+
align-items: flex-end;
|
|
9909
|
+
justify-content: center;
|
|
9910
|
+
inset: 0;
|
|
9911
|
+
padding: max(10px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px)))
|
|
9912
|
+
max(8px, var(--butex-safe-area-right, env(safe-area-inset-right, 0px)))
|
|
9913
|
+
var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px))
|
|
9914
|
+
max(8px, var(--butex-safe-area-left, env(safe-area-inset-left, 0px)));
|
|
9915
|
+
background: color-mix(in srgb, #0f172a 40%, transparent);
|
|
9916
|
+
z-index: 1;
|
|
9881
9917
|
}
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9918
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel {
|
|
9919
|
+
display: grid;
|
|
9920
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
9921
|
+
width: 100%;
|
|
9922
|
+
max-width: 620px;
|
|
9923
|
+
min-height: 0;
|
|
9924
|
+
min-width: 0;
|
|
9925
|
+
overflow: hidden;
|
|
9926
|
+
border: 1px solid var(--butex-mobile-border);
|
|
9927
|
+
border-block-end: 0;
|
|
9928
|
+
border-radius: 20px 20px 0 0;
|
|
9929
|
+
background: var(--butex-mobile-panel);
|
|
9930
|
+
color: var(--butex-mobile-fg);
|
|
9931
|
+
box-shadow: 0 -20px 60px color-mix(in srgb, #0f172a 24%, transparent);
|
|
9932
|
+
}
|
|
9933
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header {
|
|
9934
|
+
display: grid;
|
|
9935
|
+
grid-template-columns: minmax(64px, 1fr) minmax(0, 2fr) minmax(44px, 1fr);
|
|
9936
|
+
gap: 8px;
|
|
9937
|
+
align-items: center;
|
|
9938
|
+
min-height: 66px;
|
|
9939
|
+
padding: 11px 16px 9px;
|
|
9940
|
+
text-align: center;
|
|
9941
|
+
background: var(--butex-mobile-panel);
|
|
9942
|
+
border-block-end: 1px solid var(--butex-mobile-border);
|
|
9886
9943
|
}
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9944
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header strong {
|
|
9945
|
+
display: block;
|
|
9946
|
+
font-size: 1.18rem;
|
|
9947
|
+
font-weight: 750;
|
|
9948
|
+
line-height: 1.45;
|
|
9949
|
+
overflow-wrap: anywhere;
|
|
9893
9950
|
}
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9951
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header-spacer { display: block; }
|
|
9952
|
+
.butex-mobile-command-portal .butex-mobile-sheet__back,
|
|
9953
|
+
.butex-mobile-command-portal .butex-mobile-sheet__close {
|
|
9954
|
+
display: inline-flex;
|
|
9955
|
+
align-items: center;
|
|
9956
|
+
justify-content: center;
|
|
9957
|
+
gap: 5px;
|
|
9958
|
+
min-height: 44px;
|
|
9959
|
+
min-width: 44px;
|
|
9960
|
+
padding: 6px;
|
|
9961
|
+
border-radius: 11px;
|
|
9962
|
+
border: 1px solid transparent;
|
|
9963
|
+
background: transparent;
|
|
9964
|
+
color: var(--butex-mobile-fg);
|
|
9965
|
+
cursor: pointer;
|
|
9966
|
+
font: inherit;
|
|
9967
|
+
font-size: .88rem;
|
|
9902
9968
|
}
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9969
|
+
.butex-mobile-command-portal .butex-mobile-sheet__back { justify-self: start; }
|
|
9970
|
+
.butex-mobile-command-portal .butex-mobile-sheet__close {
|
|
9971
|
+
justify-self: end;
|
|
9972
|
+
background: var(--butex-mobile-soft);
|
|
9973
|
+
}
|
|
9974
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body {
|
|
9975
|
+
display: grid;
|
|
9976
|
+
align-content: start;
|
|
9977
|
+
gap: 16px;
|
|
9978
|
+
min-height: 0;
|
|
9979
|
+
min-width: 0;
|
|
9980
|
+
overflow-y: auto;
|
|
9981
|
+
overscroll-behavior: contain;
|
|
9982
|
+
scrollbar-width: thin;
|
|
9983
|
+
padding: 16px clamp(12px, 3vw, 20px) max(20px, var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px)));
|
|
9984
|
+
}
|
|
9985
|
+
.butex-mobile-command-portal .butex-mobile-command__section {
|
|
9986
|
+
display: grid;
|
|
9987
|
+
min-width: 0;
|
|
9988
|
+
gap: 10px;
|
|
9989
|
+
padding-block-end: 15px;
|
|
9990
|
+
border-block-end: 1px solid color-mix(in srgb, var(--butex-mobile-border) 74%, transparent);
|
|
9991
|
+
}
|
|
9992
|
+
.butex-mobile-command-portal .butex-mobile-command__section:last-child { border-block-end: 0; padding-block-end: 0; }
|
|
9993
|
+
.butex-mobile-command-portal .butex-mobile-command__section-title {
|
|
9994
|
+
margin: 0;
|
|
9995
|
+
display: flex;
|
|
9996
|
+
align-items: center;
|
|
9997
|
+
gap: 9px;
|
|
9998
|
+
color: var(--butex-mobile-fg);
|
|
9999
|
+
font-size: 1.08rem;
|
|
10000
|
+
font-weight: 750;
|
|
10001
|
+
line-height: 1.55;
|
|
10002
|
+
}
|
|
10003
|
+
.butex-mobile-command-portal .butex-mobile-command__section-title > svg {
|
|
10004
|
+
color: var(--butex-mobile-accent);
|
|
10005
|
+
flex: none;
|
|
10006
|
+
}
|
|
10007
|
+
.butex-mobile-command-portal .butex-mobile-command__grid {
|
|
10008
|
+
display: grid;
|
|
10009
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
10010
|
+
gap: 8px;
|
|
10011
|
+
min-width: 0;
|
|
10012
|
+
}
|
|
10013
|
+
.butex-mobile-command-portal .butex-mobile-command__grid--dense {
|
|
10014
|
+
grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
|
|
10015
|
+
}
|
|
10016
|
+
.butex-mobile-command-portal .butex-mobile-command__choice-row {
|
|
10017
|
+
display: grid;
|
|
10018
|
+
grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
|
|
10019
|
+
gap: 8px;
|
|
10020
|
+
min-width: 0;
|
|
10021
|
+
}
|
|
10022
|
+
.butex-mobile-command-portal .butex-mobile-command__choice {
|
|
10023
|
+
min-height: 44px;
|
|
10024
|
+
min-width: 0;
|
|
10025
|
+
padding: 7px 10px;
|
|
10026
|
+
border: 1px solid var(--butex-mobile-border);
|
|
10027
|
+
border-radius: 10px;
|
|
10028
|
+
background: var(--butex-mobile-panel);
|
|
10029
|
+
color: var(--butex-mobile-fg);
|
|
10030
|
+
text-align: center;
|
|
10031
|
+
font: inherit;
|
|
10032
|
+
font-size: .91rem;
|
|
10033
|
+
cursor: pointer;
|
|
10034
|
+
}
|
|
10035
|
+
.butex-mobile-command-portal .butex-mobile-command__choice[aria-pressed="true"] {
|
|
10036
|
+
background: var(--butex-mobile-soft);
|
|
10037
|
+
border-color: var(--butex-mobile-accent);
|
|
10038
|
+
}
|
|
10039
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel .butex-mobile-command__action,
|
|
10040
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel .butex-mobile-command__category {
|
|
10041
|
+
display: flex;
|
|
10042
|
+
align-items: center;
|
|
10043
|
+
justify-content: flex-start;
|
|
10044
|
+
gap: 10px;
|
|
10045
|
+
min-height: 48px;
|
|
10046
|
+
min-width: 0;
|
|
10047
|
+
width: 100%;
|
|
10048
|
+
text-align: start;
|
|
10049
|
+
padding: 9px 11px;
|
|
10050
|
+
border: 1px solid var(--butex-mobile-border);
|
|
10051
|
+
border-radius: 12px;
|
|
10052
|
+
background: var(--butex-mobile-panel);
|
|
10053
|
+
color: var(--butex-mobile-fg);
|
|
10054
|
+
cursor: pointer;
|
|
10055
|
+
font: inherit;
|
|
10056
|
+
font-size: 1rem;
|
|
10057
|
+
font-weight: 560;
|
|
10058
|
+
line-height: 1.5;
|
|
10059
|
+
white-space: normal;
|
|
10060
|
+
overflow-wrap: anywhere;
|
|
10061
|
+
}
|
|
10062
|
+
.butex-mobile-command-portal .butex-mobile-command__action .butex-mobile-command__icon {
|
|
10063
|
+
flex: 0 0 20px;
|
|
10064
|
+
color: var(--butex-mobile-accent);
|
|
10065
|
+
}
|
|
10066
|
+
.butex-mobile-command-portal .butex-mobile-command__action-label {
|
|
10067
|
+
flex: 1 1 0;
|
|
10068
|
+
min-width: 0;
|
|
10069
|
+
}
|
|
10070
|
+
.butex-mobile-command-portal .butex-mobile-command__action--danger { color: var(--butex-mobile-danger); }
|
|
10071
|
+
.butex-mobile-command-portal .butex-mobile-command__action--danger svg { color: currentColor; }
|
|
10072
|
+
.butex-mobile-command-portal .butex-mobile-command__category {
|
|
10073
|
+
min-height: 64px;
|
|
10074
|
+
padding: 10px 12px;
|
|
10075
|
+
font-weight: 680;
|
|
10076
|
+
background: color-mix(in srgb, var(--butex-mobile-panel) 94%, var(--butex-mobile-accent));
|
|
10077
|
+
}
|
|
10078
|
+
.butex-mobile-command-portal .butex-mobile-command__category-icon {
|
|
10079
|
+
display: inline-flex;
|
|
10080
|
+
align-items: center;
|
|
10081
|
+
justify-content: center;
|
|
10082
|
+
width: 36px;
|
|
10083
|
+
height: 36px;
|
|
10084
|
+
flex: 0 0 36px;
|
|
10085
|
+
border-radius: 10px;
|
|
10086
|
+
background: var(--butex-mobile-soft);
|
|
10087
|
+
color: var(--butex-mobile-accent);
|
|
10088
|
+
}
|
|
10089
|
+
.butex-mobile-command-portal .butex-mobile-command__category-label { flex: 1; min-width: 0; }
|
|
10090
|
+
.butex-mobile-command-portal .butex-mobile-command__category > svg { color: var(--butex-mobile-muted); flex: 0 0 auto; }
|
|
10091
|
+
.butex-mobile-command-portal[dir="rtl"] .butex-mobile-command__category > svg,
|
|
10092
|
+
.butex-mobile-command-portal[dir="rtl"] .butex-mobile-sheet__back > svg { transform: scaleX(-1); }
|
|
10093
|
+
.butex-mobile-command-portal .butex-mobile-command__action[aria-pressed="true"],
|
|
10094
|
+
.butex-mobile-command-portal .butex-mobile-command__action[aria-selected="true"],
|
|
10095
|
+
.butex-mobile-command-portal .butex-mobile-command__category[aria-pressed="true"] {
|
|
10096
|
+
border-color: var(--butex-mobile-accent);
|
|
10097
|
+
background: var(--butex-mobile-soft);
|
|
10098
|
+
}
|
|
10099
|
+
.butex-mobile-command-portal .butex-mobile-command__action:disabled,
|
|
10100
|
+
.butex-mobile-command-portal .butex-mobile-command__category:disabled { opacity: .45; cursor: not-allowed; }
|
|
10101
|
+
.butex-mobile-command-portal .butex-mobile-command__action:focus-visible,
|
|
10102
|
+
.butex-mobile-command-portal .butex-mobile-command__category:focus-visible,
|
|
10103
|
+
.butex-mobile-command-portal .butex-mobile-sheet__back:focus-visible,
|
|
10104
|
+
.butex-mobile-command-portal .butex-mobile-sheet__close:focus-visible,
|
|
10105
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body button:focus-visible {
|
|
10106
|
+
outline: 2px solid var(--butex-mobile-accent);
|
|
10107
|
+
outline-offset: 2px;
|
|
10108
|
+
}
|
|
10109
|
+
.butex-mobile-command-portal .butex-mobile-command__digits {
|
|
10110
|
+
display: grid; gap: 8px; padding-block-start: 4px;
|
|
10111
|
+
}
|
|
10112
|
+
.butex-mobile-command-portal .butex-widget__sheet-section {
|
|
10113
|
+
display: grid;
|
|
10114
|
+
gap: 10px;
|
|
10115
|
+
min-width: 0;
|
|
10116
|
+
padding-block: 3px 14px;
|
|
10117
|
+
border-block-end: 1px solid var(--butex-mobile-border);
|
|
10118
|
+
}
|
|
10119
|
+
.butex-mobile-command-portal .butex-widget__sheet-section h4 {
|
|
10120
|
+
margin: 0;
|
|
10121
|
+
font-size: 1rem;
|
|
10122
|
+
font-weight: 740;
|
|
10123
|
+
line-height: 1.5;
|
|
10124
|
+
color: var(--butex-mobile-fg);
|
|
10125
|
+
}
|
|
10126
|
+
.butex-mobile-command-portal .butex-widget__sheet-command-grid,
|
|
10127
|
+
.butex-mobile-command-portal .butex-widget__sheet-choice-row,
|
|
10128
|
+
.butex-mobile-command-portal .butex-widget__sheet-command-list {
|
|
10129
|
+
display: grid;
|
|
10130
|
+
gap: 8px;
|
|
10131
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
10132
|
+
min-width: 0;
|
|
10133
|
+
}
|
|
10134
|
+
.butex-mobile-command-portal .butex-widget__sheet-choice-row {
|
|
10135
|
+
grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
|
|
10136
|
+
}
|
|
10137
|
+
.butex-mobile-command-portal .butex-mobile-command__math-glyphs {
|
|
10138
|
+
display: grid;
|
|
10139
|
+
grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
|
|
10140
|
+
gap: 8px;
|
|
10141
|
+
}
|
|
10142
|
+
.butex-mobile-command-portal .butex-mobile-command__math-glyphs button {
|
|
10143
|
+
min-width: 0;
|
|
10144
|
+
min-height: 46px;
|
|
10145
|
+
justify-content: center;
|
|
10146
|
+
overflow-wrap: anywhere;
|
|
10147
|
+
}
|
|
10148
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body > nav > .butex-mobile-command__grid {
|
|
10149
|
+
margin-top: 2px;
|
|
10150
|
+
}
|
|
10151
|
+
.butex-mobile-command-portal .butex-mobile-command__grid--dense > button {
|
|
10152
|
+
min-height: 48px; min-width: 0;
|
|
10153
|
+
text-align: center; overflow-wrap: anywhere;
|
|
10154
|
+
}
|
|
10155
|
+
.butex-mobile-command-portal .butex-widget__sheet-command-grid.butex-mobile-command__grid--dense {
|
|
10156
|
+
grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
|
|
10157
|
+
}
|
|
10158
|
+
.butex-mobile-command-portal .butex-mobile-command__section > .butex-widget__sheet-command-grid {
|
|
10159
|
+
margin-block-start: 0;
|
|
10160
|
+
}
|
|
10161
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body button:not(.butex-mobile-command__action):not(.butex-mobile-command__category) {
|
|
10162
|
+
min-height: 44px;
|
|
10163
|
+
}
|
|
10164
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body .butex-widget__sheet-command-grid,
|
|
10165
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body .butex-widget__sheet-choice-row,
|
|
10166
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body .butex-widget__sheet-command-list {
|
|
10167
|
+
min-width: 0;
|
|
10168
|
+
}
|
|
10169
|
+
@media (max-width: 430px) {
|
|
10170
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel { border-radius: 18px 18px 0 0; }
|
|
10171
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header { padding-inline: 10px; }
|
|
10172
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body { padding-inline: 12px; }
|
|
10173
|
+
}
|
|
10174
|
+
@media (hover: hover) {
|
|
10175
|
+
.butex-mobile-command-portal .butex-mobile-command__action:hover:not(:disabled),
|
|
10176
|
+
.butex-mobile-command-portal .butex-mobile-command__category:hover:not(:disabled),
|
|
10177
|
+
.butex-mobile-command-portal .butex-mobile-command__choice:hover:not(:disabled) {
|
|
10178
|
+
border-color: var(--butex-mobile-accent);
|
|
10179
|
+
background: color-mix(in srgb, var(--butex-mobile-panel) 94%, var(--butex-mobile-accent));
|
|
10180
|
+
}
|
|
10181
|
+
}
|
|
10182
|
+
@media (forced-colors: active) {
|
|
10183
|
+
.butex-mobile-command-portal .butex-mobile-command__action[aria-pressed="true"],
|
|
10184
|
+
.butex-mobile-command-portal .butex-mobile-command__category[aria-pressed="true"] { outline: 2px solid Highlight; }
|
|
10185
|
+
}
|
|
10186
|
+
@media (prefers-reduced-motion: reduce) {
|
|
10187
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel,
|
|
10188
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body,
|
|
10189
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body button { animation: none; transition: none; scroll-behavior: auto; }
|
|
10190
|
+
}
|
|
10191
|
+
`.trim();
|
|
10192
|
+
var STYLE_ID = "butex-mobile-command-ui-css";
|
|
10193
|
+
function injectMobileCommandCss(doc) {
|
|
10194
|
+
if (doc.getElementById(STYLE_ID)) return;
|
|
10195
|
+
const style = doc.createElement("style");
|
|
10196
|
+
style.id = STYLE_ID;
|
|
10197
|
+
style.textContent = MOBILE_COMMAND_CSS;
|
|
10198
|
+
doc.head.appendChild(style);
|
|
10199
|
+
}
|
|
10200
|
+
|
|
10201
|
+
// src/react/mobileCommandUi.tsx
|
|
10202
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10203
|
+
var MOBILE_DIGIT_CHOICES = [
|
|
10204
|
+
{ id: "western", label: "456" },
|
|
10205
|
+
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
10206
|
+
{ id: "persianIndic", label: "\u06F4\u06F5\u06F6" }
|
|
10207
|
+
];
|
|
10208
|
+
var iconPaths = {
|
|
10209
|
+
bold: "M7 4h6a4 4 0 0 1 0 8H7zm0 8h7a4 4 0 0 1 0 8H7z",
|
|
10210
|
+
italic: "M14 4h6M4 20h6M15 4 9 20",
|
|
10211
|
+
underline: "M6 4v7a6 6 0 0 0 12 0V4M4 21h16",
|
|
10212
|
+
heading: "M4 5v14M14 5v14M4 12h10M18 7h3v12",
|
|
10213
|
+
paragraph: "M19 4H9a5 5 0 0 0 0 10h3v6M16 4v16",
|
|
10214
|
+
math: "M18 5H6l6 7-6 7h12",
|
|
10215
|
+
table: "M4 5h16v14H4zM4 10h16M4 15h16M10 5v14",
|
|
10216
|
+
image: "M4 5h16v14H4zM7 15l4-4 3 3 2-2 4 4M9 9h.01",
|
|
10217
|
+
list: "M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01",
|
|
10218
|
+
"ordered-list": "M9 6h11M9 12h11M9 18h11M3 4h2v5M3 15h2l-2 3h2",
|
|
10219
|
+
citation: "M9 5H4v7h5v5H4M20 5h-5v7h5v5h-5",
|
|
10220
|
+
reference: "M5 4h14v16l-7-4-7 4z",
|
|
10221
|
+
book: "M5 4h7v16H5a2 2 0 0 0-2 2V6a2 2 0 0 1 2-2zm7 0h7a2 2 0 0 1 2 2v16a2 2 0 0 0-2-2h-7",
|
|
10222
|
+
collapse: "M5 9l7-6 7 6M5 15l7-6 7 6M4 21h16",
|
|
10223
|
+
expand: "M5 6l7 6 7-6M5 12l7 6 7-6",
|
|
10224
|
+
up: "M12 20V4M5 11l7-7 7 7",
|
|
10225
|
+
down: "M12 4v16M5 13l7 7 7-7",
|
|
10226
|
+
trash: "M4 7h16M9 7V4h6v3M7 7l1 13h8l1-13M10 11v6M14 11v6",
|
|
10227
|
+
structure: "M12 3v6M5 9h14M5 9v5M19 9v5M2 14h6v6H2zM16 14h6v6h-6z",
|
|
10228
|
+
functions: "M4 20c5-4 3-12 8-16M6 10h11M17 9l5 9M22 9l-5 9",
|
|
10229
|
+
operators: "M4 8h8M8 4v8M16 8h6M16 16h6M16 20h6",
|
|
10230
|
+
matrices: "M7 4H4v16h3M17 4h3v16h-3M10 7h.01M14 7h.01M10 12h.01M14 12h.01M10 17h.01M14 17h.01",
|
|
10231
|
+
typography: "M3 6V4h18v2M12 4v16M8 20h8",
|
|
10232
|
+
spacing: "M4 7v10M20 7v10M7 12h10M10 9l-3 3 3 3M14 9l3 3-3 3",
|
|
10233
|
+
digits: "M4 7h4v10M13 7h7v5h-7v5h7",
|
|
10234
|
+
copy: "M8 8h12v13H8zM5 17H4V4h12v1",
|
|
10235
|
+
cut: "M4 6l16 12M20 6 4 18M7 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0M7 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0",
|
|
10236
|
+
paste: "M9 4h6l1 3H8zM7 6H5v15h14V6h-2M9 13h6M9 17h5",
|
|
10237
|
+
chevron: "M9 5l6 7-6 7",
|
|
10238
|
+
back: "M19 12H5M12 5l-7 7 7 7",
|
|
10239
|
+
close: "M5 5l14 14M19 5 5 19",
|
|
10240
|
+
fraction: "M5 12h14M8 4h8M8 20h8",
|
|
10241
|
+
delimiters: "M9 3c-5 4-5 14 0 18M15 3c5 4 5 14 0 18"
|
|
10242
|
+
};
|
|
10243
|
+
function MobileIcon({ name, size = 20 }) {
|
|
10244
|
+
return /* @__PURE__ */ jsx(
|
|
10245
|
+
"svg",
|
|
10246
|
+
{
|
|
10247
|
+
"aria-hidden": "true",
|
|
10248
|
+
focusable: "false",
|
|
10249
|
+
className: "butex-mobile-command__icon",
|
|
10250
|
+
width: size,
|
|
10251
|
+
height: size,
|
|
10252
|
+
viewBox: "0 0 24 24",
|
|
10253
|
+
fill: "none",
|
|
10254
|
+
stroke: "currentColor",
|
|
10255
|
+
strokeWidth: "1.8",
|
|
10256
|
+
strokeLinecap: "round",
|
|
10257
|
+
strokeLinejoin: "round",
|
|
10258
|
+
children: /* @__PURE__ */ jsx("path", { d: iconPaths[name] })
|
|
10259
|
+
}
|
|
10260
|
+
);
|
|
10261
|
+
}
|
|
10262
|
+
function MobileAction({ command }) {
|
|
10263
|
+
return /* @__PURE__ */ jsxs(
|
|
10264
|
+
"button",
|
|
10265
|
+
{
|
|
10266
|
+
type: "button",
|
|
10267
|
+
className: "butex-mobile-command__action" + (command.danger ? " butex-mobile-command__action--danger" : ""),
|
|
10268
|
+
disabled: command.disabled,
|
|
10269
|
+
"aria-label": command.label,
|
|
10270
|
+
"aria-pressed": command.pressed,
|
|
10271
|
+
title: command.hint ?? command.label,
|
|
10272
|
+
onMouseDown: command.preserveSelection ? (event) => event.preventDefault() : void 0,
|
|
10273
|
+
onClick: command.onSelect,
|
|
10274
|
+
children: [
|
|
10275
|
+
/* @__PURE__ */ jsx(MobileIcon, { name: command.icon }),
|
|
10276
|
+
/* @__PURE__ */ jsx("span", { className: "butex-mobile-command__action-label", children: command.label })
|
|
10277
|
+
]
|
|
10278
|
+
}
|
|
10279
|
+
);
|
|
10280
|
+
}
|
|
10281
|
+
function MobileSection({ title, icon, children, id }) {
|
|
10282
|
+
return /* @__PURE__ */ jsxs("section", { className: "butex-mobile-command__section", "aria-label": id ? void 0 : title, "aria-labelledby": id, children: [
|
|
10283
|
+
/* @__PURE__ */ jsxs("h3", { className: "butex-mobile-command__section-title", id, children: [
|
|
10284
|
+
icon ? /* @__PURE__ */ jsx(MobileIcon, { name: icon, size: 18 }) : null,
|
|
10285
|
+
/* @__PURE__ */ jsx("span", { children: title })
|
|
10286
|
+
] }),
|
|
10287
|
+
children
|
|
10288
|
+
] });
|
|
10289
|
+
}
|
|
10290
|
+
function MobileGrid({ children, dense = false, className = "" }) {
|
|
10291
|
+
return /* @__PURE__ */ jsx("div", { className: "butex-mobile-command__grid" + (dense ? " butex-mobile-command__grid--dense" : "") + (className ? " " + className : ""), children });
|
|
10292
|
+
}
|
|
10293
|
+
function MobileCategory({ label, icon, onClick }) {
|
|
10294
|
+
return /* @__PURE__ */ jsxs("button", { type: "button", className: "butex-mobile-command__category", onClick, children: [
|
|
10295
|
+
/* @__PURE__ */ jsx("span", { className: "butex-mobile-command__category-icon", children: /* @__PURE__ */ jsx(MobileIcon, { name: icon }) }),
|
|
10296
|
+
/* @__PURE__ */ jsx("span", { className: "butex-mobile-command__category-label", children: label }),
|
|
10297
|
+
/* @__PURE__ */ jsx(MobileIcon, { name: "chevron", size: 16 })
|
|
10298
|
+
] });
|
|
10299
|
+
}
|
|
10300
|
+
function MobileCommandSheet({
|
|
10301
|
+
scope,
|
|
10302
|
+
sourceRef,
|
|
10303
|
+
dialogRef,
|
|
10304
|
+
titleId,
|
|
10305
|
+
title,
|
|
10306
|
+
closeLabel,
|
|
10307
|
+
onClose,
|
|
10308
|
+
backLabel,
|
|
10309
|
+
onBack,
|
|
10310
|
+
backRef,
|
|
10311
|
+
bodyClassName,
|
|
10312
|
+
children
|
|
10313
|
+
}) {
|
|
10314
|
+
useLayoutEffect2(() => {
|
|
10315
|
+
const doc = sourceRef.current?.ownerDocument ?? document;
|
|
10316
|
+
injectMobileCommandCss(doc);
|
|
10317
|
+
}, [sourceRef]);
|
|
10318
|
+
const stopBackdropClick = (event) => {
|
|
10319
|
+
if (event.currentTarget === event.target) onClose();
|
|
10320
|
+
};
|
|
10321
|
+
return /* @__PURE__ */ jsx(MobileCommandPortal, { sourceRef, scopeClassName: scope, children: /* @__PURE__ */ jsx(
|
|
10322
|
+
"div",
|
|
10323
|
+
{
|
|
10324
|
+
className: scope + "__command-sheet-backdrop butex-mobile-sheet__backdrop",
|
|
10325
|
+
style: mobileCommandBackdropStyle,
|
|
10326
|
+
role: "presentation",
|
|
10327
|
+
onClick: stopBackdropClick,
|
|
10328
|
+
children: /* @__PURE__ */ jsxs(
|
|
10329
|
+
"section",
|
|
10330
|
+
{
|
|
10331
|
+
ref: dialogRef,
|
|
10332
|
+
className: scope + "__command-sheet butex-mobile-sheet__panel",
|
|
10333
|
+
style: mobileCommandSheetStyle,
|
|
10334
|
+
role: "dialog",
|
|
10335
|
+
"aria-modal": "true",
|
|
10336
|
+
"aria-labelledby": titleId,
|
|
10337
|
+
tabIndex: -1,
|
|
10338
|
+
children: [
|
|
10339
|
+
/* @__PURE__ */ jsxs("header", { className: scope + "__command-sheet-header butex-mobile-sheet__header", children: [
|
|
10340
|
+
onBack ? /* @__PURE__ */ jsxs("button", { type: "button", className: "butex-mobile-sheet__back", ref: backRef, onClick: onBack, children: [
|
|
10341
|
+
/* @__PURE__ */ jsx(MobileIcon, { name: "back", size: 18 }),
|
|
10342
|
+
/* @__PURE__ */ jsx("span", { children: backLabel })
|
|
10343
|
+
] }) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "butex-mobile-sheet__header-spacer" }),
|
|
10344
|
+
/* @__PURE__ */ jsx("strong", { id: titleId, children: title }),
|
|
10345
|
+
/* @__PURE__ */ jsx(
|
|
10346
|
+
"button",
|
|
10347
|
+
{
|
|
10348
|
+
type: "button",
|
|
10349
|
+
className: "butex-mobile-sheet__close",
|
|
10350
|
+
"data-dialog-initial-focus": true,
|
|
10351
|
+
"aria-label": closeLabel,
|
|
10352
|
+
title: closeLabel,
|
|
10353
|
+
onClick: onClose,
|
|
10354
|
+
children: /* @__PURE__ */ jsx(MobileIcon, { name: "close", size: 19 })
|
|
10355
|
+
}
|
|
10356
|
+
)
|
|
10357
|
+
] }),
|
|
10358
|
+
/* @__PURE__ */ jsx("div", { className: scope + "__command-sheet-body butex-mobile-sheet__body" + (bodyClassName ? " " + bodyClassName : ""), children })
|
|
10359
|
+
]
|
|
10360
|
+
}
|
|
10361
|
+
)
|
|
10362
|
+
}
|
|
10363
|
+
) });
|
|
10364
|
+
}
|
|
10365
|
+
|
|
10366
|
+
// src/react/EquationMobileToolbar.tsx
|
|
10367
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
10368
|
+
var ACCENT_COMMANDS2 = accentCommandsList();
|
|
10369
|
+
var FUNCTION_COMMANDS = atomicCommandsByCategory("function");
|
|
10370
|
+
var LIMITS_SERIES_COMMANDS = atomicCommandsByCategory("limits_series");
|
|
10371
|
+
var FUNCTION2_COMMANDS = atomicCommandsByCategory("function2");
|
|
10372
|
+
var DERIVATIVE_COMMANDS = atomicCommandsByCategory("derivative");
|
|
10373
|
+
var GROUP_COMMANDS = atomicCommandsByCategory("groups");
|
|
10374
|
+
var SPACING_COMMANDS = atomicCommandsByCategory("spacing").filter(isSpacingCommandSpec);
|
|
10375
|
+
var OPERATOR_GROUPS = [
|
|
10376
|
+
atomicOperatorCommandsByCategory("operators1"),
|
|
10377
|
+
atomicOperatorCommandsByCategory("operators2"),
|
|
10378
|
+
atomicOperatorCommandsByCategory("operators3"),
|
|
10379
|
+
atomicOperatorCommandsByCategory("dots"),
|
|
10380
|
+
atomicOperatorCommandsByCategory("integrals")
|
|
10381
|
+
];
|
|
10382
|
+
var MATRIX_STYLES = [
|
|
10383
|
+
{ id: "matrix", label: "\u25A1" },
|
|
10384
|
+
{ id: "pmatrix", label: "(\u25A1)" },
|
|
10385
|
+
{ id: "bmatrix", label: "[\u25A1]" },
|
|
10386
|
+
{ id: "Bmatrix", label: "{\u25A1}" },
|
|
10387
|
+
{ id: "vmatrix", label: "|\u25A1|" },
|
|
10388
|
+
{ id: "Vmatrix", label: "||\u25A1||" }
|
|
10389
|
+
];
|
|
10390
|
+
var MATRIX_PRESETS = [
|
|
10391
|
+
{ rows: 2, columns: 2 },
|
|
10392
|
+
{ rows: 2, columns: 3 },
|
|
10393
|
+
{ rows: 3, columns: 2 },
|
|
10394
|
+
{ rows: 3, columns: 3 }
|
|
10395
|
+
];
|
|
10396
|
+
var ARRAY_ALIGNMENTS = ["l", "c", "r"];
|
|
10397
|
+
function clampMatrixSize(value) {
|
|
10398
|
+
return Math.max(1, Math.min(12, Math.trunc(value)));
|
|
10399
|
+
}
|
|
10400
|
+
function matrixSizeLabel(rows, columns, messages) {
|
|
10401
|
+
const rowLabel = rows === 1 ? messages.row : messages.rows;
|
|
10402
|
+
const columnLabel = columns === 1 ? messages.column : messages.columns;
|
|
10403
|
+
return `${String(rows)} ${rowLabel} \xD7 ${String(columns)} ${columnLabel}`;
|
|
10404
|
+
}
|
|
10405
|
+
function matrixStyleTitle(style, messages) {
|
|
10406
|
+
if (style === "pmatrix") return messages.matrixParentheses;
|
|
10407
|
+
if (style === "bmatrix") return messages.matrixBrackets;
|
|
10408
|
+
if (style === "Bmatrix") return messages.matrixBraces;
|
|
10409
|
+
if (style === "vmatrix") return messages.matrixBars;
|
|
10410
|
+
if (style === "Vmatrix") return messages.matrixDoubleBars;
|
|
10411
|
+
return messages.matrixNoDelimiters;
|
|
10412
|
+
}
|
|
10413
|
+
function alignmentLabel(alignment, messages) {
|
|
10414
|
+
if (alignment === "l") return messages.alignLeft;
|
|
10415
|
+
if (alignment === "r") return messages.alignRight;
|
|
10416
|
+
return messages.alignCenter;
|
|
10417
|
+
}
|
|
10418
|
+
function alignmentTitle(alignment, messages) {
|
|
10419
|
+
if (alignment === "l") return messages.alignColumnLeft;
|
|
10420
|
+
if (alignment === "r") return messages.alignColumnRight;
|
|
10421
|
+
return messages.alignColumnCenter;
|
|
10422
|
+
}
|
|
10423
|
+
function boldCharacterStyleLabel(uiLocale) {
|
|
10424
|
+
return uiLocale === "ar" ? "\u0639\u0631\u064A\u0636" : "Bold";
|
|
10425
|
+
}
|
|
10426
|
+
function characterFontTitle(fontId, messages) {
|
|
10427
|
+
const key = characterFontSpec(fontId).titleKey;
|
|
10428
|
+
return messages[key] ?? messages.defaultFont;
|
|
10429
|
+
}
|
|
10430
|
+
function digitTitle(digitForm, messages) {
|
|
10431
|
+
if (digitForm === "arabicIndic") return messages.arabicIndicDigits;
|
|
10432
|
+
if (digitForm === "persianIndic") return messages.persianIndicDigits;
|
|
10433
|
+
return messages.westernDigits;
|
|
10434
|
+
}
|
|
10435
|
+
function spacingArrow(command, side) {
|
|
10436
|
+
const pointsWithFlow = command.spacing.direction === "positive";
|
|
10437
|
+
if (pointsWithFlow) {
|
|
10438
|
+
return side === "arabic" ? "\u2190" : "\u2192";
|
|
10439
|
+
}
|
|
10440
|
+
return side === "arabic" ? "\u2192" : "\u2190";
|
|
10441
|
+
}
|
|
10442
|
+
function functionLabel(command) {
|
|
10443
|
+
if (command.id !== "ln") {
|
|
10444
|
+
return command.arabicLabel;
|
|
10445
|
+
}
|
|
10446
|
+
return /* @__PURE__ */ jsxs2("span", { className: "function-command-label-with-sub", "aria-hidden": "true", children: [
|
|
10447
|
+
/* @__PURE__ */ jsx2("span", { className: "function-command-label-with-sub__base", children: command.arabicLabel }),
|
|
10448
|
+
/* @__PURE__ */ jsx2("span", { className: "function-command-label-with-sub__sub", children: "\u0647\u0640" })
|
|
10449
|
+
] });
|
|
10450
|
+
}
|
|
10451
|
+
function operatorLabel(command) {
|
|
10452
|
+
const label = command.svg_path ? /* @__PURE__ */ jsx2(
|
|
10453
|
+
"span",
|
|
9906
10454
|
{
|
|
9907
10455
|
className: "operator-command-svg-label",
|
|
9908
10456
|
"aria-hidden": "true",
|
|
@@ -9912,7 +10460,7 @@ function operatorLabel(command) {
|
|
|
9912
10460
|
}
|
|
9913
10461
|
}
|
|
9914
10462
|
) : command.Label;
|
|
9915
|
-
return /* @__PURE__ */
|
|
10463
|
+
return /* @__PURE__ */ jsx2("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: label });
|
|
9916
10464
|
}
|
|
9917
10465
|
function categoryTitle(view, messages) {
|
|
9918
10466
|
if (view === "delimiters") return messages.insertDelimiters;
|
|
@@ -9933,12 +10481,12 @@ function EquationMobileToolbar({
|
|
|
9933
10481
|
inputRef,
|
|
9934
10482
|
getRuntime
|
|
9935
10483
|
}) {
|
|
9936
|
-
const [sheetView, setSheetView] =
|
|
9937
|
-
const [envMode, setEnvMode] =
|
|
9938
|
-
const [matrixStyle, setMatrixStyle] =
|
|
9939
|
-
const [matrixRows, setMatrixRows] =
|
|
9940
|
-
const [matrixColumns, setMatrixColumns] =
|
|
9941
|
-
const [alignmentColumn, setAlignmentColumn] =
|
|
10484
|
+
const [sheetView, setSheetView] = useState2("closed");
|
|
10485
|
+
const [envMode, setEnvMode] = useState2("matrix");
|
|
10486
|
+
const [matrixStyle, setMatrixStyle] = useState2("pmatrix");
|
|
10487
|
+
const [matrixRows, setMatrixRows] = useState2(2);
|
|
10488
|
+
const [matrixColumns, setMatrixColumns] = useState2(2);
|
|
10489
|
+
const [alignmentColumn, setAlignmentColumn] = useState2(1);
|
|
9942
10490
|
const dialogRef = useRef2(null);
|
|
9943
10491
|
const moreButtonRef = useRef2(null);
|
|
9944
10492
|
const delimiterButtonRef = useRef2(null);
|
|
@@ -10007,413 +10555,321 @@ function EquationMobileToolbar({
|
|
|
10007
10555
|
const directButtonMouseDown = (event) => event.preventDefault();
|
|
10008
10556
|
const undoArrow = state.activeSide === "arabic" ? "\u21B7" : "\u21B6";
|
|
10009
10557
|
const redoArrow = state.activeSide === "arabic" ? "\u21B6" : "\u21B7";
|
|
10010
|
-
const
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
command
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10558
|
+
const categoryIcons = {
|
|
10559
|
+
structures: "structure",
|
|
10560
|
+
functions: "functions",
|
|
10561
|
+
operators: "operators",
|
|
10562
|
+
matrices: "matrices",
|
|
10563
|
+
typography: "typography",
|
|
10564
|
+
spacing: "spacing",
|
|
10565
|
+
digits: "digits"
|
|
10566
|
+
};
|
|
10567
|
+
const renderFunctionGroup = (label, commands, limits = false, outline = false) => /* @__PURE__ */ jsx2(MobileSection, { title: label, icon: "functions", children: /* @__PURE__ */ jsx2(MobileGrid, { dense: true, className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: commands.map((command) => /* @__PURE__ */ jsx2(
|
|
10568
|
+
"button",
|
|
10569
|
+
{
|
|
10570
|
+
className: `function-command-option${outline ? " function-command-option--outline" : ""}`,
|
|
10571
|
+
type: "button",
|
|
10572
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
10573
|
+
"aria-label": atomicCommandTitle(command, uiLocale),
|
|
10574
|
+
onClick: () => runAndClose((runtime) => {
|
|
10575
|
+
if (limits) runtime.insertLimitsSeriesTemplate(command.id);
|
|
10576
|
+
else runtime.insertAtomicCommand(command.id);
|
|
10577
|
+
}),
|
|
10578
|
+
children: functionLabel(command)
|
|
10579
|
+
},
|
|
10580
|
+
command.id
|
|
10581
|
+
)) }) });
|
|
10582
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
10583
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__mobile-toolbar", role: "toolbar", "aria-label": messages.compactToolbar, children: [
|
|
10584
|
+
/* @__PURE__ */ jsx2("button", { type: "button", disabled: !state.canUndo, title: messages.undo, "aria-label": messages.undo, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.performUndo(), children: undoArrow }),
|
|
10585
|
+
/* @__PURE__ */ jsx2("button", { type: "button", disabled: !state.canRedo, title: messages.redo, "aria-label": messages.redo, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.performRedo(), children: redoArrow }),
|
|
10586
|
+
/* @__PURE__ */ jsx2("button", { type: "button", title: messages.insertFraction, "aria-label": messages.insertFraction, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.insertFraction(), children: /* @__PURE__ */ jsxs2("span", { className: "toolbar-frac-icon", "aria-hidden": "true", children: [
|
|
10587
|
+
/* @__PURE__ */ jsx2("span", { children: "\u0623" }),
|
|
10588
|
+
/* @__PURE__ */ jsx2("span", { children: "\u0628" })
|
|
10035
10589
|
] }) }),
|
|
10036
|
-
/* @__PURE__ */
|
|
10037
|
-
/* @__PURE__ */
|
|
10038
|
-
/* @__PURE__ */
|
|
10590
|
+
/* @__PURE__ */ jsx2("button", { type: "button", title: messages.addSuperscript, "aria-label": messages.addSuperscript, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.addSup(), children: /* @__PURE__ */ jsxs2("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
|
|
10591
|
+
/* @__PURE__ */ jsx2("span", { children: "\u0646" }),
|
|
10592
|
+
/* @__PURE__ */ jsx2("span", { children: "\u0633" })
|
|
10039
10593
|
] }) }),
|
|
10040
|
-
/* @__PURE__ */
|
|
10041
|
-
/* @__PURE__ */
|
|
10042
|
-
/* @__PURE__ */
|
|
10594
|
+
/* @__PURE__ */ jsx2("button", { type: "button", title: messages.addSubscript, "aria-label": messages.addSubscript, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.addSub(), children: /* @__PURE__ */ jsxs2("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
|
|
10595
|
+
/* @__PURE__ */ jsx2("span", { children: "\u0646" }),
|
|
10596
|
+
/* @__PURE__ */ jsx2("span", { children: "\u0633" })
|
|
10043
10597
|
] }) }),
|
|
10044
|
-
/* @__PURE__ */
|
|
10045
|
-
/* @__PURE__ */
|
|
10046
|
-
/* @__PURE__ */
|
|
10598
|
+
/* @__PURE__ */ jsx2("button", { ref: delimiterButtonRef, type: "button", title: messages.insertDelimiters, "aria-label": messages.insertDelimiters, "aria-haspopup": "dialog", "aria-expanded": sheetView === "delimiters", onClick: openDelimiters, children: "()" }),
|
|
10599
|
+
/* @__PURE__ */ jsx2("button", { className: "butex-widget__mobile-danger", type: "button", title: messages.deleteSelectedStructure, "aria-label": messages.deleteSelectedStructure, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.deleteStructure(), children: "\xD7" }),
|
|
10600
|
+
/* @__PURE__ */ jsx2("button", { ref: moreButtonRef, type: "button", title: messages.moreActions, "aria-label": messages.moreActions, "aria-haspopup": "dialog", "aria-expanded": sheetOpen && sheetView !== "delimiters", onClick: openMore, children: "\u22EF" })
|
|
10047
10601
|
] }),
|
|
10048
|
-
sheetOpen ? /* @__PURE__ */
|
|
10049
|
-
|
|
10602
|
+
sheetOpen ? /* @__PURE__ */ jsxs2(
|
|
10603
|
+
MobileCommandSheet,
|
|
10050
10604
|
{
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
"
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
/* @__PURE__ */ jsxs("section", { className: "butex-widget__sheet-section", children: [
|
|
10255
|
-
/* @__PURE__ */ jsx("h4", { children: messages.chooseWritingFont }),
|
|
10256
|
-
/* @__PURE__ */ jsxs("div", { className: "butex-widget__sheet-choice-row", children: [
|
|
10257
|
-
/* @__PURE__ */ jsx(
|
|
10258
|
-
"button",
|
|
10259
|
-
{
|
|
10260
|
-
type: "button",
|
|
10261
|
-
className: "character-font-option--bold",
|
|
10262
|
-
"aria-pressed": state.boldCharacterStyle,
|
|
10263
|
-
title: boldCharacterStyleLabel(uiLocale),
|
|
10264
|
-
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentBoldCharacterStyle()),
|
|
10265
|
-
children: boldCharacterStyleLabel(uiLocale)
|
|
10266
|
-
}
|
|
10267
|
-
),
|
|
10268
|
-
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ jsx(
|
|
10269
|
-
"button",
|
|
10270
|
-
{
|
|
10271
|
-
type: "button",
|
|
10272
|
-
className: `character-font-option--${option.id}`,
|
|
10273
|
-
"aria-pressed": !state.boldCharacterStyle && state.characterFont === option.id,
|
|
10274
|
-
title: characterFontTitle(option.id, messages),
|
|
10275
|
-
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentCharacterFont(option.id)),
|
|
10276
|
-
children: option.label
|
|
10277
|
-
},
|
|
10278
|
-
option.id
|
|
10279
|
-
))
|
|
10280
|
-
] })
|
|
10281
|
-
] }),
|
|
10282
|
-
/* @__PURE__ */ jsx(
|
|
10283
|
-
"button",
|
|
10284
|
-
{
|
|
10285
|
-
className: "ligature-btn butex-widget__compact-ligature",
|
|
10286
|
-
type: "button",
|
|
10287
|
-
title: !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10288
|
-
"aria-label": !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10289
|
-
"aria-pressed": !state.splitLeafTyping,
|
|
10290
|
-
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSplitLeafTyping()),
|
|
10291
|
-
children: !state.splitLeafTyping ? "\u0633\u0635\u0639" : "\u0633 \u0635 \u0639"
|
|
10292
|
-
}
|
|
10293
|
-
)
|
|
10294
|
-
] }) : null,
|
|
10295
|
-
sheetView === "spacing" ? /* @__PURE__ */ jsx("div", { className: "butex-widget__sheet-command-list", children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ jsx("button", { type: "button", title: atomicCommandTitle(command, uiLocale), "aria-label": atomicCommandTitle(command, uiLocale), onClick: () => runAndClose((runtime) => runtime.insertAtomicCommand(command.id)), children: /* @__PURE__ */ jsxs(
|
|
10296
|
-
"span",
|
|
10605
|
+
scope: "butex-widget",
|
|
10606
|
+
sourceRef: moreButtonRef,
|
|
10607
|
+
dialogRef,
|
|
10608
|
+
titleId: sheetTitleId,
|
|
10609
|
+
title: categoryTitle(sheetView, messages),
|
|
10610
|
+
closeLabel: messages.closeActions,
|
|
10611
|
+
onClose: dismissSheet,
|
|
10612
|
+
backRef: backButtonRef,
|
|
10613
|
+
backLabel: messages.back,
|
|
10614
|
+
onBack: sheetView !== "root" && sheetView !== "delimiters" ? () => setSheetView("root") : void 0,
|
|
10615
|
+
children: [
|
|
10616
|
+
sheetView === "root" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
10617
|
+
showSideSwitcher ? /* @__PURE__ */ jsx2(MobileSection, { title: messages.activeSide, icon: "typography", children: /* @__PURE__ */ jsxs2("div", { className: "butex-mobile-command__choice-row", children: [
|
|
10618
|
+
/* @__PURE__ */ jsx2(
|
|
10619
|
+
"button",
|
|
10620
|
+
{
|
|
10621
|
+
type: "button",
|
|
10622
|
+
className: "butex-mobile-command__choice",
|
|
10623
|
+
"aria-pressed": state.activeSide === "arabic",
|
|
10624
|
+
onClick: (event) => {
|
|
10625
|
+
if (state.activeSide !== "arabic") runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSide());
|
|
10626
|
+
},
|
|
10627
|
+
children: messages.arabicSide
|
|
10628
|
+
}
|
|
10629
|
+
),
|
|
10630
|
+
/* @__PURE__ */ jsx2(
|
|
10631
|
+
"button",
|
|
10632
|
+
{
|
|
10633
|
+
type: "button",
|
|
10634
|
+
className: "butex-mobile-command__choice",
|
|
10635
|
+
"aria-pressed": state.activeSide === "english",
|
|
10636
|
+
onClick: (event) => {
|
|
10637
|
+
if (state.activeSide !== "english") runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSide());
|
|
10638
|
+
},
|
|
10639
|
+
children: messages.englishSide
|
|
10640
|
+
}
|
|
10641
|
+
)
|
|
10642
|
+
] }) }) : null,
|
|
10643
|
+
/* @__PURE__ */ jsx2(MobileSection, { title: messages.clipboard, icon: "copy", children: /* @__PURE__ */ jsxs2(MobileGrid, { children: [
|
|
10644
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: {
|
|
10645
|
+
id: "copy",
|
|
10646
|
+
label: messages.copy,
|
|
10647
|
+
icon: "copy",
|
|
10648
|
+
disabled: !state.hasSelection,
|
|
10649
|
+
onSelect: () => runAndClose((runtime) => {
|
|
10650
|
+
void runtime.performCopy();
|
|
10651
|
+
})
|
|
10652
|
+
} }),
|
|
10653
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: {
|
|
10654
|
+
id: "cut",
|
|
10655
|
+
label: messages.cut,
|
|
10656
|
+
icon: "cut",
|
|
10657
|
+
disabled: !state.hasSelection,
|
|
10658
|
+
onSelect: () => runAndClose((runtime) => {
|
|
10659
|
+
void runtime.performCut();
|
|
10660
|
+
})
|
|
10661
|
+
} }),
|
|
10662
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: {
|
|
10663
|
+
id: "paste",
|
|
10664
|
+
label: messages.paste,
|
|
10665
|
+
icon: "paste",
|
|
10666
|
+
onSelect: () => runAndClose((runtime) => {
|
|
10667
|
+
void runtime.performPaste();
|
|
10668
|
+
})
|
|
10669
|
+
} })
|
|
10670
|
+
] }) }),
|
|
10671
|
+
/* @__PURE__ */ jsx2("nav", { "aria-label": messages.commandCategories, children: /* @__PURE__ */ jsx2(MobileGrid, { children: ["structures", "functions", "operators", "matrices", "typography", "spacing", "digits"].map((view) => /* @__PURE__ */ jsx2(
|
|
10672
|
+
MobileCategory,
|
|
10673
|
+
{
|
|
10674
|
+
label: categoryTitle(view, messages),
|
|
10675
|
+
icon: categoryIcons[view],
|
|
10676
|
+
onClick: () => setSheetView(view)
|
|
10677
|
+
},
|
|
10678
|
+
view
|
|
10679
|
+
)) }) })
|
|
10680
|
+
] }) : null,
|
|
10681
|
+
sheetView === "delimiters" ? /* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-command-grid butex-widget__sheet-command-grid--three butex-mobile-command__math-glyphs", children: [
|
|
10682
|
+
{ kind: "paren", label: "()", title: messages.insertParentheses },
|
|
10683
|
+
{ kind: "bracket", label: "[]", title: messages.insertBrackets },
|
|
10684
|
+
{ kind: "brace", label: "{}", title: messages.insertBraces },
|
|
10685
|
+
{ kind: "vert", label: "| |", title: "| |" },
|
|
10686
|
+
{ kind: "Vert", label: "\u2016 \u2016", title: "\u2016 \u2016" }
|
|
10687
|
+
].map((option) => /* @__PURE__ */ jsx2("button", { type: "button", "aria-label": option.title, title: option.title, onClick: () => runAndClose((runtime) => runtime.insertDelimiterByKind(option.kind)), children: option.label }, option.kind)) }) : null,
|
|
10688
|
+
sheetView === "structures" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
10689
|
+
/* @__PURE__ */ jsxs2(MobileGrid, { children: [
|
|
10690
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: { id: "sqrt", label: messages.insertRoot, icon: "math", onSelect: () => runAndClose((runtime) => runtime.insertSqrt()) } }),
|
|
10691
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: { id: "over", label: messages.insertOverset, icon: "structure", onSelect: () => runAndClose((runtime) => runtime.insertOverset()) } }),
|
|
10692
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: { id: "under", label: messages.insertUnderset, icon: "structure", onSelect: () => runAndClose((runtime) => runtime.insertUnderset()) } }),
|
|
10693
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: { id: "pair", label: messages.insertAccentPair, icon: "structure", onSelect: () => runAndClose((runtime) => runtime.insertAccentPair()) } }),
|
|
10694
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: { id: "removeSup", label: messages.removeSuperscript, icon: "trash", onSelect: () => runAndClose((runtime) => runtime.removeSup()) } }),
|
|
10695
|
+
/* @__PURE__ */ jsx2(MobileAction, { command: { id: "removeSub", label: messages.removeSubscript, icon: "trash", onSelect: () => runAndClose((runtime) => runtime.removeSub()) } })
|
|
10696
|
+
] }),
|
|
10697
|
+
/* @__PURE__ */ jsxs2("section", { className: "butex-widget__sheet-section", children: [
|
|
10698
|
+
/* @__PURE__ */ jsx2("h4", { children: messages.insertAccents }),
|
|
10699
|
+
/* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: ACCENT_COMMANDS2.map((command) => /* @__PURE__ */ jsx2("button", { className: "operator-command-option", type: "button", title: accentCommandTitle(command, uiLocale), "aria-label": accentCommandTitle(command, uiLocale), onClick: () => runAndClose((runtime) => runtime.insertAccent(command.id)), children: /* @__PURE__ */ jsx2("span", { className: "operator-command-label", "aria-hidden": "true", children: command.label }) }, command.id)) })
|
|
10700
|
+
] })
|
|
10701
|
+
] }) : null,
|
|
10702
|
+
sheetView === "functions" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
10703
|
+
renderFunctionGroup(messages.insertFunction, FUNCTION_COMMANDS),
|
|
10704
|
+
renderFunctionGroup(messages.insertLimitsSeries, LIMITS_SERIES_COMMANDS, true),
|
|
10705
|
+
renderFunctionGroup(messages.insertAdditionalFunctions, FUNCTION2_COMMANDS),
|
|
10706
|
+
renderFunctionGroup(messages.insertDerivative, DERIVATIVE_COMMANDS),
|
|
10707
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: [
|
|
10708
|
+
/* @__PURE__ */ jsx2("button", { className: "function-command-option", type: "button", title: messages.insertFirstDerivative, "aria-label": messages.insertFirstDerivative, onClick: () => runAndClose((runtime) => runtime.insertFirstDerivative()), children: "\u0621/\u0633" }),
|
|
10709
|
+
/* @__PURE__ */ jsx2("button", { className: "function-command-option", type: "button", title: messages.insertSecondDerivative, "aria-label": messages.insertSecondDerivative, onClick: () => runAndClose((runtime) => runtime.insertSecondDerivative()), children: "\u0621\xB2/\u0633\xB2" })
|
|
10710
|
+
] }),
|
|
10711
|
+
renderFunctionGroup(messages.insertNumberSets, GROUP_COMMANDS, false, true)
|
|
10712
|
+
] }) : null,
|
|
10713
|
+
sheetView === "operators" ? OPERATOR_GROUPS.map((commands, index) => /* @__PURE__ */ jsx2("section", { className: "butex-widget__sheet-section", children: /* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: commands.map((command) => /* @__PURE__ */ jsx2("button", { className: "operator-command-option", type: "button", title: atomicOperatorCommandTitle(command, uiLocale), "aria-label": atomicOperatorCommandTitle(command, uiLocale), onClick: () => runAndClose((runtime) => runtime.insertAtomicOperatorCommand(command.id)), children: operatorLabel(command) }, command.id)) }) }, String(index))) : null,
|
|
10714
|
+
sheetView === "matrices" ? /* @__PURE__ */ jsxs2("div", { className: "butex-widget__mobile-matrix-picker", children: [
|
|
10715
|
+
/* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-choice-row", role: "group", "aria-label": messages.environmentType, children: [
|
|
10716
|
+
{ id: "matrix", label: messages.matrix },
|
|
10717
|
+
{ id: "array", label: messages.array },
|
|
10718
|
+
{ id: "aligned", label: messages.aligned },
|
|
10719
|
+
{ id: "cases", label: messages.piecewise }
|
|
10720
|
+
].map((option) => /* @__PURE__ */ jsx2(
|
|
10721
|
+
"button",
|
|
10722
|
+
{
|
|
10723
|
+
type: "button",
|
|
10724
|
+
"aria-pressed": envMode === option.id,
|
|
10725
|
+
onClick: () => {
|
|
10726
|
+
setEnvMode(option.id);
|
|
10727
|
+
if (option.id === "aligned" || option.id === "cases") setMatrixColumns(2);
|
|
10728
|
+
},
|
|
10729
|
+
children: option.label
|
|
10730
|
+
},
|
|
10731
|
+
option.id
|
|
10732
|
+
)) }),
|
|
10733
|
+
envMode === "matrix" ? /* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-choice-row", role: "group", "aria-label": messages.matrixType, children: MATRIX_STYLES.map((style) => /* @__PURE__ */ jsx2("button", { type: "button", title: matrixStyleTitle(style.id, messages), "aria-label": matrixStyleTitle(style.id, messages), "aria-pressed": matrixStyle === style.id, onClick: () => setMatrixStyle(style.id), children: style.label }, style.id)) }) : null,
|
|
10734
|
+
/* @__PURE__ */ jsxs2("section", { className: "butex-widget__sheet-section", children: [
|
|
10735
|
+
/* @__PURE__ */ jsx2("h4", { children: messages.commonMatrixSizes }),
|
|
10736
|
+
/* @__PURE__ */ jsx2("div", { className: "butex-widget__matrix-presets", children: (envMode === "aligned" || envMode === "cases" ? MATRIX_PRESETS.filter((preset) => preset.columns === 2) : MATRIX_PRESETS).map((preset) => /* @__PURE__ */ jsxs2(
|
|
10737
|
+
"button",
|
|
10738
|
+
{
|
|
10739
|
+
type: "button",
|
|
10740
|
+
"aria-pressed": matrixRows === preset.rows && matrixColumns === preset.columns,
|
|
10741
|
+
onClick: () => {
|
|
10742
|
+
setMatrixRows(preset.rows);
|
|
10743
|
+
setMatrixColumns(envMode === "aligned" || envMode === "cases" ? 2 : preset.columns);
|
|
10744
|
+
},
|
|
10745
|
+
children: [
|
|
10746
|
+
preset.rows,
|
|
10747
|
+
"\xD7",
|
|
10748
|
+
envMode === "aligned" || envMode === "cases" ? 2 : preset.columns
|
|
10749
|
+
]
|
|
10750
|
+
},
|
|
10751
|
+
`${String(preset.rows)}-${String(preset.columns)}`
|
|
10752
|
+
)) })
|
|
10753
|
+
] }),
|
|
10754
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__matrix-stepper-row", children: [
|
|
10755
|
+
/* @__PURE__ */ jsx2("span", { children: messages.rows }),
|
|
10756
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__matrix-stepper", children: [
|
|
10757
|
+
/* @__PURE__ */ jsx2("button", { type: "button", disabled: matrixRows <= 1, "aria-label": messages.decreaseRows, onClick: () => setMatrixDimension("rows", matrixRows - 1), children: "\u2212" }),
|
|
10758
|
+
/* @__PURE__ */ jsx2("output", { "aria-live": "polite", children: matrixRows }),
|
|
10759
|
+
/* @__PURE__ */ jsx2("button", { type: "button", disabled: matrixRows >= 12, "aria-label": messages.increaseRows, onClick: () => setMatrixDimension("rows", matrixRows + 1), children: "+" })
|
|
10760
|
+
] })
|
|
10761
|
+
] }),
|
|
10762
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__matrix-stepper-row", children: [
|
|
10763
|
+
/* @__PURE__ */ jsx2("span", { children: messages.columns }),
|
|
10764
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__matrix-stepper", children: [
|
|
10765
|
+
/* @__PURE__ */ jsx2("button", { type: "button", disabled: matrixColumns <= 1 || envMode === "aligned" || envMode === "cases", "aria-label": messages.decreaseColumns, onClick: () => setMatrixDimension("columns", matrixColumns - 1), children: "\u2212" }),
|
|
10766
|
+
/* @__PURE__ */ jsx2("output", { "aria-live": "polite", children: envMode === "aligned" || envMode === "cases" ? 2 : matrixColumns }),
|
|
10767
|
+
/* @__PURE__ */ jsx2("button", { type: "button", disabled: matrixColumns >= 12 || envMode === "aligned" || envMode === "cases", "aria-label": messages.increaseColumns, onClick: () => setMatrixDimension("columns", matrixColumns + 1), children: "+" })
|
|
10768
|
+
] })
|
|
10769
|
+
] }),
|
|
10770
|
+
/* @__PURE__ */ jsx2("p", { className: "butex-widget__matrix-size-summary", "aria-live": "polite", children: matrixSizeLabel(matrixRows, envMode === "aligned" || envMode === "cases" ? 2 : matrixColumns, messages) }),
|
|
10771
|
+
/* @__PURE__ */ jsx2("button", { type: "button", className: "butex-widget__matrix-insert", onClick: insertEnvironment, children: messages.insert }),
|
|
10772
|
+
/* @__PURE__ */ jsxs2("section", { className: "butex-widget__sheet-section", children: [
|
|
10773
|
+
/* @__PURE__ */ jsx2("h4", { children: messages.editSelectedEnvironment }),
|
|
10774
|
+
envMode === "matrix" ? /* @__PURE__ */ jsx2("button", { type: "button", onClick: () => getRuntime()?.setMatrixEnvStyle(matrixStyle), children: messages.applyStyle }) : null,
|
|
10775
|
+
envMode === "array" ? /* @__PURE__ */ jsxs2("div", { className: "butex-widget__matrix-alignment", children: [
|
|
10776
|
+
/* @__PURE__ */ jsxs2("label", { children: [
|
|
10777
|
+
messages.column,
|
|
10778
|
+
/* @__PURE__ */ jsx2("input", { type: "number", min: 1, max: 12, value: alignmentColumn, onChange: (event) => setAlignmentColumn(clampMatrixSize(Number(event.currentTarget.value) || 1)) })
|
|
10779
|
+
] }),
|
|
10780
|
+
ARRAY_ALIGNMENTS.map((alignment) => /* @__PURE__ */ jsx2("button", { type: "button", title: alignmentTitle(alignment, messages), onClick: () => getRuntime()?.setArrayColumnAlignment(alignmentColumn - 1, alignment), children: alignmentLabel(alignment, messages) }, alignment))
|
|
10781
|
+
] }) : null,
|
|
10782
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: [
|
|
10783
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", onClick: () => getRuntime()?.addMatrixRow(), children: [
|
|
10784
|
+
"+",
|
|
10785
|
+
messages.row
|
|
10786
|
+
] }),
|
|
10787
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", onClick: () => getRuntime()?.removeMatrixRow(), children: [
|
|
10788
|
+
"\u2212",
|
|
10789
|
+
messages.row
|
|
10790
|
+
] }),
|
|
10791
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", disabled: envMode === "cases", onClick: () => getRuntime()?.addMatrixColumn(), children: [
|
|
10792
|
+
"+",
|
|
10793
|
+
messages.column
|
|
10794
|
+
] }),
|
|
10795
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", disabled: envMode === "cases", onClick: () => getRuntime()?.removeMatrixColumn(), children: [
|
|
10796
|
+
"\u2212",
|
|
10797
|
+
messages.column
|
|
10798
|
+
] })
|
|
10799
|
+
] })
|
|
10800
|
+
] })
|
|
10801
|
+
] }) : null,
|
|
10802
|
+
sheetView === "typography" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
10803
|
+
/* @__PURE__ */ jsxs2("section", { className: "butex-widget__sheet-section", children: [
|
|
10804
|
+
/* @__PURE__ */ jsx2("h4", { children: messages.chooseWritingFont }),
|
|
10805
|
+
/* @__PURE__ */ jsxs2("div", { className: "butex-widget__sheet-choice-row", children: [
|
|
10806
|
+
/* @__PURE__ */ jsx2(
|
|
10807
|
+
"button",
|
|
10297
10808
|
{
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
]
|
|
10809
|
+
type: "button",
|
|
10810
|
+
className: "character-font-option--bold",
|
|
10811
|
+
"aria-pressed": state.boldCharacterStyle,
|
|
10812
|
+
title: boldCharacterStyleLabel(uiLocale),
|
|
10813
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentBoldCharacterStyle()),
|
|
10814
|
+
children: boldCharacterStyleLabel(uiLocale)
|
|
10305
10815
|
}
|
|
10306
|
-
)
|
|
10307
|
-
|
|
10308
|
-
{ id: "western", label: "456" },
|
|
10309
|
-
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
10310
|
-
{ id: "persianIndic", label: "\u06F4\u06F5\u06F6" }
|
|
10311
|
-
].map((option) => /* @__PURE__ */ jsx(
|
|
10816
|
+
),
|
|
10817
|
+
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ jsx2(
|
|
10312
10818
|
"button",
|
|
10313
10819
|
{
|
|
10314
10820
|
type: "button",
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10821
|
+
className: `character-font-option--${option.id}`,
|
|
10822
|
+
"aria-pressed": !state.boldCharacterStyle && state.characterFont === option.id,
|
|
10823
|
+
title: characterFontTitle(option.id, messages),
|
|
10824
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentCharacterFont(option.id)),
|
|
10318
10825
|
children: option.label
|
|
10319
10826
|
},
|
|
10320
10827
|
option.id
|
|
10321
|
-
))
|
|
10828
|
+
))
|
|
10322
10829
|
] })
|
|
10323
|
-
]
|
|
10324
|
-
|
|
10325
|
-
|
|
10830
|
+
] }),
|
|
10831
|
+
/* @__PURE__ */ jsx2(
|
|
10832
|
+
"button",
|
|
10833
|
+
{
|
|
10834
|
+
className: "ligature-btn butex-widget__compact-ligature",
|
|
10835
|
+
type: "button",
|
|
10836
|
+
title: !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10837
|
+
"aria-label": !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10838
|
+
"aria-pressed": !state.splitLeafTyping,
|
|
10839
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSplitLeafTyping()),
|
|
10840
|
+
children: !state.splitLeafTyping ? "\u0633\u0635\u0639" : "\u0633 \u0635 \u0639"
|
|
10841
|
+
}
|
|
10842
|
+
)
|
|
10843
|
+
] }) : null,
|
|
10844
|
+
sheetView === "spacing" ? /* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-command-list", children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ jsx2("button", { type: "button", title: atomicCommandTitle(command, uiLocale), "aria-label": atomicCommandTitle(command, uiLocale), onClick: () => runAndClose((runtime) => runtime.insertAtomicCommand(command.id)), children: /* @__PURE__ */ jsxs2(
|
|
10845
|
+
"span",
|
|
10846
|
+
{
|
|
10847
|
+
className: `spacing-command-glyph spacing-command-glyph--${command.spacing.direction} spacing-command-glyph--level-${String(command.spacing.level)}`,
|
|
10848
|
+
"aria-hidden": "true",
|
|
10849
|
+
children: [
|
|
10850
|
+
command.spacing.direction === "negative" ? /* @__PURE__ */ jsx2("span", { className: "spacing-command-glyph__arrow", children: spacingArrow(command, state.activeSide) }) : null,
|
|
10851
|
+
/* @__PURE__ */ jsx2("span", { className: "spacing-command-glyph__bar" }),
|
|
10852
|
+
command.spacing.direction === "positive" ? /* @__PURE__ */ jsx2("span", { className: "spacing-command-glyph__arrow", children: spacingArrow(command, state.activeSide) }) : null
|
|
10853
|
+
]
|
|
10854
|
+
}
|
|
10855
|
+
) }, command.id)) }) : null,
|
|
10856
|
+
sheetView === "digits" ? /* @__PURE__ */ jsx2("div", { className: "butex-widget__sheet-choice-row", children: MOBILE_DIGIT_CHOICES.map((option) => /* @__PURE__ */ jsx2(
|
|
10857
|
+
"button",
|
|
10858
|
+
{
|
|
10859
|
+
type: "button",
|
|
10860
|
+
"aria-pressed": state.digitForm === option.id,
|
|
10861
|
+
title: digitTitle(option.id, messages),
|
|
10862
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentDigitForm(option.id)),
|
|
10863
|
+
children: option.label
|
|
10864
|
+
},
|
|
10865
|
+
option.id
|
|
10866
|
+
)) }) : null
|
|
10867
|
+
]
|
|
10326
10868
|
}
|
|
10327
10869
|
) : null
|
|
10328
10870
|
] });
|
|
10329
10871
|
}
|
|
10330
10872
|
|
|
10331
|
-
// src/react/visibleViewport.ts
|
|
10332
|
-
function positiveFinite(value, fallback) {
|
|
10333
|
-
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
10334
|
-
}
|
|
10335
|
-
function finiteOffset(value) {
|
|
10336
|
-
return Number.isFinite(value) ? value : 0;
|
|
10337
|
-
}
|
|
10338
|
-
function visibleViewportSnapshot(view) {
|
|
10339
|
-
const fallbackWidth = positiveFinite(view.innerWidth, 1);
|
|
10340
|
-
const fallbackHeight = positiveFinite(view.innerHeight, 1);
|
|
10341
|
-
const visualViewport = view.visualViewport;
|
|
10342
|
-
if (visualViewport && Number.isFinite(visualViewport.width) && visualViewport.width > 0 && Number.isFinite(visualViewport.height) && visualViewport.height > 0) {
|
|
10343
|
-
return {
|
|
10344
|
-
width: visualViewport.width,
|
|
10345
|
-
height: visualViewport.height,
|
|
10346
|
-
offsetLeft: finiteOffset(visualViewport.offsetLeft),
|
|
10347
|
-
offsetTop: finiteOffset(visualViewport.offsetTop),
|
|
10348
|
-
scale: positiveFinite(visualViewport.scale, 1),
|
|
10349
|
-
source: "visual-viewport"
|
|
10350
|
-
};
|
|
10351
|
-
}
|
|
10352
|
-
return {
|
|
10353
|
-
width: fallbackWidth,
|
|
10354
|
-
height: fallbackHeight,
|
|
10355
|
-
offsetLeft: 0,
|
|
10356
|
-
offsetTop: 0,
|
|
10357
|
-
scale: 1,
|
|
10358
|
-
source: "layout-viewport"
|
|
10359
|
-
};
|
|
10360
|
-
}
|
|
10361
|
-
function reasonPriority(reason) {
|
|
10362
|
-
if (reason === "orientation") return 3;
|
|
10363
|
-
if (reason === "resize") return 2;
|
|
10364
|
-
if (reason === "scroll") return 1;
|
|
10365
|
-
return 0;
|
|
10366
|
-
}
|
|
10367
|
-
function observeVisibleViewport(view, onChange) {
|
|
10368
|
-
let previous = visibleViewportSnapshot(view);
|
|
10369
|
-
let frame = null;
|
|
10370
|
-
let pendingReason = "scroll";
|
|
10371
|
-
onChange({
|
|
10372
|
-
snapshot: previous,
|
|
10373
|
-
initial: true,
|
|
10374
|
-
sizeChanged: false,
|
|
10375
|
-
offsetChanged: false,
|
|
10376
|
-
reason: "initial"
|
|
10377
|
-
});
|
|
10378
|
-
const emit = () => {
|
|
10379
|
-
frame = null;
|
|
10380
|
-
const next = visibleViewportSnapshot(view);
|
|
10381
|
-
const sizeChanged = next.width !== previous.width || next.height !== previous.height || next.scale !== previous.scale || next.source !== previous.source;
|
|
10382
|
-
const offsetChanged = next.offsetLeft !== previous.offsetLeft || next.offsetTop !== previous.offsetTop;
|
|
10383
|
-
const reason = pendingReason;
|
|
10384
|
-
pendingReason = "scroll";
|
|
10385
|
-
previous = next;
|
|
10386
|
-
onChange({ snapshot: next, initial: false, sizeChanged, offsetChanged, reason });
|
|
10387
|
-
};
|
|
10388
|
-
const schedule = (reason) => {
|
|
10389
|
-
if (reasonPriority(reason) > reasonPriority(pendingReason)) {
|
|
10390
|
-
pendingReason = reason;
|
|
10391
|
-
}
|
|
10392
|
-
if (frame !== null) {
|
|
10393
|
-
return;
|
|
10394
|
-
}
|
|
10395
|
-
frame = view.requestAnimationFrame(emit);
|
|
10396
|
-
};
|
|
10397
|
-
const onResize = () => schedule("resize");
|
|
10398
|
-
const onScroll = () => schedule("scroll");
|
|
10399
|
-
const onOrientation = () => schedule("orientation");
|
|
10400
|
-
const visualViewport = view.visualViewport;
|
|
10401
|
-
visualViewport?.addEventListener("resize", onResize);
|
|
10402
|
-
visualViewport?.addEventListener("scroll", onScroll);
|
|
10403
|
-
view.addEventListener("resize", onResize);
|
|
10404
|
-
view.addEventListener("orientationchange", onOrientation);
|
|
10405
|
-
return () => {
|
|
10406
|
-
visualViewport?.removeEventListener("resize", onResize);
|
|
10407
|
-
visualViewport?.removeEventListener("scroll", onScroll);
|
|
10408
|
-
view.removeEventListener("resize", onResize);
|
|
10409
|
-
view.removeEventListener("orientationchange", onOrientation);
|
|
10410
|
-
if (frame !== null) {
|
|
10411
|
-
view.cancelAnimationFrame(frame);
|
|
10412
|
-
frame = null;
|
|
10413
|
-
}
|
|
10414
|
-
};
|
|
10415
|
-
}
|
|
10416
|
-
|
|
10417
10873
|
// src/react/desktopPopover.ts
|
|
10418
10874
|
import { useEffect as useEffect3 } from "react";
|
|
10419
10875
|
var POPOVER_GAP = 5;
|
|
@@ -10554,7 +11010,7 @@ function useDesktopPopoverPlacement(rootRef, active, onClose) {
|
|
|
10554
11010
|
}
|
|
10555
11011
|
|
|
10556
11012
|
// src/react/ButexEditor.tsx
|
|
10557
|
-
import { Fragment as Fragment2, jsx as
|
|
11013
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
10558
11014
|
var DIGIT_FORM_OPTIONS = [
|
|
10559
11015
|
{ id: "western", label: "456" },
|
|
10560
11016
|
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
@@ -10633,16 +11089,16 @@ function renderArabicCommandLabel(command) {
|
|
|
10633
11089
|
if (command.id !== "ln") {
|
|
10634
11090
|
return command.arabicLabel;
|
|
10635
11091
|
}
|
|
10636
|
-
return /* @__PURE__ */
|
|
10637
|
-
/* @__PURE__ */
|
|
10638
|
-
/* @__PURE__ */
|
|
11092
|
+
return /* @__PURE__ */ jsxs3("span", { className: "function-command-label-with-sub", "aria-hidden": "true", children: [
|
|
11093
|
+
/* @__PURE__ */ jsx3("span", { className: "function-command-label-with-sub__base", children: command.arabicLabel }),
|
|
11094
|
+
/* @__PURE__ */ jsx3("span", { className: "function-command-label-with-sub__sub", children: "\u0647\u0640" })
|
|
10639
11095
|
] });
|
|
10640
11096
|
}
|
|
10641
11097
|
function renderOperatorCommandLabel(command) {
|
|
10642
11098
|
if (!command.svg_path) {
|
|
10643
11099
|
return command.Label;
|
|
10644
11100
|
}
|
|
10645
|
-
return /* @__PURE__ */
|
|
11101
|
+
return /* @__PURE__ */ jsx3(
|
|
10646
11102
|
"span",
|
|
10647
11103
|
{
|
|
10648
11104
|
className: "operator-command-svg-label",
|
|
@@ -10658,7 +11114,7 @@ function renderOperatorMenuButtonLabel(command, fallback) {
|
|
|
10658
11114
|
if (!command) {
|
|
10659
11115
|
return fallback;
|
|
10660
11116
|
}
|
|
10661
|
-
return /* @__PURE__ */
|
|
11117
|
+
return /* @__PURE__ */ jsx3("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) });
|
|
10662
11118
|
}
|
|
10663
11119
|
function passiveTreeText(session, messages) {
|
|
10664
11120
|
const passive = session.activeSide === "arabic" ? session.englishTree : session.arabicTree;
|
|
@@ -10696,29 +11152,29 @@ var ButexEditor = forwardRef(
|
|
|
10696
11152
|
const onSessionChangeRef = useRef3(onSessionChange);
|
|
10697
11153
|
onSessionChangeRef.current = onSessionChange;
|
|
10698
11154
|
const debugBodyHiddenRef = useRef3(false);
|
|
10699
|
-
const [debugBodyHidden, setDebugBodyHidden] =
|
|
11155
|
+
const [debugBodyHidden, setDebugBodyHidden] = useState3(false);
|
|
10700
11156
|
debugBodyHiddenRef.current = debugBodyHidden;
|
|
10701
|
-
const [debugImportOpen, setDebugImportOpen] =
|
|
10702
|
-
const [debugImportText, setDebugImportText] =
|
|
10703
|
-
const [debugImportError, setDebugImportError] =
|
|
10704
|
-
const [openDesktopMenu, setOpenDesktopMenu] =
|
|
10705
|
-
const [selectedDigitForm2, setSelectedDigitForm] =
|
|
10706
|
-
const [selectedCharacterFont, setSelectedCharacterFont] =
|
|
10707
|
-
const [boldCharacterStyle, setBoldCharacterStyle] =
|
|
10708
|
-
const [activeEditorSide, setActiveEditorSide] =
|
|
10709
|
-
const [compactPreviewOpen, setCompactPreviewOpen] =
|
|
10710
|
-
const [compactControlState, setCompactControlState] =
|
|
11157
|
+
const [debugImportOpen, setDebugImportOpen] = useState3(false);
|
|
11158
|
+
const [debugImportText, setDebugImportText] = useState3("");
|
|
11159
|
+
const [debugImportError, setDebugImportError] = useState3("");
|
|
11160
|
+
const [openDesktopMenu, setOpenDesktopMenu] = useState3(null);
|
|
11161
|
+
const [selectedDigitForm2, setSelectedDigitForm] = useState3("western");
|
|
11162
|
+
const [selectedCharacterFont, setSelectedCharacterFont] = useState3("default");
|
|
11163
|
+
const [boldCharacterStyle, setBoldCharacterStyle] = useState3(initialSession?.currentCharacterWrapper === "\\boldarabic");
|
|
11164
|
+
const [activeEditorSide, setActiveEditorSide] = useState3("arabic");
|
|
11165
|
+
const [compactPreviewOpen, setCompactPreviewOpen] = useState3(false);
|
|
11166
|
+
const [compactControlState, setCompactControlState] = useState3({
|
|
10711
11167
|
canUndo: false,
|
|
10712
11168
|
canRedo: false,
|
|
10713
11169
|
hasSelection: false,
|
|
10714
11170
|
splitLeafTyping: initialSession?.splitLeafTyping ?? true
|
|
10715
11171
|
});
|
|
10716
|
-
const [envPaletteMode, setEnvPaletteMode] =
|
|
10717
|
-
const [matrixStyle, setMatrixStyle] =
|
|
10718
|
-
const [matrixRows, setMatrixRows] =
|
|
10719
|
-
const [matrixColumns, setMatrixColumns] =
|
|
10720
|
-
const [matrixHover, setMatrixHover] =
|
|
10721
|
-
const [arrayAlignmentColumn, setArrayAlignmentColumn] =
|
|
11172
|
+
const [envPaletteMode, setEnvPaletteMode] = useState3("matrix");
|
|
11173
|
+
const [matrixStyle, setMatrixStyle] = useState3("pmatrix");
|
|
11174
|
+
const [matrixRows, setMatrixRows] = useState3(2);
|
|
11175
|
+
const [matrixColumns, setMatrixColumns] = useState3(2);
|
|
11176
|
+
const [matrixHover, setMatrixHover] = useState3(null);
|
|
11177
|
+
const [arrayAlignmentColumn, setArrayAlignmentColumn] = useState3(1);
|
|
10722
11178
|
const closeDesktopMenu = useCallback(() => setOpenDesktopMenu(null), []);
|
|
10723
11179
|
useDesktopPopoverPlacement(wrapperRef, openDesktopMenu !== null, closeDesktopMenu);
|
|
10724
11180
|
function desktopMenuOpen(menu) {
|
|
@@ -10987,7 +11443,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
10987
11443
|
boldCharacterStyle,
|
|
10988
11444
|
digitForm: selectedDigitForm2
|
|
10989
11445
|
};
|
|
10990
|
-
return /* @__PURE__ */
|
|
11446
|
+
return /* @__PURE__ */ jsx3(
|
|
10991
11447
|
"div",
|
|
10992
11448
|
{
|
|
10993
11449
|
ref: wrapperRef,
|
|
@@ -10996,9 +11452,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
10996
11452
|
"data-responsive-mode": responsiveMode,
|
|
10997
11453
|
dir: uiLocaleDirection(uiLocale),
|
|
10998
11454
|
lang: uiLocale,
|
|
10999
|
-
children: /* @__PURE__ */
|
|
11000
|
-
/* @__PURE__ */
|
|
11001
|
-
/* @__PURE__ */
|
|
11455
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "butex-widget-layout", children: [
|
|
11456
|
+
/* @__PURE__ */ jsxs3("section", { className: "panel panel-editor", children: [
|
|
11457
|
+
/* @__PURE__ */ jsx3(
|
|
11002
11458
|
EquationMobileToolbar,
|
|
11003
11459
|
{
|
|
11004
11460
|
uiLocale,
|
|
@@ -11009,15 +11465,15 @@ ${arabic || currentMessages.empty}`;
|
|
|
11009
11465
|
getRuntime: () => runtimeRef.current
|
|
11010
11466
|
}
|
|
11011
11467
|
),
|
|
11012
|
-
/* @__PURE__ */
|
|
11013
|
-
/* @__PURE__ */
|
|
11014
|
-
/* @__PURE__ */
|
|
11015
|
-
/* @__PURE__ */
|
|
11468
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar butex-widget__desktop-toolbar", children: [
|
|
11469
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-history", role: "group", "aria-label": messages.undoRedo, children: [
|
|
11470
|
+
/* @__PURE__ */ jsx3("button", { ref: undoBtnRef, id: "btn-undo", type: "button", className: "icon-btn", title: messages.undo, "aria-label": messages.undo, children: "\u21B7" }),
|
|
11471
|
+
/* @__PURE__ */ jsx3("button", { ref: redoBtnRef, id: "btn-redo", type: "button", className: "icon-btn", title: messages.redo, "aria-label": messages.redo, children: "\u21B6" })
|
|
11016
11472
|
] }),
|
|
11017
|
-
/* @__PURE__ */
|
|
11018
|
-
/* @__PURE__ */
|
|
11019
|
-
/* @__PURE__ */
|
|
11020
|
-
/* @__PURE__ */
|
|
11473
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-clipboard", role: "group", "aria-label": messages.clipboard, children: [
|
|
11474
|
+
/* @__PURE__ */ jsx3("button", { ref: copyBtnRef, id: "btn-copy", type: "button", className: "icon-btn", title: messages.copy, "aria-label": messages.copy, disabled: true, children: "\u29C9" }),
|
|
11475
|
+
/* @__PURE__ */ jsx3("button", { ref: cutBtnRef, id: "btn-cut", type: "button", className: "icon-btn", title: messages.cut, "aria-label": messages.cut, disabled: true, children: "\u2702" }),
|
|
11476
|
+
/* @__PURE__ */ jsx3(
|
|
11021
11477
|
"button",
|
|
11022
11478
|
{
|
|
11023
11479
|
id: "btn-paste",
|
|
@@ -11034,9 +11490,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
11034
11490
|
}
|
|
11035
11491
|
)
|
|
11036
11492
|
] }),
|
|
11037
|
-
showSideSwitcher ? /* @__PURE__ */
|
|
11038
|
-
/* @__PURE__ */
|
|
11039
|
-
/* @__PURE__ */
|
|
11493
|
+
showSideSwitcher ? /* @__PURE__ */ jsx3("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.editorSettings, children: /* @__PURE__ */ jsx3("button", { className: "icon-btn accent", type: "button", title: messages.toggleSide, "aria-label": messages.toggleSide, onClick: () => runtimeRef.current?.toggleSide(), children: "\u21C4" }) }) : null,
|
|
11494
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-structures", role: "group", "aria-label": messages.structures, children: [
|
|
11495
|
+
/* @__PURE__ */ jsxs3(
|
|
11040
11496
|
"div",
|
|
11041
11497
|
{
|
|
11042
11498
|
className: "delimiter-command-menu",
|
|
@@ -11047,7 +11503,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11047
11503
|
}
|
|
11048
11504
|
},
|
|
11049
11505
|
children: [
|
|
11050
|
-
/* @__PURE__ */
|
|
11506
|
+
/* @__PURE__ */ jsx3(
|
|
11051
11507
|
"button",
|
|
11052
11508
|
{
|
|
11053
11509
|
className: "icon-btn delimiter-command-btn",
|
|
@@ -11060,8 +11516,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11060
11516
|
children: "()"
|
|
11061
11517
|
}
|
|
11062
11518
|
),
|
|
11063
|
-
/* @__PURE__ */
|
|
11064
|
-
/* @__PURE__ */
|
|
11519
|
+
/* @__PURE__ */ jsxs3("div", { className: "delimiter-command-options", role: "menu", "aria-label": messages.insertDelimiters, hidden: !delimiterMenuOpen, children: [
|
|
11520
|
+
/* @__PURE__ */ jsx3(
|
|
11065
11521
|
"button",
|
|
11066
11522
|
{
|
|
11067
11523
|
className: "delimiter-command-option",
|
|
@@ -11079,7 +11535,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11079
11535
|
children: "()"
|
|
11080
11536
|
}
|
|
11081
11537
|
),
|
|
11082
|
-
/* @__PURE__ */
|
|
11538
|
+
/* @__PURE__ */ jsx3(
|
|
11083
11539
|
"button",
|
|
11084
11540
|
{
|
|
11085
11541
|
className: "delimiter-command-option",
|
|
@@ -11097,7 +11553,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11097
11553
|
children: "[]"
|
|
11098
11554
|
}
|
|
11099
11555
|
),
|
|
11100
|
-
/* @__PURE__ */
|
|
11556
|
+
/* @__PURE__ */ jsx3(
|
|
11101
11557
|
"button",
|
|
11102
11558
|
{
|
|
11103
11559
|
className: "delimiter-command-option",
|
|
@@ -11115,7 +11571,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11115
11571
|
children: "{}"
|
|
11116
11572
|
}
|
|
11117
11573
|
),
|
|
11118
|
-
/* @__PURE__ */
|
|
11574
|
+
/* @__PURE__ */ jsx3(
|
|
11119
11575
|
"button",
|
|
11120
11576
|
{
|
|
11121
11577
|
className: "delimiter-command-option",
|
|
@@ -11133,7 +11589,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11133
11589
|
children: "| |"
|
|
11134
11590
|
}
|
|
11135
11591
|
),
|
|
11136
|
-
/* @__PURE__ */
|
|
11592
|
+
/* @__PURE__ */ jsx3(
|
|
11137
11593
|
"button",
|
|
11138
11594
|
{
|
|
11139
11595
|
className: "delimiter-command-option",
|
|
@@ -11155,40 +11611,40 @@ ${arabic || currentMessages.empty}`;
|
|
|
11155
11611
|
]
|
|
11156
11612
|
}
|
|
11157
11613
|
),
|
|
11158
|
-
/* @__PURE__ */
|
|
11614
|
+
/* @__PURE__ */ jsx3("button", { id: "insert-frac", className: "icon-btn frac-icon-btn", type: "button", title: messages.insertFraction, "aria-label": messages.insertFraction, onClick: () => {
|
|
11159
11615
|
runtimeRef.current?.insertFraction();
|
|
11160
11616
|
focusSurface();
|
|
11161
|
-
}, children: /* @__PURE__ */
|
|
11162
|
-
/* @__PURE__ */
|
|
11163
|
-
/* @__PURE__ */
|
|
11617
|
+
}, children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-frac-icon", "aria-hidden": "true", children: [
|
|
11618
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0623" }),
|
|
11619
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0628" })
|
|
11164
11620
|
] }) }),
|
|
11165
|
-
/* @__PURE__ */
|
|
11621
|
+
/* @__PURE__ */ jsx3("button", { id: "insert-sqrt", className: "icon-btn", type: "button", title: messages.insertRoot, "aria-label": messages.insertRoot, onClick: () => {
|
|
11166
11622
|
runtimeRef.current?.insertSqrt();
|
|
11167
11623
|
focusSurface();
|
|
11168
|
-
}, children: /* @__PURE__ */
|
|
11169
|
-
/* @__PURE__ */
|
|
11624
|
+
}, children: /* @__PURE__ */ jsx3("span", { className: "toolbar-sqrt-icon", "aria-hidden": "true", children: "\u221A" }) }),
|
|
11625
|
+
/* @__PURE__ */ jsx3("button", { id: "insert-overset", className: "icon-btn", type: "button", title: messages.insertOverset, "aria-label": messages.insertOverset, onClick: () => {
|
|
11170
11626
|
runtimeRef.current?.insertOverset();
|
|
11171
11627
|
focusSurface();
|
|
11172
|
-
}, children: /* @__PURE__ */
|
|
11173
|
-
/* @__PURE__ */
|
|
11174
|
-
/* @__PURE__ */
|
|
11628
|
+
}, children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-accent-icon toolbar-accent-icon--over", "aria-hidden": "true", children: [
|
|
11629
|
+
/* @__PURE__ */ jsx3("span", { children: "\u2217" }),
|
|
11630
|
+
/* @__PURE__ */ jsx3("span", { children: "\u25A1" })
|
|
11175
11631
|
] }) }),
|
|
11176
|
-
/* @__PURE__ */
|
|
11632
|
+
/* @__PURE__ */ jsx3("button", { id: "insert-underset", className: "icon-btn", type: "button", title: messages.insertUnderset, "aria-label": messages.insertUnderset, onClick: () => {
|
|
11177
11633
|
runtimeRef.current?.insertUnderset();
|
|
11178
11634
|
focusSurface();
|
|
11179
|
-
}, children: /* @__PURE__ */
|
|
11180
|
-
/* @__PURE__ */
|
|
11181
|
-
/* @__PURE__ */
|
|
11635
|
+
}, children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-accent-icon toolbar-accent-icon--under", "aria-hidden": "true", children: [
|
|
11636
|
+
/* @__PURE__ */ jsx3("span", { children: "\u25A1" }),
|
|
11637
|
+
/* @__PURE__ */ jsx3("span", { children: "\u2217" })
|
|
11182
11638
|
] }) }),
|
|
11183
|
-
/* @__PURE__ */
|
|
11639
|
+
/* @__PURE__ */ jsx3("button", { id: "insert-accent-pair", className: "icon-btn", type: "button", title: messages.insertAccentPair, "aria-label": messages.insertAccentPair, onClick: () => {
|
|
11184
11640
|
runtimeRef.current?.insertAccentPair();
|
|
11185
11641
|
focusSurface();
|
|
11186
|
-
}, children: /* @__PURE__ */
|
|
11187
|
-
/* @__PURE__ */
|
|
11188
|
-
/* @__PURE__ */
|
|
11189
|
-
/* @__PURE__ */
|
|
11642
|
+
}, children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-accent-icon toolbar-accent-icon--pair", "aria-hidden": "true", children: [
|
|
11643
|
+
/* @__PURE__ */ jsx3("span", { children: "\u2217" }),
|
|
11644
|
+
/* @__PURE__ */ jsx3("span", { children: "\u25A1" }),
|
|
11645
|
+
/* @__PURE__ */ jsx3("span", { children: "\u2217" })
|
|
11190
11646
|
] }) }),
|
|
11191
|
-
/* @__PURE__ */
|
|
11647
|
+
/* @__PURE__ */ jsxs3(
|
|
11192
11648
|
"div",
|
|
11193
11649
|
{
|
|
11194
11650
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11199,7 +11655,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11199
11655
|
}
|
|
11200
11656
|
},
|
|
11201
11657
|
children: [
|
|
11202
|
-
/* @__PURE__ */
|
|
11658
|
+
/* @__PURE__ */ jsx3(
|
|
11203
11659
|
"button",
|
|
11204
11660
|
{
|
|
11205
11661
|
id: "insert-accents",
|
|
@@ -11210,13 +11666,13 @@ ${arabic || currentMessages.empty}`;
|
|
|
11210
11666
|
"aria-haspopup": "menu",
|
|
11211
11667
|
"aria-expanded": accentMenuOpen,
|
|
11212
11668
|
onClick: () => setAccentMenuOpen((open) => !open),
|
|
11213
|
-
children: /* @__PURE__ */
|
|
11214
|
-
/* @__PURE__ */
|
|
11215
|
-
/* @__PURE__ */
|
|
11669
|
+
children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-accent-icon toolbar-accent-icon--over", "aria-hidden": "true", children: [
|
|
11670
|
+
/* @__PURE__ */ jsx3("span", { children: "\u02C6" }),
|
|
11671
|
+
/* @__PURE__ */ jsx3("span", { children: "\u25A1" })
|
|
11216
11672
|
] })
|
|
11217
11673
|
}
|
|
11218
11674
|
),
|
|
11219
|
-
/* @__PURE__ */
|
|
11675
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertAccents, hidden: !accentMenuOpen, children: ACCENT_COMMANDS_LIST.map((command) => /* @__PURE__ */ jsx3(
|
|
11220
11676
|
"button",
|
|
11221
11677
|
{
|
|
11222
11678
|
className: "function-command-option operator-command-option",
|
|
@@ -11230,7 +11686,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11230
11686
|
setAccentMenuOpen(false);
|
|
11231
11687
|
focusSurface();
|
|
11232
11688
|
},
|
|
11233
|
-
children: /* @__PURE__ */
|
|
11689
|
+
children: /* @__PURE__ */ jsx3("span", { className: "operator-command-label", children: command.label })
|
|
11234
11690
|
},
|
|
11235
11691
|
command.id
|
|
11236
11692
|
)) })
|
|
@@ -11238,7 +11694,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11238
11694
|
}
|
|
11239
11695
|
)
|
|
11240
11696
|
] }),
|
|
11241
|
-
/* @__PURE__ */
|
|
11697
|
+
/* @__PURE__ */ jsx3("div", { className: "toolbar-group toolbar-environments", role: "group", "aria-label": messages.environments, children: /* @__PURE__ */ jsxs3(
|
|
11242
11698
|
"div",
|
|
11243
11699
|
{
|
|
11244
11700
|
className: "matrix-command-menu",
|
|
@@ -11249,7 +11705,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11249
11705
|
}
|
|
11250
11706
|
},
|
|
11251
11707
|
children: [
|
|
11252
|
-
/* @__PURE__ */
|
|
11708
|
+
/* @__PURE__ */ jsx3(
|
|
11253
11709
|
"button",
|
|
11254
11710
|
{
|
|
11255
11711
|
className: "icon-btn matrix-command-btn",
|
|
@@ -11259,21 +11715,21 @@ ${arabic || currentMessages.empty}`;
|
|
|
11259
11715
|
"aria-haspopup": "dialog",
|
|
11260
11716
|
"aria-expanded": matrixMenuOpen,
|
|
11261
11717
|
onClick: () => setMatrixMenuOpen((open) => !open),
|
|
11262
|
-
children: /* @__PURE__ */
|
|
11263
|
-
/* @__PURE__ */
|
|
11264
|
-
/* @__PURE__ */
|
|
11265
|
-
/* @__PURE__ */
|
|
11266
|
-
/* @__PURE__ */
|
|
11718
|
+
children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-matrix-icon", "aria-hidden": "true", children: [
|
|
11719
|
+
/* @__PURE__ */ jsx3("span", {}),
|
|
11720
|
+
/* @__PURE__ */ jsx3("span", {}),
|
|
11721
|
+
/* @__PURE__ */ jsx3("span", {}),
|
|
11722
|
+
/* @__PURE__ */ jsx3("span", {})
|
|
11267
11723
|
] })
|
|
11268
11724
|
}
|
|
11269
11725
|
),
|
|
11270
|
-
/* @__PURE__ */
|
|
11271
|
-
/* @__PURE__ */
|
|
11726
|
+
/* @__PURE__ */ jsxs3("div", { className: "matrix-command-popover", role: "dialog", "aria-label": messages.insertEnvironment, hidden: !matrixMenuOpen, children: [
|
|
11727
|
+
/* @__PURE__ */ jsx3("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.environmentType, children: [
|
|
11272
11728
|
{ id: "matrix", label: messages.matrix },
|
|
11273
11729
|
{ id: "array", label: messages.array },
|
|
11274
11730
|
{ id: "aligned", label: messages.aligned },
|
|
11275
11731
|
{ id: "cases", label: messages.piecewise }
|
|
11276
|
-
].map((option) => /* @__PURE__ */
|
|
11732
|
+
].map((option) => /* @__PURE__ */ jsx3(
|
|
11277
11733
|
"button",
|
|
11278
11734
|
{
|
|
11279
11735
|
type: "button",
|
|
@@ -11291,7 +11747,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11291
11747
|
},
|
|
11292
11748
|
option.id
|
|
11293
11749
|
)) }),
|
|
11294
|
-
envPaletteMode === "matrix" ? /* @__PURE__ */
|
|
11750
|
+
envPaletteMode === "matrix" ? /* @__PURE__ */ jsx3("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.matrixType, children: MATRIX_STYLES2.map((style) => /* @__PURE__ */ jsx3(
|
|
11295
11751
|
"button",
|
|
11296
11752
|
{
|
|
11297
11753
|
type: "button",
|
|
@@ -11307,15 +11763,15 @@ ${arabic || currentMessages.empty}`;
|
|
|
11307
11763
|
},
|
|
11308
11764
|
style.id
|
|
11309
11765
|
)) }) : null,
|
|
11310
|
-
/* @__PURE__ */
|
|
11311
|
-
envPaletteMode !== "cases" ? /* @__PURE__ */
|
|
11766
|
+
/* @__PURE__ */ jsx3("div", { className: "matrix-size-readout", children: matrixHover ? matrixSizeLabel2(matrixHover.rows, matrixHover.columns, messages) : matrixSizeLabel2(matrixRows, matrixColumns, messages) }),
|
|
11767
|
+
envPaletteMode !== "cases" ? /* @__PURE__ */ jsx3("div", { className: "matrix-grid-picker", "aria-label": messages.chooseEnvironmentSize, children: Array.from(
|
|
11312
11768
|
{ length: 8 },
|
|
11313
11769
|
(_, rowIndex) => Array.from({ length: 8 }, (_2, columnIndex) => {
|
|
11314
11770
|
const rows = rowIndex + 1;
|
|
11315
11771
|
const columns = columnIndex + 1;
|
|
11316
11772
|
const activeRows = matrixHover?.rows ?? matrixRows;
|
|
11317
11773
|
const activeColumns = matrixHover?.columns ?? matrixColumns;
|
|
11318
|
-
return /* @__PURE__ */
|
|
11774
|
+
return /* @__PURE__ */ jsx3(
|
|
11319
11775
|
"button",
|
|
11320
11776
|
{
|
|
11321
11777
|
type: "button",
|
|
@@ -11337,10 +11793,10 @@ ${arabic || currentMessages.empty}`;
|
|
|
11337
11793
|
);
|
|
11338
11794
|
})
|
|
11339
11795
|
) }) : null,
|
|
11340
|
-
/* @__PURE__ */
|
|
11341
|
-
/* @__PURE__ */
|
|
11796
|
+
/* @__PURE__ */ jsxs3("div", { className: "matrix-custom-size", children: [
|
|
11797
|
+
/* @__PURE__ */ jsxs3("label", { children: [
|
|
11342
11798
|
messages.row,
|
|
11343
|
-
/* @__PURE__ */
|
|
11799
|
+
/* @__PURE__ */ jsx3(
|
|
11344
11800
|
"input",
|
|
11345
11801
|
{
|
|
11346
11802
|
type: "number",
|
|
@@ -11351,9 +11807,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
11351
11807
|
}
|
|
11352
11808
|
)
|
|
11353
11809
|
] }),
|
|
11354
|
-
/* @__PURE__ */
|
|
11810
|
+
/* @__PURE__ */ jsxs3("label", { children: [
|
|
11355
11811
|
messages.column,
|
|
11356
|
-
/* @__PURE__ */
|
|
11812
|
+
/* @__PURE__ */ jsx3(
|
|
11357
11813
|
"input",
|
|
11358
11814
|
{
|
|
11359
11815
|
type: "number",
|
|
@@ -11365,7 +11821,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11365
11821
|
}
|
|
11366
11822
|
)
|
|
11367
11823
|
] }),
|
|
11368
|
-
/* @__PURE__ */
|
|
11824
|
+
/* @__PURE__ */ jsx3(
|
|
11369
11825
|
"button",
|
|
11370
11826
|
{
|
|
11371
11827
|
type: "button",
|
|
@@ -11383,12 +11839,12 @@ ${arabic || currentMessages.empty}`;
|
|
|
11383
11839
|
}
|
|
11384
11840
|
)
|
|
11385
11841
|
] }),
|
|
11386
|
-
/* @__PURE__ */
|
|
11387
|
-
envPaletteMode === "matrix" ? /* @__PURE__ */
|
|
11388
|
-
envPaletteMode === "array" ? /* @__PURE__ */
|
|
11389
|
-
/* @__PURE__ */
|
|
11842
|
+
/* @__PURE__ */ jsxs3("div", { className: "matrix-edit-actions", "aria-label": messages.editSelectedEnvironment, children: [
|
|
11843
|
+
envPaletteMode === "matrix" ? /* @__PURE__ */ jsx3("button", { type: "button", title: messages.applySelectedMatrixStyle, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.setMatrixEnvStyle(matrixStyle), children: messages.applyStyle }) : null,
|
|
11844
|
+
envPaletteMode === "array" ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
11845
|
+
/* @__PURE__ */ jsxs3("label", { children: [
|
|
11390
11846
|
messages.column,
|
|
11391
|
-
/* @__PURE__ */
|
|
11847
|
+
/* @__PURE__ */ jsx3(
|
|
11392
11848
|
"input",
|
|
11393
11849
|
{
|
|
11394
11850
|
type: "number",
|
|
@@ -11399,7 +11855,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11399
11855
|
}
|
|
11400
11856
|
)
|
|
11401
11857
|
] }),
|
|
11402
|
-
ARRAY_ALIGNMENTS2.map((alignment) => /* @__PURE__ */
|
|
11858
|
+
ARRAY_ALIGNMENTS2.map((alignment) => /* @__PURE__ */ jsx3(
|
|
11403
11859
|
"button",
|
|
11404
11860
|
{
|
|
11405
11861
|
type: "button",
|
|
@@ -11411,19 +11867,19 @@ ${arabic || currentMessages.empty}`;
|
|
|
11411
11867
|
alignment.id
|
|
11412
11868
|
))
|
|
11413
11869
|
] }) : null,
|
|
11414
|
-
/* @__PURE__ */
|
|
11870
|
+
/* @__PURE__ */ jsxs3("button", { type: "button", title: messages.addRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixRow(), children: [
|
|
11415
11871
|
"+",
|
|
11416
11872
|
messages.row
|
|
11417
11873
|
] }),
|
|
11418
|
-
/* @__PURE__ */
|
|
11874
|
+
/* @__PURE__ */ jsxs3("button", { type: "button", title: messages.removeRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixRow(), children: [
|
|
11419
11875
|
"-",
|
|
11420
11876
|
messages.row
|
|
11421
11877
|
] }),
|
|
11422
|
-
/* @__PURE__ */
|
|
11878
|
+
/* @__PURE__ */ jsxs3("button", { type: "button", title: messages.addColumn, disabled: envPaletteMode === "cases", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixColumn(), children: [
|
|
11423
11879
|
"+",
|
|
11424
11880
|
messages.column
|
|
11425
11881
|
] }),
|
|
11426
|
-
/* @__PURE__ */
|
|
11882
|
+
/* @__PURE__ */ jsxs3("button", { type: "button", title: messages.removeColumn, disabled: envPaletteMode === "cases", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixColumn(), children: [
|
|
11427
11883
|
"-",
|
|
11428
11884
|
messages.column
|
|
11429
11885
|
] })
|
|
@@ -11432,7 +11888,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11432
11888
|
]
|
|
11433
11889
|
}
|
|
11434
11890
|
) }),
|
|
11435
|
-
/* @__PURE__ */
|
|
11891
|
+
/* @__PURE__ */ jsx3("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.spaces, children: /* @__PURE__ */ jsxs3(
|
|
11436
11892
|
"div",
|
|
11437
11893
|
{
|
|
11438
11894
|
className: `spacing-command-menu spacing-command-menu--${activeEditorSide}`,
|
|
@@ -11443,7 +11899,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11443
11899
|
}
|
|
11444
11900
|
},
|
|
11445
11901
|
children: [
|
|
11446
|
-
/* @__PURE__ */
|
|
11902
|
+
/* @__PURE__ */ jsx3(
|
|
11447
11903
|
"button",
|
|
11448
11904
|
{
|
|
11449
11905
|
className: "icon-btn spacing-command-btn",
|
|
@@ -11453,13 +11909,13 @@ ${arabic || currentMessages.empty}`;
|
|
|
11453
11909
|
"aria-haspopup": "menu",
|
|
11454
11910
|
"aria-expanded": spacingMenuOpen,
|
|
11455
11911
|
onClick: () => setSpacingMenuOpen((open) => !open),
|
|
11456
|
-
children: /* @__PURE__ */
|
|
11457
|
-
/* @__PURE__ */
|
|
11458
|
-
/* @__PURE__ */
|
|
11912
|
+
children: /* @__PURE__ */ jsxs3("span", { className: "spacing-command-glyph spacing-command-glyph--positive spacing-command-glyph--level-2", "aria-hidden": "true", children: [
|
|
11913
|
+
/* @__PURE__ */ jsx3("span", { className: "spacing-command-glyph__bar" }),
|
|
11914
|
+
/* @__PURE__ */ jsx3("span", { className: "spacing-command-glyph__arrow", children: activeEditorSide === "arabic" ? "\u2190" : "\u2192" })
|
|
11459
11915
|
] })
|
|
11460
11916
|
}
|
|
11461
11917
|
),
|
|
11462
|
-
/* @__PURE__ */
|
|
11918
|
+
/* @__PURE__ */ jsx3("div", { className: "spacing-command-options", role: "menu", "aria-label": messages.insertSpace, hidden: !spacingMenuOpen, children: SPACING_COMMANDS2.map((command) => /* @__PURE__ */ jsxs3(
|
|
11463
11919
|
"button",
|
|
11464
11920
|
{
|
|
11465
11921
|
type: "button",
|
|
@@ -11473,12 +11929,12 @@ ${arabic || currentMessages.empty}`;
|
|
|
11473
11929
|
focusSurface();
|
|
11474
11930
|
},
|
|
11475
11931
|
children: [
|
|
11476
|
-
/* @__PURE__ */
|
|
11477
|
-
command.spacing.direction === "negative" ? /* @__PURE__ */
|
|
11478
|
-
/* @__PURE__ */
|
|
11479
|
-
command.spacing.direction === "positive" ? /* @__PURE__ */
|
|
11932
|
+
/* @__PURE__ */ jsxs3("span", { className: `spacing-command-glyph spacing-command-glyph--${command.spacing.direction} spacing-command-glyph--level-${String(command.spacing.level)}`, "aria-hidden": "true", children: [
|
|
11933
|
+
command.spacing.direction === "negative" ? /* @__PURE__ */ jsx3("span", { className: "spacing-command-glyph__arrow", children: spacingArrow2(command, activeEditorSide) }) : null,
|
|
11934
|
+
/* @__PURE__ */ jsx3("span", { className: "spacing-command-glyph__bar" }),
|
|
11935
|
+
command.spacing.direction === "positive" ? /* @__PURE__ */ jsx3("span", { className: "spacing-command-glyph__arrow", children: spacingArrow2(command, activeEditorSide) }) : null
|
|
11480
11936
|
] }),
|
|
11481
|
-
/* @__PURE__ */
|
|
11937
|
+
/* @__PURE__ */ jsx3("span", { className: "spacing-command-option__name", children: atomicCommandTitle(command, uiLocale) })
|
|
11482
11938
|
]
|
|
11483
11939
|
},
|
|
11484
11940
|
command.id
|
|
@@ -11486,8 +11942,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11486
11942
|
]
|
|
11487
11943
|
}
|
|
11488
11944
|
) }),
|
|
11489
|
-
/* @__PURE__ */
|
|
11490
|
-
/* @__PURE__ */
|
|
11945
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-functions", role: "group", "aria-label": messages.functions, children: [
|
|
11946
|
+
/* @__PURE__ */ jsxs3(
|
|
11491
11947
|
"div",
|
|
11492
11948
|
{
|
|
11493
11949
|
className: "function-command-menu",
|
|
@@ -11498,7 +11954,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11498
11954
|
}
|
|
11499
11955
|
},
|
|
11500
11956
|
children: [
|
|
11501
|
-
/* @__PURE__ */
|
|
11957
|
+
/* @__PURE__ */ jsx3(
|
|
11502
11958
|
"button",
|
|
11503
11959
|
{
|
|
11504
11960
|
className: "icon-btn function-command-btn",
|
|
@@ -11511,7 +11967,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11511
11967
|
children: FUNCTION_COMMANDS2[0]?.arabicLabel ?? "\u062F"
|
|
11512
11968
|
}
|
|
11513
11969
|
),
|
|
11514
|
-
/* @__PURE__ */
|
|
11970
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertFunction, hidden: !functionMenuOpen, children: FUNCTION_COMMANDS2.map((command) => /* @__PURE__ */ jsx3(
|
|
11515
11971
|
"button",
|
|
11516
11972
|
{
|
|
11517
11973
|
className: "function-command-option",
|
|
@@ -11532,7 +11988,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11532
11988
|
]
|
|
11533
11989
|
}
|
|
11534
11990
|
),
|
|
11535
|
-
/* @__PURE__ */
|
|
11991
|
+
/* @__PURE__ */ jsxs3(
|
|
11536
11992
|
"div",
|
|
11537
11993
|
{
|
|
11538
11994
|
className: "function-command-menu function-command-menu--limits-series",
|
|
@@ -11543,7 +11999,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11543
11999
|
}
|
|
11544
12000
|
},
|
|
11545
12001
|
children: [
|
|
11546
|
-
/* @__PURE__ */
|
|
12002
|
+
/* @__PURE__ */ jsx3(
|
|
11547
12003
|
"button",
|
|
11548
12004
|
{
|
|
11549
12005
|
className: "icon-btn function-command-btn",
|
|
@@ -11556,7 +12012,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11556
12012
|
children: LIMITS_SERIES_COMMANDS2[0]?.arabicLabel ?? "\u062D\u062F"
|
|
11557
12013
|
}
|
|
11558
12014
|
),
|
|
11559
|
-
/* @__PURE__ */
|
|
12015
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertLimitsSeries, hidden: !limitsSeriesMenuOpen, children: LIMITS_SERIES_COMMANDS2.map((command) => /* @__PURE__ */ jsx3(
|
|
11560
12016
|
"button",
|
|
11561
12017
|
{
|
|
11562
12018
|
className: "function-command-option",
|
|
@@ -11577,7 +12033,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11577
12033
|
]
|
|
11578
12034
|
}
|
|
11579
12035
|
),
|
|
11580
|
-
/* @__PURE__ */
|
|
12036
|
+
/* @__PURE__ */ jsxs3(
|
|
11581
12037
|
"div",
|
|
11582
12038
|
{
|
|
11583
12039
|
className: "function-command-menu function-command-menu--function2",
|
|
@@ -11588,7 +12044,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11588
12044
|
}
|
|
11589
12045
|
},
|
|
11590
12046
|
children: [
|
|
11591
|
-
/* @__PURE__ */
|
|
12047
|
+
/* @__PURE__ */ jsx3(
|
|
11592
12048
|
"button",
|
|
11593
12049
|
{
|
|
11594
12050
|
className: "icon-btn function-command-btn",
|
|
@@ -11601,7 +12057,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11601
12057
|
children: FUNCTION2_COMMANDS2[0]?.arabicLabel ?? "\u062F"
|
|
11602
12058
|
}
|
|
11603
12059
|
),
|
|
11604
|
-
/* @__PURE__ */
|
|
12060
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertAdditionalFunctions, hidden: !function2MenuOpen, children: FUNCTION2_COMMANDS2.map((command) => /* @__PURE__ */ jsx3(
|
|
11605
12061
|
"button",
|
|
11606
12062
|
{
|
|
11607
12063
|
className: "function-command-option",
|
|
@@ -11622,7 +12078,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11622
12078
|
]
|
|
11623
12079
|
}
|
|
11624
12080
|
),
|
|
11625
|
-
/* @__PURE__ */
|
|
12081
|
+
/* @__PURE__ */ jsxs3(
|
|
11626
12082
|
"div",
|
|
11627
12083
|
{
|
|
11628
12084
|
className: "function-command-menu function-command-menu--derivative",
|
|
@@ -11633,7 +12089,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11633
12089
|
}
|
|
11634
12090
|
},
|
|
11635
12091
|
children: [
|
|
11636
|
-
/* @__PURE__ */
|
|
12092
|
+
/* @__PURE__ */ jsx3(
|
|
11637
12093
|
"button",
|
|
11638
12094
|
{
|
|
11639
12095
|
className: "icon-btn function-command-btn",
|
|
@@ -11646,8 +12102,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11646
12102
|
children: DERIVATIVE_COMMANDS2[0]?.arabicLabel ?? "\u0621"
|
|
11647
12103
|
}
|
|
11648
12104
|
),
|
|
11649
|
-
/* @__PURE__ */
|
|
11650
|
-
DERIVATIVE_COMMANDS2.map((command) => /* @__PURE__ */
|
|
12105
|
+
/* @__PURE__ */ jsxs3("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertDerivative, hidden: !derivativeMenuOpen, children: [
|
|
12106
|
+
DERIVATIVE_COMMANDS2.map((command) => /* @__PURE__ */ jsx3(
|
|
11651
12107
|
"button",
|
|
11652
12108
|
{
|
|
11653
12109
|
className: "function-command-option",
|
|
@@ -11665,7 +12121,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11665
12121
|
},
|
|
11666
12122
|
command.id
|
|
11667
12123
|
)),
|
|
11668
|
-
/* @__PURE__ */
|
|
12124
|
+
/* @__PURE__ */ jsx3(
|
|
11669
12125
|
"button",
|
|
11670
12126
|
{
|
|
11671
12127
|
className: "function-command-option",
|
|
@@ -11682,7 +12138,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11682
12138
|
children: "\u0621/\u0633"
|
|
11683
12139
|
}
|
|
11684
12140
|
),
|
|
11685
|
-
/* @__PURE__ */
|
|
12141
|
+
/* @__PURE__ */ jsx3(
|
|
11686
12142
|
"button",
|
|
11687
12143
|
{
|
|
11688
12144
|
className: "function-command-option",
|
|
@@ -11703,7 +12159,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11703
12159
|
]
|
|
11704
12160
|
}
|
|
11705
12161
|
),
|
|
11706
|
-
/* @__PURE__ */
|
|
12162
|
+
/* @__PURE__ */ jsxs3(
|
|
11707
12163
|
"div",
|
|
11708
12164
|
{
|
|
11709
12165
|
className: "function-command-menu function-command-menu--groups",
|
|
@@ -11714,7 +12170,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11714
12170
|
}
|
|
11715
12171
|
},
|
|
11716
12172
|
children: [
|
|
11717
|
-
/* @__PURE__ */
|
|
12173
|
+
/* @__PURE__ */ jsx3(
|
|
11718
12174
|
"button",
|
|
11719
12175
|
{
|
|
11720
12176
|
className: "icon-btn function-command-btn",
|
|
@@ -11727,7 +12183,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11727
12183
|
children: GROUP_COMMANDS2[0]?.arabicLabel ?? "\u0645"
|
|
11728
12184
|
}
|
|
11729
12185
|
),
|
|
11730
|
-
/* @__PURE__ */
|
|
12186
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertNumberSets, hidden: !groupMenuOpen, children: GROUP_COMMANDS2.map((command) => /* @__PURE__ */ jsx3(
|
|
11731
12187
|
"button",
|
|
11732
12188
|
{
|
|
11733
12189
|
className: "function-command-option",
|
|
@@ -11749,8 +12205,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11749
12205
|
}
|
|
11750
12206
|
)
|
|
11751
12207
|
] }),
|
|
11752
|
-
/* @__PURE__ */
|
|
11753
|
-
/* @__PURE__ */
|
|
12208
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-operators", role: "group", "aria-label": messages.operations, children: [
|
|
12209
|
+
/* @__PURE__ */ jsxs3(
|
|
11754
12210
|
"div",
|
|
11755
12211
|
{
|
|
11756
12212
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11761,7 +12217,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11761
12217
|
}
|
|
11762
12218
|
},
|
|
11763
12219
|
children: [
|
|
11764
|
-
/* @__PURE__ */
|
|
12220
|
+
/* @__PURE__ */ jsx3(
|
|
11765
12221
|
"button",
|
|
11766
12222
|
{
|
|
11767
12223
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11774,7 +12230,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11774
12230
|
children: renderOperatorMenuButtonLabel(OPERATOR_COMMANDS[0], "\u2217")
|
|
11775
12231
|
}
|
|
11776
12232
|
),
|
|
11777
|
-
/* @__PURE__ */
|
|
12233
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertOperation, hidden: !operatorMenuOpen, children: OPERATOR_COMMANDS.map((command) => /* @__PURE__ */ jsx3(
|
|
11778
12234
|
"button",
|
|
11779
12235
|
{
|
|
11780
12236
|
className: "function-command-option operator-command-option",
|
|
@@ -11788,14 +12244,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11788
12244
|
setOperatorMenuOpen(false);
|
|
11789
12245
|
focusSurface();
|
|
11790
12246
|
},
|
|
11791
|
-
children: /* @__PURE__ */
|
|
12247
|
+
children: /* @__PURE__ */ jsx3("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11792
12248
|
},
|
|
11793
12249
|
command.id
|
|
11794
12250
|
)) })
|
|
11795
12251
|
]
|
|
11796
12252
|
}
|
|
11797
12253
|
),
|
|
11798
|
-
/* @__PURE__ */
|
|
12254
|
+
/* @__PURE__ */ jsxs3(
|
|
11799
12255
|
"div",
|
|
11800
12256
|
{
|
|
11801
12257
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11806,7 +12262,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11806
12262
|
}
|
|
11807
12263
|
},
|
|
11808
12264
|
children: [
|
|
11809
|
-
/* @__PURE__ */
|
|
12265
|
+
/* @__PURE__ */ jsx3(
|
|
11810
12266
|
"button",
|
|
11811
12267
|
{
|
|
11812
12268
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11819,7 +12275,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11819
12275
|
children: "\u2229"
|
|
11820
12276
|
}
|
|
11821
12277
|
),
|
|
11822
|
-
/* @__PURE__ */
|
|
12278
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertRelationsSets, hidden: !operator2MenuOpen, children: OPERATOR2_COMMANDS.map((command) => /* @__PURE__ */ jsx3(
|
|
11823
12279
|
"button",
|
|
11824
12280
|
{
|
|
11825
12281
|
className: "function-command-option operator-command-option",
|
|
@@ -11833,14 +12289,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11833
12289
|
setOperator2MenuOpen(false);
|
|
11834
12290
|
focusSurface();
|
|
11835
12291
|
},
|
|
11836
|
-
children: /* @__PURE__ */
|
|
12292
|
+
children: /* @__PURE__ */ jsx3("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11837
12293
|
},
|
|
11838
12294
|
command.id
|
|
11839
12295
|
)) })
|
|
11840
12296
|
]
|
|
11841
12297
|
}
|
|
11842
12298
|
),
|
|
11843
|
-
/* @__PURE__ */
|
|
12299
|
+
/* @__PURE__ */ jsxs3(
|
|
11844
12300
|
"div",
|
|
11845
12301
|
{
|
|
11846
12302
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11851,7 +12307,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11851
12307
|
}
|
|
11852
12308
|
},
|
|
11853
12309
|
children: [
|
|
11854
|
-
/* @__PURE__ */
|
|
12310
|
+
/* @__PURE__ */ jsx3(
|
|
11855
12311
|
"button",
|
|
11856
12312
|
{
|
|
11857
12313
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11864,7 +12320,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11864
12320
|
children: renderOperatorMenuButtonLabel(OPERATOR3_COMMANDS[0], "\u21D2")
|
|
11865
12321
|
}
|
|
11866
12322
|
),
|
|
11867
|
-
/* @__PURE__ */
|
|
12323
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertArrows, hidden: !operator3MenuOpen, children: OPERATOR3_COMMANDS.map((command) => /* @__PURE__ */ jsx3(
|
|
11868
12324
|
"button",
|
|
11869
12325
|
{
|
|
11870
12326
|
className: "function-command-option operator-command-option",
|
|
@@ -11878,14 +12334,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11878
12334
|
setOperator3MenuOpen(false);
|
|
11879
12335
|
focusSurface();
|
|
11880
12336
|
},
|
|
11881
|
-
children: /* @__PURE__ */
|
|
12337
|
+
children: /* @__PURE__ */ jsx3("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11882
12338
|
},
|
|
11883
12339
|
command.id
|
|
11884
12340
|
)) })
|
|
11885
12341
|
]
|
|
11886
12342
|
}
|
|
11887
12343
|
),
|
|
11888
|
-
/* @__PURE__ */
|
|
12344
|
+
/* @__PURE__ */ jsxs3(
|
|
11889
12345
|
"div",
|
|
11890
12346
|
{
|
|
11891
12347
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11896,7 +12352,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11896
12352
|
}
|
|
11897
12353
|
},
|
|
11898
12354
|
children: [
|
|
11899
|
-
/* @__PURE__ */
|
|
12355
|
+
/* @__PURE__ */ jsx3(
|
|
11900
12356
|
"button",
|
|
11901
12357
|
{
|
|
11902
12358
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11909,7 +12365,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11909
12365
|
children: renderOperatorMenuButtonLabel(DOT_COMMANDS[0], "\u2026")
|
|
11910
12366
|
}
|
|
11911
12367
|
),
|
|
11912
|
-
/* @__PURE__ */
|
|
12368
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertDots, hidden: !dotMenuOpen, children: DOT_COMMANDS.map((command) => /* @__PURE__ */ jsx3(
|
|
11913
12369
|
"button",
|
|
11914
12370
|
{
|
|
11915
12371
|
className: "function-command-option operator-command-option",
|
|
@@ -11923,14 +12379,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11923
12379
|
setDotMenuOpen(false);
|
|
11924
12380
|
focusSurface();
|
|
11925
12381
|
},
|
|
11926
|
-
children: /* @__PURE__ */
|
|
12382
|
+
children: /* @__PURE__ */ jsx3("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11927
12383
|
},
|
|
11928
12384
|
command.id
|
|
11929
12385
|
)) })
|
|
11930
12386
|
]
|
|
11931
12387
|
}
|
|
11932
12388
|
),
|
|
11933
|
-
/* @__PURE__ */
|
|
12389
|
+
/* @__PURE__ */ jsxs3(
|
|
11934
12390
|
"div",
|
|
11935
12391
|
{
|
|
11936
12392
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11941,7 +12397,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11941
12397
|
}
|
|
11942
12398
|
},
|
|
11943
12399
|
children: [
|
|
11944
|
-
/* @__PURE__ */
|
|
12400
|
+
/* @__PURE__ */ jsx3(
|
|
11945
12401
|
"button",
|
|
11946
12402
|
{
|
|
11947
12403
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11954,7 +12410,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11954
12410
|
children: renderOperatorMenuButtonLabel(INTEGRAL_COMMANDS[0], "\u222B")
|
|
11955
12411
|
}
|
|
11956
12412
|
),
|
|
11957
|
-
/* @__PURE__ */
|
|
12413
|
+
/* @__PURE__ */ jsx3("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertIntegrals, hidden: !integralMenuOpen, children: INTEGRAL_COMMANDS.map((command) => /* @__PURE__ */ jsx3(
|
|
11958
12414
|
"button",
|
|
11959
12415
|
{
|
|
11960
12416
|
className: "function-command-option operator-command-option",
|
|
@@ -11968,7 +12424,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11968
12424
|
setIntegralMenuOpen(false);
|
|
11969
12425
|
focusSurface();
|
|
11970
12426
|
},
|
|
11971
|
-
children: /* @__PURE__ */
|
|
12427
|
+
children: /* @__PURE__ */ jsx3("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11972
12428
|
},
|
|
11973
12429
|
command.id
|
|
11974
12430
|
)) })
|
|
@@ -11976,28 +12432,28 @@ ${arabic || currentMessages.empty}`;
|
|
|
11976
12432
|
}
|
|
11977
12433
|
)
|
|
11978
12434
|
] }),
|
|
11979
|
-
/* @__PURE__ */
|
|
11980
|
-
/* @__PURE__ */
|
|
11981
|
-
/* @__PURE__ */
|
|
11982
|
-
/* @__PURE__ */
|
|
12435
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-scripts", role: "group", "aria-label": messages.scripts, children: [
|
|
12436
|
+
/* @__PURE__ */ jsx3("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSuperscript, "aria-label": messages.addSuperscript, onClick: () => runtimeRef.current?.addSup(), children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
|
|
12437
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0646" }),
|
|
12438
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0633" })
|
|
11983
12439
|
] }) }),
|
|
11984
|
-
/* @__PURE__ */
|
|
11985
|
-
/* @__PURE__ */
|
|
11986
|
-
/* @__PURE__ */
|
|
12440
|
+
/* @__PURE__ */ jsx3("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSubscript, "aria-label": messages.addSubscript, onClick: () => runtimeRef.current?.addSub(), children: /* @__PURE__ */ jsxs3("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
|
|
12441
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0646" }),
|
|
12442
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0633" })
|
|
11987
12443
|
] }) }),
|
|
11988
|
-
/* @__PURE__ */
|
|
11989
|
-
/* @__PURE__ */
|
|
11990
|
-
/* @__PURE__ */
|
|
12444
|
+
/* @__PURE__ */ jsx3("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__ */ jsxs3("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sup", "aria-hidden": "true", children: [
|
|
12445
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0646" }),
|
|
12446
|
+
/* @__PURE__ */ jsx3("span", { children: "\xD7" })
|
|
11991
12447
|
] }) }),
|
|
11992
|
-
/* @__PURE__ */
|
|
11993
|
-
/* @__PURE__ */
|
|
11994
|
-
/* @__PURE__ */
|
|
12448
|
+
/* @__PURE__ */ jsx3("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__ */ jsxs3("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sub", "aria-hidden": "true", children: [
|
|
12449
|
+
/* @__PURE__ */ jsx3("span", { children: "\u0646" }),
|
|
12450
|
+
/* @__PURE__ */ jsx3("span", { children: "\xD7" })
|
|
11995
12451
|
] }) })
|
|
11996
12452
|
] }),
|
|
11997
|
-
/* @__PURE__ */
|
|
11998
|
-
/* @__PURE__ */
|
|
11999
|
-
/* @__PURE__ */
|
|
12000
|
-
/* @__PURE__ */
|
|
12453
|
+
/* @__PURE__ */ jsxs3("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.inputStyles, children: [
|
|
12454
|
+
/* @__PURE__ */ jsx3("button", { className: "icon-btn delete-node-btn", type: "button", title: messages.deleteSelectedStructure, "aria-label": messages.deleteSelectedStructure, onClick: () => runtimeRef.current?.deleteStructure(), children: "\xD7" }),
|
|
12455
|
+
/* @__PURE__ */ jsx3("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" }),
|
|
12456
|
+
/* @__PURE__ */ jsxs3(
|
|
12001
12457
|
"div",
|
|
12002
12458
|
{
|
|
12003
12459
|
className: "character-font-menu",
|
|
@@ -12008,7 +12464,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12008
12464
|
}
|
|
12009
12465
|
},
|
|
12010
12466
|
children: [
|
|
12011
|
-
/* @__PURE__ */
|
|
12467
|
+
/* @__PURE__ */ jsx3(
|
|
12012
12468
|
"button",
|
|
12013
12469
|
{
|
|
12014
12470
|
ref: characterFontBtnRef,
|
|
@@ -12023,8 +12479,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
12023
12479
|
children: boldCharacterStyle ? boldCharacterStyleLabel2(uiLocale) : characterFontOption(selectedCharacterFont).label
|
|
12024
12480
|
}
|
|
12025
12481
|
),
|
|
12026
|
-
/* @__PURE__ */
|
|
12027
|
-
/* @__PURE__ */
|
|
12482
|
+
/* @__PURE__ */ jsxs3("div", { className: "character-font-options", role: "listbox", "aria-label": messages.chooseWritingFont, hidden: !characterFontMenuOpen, children: [
|
|
12483
|
+
/* @__PURE__ */ jsx3(
|
|
12028
12484
|
"button",
|
|
12029
12485
|
{
|
|
12030
12486
|
type: "button",
|
|
@@ -12041,7 +12497,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12041
12497
|
children: boldCharacterStyleLabel2(uiLocale)
|
|
12042
12498
|
}
|
|
12043
12499
|
),
|
|
12044
|
-
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */
|
|
12500
|
+
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ jsx3(
|
|
12045
12501
|
"button",
|
|
12046
12502
|
{
|
|
12047
12503
|
type: "button",
|
|
@@ -12064,7 +12520,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12064
12520
|
]
|
|
12065
12521
|
}
|
|
12066
12522
|
),
|
|
12067
|
-
/* @__PURE__ */
|
|
12523
|
+
/* @__PURE__ */ jsxs3(
|
|
12068
12524
|
"div",
|
|
12069
12525
|
{
|
|
12070
12526
|
className: "digit-form-menu",
|
|
@@ -12075,7 +12531,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12075
12531
|
}
|
|
12076
12532
|
},
|
|
12077
12533
|
children: [
|
|
12078
|
-
/* @__PURE__ */
|
|
12534
|
+
/* @__PURE__ */ jsx3(
|
|
12079
12535
|
"button",
|
|
12080
12536
|
{
|
|
12081
12537
|
ref: digitFormBtnRef,
|
|
@@ -12090,7 +12546,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12090
12546
|
children: digitFormLabel(selectedDigitForm2)
|
|
12091
12547
|
}
|
|
12092
12548
|
),
|
|
12093
|
-
/* @__PURE__ */
|
|
12549
|
+
/* @__PURE__ */ jsx3("div", { className: "digit-form-options", role: "listbox", "aria-label": messages.chooseDigitForm, hidden: !digitMenuOpen, children: DIGIT_FORM_OPTIONS.map((option) => /* @__PURE__ */ jsx3(
|
|
12094
12550
|
"button",
|
|
12095
12551
|
{
|
|
12096
12552
|
type: "button",
|
|
@@ -12114,7 +12570,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12114
12570
|
)
|
|
12115
12571
|
] })
|
|
12116
12572
|
] }),
|
|
12117
|
-
/* @__PURE__ */
|
|
12573
|
+
/* @__PURE__ */ jsx3(
|
|
12118
12574
|
"div",
|
|
12119
12575
|
{
|
|
12120
12576
|
ref: surfaceRef,
|
|
@@ -12124,7 +12580,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12124
12580
|
"aria-label": messages.equationEditor
|
|
12125
12581
|
}
|
|
12126
12582
|
),
|
|
12127
|
-
/* @__PURE__ */
|
|
12583
|
+
/* @__PURE__ */ jsx3(
|
|
12128
12584
|
"textarea",
|
|
12129
12585
|
{
|
|
12130
12586
|
ref: inputRef,
|
|
@@ -12138,8 +12594,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
12138
12594
|
tabIndex: -1
|
|
12139
12595
|
}
|
|
12140
12596
|
),
|
|
12141
|
-
/* @__PURE__ */
|
|
12142
|
-
/* @__PURE__ */
|
|
12597
|
+
/* @__PURE__ */ jsx3("div", { ref: renderErrorRef, className: "error", hidden: true }),
|
|
12598
|
+
/* @__PURE__ */ jsx3(
|
|
12143
12599
|
"button",
|
|
12144
12600
|
{
|
|
12145
12601
|
type: "button",
|
|
@@ -12151,18 +12607,18 @@ ${arabic || currentMessages.empty}`;
|
|
|
12151
12607
|
}
|
|
12152
12608
|
)
|
|
12153
12609
|
] }),
|
|
12154
|
-
/* @__PURE__ */
|
|
12155
|
-
debugEnabled ? /* @__PURE__ */
|
|
12156
|
-
/* @__PURE__ */
|
|
12157
|
-
/* @__PURE__ */
|
|
12158
|
-
/* @__PURE__ */
|
|
12159
|
-
/* @__PURE__ */
|
|
12610
|
+
/* @__PURE__ */ jsx3("section", { id: previewPanelId, className: "panel panel-preview", "aria-label": messages.renderPreview, children: /* @__PURE__ */ jsx3("div", { ref: mathOutputRef, className: "preview-box" }) }),
|
|
12611
|
+
debugEnabled ? /* @__PURE__ */ jsxs3("section", { className: "panel", children: [
|
|
12612
|
+
/* @__PURE__ */ jsxs3("div", { className: "dev-strip", children: [
|
|
12613
|
+
/* @__PURE__ */ jsx3("span", { className: "dev-badge", children: messages.development }),
|
|
12614
|
+
/* @__PURE__ */ jsx3("div", { ref: latexLinesRef, className: "ascii" }),
|
|
12615
|
+
/* @__PURE__ */ jsx3("div", { ref: passivePreviewRef, className: "passive-preview-text" })
|
|
12160
12616
|
] }),
|
|
12161
|
-
/* @__PURE__ */
|
|
12162
|
-
/* @__PURE__ */
|
|
12163
|
-
/* @__PURE__ */
|
|
12164
|
-
/* @__PURE__ */
|
|
12165
|
-
/* @__PURE__ */
|
|
12617
|
+
/* @__PURE__ */ jsxs3("div", { style: { marginTop: 12 }, children: [
|
|
12618
|
+
/* @__PURE__ */ jsxs3("div", { className: "debug-head", children: [
|
|
12619
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: () => void copyDebugText(currentMathObjectJsonText()), children: "Copy MathObject JSON" }),
|
|
12620
|
+
/* @__PURE__ */ jsx3("button", { type: "button", "aria-expanded": debugImportOpen, onClick: openDebugMathObjectImport, children: "Import MathObject JSON" }),
|
|
12621
|
+
/* @__PURE__ */ jsx3(
|
|
12166
12622
|
"button",
|
|
12167
12623
|
{
|
|
12168
12624
|
type: "button",
|
|
@@ -12182,7 +12638,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12182
12638
|
children: debugBodyHidden ? messages.showDebugLog : messages.hideDebugLog
|
|
12183
12639
|
}
|
|
12184
12640
|
),
|
|
12185
|
-
/* @__PURE__ */
|
|
12641
|
+
/* @__PURE__ */ jsx3(
|
|
12186
12642
|
"button",
|
|
12187
12643
|
{
|
|
12188
12644
|
type: "button",
|
|
@@ -12197,8 +12653,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
12197
12653
|
}
|
|
12198
12654
|
)
|
|
12199
12655
|
] }),
|
|
12200
|
-
debugImportOpen ? /* @__PURE__ */
|
|
12201
|
-
/* @__PURE__ */
|
|
12656
|
+
debugImportOpen ? /* @__PURE__ */ jsxs3("div", { className: "debug-json-import", children: [
|
|
12657
|
+
/* @__PURE__ */ jsx3(
|
|
12202
12658
|
"textarea",
|
|
12203
12659
|
{
|
|
12204
12660
|
value: debugImportText,
|
|
@@ -12210,9 +12666,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
12210
12666
|
}
|
|
12211
12667
|
}
|
|
12212
12668
|
),
|
|
12213
|
-
/* @__PURE__ */
|
|
12214
|
-
/* @__PURE__ */
|
|
12215
|
-
/* @__PURE__ */
|
|
12669
|
+
/* @__PURE__ */ jsxs3("div", { className: "debug-head", children: [
|
|
12670
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: applyDebugMathObjectImport, children: "Apply" }),
|
|
12671
|
+
/* @__PURE__ */ jsx3(
|
|
12216
12672
|
"button",
|
|
12217
12673
|
{
|
|
12218
12674
|
type: "button",
|
|
@@ -12224,9 +12680,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
12224
12680
|
}
|
|
12225
12681
|
)
|
|
12226
12682
|
] }),
|
|
12227
|
-
debugImportError ? /* @__PURE__ */
|
|
12683
|
+
debugImportError ? /* @__PURE__ */ jsx3("p", { className: "debug-json-error", children: debugImportError }) : null
|
|
12228
12684
|
] }) : null,
|
|
12229
|
-
/* @__PURE__ */
|
|
12685
|
+
/* @__PURE__ */ jsx3("div", { ref: debugLogRef, className: "debug-log" })
|
|
12230
12686
|
] })
|
|
12231
12687
|
] }) : null
|
|
12232
12688
|
] })
|