@drghaliasri/butex 8.1.5 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-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.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(react_entry_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(react_entry_exports);
|
|
26
26
|
|
|
27
27
|
// src/react/ButexEditor.tsx
|
|
28
|
-
var
|
|
28
|
+
var import_react6 = require("react");
|
|
29
29
|
|
|
30
30
|
// src/editor/factory.ts
|
|
31
31
|
var nextId = 1;
|
|
@@ -7436,95 +7436,6 @@ var WIDGET_CHROME_CSS = `
|
|
|
7436
7436
|
margin-top: 8px;
|
|
7437
7437
|
}
|
|
7438
7438
|
|
|
7439
|
-
.butex-widget .butex-widget__command-sheet-backdrop {
|
|
7440
|
-
align-items: flex-end;
|
|
7441
|
-
background: rgba(15, 23, 42, 0.38);
|
|
7442
|
-
inset: 0;
|
|
7443
|
-
justify-content: center;
|
|
7444
|
-
padding-bottom: var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px));
|
|
7445
|
-
padding-left: max(12px, var(--butex-safe-area-left, env(safe-area-inset-left, 0px)));
|
|
7446
|
-
padding-right: max(12px, var(--butex-safe-area-right, env(safe-area-inset-right, 0px)));
|
|
7447
|
-
padding-top: max(12px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px)));
|
|
7448
|
-
position: fixed;
|
|
7449
|
-
z-index: var(--butex-z-popover);
|
|
7450
|
-
}
|
|
7451
|
-
|
|
7452
|
-
.butex-widget .butex-widget__command-sheet {
|
|
7453
|
-
background: var(--butex-panel);
|
|
7454
|
-
border: 1px solid var(--butex-border);
|
|
7455
|
-
border-radius: 16px 16px 0 0;
|
|
7456
|
-
box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.22);
|
|
7457
|
-
display: grid;
|
|
7458
|
-
grid-template-rows: auto minmax(0, 1fr);
|
|
7459
|
-
max-height: min(78vh, 720px);
|
|
7460
|
-
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))));
|
|
7461
|
-
max-width: 640px;
|
|
7462
|
-
min-width: 0;
|
|
7463
|
-
overflow: hidden;
|
|
7464
|
-
width: 100%;
|
|
7465
|
-
}
|
|
7466
|
-
|
|
7467
|
-
.butex-widget .butex-widget__command-sheet-header {
|
|
7468
|
-
align-items: center;
|
|
7469
|
-
border-bottom: 1px solid var(--butex-border);
|
|
7470
|
-
display: grid;
|
|
7471
|
-
gap: 8px;
|
|
7472
|
-
grid-template-columns: minmax(44px, auto) minmax(0, 1fr) minmax(44px, auto);
|
|
7473
|
-
padding: 10px 12px;
|
|
7474
|
-
text-align: center;
|
|
7475
|
-
}
|
|
7476
|
-
|
|
7477
|
-
.butex-widget .butex-widget__command-sheet-header strong {
|
|
7478
|
-
overflow-wrap: anywhere;
|
|
7479
|
-
}
|
|
7480
|
-
|
|
7481
|
-
.butex-widget .butex-widget__command-sheet-body {
|
|
7482
|
-
display: grid;
|
|
7483
|
-
gap: 14px;
|
|
7484
|
-
min-height: 0;
|
|
7485
|
-
min-width: 0;
|
|
7486
|
-
overflow-y: auto;
|
|
7487
|
-
overscroll-behavior: contain;
|
|
7488
|
-
padding: 12px;
|
|
7489
|
-
}
|
|
7490
|
-
|
|
7491
|
-
.butex-widget .butex-widget__sheet-section {
|
|
7492
|
-
display: grid;
|
|
7493
|
-
gap: 8px;
|
|
7494
|
-
min-width: 0;
|
|
7495
|
-
}
|
|
7496
|
-
|
|
7497
|
-
.butex-widget .butex-widget__sheet-section h4 {
|
|
7498
|
-
font-size: 13px;
|
|
7499
|
-
margin: 0;
|
|
7500
|
-
}
|
|
7501
|
-
|
|
7502
|
-
.butex-widget .butex-widget__sheet-categories,
|
|
7503
|
-
.butex-widget .butex-widget__sheet-command-grid,
|
|
7504
|
-
.butex-widget .butex-widget__sheet-command-list,
|
|
7505
|
-
.butex-widget .butex-widget__sheet-choice-row {
|
|
7506
|
-
display: grid;
|
|
7507
|
-
gap: 8px;
|
|
7508
|
-
min-width: 0;
|
|
7509
|
-
}
|
|
7510
|
-
|
|
7511
|
-
.butex-widget .butex-widget__sheet-categories,
|
|
7512
|
-
.butex-widget .butex-widget__sheet-command-grid {
|
|
7513
|
-
grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
|
|
7514
|
-
}
|
|
7515
|
-
|
|
7516
|
-
.butex-widget .butex-widget__sheet-command-grid--three,
|
|
7517
|
-
.butex-widget .butex-widget__sheet-choice-row {
|
|
7518
|
-
grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
|
|
7519
|
-
}
|
|
7520
|
-
|
|
7521
|
-
.butex-widget .butex-widget__sheet-categories button,
|
|
7522
|
-
.butex-widget .butex-widget__sheet-command-list button {
|
|
7523
|
-
justify-content: flex-start;
|
|
7524
|
-
overflow-wrap: anywhere;
|
|
7525
|
-
text-align: start;
|
|
7526
|
-
}
|
|
7527
|
-
|
|
7528
7439
|
.butex-widget .butex-widget__command-sheet .operator-command-svg-label {
|
|
7529
7440
|
background-color: currentColor;
|
|
7530
7441
|
display: inline-block;
|
|
@@ -8429,19 +8340,6 @@ ${MATRIX_PICKER_CSS}
|
|
|
8429
8340
|
grid-template-columns: repeat(4, minmax(44px, 1fr));
|
|
8430
8341
|
}
|
|
8431
8342
|
|
|
8432
|
-
.butex-widget:not([data-responsive-mode="desktop"]) .butex-widget__command-sheet-backdrop {
|
|
8433
|
-
padding-bottom: var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px));
|
|
8434
|
-
padding-left: var(--butex-safe-area-left, env(safe-area-inset-left, 0px));
|
|
8435
|
-
padding-right: var(--butex-safe-area-right, env(safe-area-inset-right, 0px));
|
|
8436
|
-
padding-top: max(8px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px)));
|
|
8437
|
-
}
|
|
8438
|
-
|
|
8439
|
-
.butex-widget:not([data-responsive-mode="desktop"]) .butex-widget__command-sheet {
|
|
8440
|
-
border-bottom: 0;
|
|
8441
|
-
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)));
|
|
8442
|
-
max-width: none;
|
|
8443
|
-
}
|
|
8444
|
-
|
|
8445
8343
|
.butex-widget:not([data-responsive-mode="desktop"]) .delimiter-command-menu,
|
|
8446
8344
|
.butex-widget:not([data-responsive-mode="desktop"]) .matrix-command-menu,
|
|
8447
8345
|
.butex-widget:not([data-responsive-mode="desktop"]) .character-font-menu,
|
|
@@ -9722,7 +9620,7 @@ function parseJsonDebugInput(text) {
|
|
|
9722
9620
|
}
|
|
9723
9621
|
|
|
9724
9622
|
// src/react/EquationMobileToolbar.tsx
|
|
9725
|
-
var
|
|
9623
|
+
var import_react4 = require("react");
|
|
9726
9624
|
|
|
9727
9625
|
// src/react/dialogFocus.ts
|
|
9728
9626
|
var import_react = require("react");
|
|
@@ -9833,104 +9731,754 @@ function useDialogFocus({ open, dialogRef, onClose, triggerRef }) {
|
|
|
9833
9731
|
}, [dialogRef, open, triggerRef]);
|
|
9834
9732
|
}
|
|
9835
9733
|
|
|
9836
|
-
// src/react/
|
|
9837
|
-
var
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
var
|
|
9841
|
-
var
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
atomicOperatorCommandsByCategory("operators1"),
|
|
9847
|
-
atomicOperatorCommandsByCategory("operators2"),
|
|
9848
|
-
atomicOperatorCommandsByCategory("operators3"),
|
|
9849
|
-
atomicOperatorCommandsByCategory("dots"),
|
|
9850
|
-
atomicOperatorCommandsByCategory("integrals")
|
|
9851
|
-
];
|
|
9852
|
-
var MATRIX_STYLES = [
|
|
9853
|
-
{ id: "matrix", label: "\u25A1" },
|
|
9854
|
-
{ id: "pmatrix", label: "(\u25A1)" },
|
|
9855
|
-
{ id: "bmatrix", label: "[\u25A1]" },
|
|
9856
|
-
{ id: "Bmatrix", label: "{\u25A1}" },
|
|
9857
|
-
{ id: "vmatrix", label: "|\u25A1|" },
|
|
9858
|
-
{ id: "Vmatrix", label: "||\u25A1||" }
|
|
9859
|
-
];
|
|
9860
|
-
var MATRIX_PRESETS = [
|
|
9861
|
-
{ rows: 2, columns: 2 },
|
|
9862
|
-
{ rows: 2, columns: 3 },
|
|
9863
|
-
{ rows: 3, columns: 2 },
|
|
9864
|
-
{ rows: 3, columns: 3 }
|
|
9865
|
-
];
|
|
9866
|
-
var ARRAY_ALIGNMENTS = ["l", "c", "r"];
|
|
9867
|
-
function clampMatrixSize(value) {
|
|
9868
|
-
return Math.max(1, Math.min(12, Math.trunc(value)));
|
|
9869
|
-
}
|
|
9870
|
-
function matrixSizeLabel(rows, columns, messages) {
|
|
9871
|
-
const rowLabel = rows === 1 ? messages.row : messages.rows;
|
|
9872
|
-
const columnLabel = columns === 1 ? messages.column : messages.columns;
|
|
9873
|
-
return `${String(rows)} ${rowLabel} \xD7 ${String(columns)} ${columnLabel}`;
|
|
9734
|
+
// src/react/mobileCommandUi.tsx
|
|
9735
|
+
var import_react3 = require("react");
|
|
9736
|
+
|
|
9737
|
+
// src/react/mobileCommandPortal.tsx
|
|
9738
|
+
var import_react2 = require("react");
|
|
9739
|
+
var import_react_dom = require("react-dom");
|
|
9740
|
+
|
|
9741
|
+
// src/react/visibleViewport.ts
|
|
9742
|
+
function positiveFinite(value, fallback) {
|
|
9743
|
+
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
9874
9744
|
}
|
|
9875
|
-
function
|
|
9876
|
-
|
|
9877
|
-
if (style === "bmatrix") return messages.matrixBrackets;
|
|
9878
|
-
if (style === "Bmatrix") return messages.matrixBraces;
|
|
9879
|
-
if (style === "vmatrix") return messages.matrixBars;
|
|
9880
|
-
if (style === "Vmatrix") return messages.matrixDoubleBars;
|
|
9881
|
-
return messages.matrixNoDelimiters;
|
|
9745
|
+
function finiteOffset(value) {
|
|
9746
|
+
return Number.isFinite(value) ? value : 0;
|
|
9882
9747
|
}
|
|
9883
|
-
function
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9748
|
+
function visibleViewportSnapshot(view) {
|
|
9749
|
+
const fallbackWidth = positiveFinite(view.innerWidth, 1);
|
|
9750
|
+
const fallbackHeight = positiveFinite(view.innerHeight, 1);
|
|
9751
|
+
const visualViewport = view.visualViewport;
|
|
9752
|
+
if (visualViewport && Number.isFinite(visualViewport.width) && visualViewport.width > 0 && Number.isFinite(visualViewport.height) && visualViewport.height > 0) {
|
|
9753
|
+
return {
|
|
9754
|
+
width: visualViewport.width,
|
|
9755
|
+
height: visualViewport.height,
|
|
9756
|
+
offsetLeft: finiteOffset(visualViewport.offsetLeft),
|
|
9757
|
+
offsetTop: finiteOffset(visualViewport.offsetTop),
|
|
9758
|
+
scale: positiveFinite(visualViewport.scale, 1),
|
|
9759
|
+
source: "visual-viewport"
|
|
9760
|
+
};
|
|
9761
|
+
}
|
|
9762
|
+
return {
|
|
9763
|
+
width: fallbackWidth,
|
|
9764
|
+
height: fallbackHeight,
|
|
9765
|
+
offsetLeft: 0,
|
|
9766
|
+
offsetTop: 0,
|
|
9767
|
+
scale: 1,
|
|
9768
|
+
source: "layout-viewport"
|
|
9769
|
+
};
|
|
9887
9770
|
}
|
|
9888
|
-
function
|
|
9889
|
-
if (
|
|
9890
|
-
if (
|
|
9891
|
-
return
|
|
9771
|
+
function reasonPriority(reason) {
|
|
9772
|
+
if (reason === "orientation") return 3;
|
|
9773
|
+
if (reason === "resize") return 2;
|
|
9774
|
+
if (reason === "scroll") return 1;
|
|
9775
|
+
return 0;
|
|
9892
9776
|
}
|
|
9893
|
-
function
|
|
9894
|
-
|
|
9777
|
+
function observeVisibleViewport(view, onChange) {
|
|
9778
|
+
let previous = visibleViewportSnapshot(view);
|
|
9779
|
+
let frame = null;
|
|
9780
|
+
let pendingReason = "scroll";
|
|
9781
|
+
onChange({
|
|
9782
|
+
snapshot: previous,
|
|
9783
|
+
initial: true,
|
|
9784
|
+
sizeChanged: false,
|
|
9785
|
+
offsetChanged: false,
|
|
9786
|
+
reason: "initial"
|
|
9787
|
+
});
|
|
9788
|
+
const emit = () => {
|
|
9789
|
+
frame = null;
|
|
9790
|
+
const next = visibleViewportSnapshot(view);
|
|
9791
|
+
const sizeChanged = next.width !== previous.width || next.height !== previous.height || next.scale !== previous.scale || next.source !== previous.source;
|
|
9792
|
+
const offsetChanged = next.offsetLeft !== previous.offsetLeft || next.offsetTop !== previous.offsetTop;
|
|
9793
|
+
const reason = pendingReason;
|
|
9794
|
+
pendingReason = "scroll";
|
|
9795
|
+
previous = next;
|
|
9796
|
+
onChange({ snapshot: next, initial: false, sizeChanged, offsetChanged, reason });
|
|
9797
|
+
};
|
|
9798
|
+
const schedule = (reason) => {
|
|
9799
|
+
if (reasonPriority(reason) > reasonPriority(pendingReason)) {
|
|
9800
|
+
pendingReason = reason;
|
|
9801
|
+
}
|
|
9802
|
+
if (frame !== null) {
|
|
9803
|
+
return;
|
|
9804
|
+
}
|
|
9805
|
+
frame = view.requestAnimationFrame(emit);
|
|
9806
|
+
};
|
|
9807
|
+
const onResize = () => schedule("resize");
|
|
9808
|
+
const onScroll = () => schedule("scroll");
|
|
9809
|
+
const onOrientation = () => schedule("orientation");
|
|
9810
|
+
const visualViewport = view.visualViewport;
|
|
9811
|
+
visualViewport?.addEventListener("resize", onResize);
|
|
9812
|
+
visualViewport?.addEventListener("scroll", onScroll);
|
|
9813
|
+
view.addEventListener("resize", onResize);
|
|
9814
|
+
view.addEventListener("orientationchange", onOrientation);
|
|
9815
|
+
return () => {
|
|
9816
|
+
visualViewport?.removeEventListener("resize", onResize);
|
|
9817
|
+
visualViewport?.removeEventListener("scroll", onScroll);
|
|
9818
|
+
view.removeEventListener("resize", onResize);
|
|
9819
|
+
view.removeEventListener("orientationchange", onOrientation);
|
|
9820
|
+
if (frame !== null) {
|
|
9821
|
+
view.cancelAnimationFrame(frame);
|
|
9822
|
+
frame = null;
|
|
9823
|
+
}
|
|
9824
|
+
};
|
|
9895
9825
|
}
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9826
|
+
|
|
9827
|
+
// src/react/mobileCommandPortal.tsx
|
|
9828
|
+
var scrollLocks = /* @__PURE__ */ new WeakMap();
|
|
9829
|
+
function lockBackground(doc) {
|
|
9830
|
+
let lock = scrollLocks.get(doc);
|
|
9831
|
+
if (!lock) {
|
|
9832
|
+
lock = {
|
|
9833
|
+
count: 0,
|
|
9834
|
+
overflow: doc.body.style.overflow,
|
|
9835
|
+
overscroll: doc.documentElement.style.overscrollBehavior
|
|
9836
|
+
};
|
|
9837
|
+
scrollLocks.set(doc, lock);
|
|
9838
|
+
doc.body.style.overflow = "hidden";
|
|
9839
|
+
doc.documentElement.style.overscrollBehavior = "none";
|
|
9840
|
+
}
|
|
9841
|
+
lock.count += 1;
|
|
9842
|
+
return () => {
|
|
9843
|
+
if (!lock) return;
|
|
9844
|
+
lock.count -= 1;
|
|
9845
|
+
if (lock.count === 0) {
|
|
9846
|
+
doc.body.style.overflow = lock.overflow;
|
|
9847
|
+
doc.documentElement.style.overscrollBehavior = lock.overscroll;
|
|
9848
|
+
scrollLocks.delete(doc);
|
|
9849
|
+
}
|
|
9850
|
+
};
|
|
9899
9851
|
}
|
|
9900
|
-
function
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9852
|
+
function ViewportModalPortal({ sourceRef, scopeClassName, children }) {
|
|
9853
|
+
const [host, setHost] = (0, import_react2.useState)(null);
|
|
9854
|
+
(0, import_react2.useLayoutEffect)(() => {
|
|
9855
|
+
const doc = sourceRef?.current?.ownerDocument ?? document;
|
|
9856
|
+
const source = sourceRef?.current?.closest(`.${scopeClassName}`) ?? doc.documentElement;
|
|
9857
|
+
const view = doc.defaultView;
|
|
9858
|
+
if (!view) return;
|
|
9859
|
+
const computed = view.getComputedStyle(source);
|
|
9860
|
+
const layer = doc.createElement("div");
|
|
9861
|
+
layer.className = `${scopeClassName} butex-mobile-command-portal`;
|
|
9862
|
+
layer.dataset.responsiveMode = source.dataset.responsiveMode ?? "auto";
|
|
9863
|
+
layer.dir = source.dir || computed.direction;
|
|
9864
|
+
layer.lang = source.lang || doc.documentElement.lang;
|
|
9865
|
+
for (let i = 0; i < computed.length; i += 1) {
|
|
9866
|
+
const name = computed.item(i);
|
|
9867
|
+
if (name.startsWith("--")) layer.style.setProperty(name, computed.getPropertyValue(name));
|
|
9868
|
+
}
|
|
9869
|
+
layer.style.fontFamily = computed.fontFamily;
|
|
9870
|
+
layer.style.fontSize = computed.fontSize;
|
|
9871
|
+
layer.style.lineHeight = computed.lineHeight;
|
|
9872
|
+
layer.style.color = computed.color;
|
|
9873
|
+
layer.style.direction = computed.direction;
|
|
9874
|
+
layer.style.position = "fixed";
|
|
9875
|
+
layer.style.inset = "auto";
|
|
9876
|
+
layer.style.maxWidth = "none";
|
|
9877
|
+
layer.style.minWidth = "0";
|
|
9878
|
+
layer.style.containerType = "normal";
|
|
9879
|
+
layer.style.contain = "none";
|
|
9880
|
+
layer.style.isolation = "isolate";
|
|
9881
|
+
layer.style.zIndex = "2147483000";
|
|
9882
|
+
const stopObserving = observeVisibleViewport(view, ({ snapshot }) => {
|
|
9883
|
+
layer.style.left = `${String(snapshot.offsetLeft)}px`;
|
|
9884
|
+
layer.style.top = `${String(snapshot.offsetTop)}px`;
|
|
9885
|
+
layer.style.width = `${String(snapshot.width)}px`;
|
|
9886
|
+
layer.style.height = `${String(snapshot.height)}px`;
|
|
9887
|
+
});
|
|
9888
|
+
doc.body.appendChild(layer);
|
|
9889
|
+
const unlock = lockBackground(doc);
|
|
9890
|
+
setHost(layer);
|
|
9891
|
+
return () => {
|
|
9892
|
+
stopObserving();
|
|
9893
|
+
unlock();
|
|
9894
|
+
layer.remove();
|
|
9895
|
+
};
|
|
9896
|
+
}, [sourceRef, scopeClassName]);
|
|
9897
|
+
return host ? (0, import_react_dom.createPortal)(children, host) : null;
|
|
9898
|
+
}
|
|
9899
|
+
var mobileCommandBackdropStyle = { position: "absolute" };
|
|
9900
|
+
var mobileCommandSheetStyle = { maxHeight: "min(720px, 100%)" };
|
|
9901
|
+
var MobileCommandPortal = ViewportModalPortal;
|
|
9902
|
+
|
|
9903
|
+
// src/react/mobileCommandCss.ts
|
|
9904
|
+
var MOBILE_COMMAND_CSS = String.raw`
|
|
9905
|
+
/* A single visual language for document and equation command portals (mobile only). */
|
|
9906
|
+
.butex-document-widget.butex-mobile-command-portal {
|
|
9907
|
+
--butex-mobile-panel: var(--butex-document-panel);
|
|
9908
|
+
--butex-mobile-fg: var(--butex-document-fg);
|
|
9909
|
+
--butex-mobile-muted: var(--butex-document-muted);
|
|
9910
|
+
--butex-mobile-border: var(--butex-document-border);
|
|
9911
|
+
--butex-mobile-accent: var(--butex-document-accent);
|
|
9912
|
+
--butex-mobile-soft: var(--butex-document-accent-bg);
|
|
9913
|
+
--butex-mobile-danger: var(--butex-document-danger);
|
|
9914
|
+
}
|
|
9915
|
+
.butex-widget.butex-mobile-command-portal {
|
|
9916
|
+
--butex-mobile-panel: var(--butex-panel);
|
|
9917
|
+
--butex-mobile-fg: var(--butex-fg);
|
|
9918
|
+
--butex-mobile-muted: var(--butex-muted);
|
|
9919
|
+
--butex-mobile-border: var(--butex-border);
|
|
9920
|
+
--butex-mobile-accent: var(--butex-accent);
|
|
9921
|
+
--butex-mobile-soft: var(--butex-toolbar-hover-bg);
|
|
9922
|
+
--butex-mobile-danger: var(--butex-danger);
|
|
9923
|
+
}
|
|
9924
|
+
.butex-mobile-command-portal .butex-mobile-sheet__backdrop {
|
|
9925
|
+
display: flex;
|
|
9926
|
+
align-items: flex-end;
|
|
9927
|
+
justify-content: center;
|
|
9928
|
+
inset: 0;
|
|
9929
|
+
padding: max(10px, var(--butex-safe-area-top, env(safe-area-inset-top, 0px)))
|
|
9930
|
+
max(8px, var(--butex-safe-area-right, env(safe-area-inset-right, 0px)))
|
|
9931
|
+
var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px))
|
|
9932
|
+
max(8px, var(--butex-safe-area-left, env(safe-area-inset-left, 0px)));
|
|
9933
|
+
background: color-mix(in srgb, #0f172a 40%, transparent);
|
|
9934
|
+
z-index: 1;
|
|
9904
9935
|
}
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9936
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel {
|
|
9937
|
+
display: grid;
|
|
9938
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
9939
|
+
width: 100%;
|
|
9940
|
+
max-width: 620px;
|
|
9941
|
+
min-height: 0;
|
|
9942
|
+
min-width: 0;
|
|
9943
|
+
overflow: hidden;
|
|
9944
|
+
border: 1px solid var(--butex-mobile-border);
|
|
9945
|
+
border-block-end: 0;
|
|
9946
|
+
border-radius: 20px 20px 0 0;
|
|
9947
|
+
background: var(--butex-mobile-panel);
|
|
9948
|
+
color: var(--butex-mobile-fg);
|
|
9949
|
+
box-shadow: 0 -20px 60px color-mix(in srgb, #0f172a 24%, transparent);
|
|
9950
|
+
}
|
|
9951
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header {
|
|
9952
|
+
display: grid;
|
|
9953
|
+
grid-template-columns: minmax(64px, 1fr) minmax(0, 2fr) minmax(44px, 1fr);
|
|
9954
|
+
gap: 8px;
|
|
9955
|
+
align-items: center;
|
|
9956
|
+
min-height: 66px;
|
|
9957
|
+
padding: 11px 16px 9px;
|
|
9958
|
+
text-align: center;
|
|
9959
|
+
background: var(--butex-mobile-panel);
|
|
9960
|
+
border-block-end: 1px solid var(--butex-mobile-border);
|
|
9911
9961
|
}
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "function-command-label-with-sub__sub", children: "\u0647\u0640" })
|
|
9919
|
-
] });
|
|
9962
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header strong {
|
|
9963
|
+
display: block;
|
|
9964
|
+
font-size: 1.18rem;
|
|
9965
|
+
font-weight: 750;
|
|
9966
|
+
line-height: 1.45;
|
|
9967
|
+
overflow-wrap: anywhere;
|
|
9920
9968
|
}
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9969
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header-spacer { display: block; }
|
|
9970
|
+
.butex-mobile-command-portal .butex-mobile-sheet__back,
|
|
9971
|
+
.butex-mobile-command-portal .butex-mobile-sheet__close {
|
|
9972
|
+
display: inline-flex;
|
|
9973
|
+
align-items: center;
|
|
9974
|
+
justify-content: center;
|
|
9975
|
+
gap: 5px;
|
|
9976
|
+
min-height: 44px;
|
|
9977
|
+
min-width: 44px;
|
|
9978
|
+
padding: 6px;
|
|
9979
|
+
border-radius: 11px;
|
|
9980
|
+
border: 1px solid transparent;
|
|
9981
|
+
background: transparent;
|
|
9982
|
+
color: var(--butex-mobile-fg);
|
|
9983
|
+
cursor: pointer;
|
|
9984
|
+
font: inherit;
|
|
9985
|
+
font-size: .88rem;
|
|
9986
|
+
}
|
|
9987
|
+
.butex-mobile-command-portal .butex-mobile-sheet__back { justify-self: start; }
|
|
9988
|
+
.butex-mobile-command-portal .butex-mobile-sheet__close {
|
|
9989
|
+
justify-self: end;
|
|
9990
|
+
background: var(--butex-mobile-soft);
|
|
9991
|
+
}
|
|
9992
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body {
|
|
9993
|
+
display: grid;
|
|
9994
|
+
align-content: start;
|
|
9995
|
+
gap: 16px;
|
|
9996
|
+
min-height: 0;
|
|
9997
|
+
min-width: 0;
|
|
9998
|
+
overflow-y: auto;
|
|
9999
|
+
overscroll-behavior: contain;
|
|
10000
|
+
scrollbar-width: thin;
|
|
10001
|
+
padding: 16px clamp(12px, 3vw, 20px) max(20px, var(--butex-safe-area-bottom, env(safe-area-inset-bottom, 0px)));
|
|
10002
|
+
}
|
|
10003
|
+
.butex-mobile-command-portal .butex-mobile-command__section {
|
|
10004
|
+
display: grid;
|
|
10005
|
+
min-width: 0;
|
|
10006
|
+
gap: 10px;
|
|
10007
|
+
padding-block-end: 15px;
|
|
10008
|
+
border-block-end: 1px solid color-mix(in srgb, var(--butex-mobile-border) 74%, transparent);
|
|
10009
|
+
}
|
|
10010
|
+
.butex-mobile-command-portal .butex-mobile-command__section:last-child { border-block-end: 0; padding-block-end: 0; }
|
|
10011
|
+
.butex-mobile-command-portal .butex-mobile-command__section-title {
|
|
10012
|
+
margin: 0;
|
|
10013
|
+
display: flex;
|
|
10014
|
+
align-items: center;
|
|
10015
|
+
gap: 9px;
|
|
10016
|
+
color: var(--butex-mobile-fg);
|
|
10017
|
+
font-size: 1.08rem;
|
|
10018
|
+
font-weight: 750;
|
|
10019
|
+
line-height: 1.55;
|
|
10020
|
+
}
|
|
10021
|
+
.butex-mobile-command-portal .butex-mobile-command__section-title > svg {
|
|
10022
|
+
color: var(--butex-mobile-accent);
|
|
10023
|
+
flex: none;
|
|
10024
|
+
}
|
|
10025
|
+
.butex-mobile-command-portal .butex-mobile-command__grid {
|
|
10026
|
+
display: grid;
|
|
10027
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
10028
|
+
gap: 8px;
|
|
10029
|
+
min-width: 0;
|
|
10030
|
+
}
|
|
10031
|
+
.butex-mobile-command-portal .butex-mobile-command__grid--dense {
|
|
10032
|
+
grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
|
|
10033
|
+
}
|
|
10034
|
+
.butex-mobile-command-portal .butex-mobile-command__choice-row {
|
|
10035
|
+
display: grid;
|
|
10036
|
+
grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
|
|
10037
|
+
gap: 8px;
|
|
10038
|
+
min-width: 0;
|
|
10039
|
+
}
|
|
10040
|
+
.butex-mobile-command-portal .butex-mobile-command__choice {
|
|
10041
|
+
min-height: 44px;
|
|
10042
|
+
min-width: 0;
|
|
10043
|
+
padding: 7px 10px;
|
|
10044
|
+
border: 1px solid var(--butex-mobile-border);
|
|
10045
|
+
border-radius: 10px;
|
|
10046
|
+
background: var(--butex-mobile-panel);
|
|
10047
|
+
color: var(--butex-mobile-fg);
|
|
10048
|
+
text-align: center;
|
|
10049
|
+
font: inherit;
|
|
10050
|
+
font-size: .91rem;
|
|
10051
|
+
cursor: pointer;
|
|
10052
|
+
}
|
|
10053
|
+
.butex-mobile-command-portal .butex-mobile-command__choice[aria-pressed="true"] {
|
|
10054
|
+
background: var(--butex-mobile-soft);
|
|
10055
|
+
border-color: var(--butex-mobile-accent);
|
|
10056
|
+
}
|
|
10057
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel .butex-mobile-command__action,
|
|
10058
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel .butex-mobile-command__category {
|
|
10059
|
+
display: flex;
|
|
10060
|
+
align-items: center;
|
|
10061
|
+
justify-content: flex-start;
|
|
10062
|
+
gap: 10px;
|
|
10063
|
+
min-height: 48px;
|
|
10064
|
+
min-width: 0;
|
|
10065
|
+
width: 100%;
|
|
10066
|
+
text-align: start;
|
|
10067
|
+
padding: 9px 11px;
|
|
10068
|
+
border: 1px solid var(--butex-mobile-border);
|
|
10069
|
+
border-radius: 12px;
|
|
10070
|
+
background: var(--butex-mobile-panel);
|
|
10071
|
+
color: var(--butex-mobile-fg);
|
|
10072
|
+
cursor: pointer;
|
|
10073
|
+
font: inherit;
|
|
10074
|
+
font-size: 1rem;
|
|
10075
|
+
font-weight: 560;
|
|
10076
|
+
line-height: 1.5;
|
|
10077
|
+
white-space: normal;
|
|
10078
|
+
overflow-wrap: anywhere;
|
|
10079
|
+
}
|
|
10080
|
+
.butex-mobile-command-portal .butex-mobile-command__action .butex-mobile-command__icon {
|
|
10081
|
+
flex: 0 0 20px;
|
|
10082
|
+
color: var(--butex-mobile-accent);
|
|
10083
|
+
}
|
|
10084
|
+
.butex-mobile-command-portal .butex-mobile-command__action-label {
|
|
10085
|
+
flex: 1 1 0;
|
|
10086
|
+
min-width: 0;
|
|
10087
|
+
}
|
|
10088
|
+
.butex-mobile-command-portal .butex-mobile-command__action--danger { color: var(--butex-mobile-danger); }
|
|
10089
|
+
.butex-mobile-command-portal .butex-mobile-command__action--danger svg { color: currentColor; }
|
|
10090
|
+
.butex-mobile-command-portal .butex-mobile-command__category {
|
|
10091
|
+
min-height: 64px;
|
|
10092
|
+
padding: 10px 12px;
|
|
10093
|
+
font-weight: 680;
|
|
10094
|
+
background: color-mix(in srgb, var(--butex-mobile-panel) 94%, var(--butex-mobile-accent));
|
|
10095
|
+
}
|
|
10096
|
+
.butex-mobile-command-portal .butex-mobile-command__category-icon {
|
|
10097
|
+
display: inline-flex;
|
|
10098
|
+
align-items: center;
|
|
10099
|
+
justify-content: center;
|
|
10100
|
+
width: 36px;
|
|
10101
|
+
height: 36px;
|
|
10102
|
+
flex: 0 0 36px;
|
|
10103
|
+
border-radius: 10px;
|
|
10104
|
+
background: var(--butex-mobile-soft);
|
|
10105
|
+
color: var(--butex-mobile-accent);
|
|
10106
|
+
}
|
|
10107
|
+
.butex-mobile-command-portal .butex-mobile-command__category-label { flex: 1; min-width: 0; }
|
|
10108
|
+
.butex-mobile-command-portal .butex-mobile-command__category > svg { color: var(--butex-mobile-muted); flex: 0 0 auto; }
|
|
10109
|
+
.butex-mobile-command-portal[dir="rtl"] .butex-mobile-command__category > svg,
|
|
10110
|
+
.butex-mobile-command-portal[dir="rtl"] .butex-mobile-sheet__back > svg { transform: scaleX(-1); }
|
|
10111
|
+
.butex-mobile-command-portal .butex-mobile-command__action[aria-pressed="true"],
|
|
10112
|
+
.butex-mobile-command-portal .butex-mobile-command__action[aria-selected="true"],
|
|
10113
|
+
.butex-mobile-command-portal .butex-mobile-command__category[aria-pressed="true"] {
|
|
10114
|
+
border-color: var(--butex-mobile-accent);
|
|
10115
|
+
background: var(--butex-mobile-soft);
|
|
10116
|
+
}
|
|
10117
|
+
.butex-mobile-command-portal .butex-mobile-command__action:disabled,
|
|
10118
|
+
.butex-mobile-command-portal .butex-mobile-command__category:disabled { opacity: .45; cursor: not-allowed; }
|
|
10119
|
+
.butex-mobile-command-portal .butex-mobile-command__action:focus-visible,
|
|
10120
|
+
.butex-mobile-command-portal .butex-mobile-command__category:focus-visible,
|
|
10121
|
+
.butex-mobile-command-portal .butex-mobile-sheet__back:focus-visible,
|
|
10122
|
+
.butex-mobile-command-portal .butex-mobile-sheet__close:focus-visible,
|
|
10123
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body button:focus-visible {
|
|
10124
|
+
outline: 2px solid var(--butex-mobile-accent);
|
|
10125
|
+
outline-offset: 2px;
|
|
10126
|
+
}
|
|
10127
|
+
.butex-mobile-command-portal .butex-mobile-command__digits {
|
|
10128
|
+
display: grid; gap: 8px; padding-block-start: 4px;
|
|
10129
|
+
}
|
|
10130
|
+
.butex-mobile-command-portal .butex-widget__sheet-section {
|
|
10131
|
+
display: grid;
|
|
10132
|
+
gap: 10px;
|
|
10133
|
+
min-width: 0;
|
|
10134
|
+
padding-block: 3px 14px;
|
|
10135
|
+
border-block-end: 1px solid var(--butex-mobile-border);
|
|
10136
|
+
}
|
|
10137
|
+
.butex-mobile-command-portal .butex-widget__sheet-section h4 {
|
|
10138
|
+
margin: 0;
|
|
10139
|
+
font-size: 1rem;
|
|
10140
|
+
font-weight: 740;
|
|
10141
|
+
line-height: 1.5;
|
|
10142
|
+
color: var(--butex-mobile-fg);
|
|
10143
|
+
}
|
|
10144
|
+
.butex-mobile-command-portal .butex-widget__sheet-command-grid,
|
|
10145
|
+
.butex-mobile-command-portal .butex-widget__sheet-choice-row,
|
|
10146
|
+
.butex-mobile-command-portal .butex-widget__sheet-command-list {
|
|
10147
|
+
display: grid;
|
|
10148
|
+
gap: 8px;
|
|
10149
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
10150
|
+
min-width: 0;
|
|
10151
|
+
}
|
|
10152
|
+
.butex-mobile-command-portal .butex-widget__sheet-choice-row {
|
|
10153
|
+
grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
|
|
10154
|
+
}
|
|
10155
|
+
.butex-mobile-command-portal .butex-mobile-command__math-glyphs {
|
|
10156
|
+
display: grid;
|
|
10157
|
+
grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
|
|
10158
|
+
gap: 8px;
|
|
10159
|
+
}
|
|
10160
|
+
.butex-mobile-command-portal .butex-mobile-command__math-glyphs button {
|
|
10161
|
+
min-width: 0;
|
|
10162
|
+
min-height: 46px;
|
|
10163
|
+
justify-content: center;
|
|
10164
|
+
overflow-wrap: anywhere;
|
|
10165
|
+
}
|
|
10166
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body > nav > .butex-mobile-command__grid {
|
|
10167
|
+
margin-top: 2px;
|
|
10168
|
+
}
|
|
10169
|
+
.butex-mobile-command-portal .butex-mobile-command__grid--dense > button {
|
|
10170
|
+
min-height: 48px; min-width: 0;
|
|
10171
|
+
text-align: center; overflow-wrap: anywhere;
|
|
10172
|
+
}
|
|
10173
|
+
.butex-mobile-command-portal .butex-widget__sheet-command-grid.butex-mobile-command__grid--dense {
|
|
10174
|
+
grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
|
|
10175
|
+
}
|
|
10176
|
+
.butex-mobile-command-portal .butex-mobile-command__section > .butex-widget__sheet-command-grid {
|
|
10177
|
+
margin-block-start: 0;
|
|
10178
|
+
}
|
|
10179
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body button:not(.butex-mobile-command__action):not(.butex-mobile-command__category) {
|
|
10180
|
+
min-height: 44px;
|
|
10181
|
+
}
|
|
10182
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body .butex-widget__sheet-command-grid,
|
|
10183
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body .butex-widget__sheet-choice-row,
|
|
10184
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body .butex-widget__sheet-command-list {
|
|
10185
|
+
min-width: 0;
|
|
10186
|
+
}
|
|
10187
|
+
@media (max-width: 430px) {
|
|
10188
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel { border-radius: 18px 18px 0 0; }
|
|
10189
|
+
.butex-mobile-command-portal .butex-mobile-sheet__header { padding-inline: 10px; }
|
|
10190
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body { padding-inline: 12px; }
|
|
10191
|
+
}
|
|
10192
|
+
@media (hover: hover) {
|
|
10193
|
+
.butex-mobile-command-portal .butex-mobile-command__action:hover:not(:disabled),
|
|
10194
|
+
.butex-mobile-command-portal .butex-mobile-command__category:hover:not(:disabled),
|
|
10195
|
+
.butex-mobile-command-portal .butex-mobile-command__choice:hover:not(:disabled) {
|
|
10196
|
+
border-color: var(--butex-mobile-accent);
|
|
10197
|
+
background: color-mix(in srgb, var(--butex-mobile-panel) 94%, var(--butex-mobile-accent));
|
|
10198
|
+
}
|
|
10199
|
+
}
|
|
10200
|
+
@media (forced-colors: active) {
|
|
10201
|
+
.butex-mobile-command-portal .butex-mobile-command__action[aria-pressed="true"],
|
|
10202
|
+
.butex-mobile-command-portal .butex-mobile-command__category[aria-pressed="true"] { outline: 2px solid Highlight; }
|
|
10203
|
+
}
|
|
10204
|
+
@media (prefers-reduced-motion: reduce) {
|
|
10205
|
+
.butex-mobile-command-portal .butex-mobile-sheet__panel,
|
|
10206
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body,
|
|
10207
|
+
.butex-mobile-command-portal .butex-mobile-sheet__body button { animation: none; transition: none; scroll-behavior: auto; }
|
|
10208
|
+
}
|
|
10209
|
+
`.trim();
|
|
10210
|
+
var STYLE_ID = "butex-mobile-command-ui-css";
|
|
10211
|
+
function injectMobileCommandCss(doc) {
|
|
10212
|
+
if (doc.getElementById(STYLE_ID)) return;
|
|
10213
|
+
const style = doc.createElement("style");
|
|
10214
|
+
style.id = STYLE_ID;
|
|
10215
|
+
style.textContent = MOBILE_COMMAND_CSS;
|
|
10216
|
+
doc.head.appendChild(style);
|
|
10217
|
+
}
|
|
10218
|
+
|
|
10219
|
+
// src/react/mobileCommandUi.tsx
|
|
10220
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
10221
|
+
var MOBILE_DIGIT_CHOICES = [
|
|
10222
|
+
{ id: "western", label: "456" },
|
|
10223
|
+
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
10224
|
+
{ id: "persianIndic", label: "\u06F4\u06F5\u06F6" }
|
|
10225
|
+
];
|
|
10226
|
+
var iconPaths = {
|
|
10227
|
+
bold: "M7 4h6a4 4 0 0 1 0 8H7zm0 8h7a4 4 0 0 1 0 8H7z",
|
|
10228
|
+
italic: "M14 4h6M4 20h6M15 4 9 20",
|
|
10229
|
+
underline: "M6 4v7a6 6 0 0 0 12 0V4M4 21h16",
|
|
10230
|
+
heading: "M4 5v14M14 5v14M4 12h10M18 7h3v12",
|
|
10231
|
+
paragraph: "M19 4H9a5 5 0 0 0 0 10h3v6M16 4v16",
|
|
10232
|
+
math: "M18 5H6l6 7-6 7h12",
|
|
10233
|
+
table: "M4 5h16v14H4zM4 10h16M4 15h16M10 5v14",
|
|
10234
|
+
image: "M4 5h16v14H4zM7 15l4-4 3 3 2-2 4 4M9 9h.01",
|
|
10235
|
+
list: "M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01",
|
|
10236
|
+
"ordered-list": "M9 6h11M9 12h11M9 18h11M3 4h2v5M3 15h2l-2 3h2",
|
|
10237
|
+
citation: "M9 5H4v7h5v5H4M20 5h-5v7h5v5h-5",
|
|
10238
|
+
reference: "M5 4h14v16l-7-4-7 4z",
|
|
10239
|
+
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",
|
|
10240
|
+
collapse: "M5 9l7-6 7 6M5 15l7-6 7 6M4 21h16",
|
|
10241
|
+
expand: "M5 6l7 6 7-6M5 12l7 6 7-6",
|
|
10242
|
+
up: "M12 20V4M5 11l7-7 7 7",
|
|
10243
|
+
down: "M12 4v16M5 13l7 7 7-7",
|
|
10244
|
+
trash: "M4 7h16M9 7V4h6v3M7 7l1 13h8l1-13M10 11v6M14 11v6",
|
|
10245
|
+
structure: "M12 3v6M5 9h14M5 9v5M19 9v5M2 14h6v6H2zM16 14h6v6h-6z",
|
|
10246
|
+
functions: "M4 20c5-4 3-12 8-16M6 10h11M17 9l5 9M22 9l-5 9",
|
|
10247
|
+
operators: "M4 8h8M8 4v8M16 8h6M16 16h6M16 20h6",
|
|
10248
|
+
matrices: "M7 4H4v16h3M17 4h3v16h-3M10 7h.01M14 7h.01M10 12h.01M14 12h.01M10 17h.01M14 17h.01",
|
|
10249
|
+
typography: "M3 6V4h18v2M12 4v16M8 20h8",
|
|
10250
|
+
spacing: "M4 7v10M20 7v10M7 12h10M10 9l-3 3 3 3M14 9l3 3-3 3",
|
|
10251
|
+
digits: "M4 7h4v10M13 7h7v5h-7v5h7",
|
|
10252
|
+
copy: "M8 8h12v13H8zM5 17H4V4h12v1",
|
|
10253
|
+
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",
|
|
10254
|
+
paste: "M9 4h6l1 3H8zM7 6H5v15h14V6h-2M9 13h6M9 17h5",
|
|
10255
|
+
chevron: "M9 5l6 7-6 7",
|
|
10256
|
+
back: "M19 12H5M12 5l-7 7 7 7",
|
|
10257
|
+
close: "M5 5l14 14M19 5 5 19",
|
|
10258
|
+
fraction: "M5 12h14M8 4h8M8 20h8",
|
|
10259
|
+
delimiters: "M9 3c-5 4-5 14 0 18M15 3c5 4 5 14 0 18"
|
|
10260
|
+
};
|
|
10261
|
+
function MobileIcon({ name, size = 20 }) {
|
|
10262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10263
|
+
"svg",
|
|
10264
|
+
{
|
|
10265
|
+
"aria-hidden": "true",
|
|
10266
|
+
focusable: "false",
|
|
10267
|
+
className: "butex-mobile-command__icon",
|
|
10268
|
+
width: size,
|
|
10269
|
+
height: size,
|
|
10270
|
+
viewBox: "0 0 24 24",
|
|
10271
|
+
fill: "none",
|
|
10272
|
+
stroke: "currentColor",
|
|
10273
|
+
strokeWidth: "1.8",
|
|
10274
|
+
strokeLinecap: "round",
|
|
10275
|
+
strokeLinejoin: "round",
|
|
10276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: iconPaths[name] })
|
|
10277
|
+
}
|
|
10278
|
+
);
|
|
10279
|
+
}
|
|
10280
|
+
function MobileAction({ command }) {
|
|
10281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
10282
|
+
"button",
|
|
10283
|
+
{
|
|
10284
|
+
type: "button",
|
|
10285
|
+
className: "butex-mobile-command__action" + (command.danger ? " butex-mobile-command__action--danger" : ""),
|
|
10286
|
+
disabled: command.disabled,
|
|
10287
|
+
"aria-label": command.label,
|
|
10288
|
+
"aria-pressed": command.pressed,
|
|
10289
|
+
title: command.hint ?? command.label,
|
|
10290
|
+
onMouseDown: command.preserveSelection ? (event) => event.preventDefault() : void 0,
|
|
10291
|
+
onClick: command.onSelect,
|
|
10292
|
+
children: [
|
|
10293
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileIcon, { name: command.icon }),
|
|
10294
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "butex-mobile-command__action-label", children: command.label })
|
|
10295
|
+
]
|
|
10296
|
+
}
|
|
10297
|
+
);
|
|
10298
|
+
}
|
|
10299
|
+
function MobileSection({ title, icon, children, id }) {
|
|
10300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "butex-mobile-command__section", "aria-label": id ? void 0 : title, "aria-labelledby": id, children: [
|
|
10301
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h3", { className: "butex-mobile-command__section-title", id, children: [
|
|
10302
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileIcon, { name: icon, size: 18 }) : null,
|
|
10303
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: title })
|
|
10304
|
+
] }),
|
|
10305
|
+
children
|
|
10306
|
+
] });
|
|
10307
|
+
}
|
|
10308
|
+
function MobileGrid({ children, dense = false, className = "" }) {
|
|
10309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "butex-mobile-command__grid" + (dense ? " butex-mobile-command__grid--dense" : "") + (className ? " " + className : ""), children });
|
|
10310
|
+
}
|
|
10311
|
+
function MobileCategory({ label, icon, onClick }) {
|
|
10312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "butex-mobile-command__category", onClick, children: [
|
|
10313
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "butex-mobile-command__category-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileIcon, { name: icon }) }),
|
|
10314
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "butex-mobile-command__category-label", children: label }),
|
|
10315
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileIcon, { name: "chevron", size: 16 })
|
|
10316
|
+
] });
|
|
10317
|
+
}
|
|
10318
|
+
function MobileCommandSheet({
|
|
10319
|
+
scope,
|
|
10320
|
+
sourceRef,
|
|
10321
|
+
dialogRef,
|
|
10322
|
+
titleId,
|
|
10323
|
+
title,
|
|
10324
|
+
closeLabel,
|
|
10325
|
+
onClose,
|
|
10326
|
+
backLabel,
|
|
10327
|
+
onBack,
|
|
10328
|
+
backRef,
|
|
10329
|
+
bodyClassName,
|
|
10330
|
+
children
|
|
10331
|
+
}) {
|
|
10332
|
+
(0, import_react3.useLayoutEffect)(() => {
|
|
10333
|
+
const doc = sourceRef.current?.ownerDocument ?? document;
|
|
10334
|
+
injectMobileCommandCss(doc);
|
|
10335
|
+
}, [sourceRef]);
|
|
10336
|
+
const stopBackdropClick = (event) => {
|
|
10337
|
+
if (event.currentTarget === event.target) onClose();
|
|
10338
|
+
};
|
|
10339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileCommandPortal, { sourceRef, scopeClassName: scope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10340
|
+
"div",
|
|
10341
|
+
{
|
|
10342
|
+
className: scope + "__command-sheet-backdrop butex-mobile-sheet__backdrop",
|
|
10343
|
+
style: mobileCommandBackdropStyle,
|
|
10344
|
+
role: "presentation",
|
|
10345
|
+
onClick: stopBackdropClick,
|
|
10346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
10347
|
+
"section",
|
|
10348
|
+
{
|
|
10349
|
+
ref: dialogRef,
|
|
10350
|
+
className: scope + "__command-sheet butex-mobile-sheet__panel",
|
|
10351
|
+
style: mobileCommandSheetStyle,
|
|
10352
|
+
role: "dialog",
|
|
10353
|
+
"aria-modal": "true",
|
|
10354
|
+
"aria-labelledby": titleId,
|
|
10355
|
+
tabIndex: -1,
|
|
10356
|
+
children: [
|
|
10357
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: scope + "__command-sheet-header butex-mobile-sheet__header", children: [
|
|
10358
|
+
onBack ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "butex-mobile-sheet__back", ref: backRef, onClick: onBack, children: [
|
|
10359
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileIcon, { name: "back", size: 18 }),
|
|
10360
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: backLabel })
|
|
10361
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", className: "butex-mobile-sheet__header-spacer" }),
|
|
10362
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { id: titleId, children: title }),
|
|
10363
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10364
|
+
"button",
|
|
10365
|
+
{
|
|
10366
|
+
type: "button",
|
|
10367
|
+
className: "butex-mobile-sheet__close",
|
|
10368
|
+
"data-dialog-initial-focus": true,
|
|
10369
|
+
"aria-label": closeLabel,
|
|
10370
|
+
title: closeLabel,
|
|
10371
|
+
onClick: onClose,
|
|
10372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MobileIcon, { name: "close", size: 19 })
|
|
10373
|
+
}
|
|
10374
|
+
)
|
|
10375
|
+
] }),
|
|
10376
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: scope + "__command-sheet-body butex-mobile-sheet__body" + (bodyClassName ? " " + bodyClassName : ""), children })
|
|
10377
|
+
]
|
|
10378
|
+
}
|
|
10379
|
+
)
|
|
10380
|
+
}
|
|
10381
|
+
) });
|
|
10382
|
+
}
|
|
10383
|
+
|
|
10384
|
+
// src/react/EquationMobileToolbar.tsx
|
|
10385
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
10386
|
+
var ACCENT_COMMANDS2 = accentCommandsList();
|
|
10387
|
+
var FUNCTION_COMMANDS = atomicCommandsByCategory("function");
|
|
10388
|
+
var LIMITS_SERIES_COMMANDS = atomicCommandsByCategory("limits_series");
|
|
10389
|
+
var FUNCTION2_COMMANDS = atomicCommandsByCategory("function2");
|
|
10390
|
+
var DERIVATIVE_COMMANDS = atomicCommandsByCategory("derivative");
|
|
10391
|
+
var GROUP_COMMANDS = atomicCommandsByCategory("groups");
|
|
10392
|
+
var SPACING_COMMANDS = atomicCommandsByCategory("spacing").filter(isSpacingCommandSpec);
|
|
10393
|
+
var OPERATOR_GROUPS = [
|
|
10394
|
+
atomicOperatorCommandsByCategory("operators1"),
|
|
10395
|
+
atomicOperatorCommandsByCategory("operators2"),
|
|
10396
|
+
atomicOperatorCommandsByCategory("operators3"),
|
|
10397
|
+
atomicOperatorCommandsByCategory("dots"),
|
|
10398
|
+
atomicOperatorCommandsByCategory("integrals")
|
|
10399
|
+
];
|
|
10400
|
+
var MATRIX_STYLES = [
|
|
10401
|
+
{ id: "matrix", label: "\u25A1" },
|
|
10402
|
+
{ id: "pmatrix", label: "(\u25A1)" },
|
|
10403
|
+
{ id: "bmatrix", label: "[\u25A1]" },
|
|
10404
|
+
{ id: "Bmatrix", label: "{\u25A1}" },
|
|
10405
|
+
{ id: "vmatrix", label: "|\u25A1|" },
|
|
10406
|
+
{ id: "Vmatrix", label: "||\u25A1||" }
|
|
10407
|
+
];
|
|
10408
|
+
var MATRIX_PRESETS = [
|
|
10409
|
+
{ rows: 2, columns: 2 },
|
|
10410
|
+
{ rows: 2, columns: 3 },
|
|
10411
|
+
{ rows: 3, columns: 2 },
|
|
10412
|
+
{ rows: 3, columns: 3 }
|
|
10413
|
+
];
|
|
10414
|
+
var ARRAY_ALIGNMENTS = ["l", "c", "r"];
|
|
10415
|
+
function clampMatrixSize(value) {
|
|
10416
|
+
return Math.max(1, Math.min(12, Math.trunc(value)));
|
|
10417
|
+
}
|
|
10418
|
+
function matrixSizeLabel(rows, columns, messages) {
|
|
10419
|
+
const rowLabel = rows === 1 ? messages.row : messages.rows;
|
|
10420
|
+
const columnLabel = columns === 1 ? messages.column : messages.columns;
|
|
10421
|
+
return `${String(rows)} ${rowLabel} \xD7 ${String(columns)} ${columnLabel}`;
|
|
10422
|
+
}
|
|
10423
|
+
function matrixStyleTitle(style, messages) {
|
|
10424
|
+
if (style === "pmatrix") return messages.matrixParentheses;
|
|
10425
|
+
if (style === "bmatrix") return messages.matrixBrackets;
|
|
10426
|
+
if (style === "Bmatrix") return messages.matrixBraces;
|
|
10427
|
+
if (style === "vmatrix") return messages.matrixBars;
|
|
10428
|
+
if (style === "Vmatrix") return messages.matrixDoubleBars;
|
|
10429
|
+
return messages.matrixNoDelimiters;
|
|
10430
|
+
}
|
|
10431
|
+
function alignmentLabel(alignment, messages) {
|
|
10432
|
+
if (alignment === "l") return messages.alignLeft;
|
|
10433
|
+
if (alignment === "r") return messages.alignRight;
|
|
10434
|
+
return messages.alignCenter;
|
|
10435
|
+
}
|
|
10436
|
+
function alignmentTitle(alignment, messages) {
|
|
10437
|
+
if (alignment === "l") return messages.alignColumnLeft;
|
|
10438
|
+
if (alignment === "r") return messages.alignColumnRight;
|
|
10439
|
+
return messages.alignColumnCenter;
|
|
10440
|
+
}
|
|
10441
|
+
function boldCharacterStyleLabel(uiLocale) {
|
|
10442
|
+
return uiLocale === "ar" ? "\u0639\u0631\u064A\u0636" : "Bold";
|
|
10443
|
+
}
|
|
10444
|
+
function characterFontTitle(fontId, messages) {
|
|
10445
|
+
const key = characterFontSpec(fontId).titleKey;
|
|
10446
|
+
return messages[key] ?? messages.defaultFont;
|
|
10447
|
+
}
|
|
10448
|
+
function digitTitle(digitForm, messages) {
|
|
10449
|
+
if (digitForm === "arabicIndic") return messages.arabicIndicDigits;
|
|
10450
|
+
if (digitForm === "persianIndic") return messages.persianIndicDigits;
|
|
10451
|
+
return messages.westernDigits;
|
|
10452
|
+
}
|
|
10453
|
+
function spacingArrow(command, side) {
|
|
10454
|
+
const pointsWithFlow = command.spacing.direction === "positive";
|
|
10455
|
+
if (pointsWithFlow) {
|
|
10456
|
+
return side === "arabic" ? "\u2190" : "\u2192";
|
|
10457
|
+
}
|
|
10458
|
+
return side === "arabic" ? "\u2192" : "\u2190";
|
|
10459
|
+
}
|
|
10460
|
+
function functionLabel(command) {
|
|
10461
|
+
if (command.id !== "ln") {
|
|
10462
|
+
return command.arabicLabel;
|
|
10463
|
+
}
|
|
10464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "function-command-label-with-sub", "aria-hidden": "true", children: [
|
|
10465
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "function-command-label-with-sub__base", children: command.arabicLabel }),
|
|
10466
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "function-command-label-with-sub__sub", children: "\u0647\u0640" })
|
|
10467
|
+
] });
|
|
10468
|
+
}
|
|
10469
|
+
function operatorLabel(command) {
|
|
10470
|
+
const label = command.svg_path ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10471
|
+
"span",
|
|
10472
|
+
{
|
|
10473
|
+
className: "operator-command-svg-label",
|
|
10474
|
+
"aria-hidden": "true",
|
|
10475
|
+
style: {
|
|
9928
10476
|
mask: `url("${command.svg_path}") center / contain no-repeat`,
|
|
9929
10477
|
WebkitMask: `url("${command.svg_path}") center / contain no-repeat`
|
|
9930
10478
|
}
|
|
9931
10479
|
}
|
|
9932
10480
|
) : command.Label;
|
|
9933
|
-
return /* @__PURE__ */ (0,
|
|
10481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: label });
|
|
9934
10482
|
}
|
|
9935
10483
|
function categoryTitle(view, messages) {
|
|
9936
10484
|
if (view === "delimiters") return messages.insertDelimiters;
|
|
@@ -9951,24 +10499,24 @@ function EquationMobileToolbar({
|
|
|
9951
10499
|
inputRef,
|
|
9952
10500
|
getRuntime
|
|
9953
10501
|
}) {
|
|
9954
|
-
const [sheetView, setSheetView] = (0,
|
|
9955
|
-
const [envMode, setEnvMode] = (0,
|
|
9956
|
-
const [matrixStyle, setMatrixStyle] = (0,
|
|
9957
|
-
const [matrixRows, setMatrixRows] = (0,
|
|
9958
|
-
const [matrixColumns, setMatrixColumns] = (0,
|
|
9959
|
-
const [alignmentColumn, setAlignmentColumn] = (0,
|
|
9960
|
-
const dialogRef = (0,
|
|
9961
|
-
const moreButtonRef = (0,
|
|
9962
|
-
const delimiterButtonRef = (0,
|
|
9963
|
-
const backButtonRef = (0,
|
|
9964
|
-
const restoreFocusRef = (0,
|
|
9965
|
-
const sheetTitleId = (0,
|
|
10502
|
+
const [sheetView, setSheetView] = (0, import_react4.useState)("closed");
|
|
10503
|
+
const [envMode, setEnvMode] = (0, import_react4.useState)("matrix");
|
|
10504
|
+
const [matrixStyle, setMatrixStyle] = (0, import_react4.useState)("pmatrix");
|
|
10505
|
+
const [matrixRows, setMatrixRows] = (0, import_react4.useState)(2);
|
|
10506
|
+
const [matrixColumns, setMatrixColumns] = (0, import_react4.useState)(2);
|
|
10507
|
+
const [alignmentColumn, setAlignmentColumn] = (0, import_react4.useState)(1);
|
|
10508
|
+
const dialogRef = (0, import_react4.useRef)(null);
|
|
10509
|
+
const moreButtonRef = (0, import_react4.useRef)(null);
|
|
10510
|
+
const delimiterButtonRef = (0, import_react4.useRef)(null);
|
|
10511
|
+
const backButtonRef = (0, import_react4.useRef)(null);
|
|
10512
|
+
const restoreFocusRef = (0, import_react4.useRef)(null);
|
|
10513
|
+
const sheetTitleId = (0, import_react4.useId)();
|
|
9966
10514
|
const sheetOpen = sheetView !== "closed";
|
|
9967
10515
|
function dismissSheet() {
|
|
9968
10516
|
setSheetView("closed");
|
|
9969
10517
|
}
|
|
9970
10518
|
useDialogFocus({ open: sheetOpen, dialogRef, onClose: dismissSheet, triggerRef: restoreFocusRef });
|
|
9971
|
-
(0,
|
|
10519
|
+
(0, import_react4.useEffect)(() => {
|
|
9972
10520
|
if (sheetView !== "closed" && sheetView !== "root" && sheetView !== "delimiters") {
|
|
9973
10521
|
const timer = window.setTimeout(() => backButtonRef.current?.focus(), 0);
|
|
9974
10522
|
return () => window.clearTimeout(timer);
|
|
@@ -10025,415 +10573,323 @@ function EquationMobileToolbar({
|
|
|
10025
10573
|
const directButtonMouseDown = (event) => event.preventDefault();
|
|
10026
10574
|
const undoArrow = state.activeSide === "arabic" ? "\u21B7" : "\u21B6";
|
|
10027
10575
|
const redoArrow = state.activeSide === "arabic" ? "\u21B6" : "\u21B7";
|
|
10028
|
-
const
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
command
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10576
|
+
const categoryIcons = {
|
|
10577
|
+
structures: "structure",
|
|
10578
|
+
functions: "functions",
|
|
10579
|
+
operators: "operators",
|
|
10580
|
+
matrices: "matrices",
|
|
10581
|
+
typography: "typography",
|
|
10582
|
+
spacing: "spacing",
|
|
10583
|
+
digits: "digits"
|
|
10584
|
+
};
|
|
10585
|
+
const renderFunctionGroup = (label, commands, limits = false, outline = false) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileSection, { title: label, icon: "functions", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileGrid, { dense: true, className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: commands.map((command) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10586
|
+
"button",
|
|
10587
|
+
{
|
|
10588
|
+
className: `function-command-option${outline ? " function-command-option--outline" : ""}`,
|
|
10589
|
+
type: "button",
|
|
10590
|
+
title: atomicCommandTitle(command, uiLocale),
|
|
10591
|
+
"aria-label": atomicCommandTitle(command, uiLocale),
|
|
10592
|
+
onClick: () => runAndClose((runtime) => {
|
|
10593
|
+
if (limits) runtime.insertLimitsSeriesTemplate(command.id);
|
|
10594
|
+
else runtime.insertAtomicCommand(command.id);
|
|
10595
|
+
}),
|
|
10596
|
+
children: functionLabel(command)
|
|
10597
|
+
},
|
|
10598
|
+
command.id
|
|
10599
|
+
)) }) });
|
|
10600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
10601
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__mobile-toolbar", role: "toolbar", "aria-label": messages.compactToolbar, children: [
|
|
10602
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", disabled: !state.canUndo, title: messages.undo, "aria-label": messages.undo, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.performUndo(), children: undoArrow }),
|
|
10603
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", disabled: !state.canRedo, title: messages.redo, "aria-label": messages.redo, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.performRedo(), children: redoArrow }),
|
|
10604
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", title: messages.insertFraction, "aria-label": messages.insertFraction, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.insertFraction(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "toolbar-frac-icon", "aria-hidden": "true", children: [
|
|
10605
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u0623" }),
|
|
10606
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u0628" })
|
|
10053
10607
|
] }) }),
|
|
10054
|
-
/* @__PURE__ */ (0,
|
|
10055
|
-
/* @__PURE__ */ (0,
|
|
10056
|
-
/* @__PURE__ */ (0,
|
|
10608
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", title: messages.addSuperscript, "aria-label": messages.addSuperscript, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.addSup(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
|
|
10609
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u0646" }),
|
|
10610
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u0633" })
|
|
10057
10611
|
] }) }),
|
|
10058
|
-
/* @__PURE__ */ (0,
|
|
10059
|
-
/* @__PURE__ */ (0,
|
|
10060
|
-
/* @__PURE__ */ (0,
|
|
10612
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", title: messages.addSubscript, "aria-label": messages.addSubscript, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.addSub(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
|
|
10613
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u0646" }),
|
|
10614
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u0633" })
|
|
10061
10615
|
] }) }),
|
|
10062
|
-
/* @__PURE__ */ (0,
|
|
10063
|
-
/* @__PURE__ */ (0,
|
|
10064
|
-
/* @__PURE__ */ (0,
|
|
10616
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { ref: delimiterButtonRef, type: "button", title: messages.insertDelimiters, "aria-label": messages.insertDelimiters, "aria-haspopup": "dialog", "aria-expanded": sheetView === "delimiters", onClick: openDelimiters, children: "()" }),
|
|
10617
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { className: "butex-widget__mobile-danger", type: "button", title: messages.deleteSelectedStructure, "aria-label": messages.deleteSelectedStructure, onMouseDown: directButtonMouseDown, onClick: () => getRuntime()?.deleteStructure(), children: "\xD7" }),
|
|
10618
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { ref: moreButtonRef, type: "button", title: messages.moreActions, "aria-label": messages.moreActions, "aria-haspopup": "dialog", "aria-expanded": sheetOpen && sheetView !== "delimiters", onClick: openMore, children: "\u22EF" })
|
|
10065
10619
|
] }),
|
|
10066
|
-
sheetOpen ? /* @__PURE__ */ (0,
|
|
10067
|
-
|
|
10620
|
+
sheetOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
10621
|
+
MobileCommandSheet,
|
|
10068
10622
|
{
|
|
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
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "butex-widget__sheet-section", children: [
|
|
10273
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: messages.chooseWritingFont }),
|
|
10274
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "butex-widget__sheet-choice-row", children: [
|
|
10275
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10276
|
-
"button",
|
|
10277
|
-
{
|
|
10278
|
-
type: "button",
|
|
10279
|
-
className: "character-font-option--bold",
|
|
10280
|
-
"aria-pressed": state.boldCharacterStyle,
|
|
10281
|
-
title: boldCharacterStyleLabel(uiLocale),
|
|
10282
|
-
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentBoldCharacterStyle()),
|
|
10283
|
-
children: boldCharacterStyleLabel(uiLocale)
|
|
10284
|
-
}
|
|
10285
|
-
),
|
|
10286
|
-
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10287
|
-
"button",
|
|
10288
|
-
{
|
|
10289
|
-
type: "button",
|
|
10290
|
-
className: `character-font-option--${option.id}`,
|
|
10291
|
-
"aria-pressed": !state.boldCharacterStyle && state.characterFont === option.id,
|
|
10292
|
-
title: characterFontTitle(option.id, messages),
|
|
10293
|
-
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentCharacterFont(option.id)),
|
|
10294
|
-
children: option.label
|
|
10295
|
-
},
|
|
10296
|
-
option.id
|
|
10297
|
-
))
|
|
10298
|
-
] })
|
|
10299
|
-
] }),
|
|
10300
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10301
|
-
"button",
|
|
10302
|
-
{
|
|
10303
|
-
className: "ligature-btn butex-widget__compact-ligature",
|
|
10304
|
-
type: "button",
|
|
10305
|
-
title: !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10306
|
-
"aria-label": !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10307
|
-
"aria-pressed": !state.splitLeafTyping,
|
|
10308
|
-
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSplitLeafTyping()),
|
|
10309
|
-
children: !state.splitLeafTyping ? "\u0633\u0635\u0639" : "\u0633 \u0635 \u0639"
|
|
10310
|
-
}
|
|
10311
|
-
)
|
|
10312
|
-
] }) : null,
|
|
10313
|
-
sheetView === "spacing" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "butex-widget__sheet-command-list", children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", title: atomicCommandTitle(command, uiLocale), "aria-label": atomicCommandTitle(command, uiLocale), onClick: () => runAndClose((runtime) => runtime.insertAtomicCommand(command.id)), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
10314
|
-
"span",
|
|
10623
|
+
scope: "butex-widget",
|
|
10624
|
+
sourceRef: moreButtonRef,
|
|
10625
|
+
dialogRef,
|
|
10626
|
+
titleId: sheetTitleId,
|
|
10627
|
+
title: categoryTitle(sheetView, messages),
|
|
10628
|
+
closeLabel: messages.closeActions,
|
|
10629
|
+
onClose: dismissSheet,
|
|
10630
|
+
backRef: backButtonRef,
|
|
10631
|
+
backLabel: messages.back,
|
|
10632
|
+
onBack: sheetView !== "root" && sheetView !== "delimiters" ? () => setSheetView("root") : void 0,
|
|
10633
|
+
children: [
|
|
10634
|
+
sheetView === "root" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
10635
|
+
showSideSwitcher ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileSection, { title: messages.activeSide, icon: "typography", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-mobile-command__choice-row", children: [
|
|
10636
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10637
|
+
"button",
|
|
10638
|
+
{
|
|
10639
|
+
type: "button",
|
|
10640
|
+
className: "butex-mobile-command__choice",
|
|
10641
|
+
"aria-pressed": state.activeSide === "arabic",
|
|
10642
|
+
onClick: (event) => {
|
|
10643
|
+
if (state.activeSide !== "arabic") runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSide());
|
|
10644
|
+
},
|
|
10645
|
+
children: messages.arabicSide
|
|
10646
|
+
}
|
|
10647
|
+
),
|
|
10648
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10649
|
+
"button",
|
|
10650
|
+
{
|
|
10651
|
+
type: "button",
|
|
10652
|
+
className: "butex-mobile-command__choice",
|
|
10653
|
+
"aria-pressed": state.activeSide === "english",
|
|
10654
|
+
onClick: (event) => {
|
|
10655
|
+
if (state.activeSide !== "english") runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSide());
|
|
10656
|
+
},
|
|
10657
|
+
children: messages.englishSide
|
|
10658
|
+
}
|
|
10659
|
+
)
|
|
10660
|
+
] }) }) : null,
|
|
10661
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileSection, { title: messages.clipboard, icon: "copy", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(MobileGrid, { children: [
|
|
10662
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: {
|
|
10663
|
+
id: "copy",
|
|
10664
|
+
label: messages.copy,
|
|
10665
|
+
icon: "copy",
|
|
10666
|
+
disabled: !state.hasSelection,
|
|
10667
|
+
onSelect: () => runAndClose((runtime) => {
|
|
10668
|
+
void runtime.performCopy();
|
|
10669
|
+
})
|
|
10670
|
+
} }),
|
|
10671
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: {
|
|
10672
|
+
id: "cut",
|
|
10673
|
+
label: messages.cut,
|
|
10674
|
+
icon: "cut",
|
|
10675
|
+
disabled: !state.hasSelection,
|
|
10676
|
+
onSelect: () => runAndClose((runtime) => {
|
|
10677
|
+
void runtime.performCut();
|
|
10678
|
+
})
|
|
10679
|
+
} }),
|
|
10680
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: {
|
|
10681
|
+
id: "paste",
|
|
10682
|
+
label: messages.paste,
|
|
10683
|
+
icon: "paste",
|
|
10684
|
+
onSelect: () => runAndClose((runtime) => {
|
|
10685
|
+
void runtime.performPaste();
|
|
10686
|
+
})
|
|
10687
|
+
} })
|
|
10688
|
+
] }) }),
|
|
10689
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("nav", { "aria-label": messages.commandCategories, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileGrid, { children: ["structures", "functions", "operators", "matrices", "typography", "spacing", "digits"].map((view) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10690
|
+
MobileCategory,
|
|
10691
|
+
{
|
|
10692
|
+
label: categoryTitle(view, messages),
|
|
10693
|
+
icon: categoryIcons[view],
|
|
10694
|
+
onClick: () => setSheetView(view)
|
|
10695
|
+
},
|
|
10696
|
+
view
|
|
10697
|
+
)) }) })
|
|
10698
|
+
] }) : null,
|
|
10699
|
+
sheetView === "delimiters" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-command-grid butex-widget__sheet-command-grid--three butex-mobile-command__math-glyphs", children: [
|
|
10700
|
+
{ kind: "paren", label: "()", title: messages.insertParentheses },
|
|
10701
|
+
{ kind: "bracket", label: "[]", title: messages.insertBrackets },
|
|
10702
|
+
{ kind: "brace", label: "{}", title: messages.insertBraces },
|
|
10703
|
+
{ kind: "vert", label: "| |", title: "| |" },
|
|
10704
|
+
{ kind: "Vert", label: "\u2016 \u2016", title: "\u2016 \u2016" }
|
|
10705
|
+
].map((option) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", "aria-label": option.title, title: option.title, onClick: () => runAndClose((runtime) => runtime.insertDelimiterByKind(option.kind)), children: option.label }, option.kind)) }) : null,
|
|
10706
|
+
sheetView === "structures" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
10707
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(MobileGrid, { children: [
|
|
10708
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: { id: "sqrt", label: messages.insertRoot, icon: "math", onSelect: () => runAndClose((runtime) => runtime.insertSqrt()) } }),
|
|
10709
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: { id: "over", label: messages.insertOverset, icon: "structure", onSelect: () => runAndClose((runtime) => runtime.insertOverset()) } }),
|
|
10710
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: { id: "under", label: messages.insertUnderset, icon: "structure", onSelect: () => runAndClose((runtime) => runtime.insertUnderset()) } }),
|
|
10711
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: { id: "pair", label: messages.insertAccentPair, icon: "structure", onSelect: () => runAndClose((runtime) => runtime.insertAccentPair()) } }),
|
|
10712
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: { id: "removeSup", label: messages.removeSuperscript, icon: "trash", onSelect: () => runAndClose((runtime) => runtime.removeSup()) } }),
|
|
10713
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MobileAction, { command: { id: "removeSub", label: messages.removeSubscript, icon: "trash", onSelect: () => runAndClose((runtime) => runtime.removeSub()) } })
|
|
10714
|
+
] }),
|
|
10715
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "butex-widget__sheet-section", children: [
|
|
10716
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h4", { children: messages.insertAccents }),
|
|
10717
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: ACCENT_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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__ */ (0, import_jsx_runtime2.jsx)("span", { className: "operator-command-label", "aria-hidden": "true", children: command.label }) }, command.id)) })
|
|
10718
|
+
] })
|
|
10719
|
+
] }) : null,
|
|
10720
|
+
sheetView === "functions" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
10721
|
+
renderFunctionGroup(messages.insertFunction, FUNCTION_COMMANDS),
|
|
10722
|
+
renderFunctionGroup(messages.insertLimitsSeries, LIMITS_SERIES_COMMANDS, true),
|
|
10723
|
+
renderFunctionGroup(messages.insertAdditionalFunctions, FUNCTION2_COMMANDS),
|
|
10724
|
+
renderFunctionGroup(messages.insertDerivative, DERIVATIVE_COMMANDS),
|
|
10725
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: [
|
|
10726
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { className: "function-command-option", type: "button", title: messages.insertFirstDerivative, "aria-label": messages.insertFirstDerivative, onClick: () => runAndClose((runtime) => runtime.insertFirstDerivative()), children: "\u0621/\u0633" }),
|
|
10727
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { className: "function-command-option", type: "button", title: messages.insertSecondDerivative, "aria-label": messages.insertSecondDerivative, onClick: () => runAndClose((runtime) => runtime.insertSecondDerivative()), children: "\u0621\xB2/\u0633\xB2" })
|
|
10728
|
+
] }),
|
|
10729
|
+
renderFunctionGroup(messages.insertNumberSets, GROUP_COMMANDS, false, true)
|
|
10730
|
+
] }) : null,
|
|
10731
|
+
sheetView === "operators" ? OPERATOR_GROUPS.map((commands, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("section", { className: "butex-widget__sheet-section", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: commands.map((command) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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,
|
|
10732
|
+
sheetView === "matrices" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__mobile-matrix-picker", children: [
|
|
10733
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-choice-row", role: "group", "aria-label": messages.environmentType, children: [
|
|
10734
|
+
{ id: "matrix", label: messages.matrix },
|
|
10735
|
+
{ id: "array", label: messages.array },
|
|
10736
|
+
{ id: "aligned", label: messages.aligned },
|
|
10737
|
+
{ id: "cases", label: messages.piecewise }
|
|
10738
|
+
].map((option) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10739
|
+
"button",
|
|
10740
|
+
{
|
|
10741
|
+
type: "button",
|
|
10742
|
+
"aria-pressed": envMode === option.id,
|
|
10743
|
+
onClick: () => {
|
|
10744
|
+
setEnvMode(option.id);
|
|
10745
|
+
if (option.id === "aligned" || option.id === "cases") setMatrixColumns(2);
|
|
10746
|
+
},
|
|
10747
|
+
children: option.label
|
|
10748
|
+
},
|
|
10749
|
+
option.id
|
|
10750
|
+
)) }),
|
|
10751
|
+
envMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-choice-row", role: "group", "aria-label": messages.matrixType, children: MATRIX_STYLES.map((style) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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,
|
|
10752
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "butex-widget__sheet-section", children: [
|
|
10753
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h4", { children: messages.commonMatrixSizes }),
|
|
10754
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__matrix-presets", children: (envMode === "aligned" || envMode === "cases" ? MATRIX_PRESETS.filter((preset) => preset.columns === 2) : MATRIX_PRESETS).map((preset) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
10755
|
+
"button",
|
|
10756
|
+
{
|
|
10757
|
+
type: "button",
|
|
10758
|
+
"aria-pressed": matrixRows === preset.rows && matrixColumns === preset.columns,
|
|
10759
|
+
onClick: () => {
|
|
10760
|
+
setMatrixRows(preset.rows);
|
|
10761
|
+
setMatrixColumns(envMode === "aligned" || envMode === "cases" ? 2 : preset.columns);
|
|
10762
|
+
},
|
|
10763
|
+
children: [
|
|
10764
|
+
preset.rows,
|
|
10765
|
+
"\xD7",
|
|
10766
|
+
envMode === "aligned" || envMode === "cases" ? 2 : preset.columns
|
|
10767
|
+
]
|
|
10768
|
+
},
|
|
10769
|
+
`${String(preset.rows)}-${String(preset.columns)}`
|
|
10770
|
+
)) })
|
|
10771
|
+
] }),
|
|
10772
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__matrix-stepper-row", children: [
|
|
10773
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: messages.rows }),
|
|
10774
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__matrix-stepper", children: [
|
|
10775
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", disabled: matrixRows <= 1, "aria-label": messages.decreaseRows, onClick: () => setMatrixDimension("rows", matrixRows - 1), children: "\u2212" }),
|
|
10776
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("output", { "aria-live": "polite", children: matrixRows }),
|
|
10777
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", disabled: matrixRows >= 12, "aria-label": messages.increaseRows, onClick: () => setMatrixDimension("rows", matrixRows + 1), children: "+" })
|
|
10778
|
+
] })
|
|
10779
|
+
] }),
|
|
10780
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__matrix-stepper-row", children: [
|
|
10781
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: messages.columns }),
|
|
10782
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__matrix-stepper", children: [
|
|
10783
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", disabled: matrixColumns <= 1 || envMode === "aligned" || envMode === "cases", "aria-label": messages.decreaseColumns, onClick: () => setMatrixDimension("columns", matrixColumns - 1), children: "\u2212" }),
|
|
10784
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("output", { "aria-live": "polite", children: envMode === "aligned" || envMode === "cases" ? 2 : matrixColumns }),
|
|
10785
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", disabled: matrixColumns >= 12 || envMode === "aligned" || envMode === "cases", "aria-label": messages.increaseColumns, onClick: () => setMatrixDimension("columns", matrixColumns + 1), children: "+" })
|
|
10786
|
+
] })
|
|
10787
|
+
] }),
|
|
10788
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "butex-widget__matrix-size-summary", "aria-live": "polite", children: matrixSizeLabel(matrixRows, envMode === "aligned" || envMode === "cases" ? 2 : matrixColumns, messages) }),
|
|
10789
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "butex-widget__matrix-insert", onClick: insertEnvironment, children: messages.insert }),
|
|
10790
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "butex-widget__sheet-section", children: [
|
|
10791
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h4", { children: messages.editSelectedEnvironment }),
|
|
10792
|
+
envMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", onClick: () => getRuntime()?.setMatrixEnvStyle(matrixStyle), children: messages.applyStyle }) : null,
|
|
10793
|
+
envMode === "array" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__matrix-alignment", children: [
|
|
10794
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { children: [
|
|
10795
|
+
messages.column,
|
|
10796
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("input", { type: "number", min: 1, max: 12, value: alignmentColumn, onChange: (event) => setAlignmentColumn(clampMatrixSize(Number(event.currentTarget.value) || 1)) })
|
|
10797
|
+
] }),
|
|
10798
|
+
ARRAY_ALIGNMENTS.map((alignment) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", title: alignmentTitle(alignment, messages), onClick: () => getRuntime()?.setArrayColumnAlignment(alignmentColumn - 1, alignment), children: alignmentLabel(alignment, messages) }, alignment))
|
|
10799
|
+
] }) : null,
|
|
10800
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__sheet-command-grid butex-mobile-command__math-glyphs", children: [
|
|
10801
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", onClick: () => getRuntime()?.addMatrixRow(), children: [
|
|
10802
|
+
"+",
|
|
10803
|
+
messages.row
|
|
10804
|
+
] }),
|
|
10805
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", onClick: () => getRuntime()?.removeMatrixRow(), children: [
|
|
10806
|
+
"\u2212",
|
|
10807
|
+
messages.row
|
|
10808
|
+
] }),
|
|
10809
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", disabled: envMode === "cases", onClick: () => getRuntime()?.addMatrixColumn(), children: [
|
|
10810
|
+
"+",
|
|
10811
|
+
messages.column
|
|
10812
|
+
] }),
|
|
10813
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", disabled: envMode === "cases", onClick: () => getRuntime()?.removeMatrixColumn(), children: [
|
|
10814
|
+
"\u2212",
|
|
10815
|
+
messages.column
|
|
10816
|
+
] })
|
|
10817
|
+
] })
|
|
10818
|
+
] })
|
|
10819
|
+
] }) : null,
|
|
10820
|
+
sheetView === "typography" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
10821
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "butex-widget__sheet-section", children: [
|
|
10822
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h4", { children: messages.chooseWritingFont }),
|
|
10823
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "butex-widget__sheet-choice-row", children: [
|
|
10824
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10825
|
+
"button",
|
|
10315
10826
|
{
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
]
|
|
10827
|
+
type: "button",
|
|
10828
|
+
className: "character-font-option--bold",
|
|
10829
|
+
"aria-pressed": state.boldCharacterStyle,
|
|
10830
|
+
title: boldCharacterStyleLabel(uiLocale),
|
|
10831
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentBoldCharacterStyle()),
|
|
10832
|
+
children: boldCharacterStyleLabel(uiLocale)
|
|
10323
10833
|
}
|
|
10324
|
-
)
|
|
10325
|
-
|
|
10326
|
-
{ id: "western", label: "456" },
|
|
10327
|
-
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
10328
|
-
{ id: "persianIndic", label: "\u06F4\u06F5\u06F6" }
|
|
10329
|
-
].map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
10834
|
+
),
|
|
10835
|
+
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10330
10836
|
"button",
|
|
10331
10837
|
{
|
|
10332
10838
|
type: "button",
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10839
|
+
className: `character-font-option--${option.id}`,
|
|
10840
|
+
"aria-pressed": !state.boldCharacterStyle && state.characterFont === option.id,
|
|
10841
|
+
title: characterFontTitle(option.id, messages),
|
|
10842
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentCharacterFont(option.id)),
|
|
10336
10843
|
children: option.label
|
|
10337
10844
|
},
|
|
10338
10845
|
option.id
|
|
10339
|
-
))
|
|
10846
|
+
))
|
|
10340
10847
|
] })
|
|
10341
|
-
]
|
|
10342
|
-
|
|
10343
|
-
|
|
10848
|
+
] }),
|
|
10849
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10850
|
+
"button",
|
|
10851
|
+
{
|
|
10852
|
+
className: "ligature-btn butex-widget__compact-ligature",
|
|
10853
|
+
type: "button",
|
|
10854
|
+
title: !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10855
|
+
"aria-label": !state.splitLeafTyping ? messages.disableLetterMerging : messages.enableLetterMerging,
|
|
10856
|
+
"aria-pressed": !state.splitLeafTyping,
|
|
10857
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.toggleSplitLeafTyping()),
|
|
10858
|
+
children: !state.splitLeafTyping ? "\u0633\u0635\u0639" : "\u0633 \u0635 \u0639"
|
|
10859
|
+
}
|
|
10860
|
+
)
|
|
10861
|
+
] }) : null,
|
|
10862
|
+
sheetView === "spacing" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-command-list", children: SPACING_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", title: atomicCommandTitle(command, uiLocale), "aria-label": atomicCommandTitle(command, uiLocale), onClick: () => runAndClose((runtime) => runtime.insertAtomicCommand(command.id)), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
10863
|
+
"span",
|
|
10864
|
+
{
|
|
10865
|
+
className: `spacing-command-glyph spacing-command-glyph--${command.spacing.direction} spacing-command-glyph--level-${String(command.spacing.level)}`,
|
|
10866
|
+
"aria-hidden": "true",
|
|
10867
|
+
children: [
|
|
10868
|
+
command.spacing.direction === "negative" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "spacing-command-glyph__arrow", children: spacingArrow(command, state.activeSide) }) : null,
|
|
10869
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "spacing-command-glyph__bar" }),
|
|
10870
|
+
command.spacing.direction === "positive" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "spacing-command-glyph__arrow", children: spacingArrow(command, state.activeSide) }) : null
|
|
10871
|
+
]
|
|
10872
|
+
}
|
|
10873
|
+
) }, command.id)) }) : null,
|
|
10874
|
+
sheetView === "digits" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "butex-widget__sheet-choice-row", children: MOBILE_DIGIT_CHOICES.map((option) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10875
|
+
"button",
|
|
10876
|
+
{
|
|
10877
|
+
type: "button",
|
|
10878
|
+
"aria-pressed": state.digitForm === option.id,
|
|
10879
|
+
title: digitTitle(option.id, messages),
|
|
10880
|
+
onClick: (event) => runAndKeepFocus(event.currentTarget, (runtime) => runtime.setCurrentDigitForm(option.id)),
|
|
10881
|
+
children: option.label
|
|
10882
|
+
},
|
|
10883
|
+
option.id
|
|
10884
|
+
)) }) : null
|
|
10885
|
+
]
|
|
10344
10886
|
}
|
|
10345
10887
|
) : null
|
|
10346
10888
|
] });
|
|
10347
10889
|
}
|
|
10348
10890
|
|
|
10349
|
-
// src/react/visibleViewport.ts
|
|
10350
|
-
function positiveFinite(value, fallback) {
|
|
10351
|
-
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
10352
|
-
}
|
|
10353
|
-
function finiteOffset(value) {
|
|
10354
|
-
return Number.isFinite(value) ? value : 0;
|
|
10355
|
-
}
|
|
10356
|
-
function visibleViewportSnapshot(view) {
|
|
10357
|
-
const fallbackWidth = positiveFinite(view.innerWidth, 1);
|
|
10358
|
-
const fallbackHeight = positiveFinite(view.innerHeight, 1);
|
|
10359
|
-
const visualViewport = view.visualViewport;
|
|
10360
|
-
if (visualViewport && Number.isFinite(visualViewport.width) && visualViewport.width > 0 && Number.isFinite(visualViewport.height) && visualViewport.height > 0) {
|
|
10361
|
-
return {
|
|
10362
|
-
width: visualViewport.width,
|
|
10363
|
-
height: visualViewport.height,
|
|
10364
|
-
offsetLeft: finiteOffset(visualViewport.offsetLeft),
|
|
10365
|
-
offsetTop: finiteOffset(visualViewport.offsetTop),
|
|
10366
|
-
scale: positiveFinite(visualViewport.scale, 1),
|
|
10367
|
-
source: "visual-viewport"
|
|
10368
|
-
};
|
|
10369
|
-
}
|
|
10370
|
-
return {
|
|
10371
|
-
width: fallbackWidth,
|
|
10372
|
-
height: fallbackHeight,
|
|
10373
|
-
offsetLeft: 0,
|
|
10374
|
-
offsetTop: 0,
|
|
10375
|
-
scale: 1,
|
|
10376
|
-
source: "layout-viewport"
|
|
10377
|
-
};
|
|
10378
|
-
}
|
|
10379
|
-
function reasonPriority(reason) {
|
|
10380
|
-
if (reason === "orientation") return 3;
|
|
10381
|
-
if (reason === "resize") return 2;
|
|
10382
|
-
if (reason === "scroll") return 1;
|
|
10383
|
-
return 0;
|
|
10384
|
-
}
|
|
10385
|
-
function observeVisibleViewport(view, onChange) {
|
|
10386
|
-
let previous = visibleViewportSnapshot(view);
|
|
10387
|
-
let frame = null;
|
|
10388
|
-
let pendingReason = "scroll";
|
|
10389
|
-
onChange({
|
|
10390
|
-
snapshot: previous,
|
|
10391
|
-
initial: true,
|
|
10392
|
-
sizeChanged: false,
|
|
10393
|
-
offsetChanged: false,
|
|
10394
|
-
reason: "initial"
|
|
10395
|
-
});
|
|
10396
|
-
const emit = () => {
|
|
10397
|
-
frame = null;
|
|
10398
|
-
const next = visibleViewportSnapshot(view);
|
|
10399
|
-
const sizeChanged = next.width !== previous.width || next.height !== previous.height || next.scale !== previous.scale || next.source !== previous.source;
|
|
10400
|
-
const offsetChanged = next.offsetLeft !== previous.offsetLeft || next.offsetTop !== previous.offsetTop;
|
|
10401
|
-
const reason = pendingReason;
|
|
10402
|
-
pendingReason = "scroll";
|
|
10403
|
-
previous = next;
|
|
10404
|
-
onChange({ snapshot: next, initial: false, sizeChanged, offsetChanged, reason });
|
|
10405
|
-
};
|
|
10406
|
-
const schedule = (reason) => {
|
|
10407
|
-
if (reasonPriority(reason) > reasonPriority(pendingReason)) {
|
|
10408
|
-
pendingReason = reason;
|
|
10409
|
-
}
|
|
10410
|
-
if (frame !== null) {
|
|
10411
|
-
return;
|
|
10412
|
-
}
|
|
10413
|
-
frame = view.requestAnimationFrame(emit);
|
|
10414
|
-
};
|
|
10415
|
-
const onResize = () => schedule("resize");
|
|
10416
|
-
const onScroll = () => schedule("scroll");
|
|
10417
|
-
const onOrientation = () => schedule("orientation");
|
|
10418
|
-
const visualViewport = view.visualViewport;
|
|
10419
|
-
visualViewport?.addEventListener("resize", onResize);
|
|
10420
|
-
visualViewport?.addEventListener("scroll", onScroll);
|
|
10421
|
-
view.addEventListener("resize", onResize);
|
|
10422
|
-
view.addEventListener("orientationchange", onOrientation);
|
|
10423
|
-
return () => {
|
|
10424
|
-
visualViewport?.removeEventListener("resize", onResize);
|
|
10425
|
-
visualViewport?.removeEventListener("scroll", onScroll);
|
|
10426
|
-
view.removeEventListener("resize", onResize);
|
|
10427
|
-
view.removeEventListener("orientationchange", onOrientation);
|
|
10428
|
-
if (frame !== null) {
|
|
10429
|
-
view.cancelAnimationFrame(frame);
|
|
10430
|
-
frame = null;
|
|
10431
|
-
}
|
|
10432
|
-
};
|
|
10433
|
-
}
|
|
10434
|
-
|
|
10435
10891
|
// src/react/desktopPopover.ts
|
|
10436
|
-
var
|
|
10892
|
+
var import_react5 = require("react");
|
|
10437
10893
|
var POPOVER_GAP = 5;
|
|
10438
10894
|
var VIEWPORT_MARGIN = 8;
|
|
10439
10895
|
var MIN_USABLE_HEIGHT = 96;
|
|
@@ -10444,7 +10900,7 @@ function clearPlacement(popover) {
|
|
|
10444
10900
|
delete popover.dataset.placement;
|
|
10445
10901
|
}
|
|
10446
10902
|
function useDesktopPopoverPlacement(rootRef, active, onClose) {
|
|
10447
|
-
(0,
|
|
10903
|
+
(0, import_react5.useEffect)(() => {
|
|
10448
10904
|
if (!active || typeof window === "undefined") {
|
|
10449
10905
|
return;
|
|
10450
10906
|
}
|
|
@@ -10572,7 +11028,7 @@ function useDesktopPopoverPlacement(rootRef, active, onClose) {
|
|
|
10572
11028
|
}
|
|
10573
11029
|
|
|
10574
11030
|
// src/react/ButexEditor.tsx
|
|
10575
|
-
var
|
|
11031
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
10576
11032
|
var DIGIT_FORM_OPTIONS = [
|
|
10577
11033
|
{ id: "western", label: "456" },
|
|
10578
11034
|
{ id: "arabicIndic", label: "\u0664\u0665\u0666" },
|
|
@@ -10651,16 +11107,16 @@ function renderArabicCommandLabel(command) {
|
|
|
10651
11107
|
if (command.id !== "ln") {
|
|
10652
11108
|
return command.arabicLabel;
|
|
10653
11109
|
}
|
|
10654
|
-
return /* @__PURE__ */ (0,
|
|
10655
|
-
/* @__PURE__ */ (0,
|
|
10656
|
-
/* @__PURE__ */ (0,
|
|
11110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "function-command-label-with-sub", "aria-hidden": "true", children: [
|
|
11111
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "function-command-label-with-sub__base", children: command.arabicLabel }),
|
|
11112
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "function-command-label-with-sub__sub", children: "\u0647\u0640" })
|
|
10657
11113
|
] });
|
|
10658
11114
|
}
|
|
10659
11115
|
function renderOperatorCommandLabel(command) {
|
|
10660
11116
|
if (!command.svg_path) {
|
|
10661
11117
|
return command.Label;
|
|
10662
11118
|
}
|
|
10663
|
-
return /* @__PURE__ */ (0,
|
|
11119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
10664
11120
|
"span",
|
|
10665
11121
|
{
|
|
10666
11122
|
className: "operator-command-svg-label",
|
|
@@ -10676,7 +11132,7 @@ function renderOperatorMenuButtonLabel(command, fallback) {
|
|
|
10676
11132
|
if (!command) {
|
|
10677
11133
|
return fallback;
|
|
10678
11134
|
}
|
|
10679
|
-
return /* @__PURE__ */ (0,
|
|
11135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) });
|
|
10680
11136
|
}
|
|
10681
11137
|
function passiveTreeText(session, messages) {
|
|
10682
11138
|
const passive = session.activeSide === "arabic" ? session.englishTree : session.arabicTree;
|
|
@@ -10686,58 +11142,58 @@ function passiveTreeText(session, messages) {
|
|
|
10686
11142
|
|
|
10687
11143
|
${latex || messages.empty}`;
|
|
10688
11144
|
}
|
|
10689
|
-
var ButexEditor = (0,
|
|
11145
|
+
var ButexEditor = (0, import_react6.forwardRef)(
|
|
10690
11146
|
function ButexEditor2({ className, debug = false, defaultSide, uiLocale = "ar", initialSession, onSessionChange, responsiveMode = "auto", showSideSwitcher = true }, ref) {
|
|
10691
11147
|
const messages = equationEditorMessages(uiLocale);
|
|
10692
|
-
const previewPanelId = (0,
|
|
11148
|
+
const previewPanelId = (0, import_react6.useId)();
|
|
10693
11149
|
const debugEnabled = debug || typeof window !== "undefined" && new URLSearchParams(window.location.search).get("debug") === "1";
|
|
10694
|
-
const wrapperRef = (0,
|
|
10695
|
-
const surfaceRef = (0,
|
|
10696
|
-
const inputRef = (0,
|
|
10697
|
-
const mathOutputRef = (0,
|
|
10698
|
-
const renderErrorRef = (0,
|
|
10699
|
-
const latexLinesRef = (0,
|
|
10700
|
-
const passivePreviewRef = (0,
|
|
10701
|
-
const debugLogRef = (0,
|
|
10702
|
-
const undoBtnRef = (0,
|
|
10703
|
-
const redoBtnRef = (0,
|
|
10704
|
-
const copyBtnRef = (0,
|
|
10705
|
-
const cutBtnRef = (0,
|
|
10706
|
-
const splitTypingBtnRef = (0,
|
|
10707
|
-
const characterFontBtnRef = (0,
|
|
10708
|
-
const digitFormBtnRef = (0,
|
|
10709
|
-
const runtimeRef = (0,
|
|
10710
|
-
const debugRef = (0,
|
|
11150
|
+
const wrapperRef = (0, import_react6.useRef)(null);
|
|
11151
|
+
const surfaceRef = (0, import_react6.useRef)(null);
|
|
11152
|
+
const inputRef = (0, import_react6.useRef)(null);
|
|
11153
|
+
const mathOutputRef = (0, import_react6.useRef)(null);
|
|
11154
|
+
const renderErrorRef = (0, import_react6.useRef)(null);
|
|
11155
|
+
const latexLinesRef = (0, import_react6.useRef)(null);
|
|
11156
|
+
const passivePreviewRef = (0, import_react6.useRef)(null);
|
|
11157
|
+
const debugLogRef = (0, import_react6.useRef)(null);
|
|
11158
|
+
const undoBtnRef = (0, import_react6.useRef)(null);
|
|
11159
|
+
const redoBtnRef = (0, import_react6.useRef)(null);
|
|
11160
|
+
const copyBtnRef = (0, import_react6.useRef)(null);
|
|
11161
|
+
const cutBtnRef = (0, import_react6.useRef)(null);
|
|
11162
|
+
const splitTypingBtnRef = (0, import_react6.useRef)(null);
|
|
11163
|
+
const characterFontBtnRef = (0, import_react6.useRef)(null);
|
|
11164
|
+
const digitFormBtnRef = (0, import_react6.useRef)(null);
|
|
11165
|
+
const runtimeRef = (0, import_react6.useRef)(null);
|
|
11166
|
+
const debugRef = (0, import_react6.useRef)(debug);
|
|
10711
11167
|
debugRef.current = debugEnabled;
|
|
10712
|
-
const uiLocaleRef = (0,
|
|
11168
|
+
const uiLocaleRef = (0, import_react6.useRef)(uiLocale);
|
|
10713
11169
|
uiLocaleRef.current = uiLocale;
|
|
10714
|
-
const onSessionChangeRef = (0,
|
|
11170
|
+
const onSessionChangeRef = (0, import_react6.useRef)(onSessionChange);
|
|
10715
11171
|
onSessionChangeRef.current = onSessionChange;
|
|
10716
|
-
const debugBodyHiddenRef = (0,
|
|
10717
|
-
const [debugBodyHidden, setDebugBodyHidden] = (0,
|
|
11172
|
+
const debugBodyHiddenRef = (0, import_react6.useRef)(false);
|
|
11173
|
+
const [debugBodyHidden, setDebugBodyHidden] = (0, import_react6.useState)(false);
|
|
10718
11174
|
debugBodyHiddenRef.current = debugBodyHidden;
|
|
10719
|
-
const [debugImportOpen, setDebugImportOpen] = (0,
|
|
10720
|
-
const [debugImportText, setDebugImportText] = (0,
|
|
10721
|
-
const [debugImportError, setDebugImportError] = (0,
|
|
10722
|
-
const [openDesktopMenu, setOpenDesktopMenu] = (0,
|
|
10723
|
-
const [selectedDigitForm2, setSelectedDigitForm] = (0,
|
|
10724
|
-
const [selectedCharacterFont, setSelectedCharacterFont] = (0,
|
|
10725
|
-
const [boldCharacterStyle, setBoldCharacterStyle] = (0,
|
|
10726
|
-
const [activeEditorSide, setActiveEditorSide] = (0,
|
|
10727
|
-
const [compactPreviewOpen, setCompactPreviewOpen] = (0,
|
|
10728
|
-
const [compactControlState, setCompactControlState] = (0,
|
|
11175
|
+
const [debugImportOpen, setDebugImportOpen] = (0, import_react6.useState)(false);
|
|
11176
|
+
const [debugImportText, setDebugImportText] = (0, import_react6.useState)("");
|
|
11177
|
+
const [debugImportError, setDebugImportError] = (0, import_react6.useState)("");
|
|
11178
|
+
const [openDesktopMenu, setOpenDesktopMenu] = (0, import_react6.useState)(null);
|
|
11179
|
+
const [selectedDigitForm2, setSelectedDigitForm] = (0, import_react6.useState)("western");
|
|
11180
|
+
const [selectedCharacterFont, setSelectedCharacterFont] = (0, import_react6.useState)("default");
|
|
11181
|
+
const [boldCharacterStyle, setBoldCharacterStyle] = (0, import_react6.useState)(initialSession?.currentCharacterWrapper === "\\boldarabic");
|
|
11182
|
+
const [activeEditorSide, setActiveEditorSide] = (0, import_react6.useState)("arabic");
|
|
11183
|
+
const [compactPreviewOpen, setCompactPreviewOpen] = (0, import_react6.useState)(false);
|
|
11184
|
+
const [compactControlState, setCompactControlState] = (0, import_react6.useState)({
|
|
10729
11185
|
canUndo: false,
|
|
10730
11186
|
canRedo: false,
|
|
10731
11187
|
hasSelection: false,
|
|
10732
11188
|
splitLeafTyping: initialSession?.splitLeafTyping ?? true
|
|
10733
11189
|
});
|
|
10734
|
-
const [envPaletteMode, setEnvPaletteMode] = (0,
|
|
10735
|
-
const [matrixStyle, setMatrixStyle] = (0,
|
|
10736
|
-
const [matrixRows, setMatrixRows] = (0,
|
|
10737
|
-
const [matrixColumns, setMatrixColumns] = (0,
|
|
10738
|
-
const [matrixHover, setMatrixHover] = (0,
|
|
10739
|
-
const [arrayAlignmentColumn, setArrayAlignmentColumn] = (0,
|
|
10740
|
-
const closeDesktopMenu = (0,
|
|
11190
|
+
const [envPaletteMode, setEnvPaletteMode] = (0, import_react6.useState)("matrix");
|
|
11191
|
+
const [matrixStyle, setMatrixStyle] = (0, import_react6.useState)("pmatrix");
|
|
11192
|
+
const [matrixRows, setMatrixRows] = (0, import_react6.useState)(2);
|
|
11193
|
+
const [matrixColumns, setMatrixColumns] = (0, import_react6.useState)(2);
|
|
11194
|
+
const [matrixHover, setMatrixHover] = (0, import_react6.useState)(null);
|
|
11195
|
+
const [arrayAlignmentColumn, setArrayAlignmentColumn] = (0, import_react6.useState)(1);
|
|
11196
|
+
const closeDesktopMenu = (0, import_react6.useCallback)(() => setOpenDesktopMenu(null), []);
|
|
10741
11197
|
useDesktopPopoverPlacement(wrapperRef, openDesktopMenu !== null, closeDesktopMenu);
|
|
10742
11198
|
function desktopMenuOpen(menu) {
|
|
10743
11199
|
return openDesktopMenu === menu;
|
|
@@ -10781,10 +11237,10 @@ var ButexEditor = (0, import_react4.forwardRef)(
|
|
|
10781
11237
|
const setIntegralMenuOpen = (value) => setDesktopMenuOpen("integrals", value);
|
|
10782
11238
|
const setCharacterFontMenuOpen = (value) => setDesktopMenuOpen("font", value);
|
|
10783
11239
|
const setDigitMenuOpen = (value) => setDesktopMenuOpen("digits", value);
|
|
10784
|
-
(0,
|
|
11240
|
+
(0, import_react6.useImperativeHandle)(ref, () => ({
|
|
10785
11241
|
getRuntime: () => runtimeRef.current
|
|
10786
11242
|
}));
|
|
10787
|
-
const updatePreview = (0,
|
|
11243
|
+
const updatePreview = (0, import_react6.useCallback)(async (session) => {
|
|
10788
11244
|
const mathOutputEl = mathOutputRef.current;
|
|
10789
11245
|
const renderErrorEl = renderErrorRef.current;
|
|
10790
11246
|
const latexLinesEl = latexLinesRef.current;
|
|
@@ -10834,7 +11290,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
10834
11290
|
}
|
|
10835
11291
|
}
|
|
10836
11292
|
}, []);
|
|
10837
|
-
const updatePreviewRef = (0,
|
|
11293
|
+
const updatePreviewRef = (0, import_react6.useRef)(updatePreview);
|
|
10838
11294
|
updatePreviewRef.current = updatePreview;
|
|
10839
11295
|
async function copyDebugText(text) {
|
|
10840
11296
|
try {
|
|
@@ -10885,7 +11341,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
10885
11341
|
setDebugImportError(importError instanceof Error ? importError.message : String(importError));
|
|
10886
11342
|
}
|
|
10887
11343
|
}
|
|
10888
|
-
(0,
|
|
11344
|
+
(0, import_react6.useEffect)(() => {
|
|
10889
11345
|
injectWidgetChromeCss();
|
|
10890
11346
|
injectBuTeXEditorStyles(typeof document !== "undefined" ? document : void 0);
|
|
10891
11347
|
const surfaceEl = surfaceRef.current;
|
|
@@ -10977,7 +11433,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
10977
11433
|
runtimeRef.current = null;
|
|
10978
11434
|
};
|
|
10979
11435
|
}, []);
|
|
10980
|
-
(0,
|
|
11436
|
+
(0, import_react6.useEffect)(() => {
|
|
10981
11437
|
runtimeRef.current?.setUiLocale(uiLocale);
|
|
10982
11438
|
const session = runtimeRef.current?.getSession();
|
|
10983
11439
|
if (session) {
|
|
@@ -11005,7 +11461,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11005
11461
|
boldCharacterStyle,
|
|
11006
11462
|
digitForm: selectedDigitForm2
|
|
11007
11463
|
};
|
|
11008
|
-
return /* @__PURE__ */ (0,
|
|
11464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11009
11465
|
"div",
|
|
11010
11466
|
{
|
|
11011
11467
|
ref: wrapperRef,
|
|
@@ -11014,9 +11470,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
11014
11470
|
"data-responsive-mode": responsiveMode,
|
|
11015
11471
|
dir: uiLocaleDirection(uiLocale),
|
|
11016
11472
|
lang: uiLocale,
|
|
11017
|
-
children: /* @__PURE__ */ (0,
|
|
11018
|
-
/* @__PURE__ */ (0,
|
|
11019
|
-
/* @__PURE__ */ (0,
|
|
11473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "butex-widget-layout", children: [
|
|
11474
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "panel panel-editor", children: [
|
|
11475
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11020
11476
|
EquationMobileToolbar,
|
|
11021
11477
|
{
|
|
11022
11478
|
uiLocale,
|
|
@@ -11027,15 +11483,15 @@ ${arabic || currentMessages.empty}`;
|
|
|
11027
11483
|
getRuntime: () => runtimeRef.current
|
|
11028
11484
|
}
|
|
11029
11485
|
),
|
|
11030
|
-
/* @__PURE__ */ (0,
|
|
11031
|
-
/* @__PURE__ */ (0,
|
|
11032
|
-
/* @__PURE__ */ (0,
|
|
11033
|
-
/* @__PURE__ */ (0,
|
|
11486
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar butex-widget__desktop-toolbar", children: [
|
|
11487
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-history", role: "group", "aria-label": messages.undoRedo, children: [
|
|
11488
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { ref: undoBtnRef, id: "btn-undo", type: "button", className: "icon-btn", title: messages.undo, "aria-label": messages.undo, children: "\u21B7" }),
|
|
11489
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { ref: redoBtnRef, id: "btn-redo", type: "button", className: "icon-btn", title: messages.redo, "aria-label": messages.redo, children: "\u21B6" })
|
|
11034
11490
|
] }),
|
|
11035
|
-
/* @__PURE__ */ (0,
|
|
11036
|
-
/* @__PURE__ */ (0,
|
|
11037
|
-
/* @__PURE__ */ (0,
|
|
11038
|
-
/* @__PURE__ */ (0,
|
|
11491
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-clipboard", role: "group", "aria-label": messages.clipboard, children: [
|
|
11492
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { ref: copyBtnRef, id: "btn-copy", type: "button", className: "icon-btn", title: messages.copy, "aria-label": messages.copy, disabled: true, children: "\u29C9" }),
|
|
11493
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { ref: cutBtnRef, id: "btn-cut", type: "button", className: "icon-btn", title: messages.cut, "aria-label": messages.cut, disabled: true, children: "\u2702" }),
|
|
11494
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11039
11495
|
"button",
|
|
11040
11496
|
{
|
|
11041
11497
|
id: "btn-paste",
|
|
@@ -11052,9 +11508,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
11052
11508
|
}
|
|
11053
11509
|
)
|
|
11054
11510
|
] }),
|
|
11055
|
-
showSideSwitcher ? /* @__PURE__ */ (0,
|
|
11056
|
-
/* @__PURE__ */ (0,
|
|
11057
|
-
/* @__PURE__ */ (0,
|
|
11511
|
+
showSideSwitcher ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.editorSettings, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { className: "icon-btn accent", type: "button", title: messages.toggleSide, "aria-label": messages.toggleSide, onClick: () => runtimeRef.current?.toggleSide(), children: "\u21C4" }) }) : null,
|
|
11512
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-structures", role: "group", "aria-label": messages.structures, children: [
|
|
11513
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11058
11514
|
"div",
|
|
11059
11515
|
{
|
|
11060
11516
|
className: "delimiter-command-menu",
|
|
@@ -11065,7 +11521,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11065
11521
|
}
|
|
11066
11522
|
},
|
|
11067
11523
|
children: [
|
|
11068
|
-
/* @__PURE__ */ (0,
|
|
11524
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11069
11525
|
"button",
|
|
11070
11526
|
{
|
|
11071
11527
|
className: "icon-btn delimiter-command-btn",
|
|
@@ -11078,8 +11534,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11078
11534
|
children: "()"
|
|
11079
11535
|
}
|
|
11080
11536
|
),
|
|
11081
|
-
/* @__PURE__ */ (0,
|
|
11082
|
-
/* @__PURE__ */ (0,
|
|
11537
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "delimiter-command-options", role: "menu", "aria-label": messages.insertDelimiters, hidden: !delimiterMenuOpen, children: [
|
|
11538
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
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__ */ (0,
|
|
11556
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
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__ */ (0,
|
|
11574
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
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__ */ (0,
|
|
11592
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11137
11593
|
"button",
|
|
11138
11594
|
{
|
|
11139
11595
|
className: "delimiter-command-option",
|
|
@@ -11151,7 +11607,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11151
11607
|
children: "| |"
|
|
11152
11608
|
}
|
|
11153
11609
|
),
|
|
11154
|
-
/* @__PURE__ */ (0,
|
|
11610
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11155
11611
|
"button",
|
|
11156
11612
|
{
|
|
11157
11613
|
className: "delimiter-command-option",
|
|
@@ -11173,40 +11629,40 @@ ${arabic || currentMessages.empty}`;
|
|
|
11173
11629
|
]
|
|
11174
11630
|
}
|
|
11175
11631
|
),
|
|
11176
|
-
/* @__PURE__ */ (0,
|
|
11632
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { id: "insert-frac", className: "icon-btn frac-icon-btn", type: "button", title: messages.insertFraction, "aria-label": messages.insertFraction, onClick: () => {
|
|
11177
11633
|
runtimeRef.current?.insertFraction();
|
|
11178
11634
|
focusSurface();
|
|
11179
|
-
}, children: /* @__PURE__ */ (0,
|
|
11180
|
-
/* @__PURE__ */ (0,
|
|
11181
|
-
/* @__PURE__ */ (0,
|
|
11635
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-frac-icon", "aria-hidden": "true", children: [
|
|
11636
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0623" }),
|
|
11637
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0628" })
|
|
11182
11638
|
] }) }),
|
|
11183
|
-
/* @__PURE__ */ (0,
|
|
11639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { id: "insert-sqrt", className: "icon-btn", type: "button", title: messages.insertRoot, "aria-label": messages.insertRoot, onClick: () => {
|
|
11184
11640
|
runtimeRef.current?.insertSqrt();
|
|
11185
11641
|
focusSurface();
|
|
11186
|
-
}, children: /* @__PURE__ */ (0,
|
|
11187
|
-
/* @__PURE__ */ (0,
|
|
11642
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "toolbar-sqrt-icon", "aria-hidden": "true", children: "\u221A" }) }),
|
|
11643
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { id: "insert-overset", className: "icon-btn", type: "button", title: messages.insertOverset, "aria-label": messages.insertOverset, onClick: () => {
|
|
11188
11644
|
runtimeRef.current?.insertOverset();
|
|
11189
11645
|
focusSurface();
|
|
11190
|
-
}, children: /* @__PURE__ */ (0,
|
|
11191
|
-
/* @__PURE__ */ (0,
|
|
11192
|
-
/* @__PURE__ */ (0,
|
|
11646
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-accent-icon toolbar-accent-icon--over", "aria-hidden": "true", children: [
|
|
11647
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u2217" }),
|
|
11648
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u25A1" })
|
|
11193
11649
|
] }) }),
|
|
11194
|
-
/* @__PURE__ */ (0,
|
|
11650
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { id: "insert-underset", className: "icon-btn", type: "button", title: messages.insertUnderset, "aria-label": messages.insertUnderset, onClick: () => {
|
|
11195
11651
|
runtimeRef.current?.insertUnderset();
|
|
11196
11652
|
focusSurface();
|
|
11197
|
-
}, children: /* @__PURE__ */ (0,
|
|
11198
|
-
/* @__PURE__ */ (0,
|
|
11199
|
-
/* @__PURE__ */ (0,
|
|
11653
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-accent-icon toolbar-accent-icon--under", "aria-hidden": "true", children: [
|
|
11654
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u25A1" }),
|
|
11655
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u2217" })
|
|
11200
11656
|
] }) }),
|
|
11201
|
-
/* @__PURE__ */ (0,
|
|
11657
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { id: "insert-accent-pair", className: "icon-btn", type: "button", title: messages.insertAccentPair, "aria-label": messages.insertAccentPair, onClick: () => {
|
|
11202
11658
|
runtimeRef.current?.insertAccentPair();
|
|
11203
11659
|
focusSurface();
|
|
11204
|
-
}, children: /* @__PURE__ */ (0,
|
|
11205
|
-
/* @__PURE__ */ (0,
|
|
11206
|
-
/* @__PURE__ */ (0,
|
|
11207
|
-
/* @__PURE__ */ (0,
|
|
11660
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-accent-icon toolbar-accent-icon--pair", "aria-hidden": "true", children: [
|
|
11661
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u2217" }),
|
|
11662
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u25A1" }),
|
|
11663
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u2217" })
|
|
11208
11664
|
] }) }),
|
|
11209
|
-
/* @__PURE__ */ (0,
|
|
11665
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11210
11666
|
"div",
|
|
11211
11667
|
{
|
|
11212
11668
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11217,7 +11673,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11217
11673
|
}
|
|
11218
11674
|
},
|
|
11219
11675
|
children: [
|
|
11220
|
-
/* @__PURE__ */ (0,
|
|
11676
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11221
11677
|
"button",
|
|
11222
11678
|
{
|
|
11223
11679
|
id: "insert-accents",
|
|
@@ -11228,13 +11684,13 @@ ${arabic || currentMessages.empty}`;
|
|
|
11228
11684
|
"aria-haspopup": "menu",
|
|
11229
11685
|
"aria-expanded": accentMenuOpen,
|
|
11230
11686
|
onClick: () => setAccentMenuOpen((open) => !open),
|
|
11231
|
-
children: /* @__PURE__ */ (0,
|
|
11232
|
-
/* @__PURE__ */ (0,
|
|
11233
|
-
/* @__PURE__ */ (0,
|
|
11687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-accent-icon toolbar-accent-icon--over", "aria-hidden": "true", children: [
|
|
11688
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u02C6" }),
|
|
11689
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u25A1" })
|
|
11234
11690
|
] })
|
|
11235
11691
|
}
|
|
11236
11692
|
),
|
|
11237
|
-
/* @__PURE__ */ (0,
|
|
11693
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertAccents, hidden: !accentMenuOpen, children: ACCENT_COMMANDS_LIST.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11238
11694
|
"button",
|
|
11239
11695
|
{
|
|
11240
11696
|
className: "function-command-option operator-command-option",
|
|
@@ -11248,7 +11704,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11248
11704
|
setAccentMenuOpen(false);
|
|
11249
11705
|
focusSurface();
|
|
11250
11706
|
},
|
|
11251
|
-
children: /* @__PURE__ */ (0,
|
|
11707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "operator-command-label", children: command.label })
|
|
11252
11708
|
},
|
|
11253
11709
|
command.id
|
|
11254
11710
|
)) })
|
|
@@ -11256,7 +11712,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11256
11712
|
}
|
|
11257
11713
|
)
|
|
11258
11714
|
] }),
|
|
11259
|
-
/* @__PURE__ */ (0,
|
|
11715
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "toolbar-group toolbar-environments", role: "group", "aria-label": messages.environments, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11260
11716
|
"div",
|
|
11261
11717
|
{
|
|
11262
11718
|
className: "matrix-command-menu",
|
|
@@ -11267,7 +11723,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11267
11723
|
}
|
|
11268
11724
|
},
|
|
11269
11725
|
children: [
|
|
11270
|
-
/* @__PURE__ */ (0,
|
|
11726
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11271
11727
|
"button",
|
|
11272
11728
|
{
|
|
11273
11729
|
className: "icon-btn matrix-command-btn",
|
|
@@ -11277,21 +11733,21 @@ ${arabic || currentMessages.empty}`;
|
|
|
11277
11733
|
"aria-haspopup": "dialog",
|
|
11278
11734
|
"aria-expanded": matrixMenuOpen,
|
|
11279
11735
|
onClick: () => setMatrixMenuOpen((open) => !open),
|
|
11280
|
-
children: /* @__PURE__ */ (0,
|
|
11281
|
-
/* @__PURE__ */ (0,
|
|
11282
|
-
/* @__PURE__ */ (0,
|
|
11283
|
-
/* @__PURE__ */ (0,
|
|
11284
|
-
/* @__PURE__ */ (0,
|
|
11736
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-matrix-icon", "aria-hidden": "true", children: [
|
|
11737
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {}),
|
|
11738
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {}),
|
|
11739
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {}),
|
|
11740
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {})
|
|
11285
11741
|
] })
|
|
11286
11742
|
}
|
|
11287
11743
|
),
|
|
11288
|
-
/* @__PURE__ */ (0,
|
|
11289
|
-
/* @__PURE__ */ (0,
|
|
11744
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "matrix-command-popover", role: "dialog", "aria-label": messages.insertEnvironment, hidden: !matrixMenuOpen, children: [
|
|
11745
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.environmentType, children: [
|
|
11290
11746
|
{ id: "matrix", label: messages.matrix },
|
|
11291
11747
|
{ id: "array", label: messages.array },
|
|
11292
11748
|
{ id: "aligned", label: messages.aligned },
|
|
11293
11749
|
{ id: "cases", label: messages.piecewise }
|
|
11294
|
-
].map((option) => /* @__PURE__ */ (0,
|
|
11750
|
+
].map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11295
11751
|
"button",
|
|
11296
11752
|
{
|
|
11297
11753
|
type: "button",
|
|
@@ -11309,7 +11765,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11309
11765
|
},
|
|
11310
11766
|
option.id
|
|
11311
11767
|
)) }),
|
|
11312
|
-
envPaletteMode === "matrix" ? /* @__PURE__ */ (0,
|
|
11768
|
+
envPaletteMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "matrix-style-options", role: "listbox", "aria-label": messages.matrixType, children: MATRIX_STYLES2.map((style) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11313
11769
|
"button",
|
|
11314
11770
|
{
|
|
11315
11771
|
type: "button",
|
|
@@ -11325,15 +11781,15 @@ ${arabic || currentMessages.empty}`;
|
|
|
11325
11781
|
},
|
|
11326
11782
|
style.id
|
|
11327
11783
|
)) }) : null,
|
|
11328
|
-
/* @__PURE__ */ (0,
|
|
11329
|
-
envPaletteMode !== "cases" ? /* @__PURE__ */ (0,
|
|
11784
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "matrix-size-readout", children: matrixHover ? matrixSizeLabel2(matrixHover.rows, matrixHover.columns, messages) : matrixSizeLabel2(matrixRows, matrixColumns, messages) }),
|
|
11785
|
+
envPaletteMode !== "cases" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "matrix-grid-picker", "aria-label": messages.chooseEnvironmentSize, children: Array.from(
|
|
11330
11786
|
{ length: 8 },
|
|
11331
11787
|
(_, rowIndex) => Array.from({ length: 8 }, (_2, columnIndex) => {
|
|
11332
11788
|
const rows = rowIndex + 1;
|
|
11333
11789
|
const columns = columnIndex + 1;
|
|
11334
11790
|
const activeRows = matrixHover?.rows ?? matrixRows;
|
|
11335
11791
|
const activeColumns = matrixHover?.columns ?? matrixColumns;
|
|
11336
|
-
return /* @__PURE__ */ (0,
|
|
11792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11337
11793
|
"button",
|
|
11338
11794
|
{
|
|
11339
11795
|
type: "button",
|
|
@@ -11355,10 +11811,10 @@ ${arabic || currentMessages.empty}`;
|
|
|
11355
11811
|
);
|
|
11356
11812
|
})
|
|
11357
11813
|
) }) : null,
|
|
11358
|
-
/* @__PURE__ */ (0,
|
|
11359
|
-
/* @__PURE__ */ (0,
|
|
11814
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "matrix-custom-size", children: [
|
|
11815
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { children: [
|
|
11360
11816
|
messages.row,
|
|
11361
|
-
/* @__PURE__ */ (0,
|
|
11817
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11362
11818
|
"input",
|
|
11363
11819
|
{
|
|
11364
11820
|
type: "number",
|
|
@@ -11369,9 +11825,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
11369
11825
|
}
|
|
11370
11826
|
)
|
|
11371
11827
|
] }),
|
|
11372
|
-
/* @__PURE__ */ (0,
|
|
11828
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { children: [
|
|
11373
11829
|
messages.column,
|
|
11374
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11375
11831
|
"input",
|
|
11376
11832
|
{
|
|
11377
11833
|
type: "number",
|
|
@@ -11383,7 +11839,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11383
11839
|
}
|
|
11384
11840
|
)
|
|
11385
11841
|
] }),
|
|
11386
|
-
/* @__PURE__ */ (0,
|
|
11842
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11387
11843
|
"button",
|
|
11388
11844
|
{
|
|
11389
11845
|
type: "button",
|
|
@@ -11401,12 +11857,12 @@ ${arabic || currentMessages.empty}`;
|
|
|
11401
11857
|
}
|
|
11402
11858
|
)
|
|
11403
11859
|
] }),
|
|
11404
|
-
/* @__PURE__ */ (0,
|
|
11405
|
-
envPaletteMode === "matrix" ? /* @__PURE__ */ (0,
|
|
11406
|
-
envPaletteMode === "array" ? /* @__PURE__ */ (0,
|
|
11407
|
-
/* @__PURE__ */ (0,
|
|
11860
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "matrix-edit-actions", "aria-label": messages.editSelectedEnvironment, children: [
|
|
11861
|
+
envPaletteMode === "matrix" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", title: messages.applySelectedMatrixStyle, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.setMatrixEnvStyle(matrixStyle), children: messages.applyStyle }) : null,
|
|
11862
|
+
envPaletteMode === "array" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
11863
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { children: [
|
|
11408
11864
|
messages.column,
|
|
11409
|
-
/* @__PURE__ */ (0,
|
|
11865
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11410
11866
|
"input",
|
|
11411
11867
|
{
|
|
11412
11868
|
type: "number",
|
|
@@ -11417,7 +11873,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11417
11873
|
}
|
|
11418
11874
|
)
|
|
11419
11875
|
] }),
|
|
11420
|
-
ARRAY_ALIGNMENTS2.map((alignment) => /* @__PURE__ */ (0,
|
|
11876
|
+
ARRAY_ALIGNMENTS2.map((alignment) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11421
11877
|
"button",
|
|
11422
11878
|
{
|
|
11423
11879
|
type: "button",
|
|
@@ -11429,19 +11885,19 @@ ${arabic || currentMessages.empty}`;
|
|
|
11429
11885
|
alignment.id
|
|
11430
11886
|
))
|
|
11431
11887
|
] }) : null,
|
|
11432
|
-
/* @__PURE__ */ (0,
|
|
11888
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", title: messages.addRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixRow(), children: [
|
|
11433
11889
|
"+",
|
|
11434
11890
|
messages.row
|
|
11435
11891
|
] }),
|
|
11436
|
-
/* @__PURE__ */ (0,
|
|
11892
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", title: messages.removeRow, onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixRow(), children: [
|
|
11437
11893
|
"-",
|
|
11438
11894
|
messages.row
|
|
11439
11895
|
] }),
|
|
11440
|
-
/* @__PURE__ */ (0,
|
|
11896
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", title: messages.addColumn, disabled: envPaletteMode === "cases", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.addMatrixColumn(), children: [
|
|
11441
11897
|
"+",
|
|
11442
11898
|
messages.column
|
|
11443
11899
|
] }),
|
|
11444
|
-
/* @__PURE__ */ (0,
|
|
11900
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", title: messages.removeColumn, disabled: envPaletteMode === "cases", onMouseDown: (event) => event.preventDefault(), onClick: () => runtimeRef.current?.removeMatrixColumn(), children: [
|
|
11445
11901
|
"-",
|
|
11446
11902
|
messages.column
|
|
11447
11903
|
] })
|
|
@@ -11450,7 +11906,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11450
11906
|
]
|
|
11451
11907
|
}
|
|
11452
11908
|
) }),
|
|
11453
|
-
/* @__PURE__ */ (0,
|
|
11909
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.spaces, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11454
11910
|
"div",
|
|
11455
11911
|
{
|
|
11456
11912
|
className: `spacing-command-menu spacing-command-menu--${activeEditorSide}`,
|
|
@@ -11461,7 +11917,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11461
11917
|
}
|
|
11462
11918
|
},
|
|
11463
11919
|
children: [
|
|
11464
|
-
/* @__PURE__ */ (0,
|
|
11920
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11465
11921
|
"button",
|
|
11466
11922
|
{
|
|
11467
11923
|
className: "icon-btn spacing-command-btn",
|
|
@@ -11471,13 +11927,13 @@ ${arabic || currentMessages.empty}`;
|
|
|
11471
11927
|
"aria-haspopup": "menu",
|
|
11472
11928
|
"aria-expanded": spacingMenuOpen,
|
|
11473
11929
|
onClick: () => setSpacingMenuOpen((open) => !open),
|
|
11474
|
-
children: /* @__PURE__ */ (0,
|
|
11475
|
-
/* @__PURE__ */ (0,
|
|
11476
|
-
/* @__PURE__ */ (0,
|
|
11930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "spacing-command-glyph spacing-command-glyph--positive spacing-command-glyph--level-2", "aria-hidden": "true", children: [
|
|
11931
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "spacing-command-glyph__bar" }),
|
|
11932
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "spacing-command-glyph__arrow", children: activeEditorSide === "arabic" ? "\u2190" : "\u2192" })
|
|
11477
11933
|
] })
|
|
11478
11934
|
}
|
|
11479
11935
|
),
|
|
11480
|
-
/* @__PURE__ */ (0,
|
|
11936
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "spacing-command-options", role: "menu", "aria-label": messages.insertSpace, hidden: !spacingMenuOpen, children: SPACING_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11481
11937
|
"button",
|
|
11482
11938
|
{
|
|
11483
11939
|
type: "button",
|
|
@@ -11491,12 +11947,12 @@ ${arabic || currentMessages.empty}`;
|
|
|
11491
11947
|
focusSurface();
|
|
11492
11948
|
},
|
|
11493
11949
|
children: [
|
|
11494
|
-
/* @__PURE__ */ (0,
|
|
11495
|
-
command.spacing.direction === "negative" ? /* @__PURE__ */ (0,
|
|
11496
|
-
/* @__PURE__ */ (0,
|
|
11497
|
-
command.spacing.direction === "positive" ? /* @__PURE__ */ (0,
|
|
11950
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `spacing-command-glyph spacing-command-glyph--${command.spacing.direction} spacing-command-glyph--level-${String(command.spacing.level)}`, "aria-hidden": "true", children: [
|
|
11951
|
+
command.spacing.direction === "negative" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "spacing-command-glyph__arrow", children: spacingArrow2(command, activeEditorSide) }) : null,
|
|
11952
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "spacing-command-glyph__bar" }),
|
|
11953
|
+
command.spacing.direction === "positive" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "spacing-command-glyph__arrow", children: spacingArrow2(command, activeEditorSide) }) : null
|
|
11498
11954
|
] }),
|
|
11499
|
-
/* @__PURE__ */ (0,
|
|
11955
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "spacing-command-option__name", children: atomicCommandTitle(command, uiLocale) })
|
|
11500
11956
|
]
|
|
11501
11957
|
},
|
|
11502
11958
|
command.id
|
|
@@ -11504,8 +11960,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11504
11960
|
]
|
|
11505
11961
|
}
|
|
11506
11962
|
) }),
|
|
11507
|
-
/* @__PURE__ */ (0,
|
|
11508
|
-
/* @__PURE__ */ (0,
|
|
11963
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-functions", role: "group", "aria-label": messages.functions, children: [
|
|
11964
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11509
11965
|
"div",
|
|
11510
11966
|
{
|
|
11511
11967
|
className: "function-command-menu",
|
|
@@ -11516,7 +11972,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11516
11972
|
}
|
|
11517
11973
|
},
|
|
11518
11974
|
children: [
|
|
11519
|
-
/* @__PURE__ */ (0,
|
|
11975
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11520
11976
|
"button",
|
|
11521
11977
|
{
|
|
11522
11978
|
className: "icon-btn function-command-btn",
|
|
@@ -11529,7 +11985,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11529
11985
|
children: FUNCTION_COMMANDS2[0]?.arabicLabel ?? "\u062F"
|
|
11530
11986
|
}
|
|
11531
11987
|
),
|
|
11532
|
-
/* @__PURE__ */ (0,
|
|
11988
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertFunction, hidden: !functionMenuOpen, children: FUNCTION_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11533
11989
|
"button",
|
|
11534
11990
|
{
|
|
11535
11991
|
className: "function-command-option",
|
|
@@ -11550,7 +12006,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11550
12006
|
]
|
|
11551
12007
|
}
|
|
11552
12008
|
),
|
|
11553
|
-
/* @__PURE__ */ (0,
|
|
12009
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11554
12010
|
"div",
|
|
11555
12011
|
{
|
|
11556
12012
|
className: "function-command-menu function-command-menu--limits-series",
|
|
@@ -11561,7 +12017,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11561
12017
|
}
|
|
11562
12018
|
},
|
|
11563
12019
|
children: [
|
|
11564
|
-
/* @__PURE__ */ (0,
|
|
12020
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11565
12021
|
"button",
|
|
11566
12022
|
{
|
|
11567
12023
|
className: "icon-btn function-command-btn",
|
|
@@ -11574,7 +12030,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11574
12030
|
children: LIMITS_SERIES_COMMANDS2[0]?.arabicLabel ?? "\u062D\u062F"
|
|
11575
12031
|
}
|
|
11576
12032
|
),
|
|
11577
|
-
/* @__PURE__ */ (0,
|
|
12033
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertLimitsSeries, hidden: !limitsSeriesMenuOpen, children: LIMITS_SERIES_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11578
12034
|
"button",
|
|
11579
12035
|
{
|
|
11580
12036
|
className: "function-command-option",
|
|
@@ -11595,7 +12051,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11595
12051
|
]
|
|
11596
12052
|
}
|
|
11597
12053
|
),
|
|
11598
|
-
/* @__PURE__ */ (0,
|
|
12054
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11599
12055
|
"div",
|
|
11600
12056
|
{
|
|
11601
12057
|
className: "function-command-menu function-command-menu--function2",
|
|
@@ -11606,7 +12062,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11606
12062
|
}
|
|
11607
12063
|
},
|
|
11608
12064
|
children: [
|
|
11609
|
-
/* @__PURE__ */ (0,
|
|
12065
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11610
12066
|
"button",
|
|
11611
12067
|
{
|
|
11612
12068
|
className: "icon-btn function-command-btn",
|
|
@@ -11619,7 +12075,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11619
12075
|
children: FUNCTION2_COMMANDS2[0]?.arabicLabel ?? "\u062F"
|
|
11620
12076
|
}
|
|
11621
12077
|
),
|
|
11622
|
-
/* @__PURE__ */ (0,
|
|
12078
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertAdditionalFunctions, hidden: !function2MenuOpen, children: FUNCTION2_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11623
12079
|
"button",
|
|
11624
12080
|
{
|
|
11625
12081
|
className: "function-command-option",
|
|
@@ -11640,7 +12096,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11640
12096
|
]
|
|
11641
12097
|
}
|
|
11642
12098
|
),
|
|
11643
|
-
/* @__PURE__ */ (0,
|
|
12099
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11644
12100
|
"div",
|
|
11645
12101
|
{
|
|
11646
12102
|
className: "function-command-menu function-command-menu--derivative",
|
|
@@ -11651,7 +12107,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11651
12107
|
}
|
|
11652
12108
|
},
|
|
11653
12109
|
children: [
|
|
11654
|
-
/* @__PURE__ */ (0,
|
|
12110
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11655
12111
|
"button",
|
|
11656
12112
|
{
|
|
11657
12113
|
className: "icon-btn function-command-btn",
|
|
@@ -11664,8 +12120,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11664
12120
|
children: DERIVATIVE_COMMANDS2[0]?.arabicLabel ?? "\u0621"
|
|
11665
12121
|
}
|
|
11666
12122
|
),
|
|
11667
|
-
/* @__PURE__ */ (0,
|
|
11668
|
-
DERIVATIVE_COMMANDS2.map((command) => /* @__PURE__ */ (0,
|
|
12123
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertDerivative, hidden: !derivativeMenuOpen, children: [
|
|
12124
|
+
DERIVATIVE_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11669
12125
|
"button",
|
|
11670
12126
|
{
|
|
11671
12127
|
className: "function-command-option",
|
|
@@ -11683,7 +12139,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11683
12139
|
},
|
|
11684
12140
|
command.id
|
|
11685
12141
|
)),
|
|
11686
|
-
/* @__PURE__ */ (0,
|
|
12142
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11687
12143
|
"button",
|
|
11688
12144
|
{
|
|
11689
12145
|
className: "function-command-option",
|
|
@@ -11700,7 +12156,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11700
12156
|
children: "\u0621/\u0633"
|
|
11701
12157
|
}
|
|
11702
12158
|
),
|
|
11703
|
-
/* @__PURE__ */ (0,
|
|
12159
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11704
12160
|
"button",
|
|
11705
12161
|
{
|
|
11706
12162
|
className: "function-command-option",
|
|
@@ -11721,7 +12177,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11721
12177
|
]
|
|
11722
12178
|
}
|
|
11723
12179
|
),
|
|
11724
|
-
/* @__PURE__ */ (0,
|
|
12180
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11725
12181
|
"div",
|
|
11726
12182
|
{
|
|
11727
12183
|
className: "function-command-menu function-command-menu--groups",
|
|
@@ -11732,7 +12188,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11732
12188
|
}
|
|
11733
12189
|
},
|
|
11734
12190
|
children: [
|
|
11735
|
-
/* @__PURE__ */ (0,
|
|
12191
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11736
12192
|
"button",
|
|
11737
12193
|
{
|
|
11738
12194
|
className: "icon-btn function-command-btn",
|
|
@@ -11745,7 +12201,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11745
12201
|
children: GROUP_COMMANDS2[0]?.arabicLabel ?? "\u0645"
|
|
11746
12202
|
}
|
|
11747
12203
|
),
|
|
11748
|
-
/* @__PURE__ */ (0,
|
|
12204
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options", role: "menu", "aria-label": messages.insertNumberSets, hidden: !groupMenuOpen, children: GROUP_COMMANDS2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11749
12205
|
"button",
|
|
11750
12206
|
{
|
|
11751
12207
|
className: "function-command-option",
|
|
@@ -11767,8 +12223,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
11767
12223
|
}
|
|
11768
12224
|
)
|
|
11769
12225
|
] }),
|
|
11770
|
-
/* @__PURE__ */ (0,
|
|
11771
|
-
/* @__PURE__ */ (0,
|
|
12226
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-operators", role: "group", "aria-label": messages.operations, children: [
|
|
12227
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11772
12228
|
"div",
|
|
11773
12229
|
{
|
|
11774
12230
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11779,7 +12235,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11779
12235
|
}
|
|
11780
12236
|
},
|
|
11781
12237
|
children: [
|
|
11782
|
-
/* @__PURE__ */ (0,
|
|
12238
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11783
12239
|
"button",
|
|
11784
12240
|
{
|
|
11785
12241
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11792,7 +12248,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11792
12248
|
children: renderOperatorMenuButtonLabel(OPERATOR_COMMANDS[0], "\u2217")
|
|
11793
12249
|
}
|
|
11794
12250
|
),
|
|
11795
|
-
/* @__PURE__ */ (0,
|
|
12251
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertOperation, hidden: !operatorMenuOpen, children: OPERATOR_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11796
12252
|
"button",
|
|
11797
12253
|
{
|
|
11798
12254
|
className: "function-command-option operator-command-option",
|
|
@@ -11806,14 +12262,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11806
12262
|
setOperatorMenuOpen(false);
|
|
11807
12263
|
focusSurface();
|
|
11808
12264
|
},
|
|
11809
|
-
children: /* @__PURE__ */ (0,
|
|
12265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11810
12266
|
},
|
|
11811
12267
|
command.id
|
|
11812
12268
|
)) })
|
|
11813
12269
|
]
|
|
11814
12270
|
}
|
|
11815
12271
|
),
|
|
11816
|
-
/* @__PURE__ */ (0,
|
|
12272
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11817
12273
|
"div",
|
|
11818
12274
|
{
|
|
11819
12275
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11824,7 +12280,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11824
12280
|
}
|
|
11825
12281
|
},
|
|
11826
12282
|
children: [
|
|
11827
|
-
/* @__PURE__ */ (0,
|
|
12283
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11828
12284
|
"button",
|
|
11829
12285
|
{
|
|
11830
12286
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11837,7 +12293,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11837
12293
|
children: "\u2229"
|
|
11838
12294
|
}
|
|
11839
12295
|
),
|
|
11840
|
-
/* @__PURE__ */ (0,
|
|
12296
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertRelationsSets, hidden: !operator2MenuOpen, children: OPERATOR2_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11841
12297
|
"button",
|
|
11842
12298
|
{
|
|
11843
12299
|
className: "function-command-option operator-command-option",
|
|
@@ -11851,14 +12307,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11851
12307
|
setOperator2MenuOpen(false);
|
|
11852
12308
|
focusSurface();
|
|
11853
12309
|
},
|
|
11854
|
-
children: /* @__PURE__ */ (0,
|
|
12310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11855
12311
|
},
|
|
11856
12312
|
command.id
|
|
11857
12313
|
)) })
|
|
11858
12314
|
]
|
|
11859
12315
|
}
|
|
11860
12316
|
),
|
|
11861
|
-
/* @__PURE__ */ (0,
|
|
12317
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11862
12318
|
"div",
|
|
11863
12319
|
{
|
|
11864
12320
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11869,7 +12325,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11869
12325
|
}
|
|
11870
12326
|
},
|
|
11871
12327
|
children: [
|
|
11872
|
-
/* @__PURE__ */ (0,
|
|
12328
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11873
12329
|
"button",
|
|
11874
12330
|
{
|
|
11875
12331
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11882,7 +12338,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11882
12338
|
children: renderOperatorMenuButtonLabel(OPERATOR3_COMMANDS[0], "\u21D2")
|
|
11883
12339
|
}
|
|
11884
12340
|
),
|
|
11885
|
-
/* @__PURE__ */ (0,
|
|
12341
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertArrows, hidden: !operator3MenuOpen, children: OPERATOR3_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11886
12342
|
"button",
|
|
11887
12343
|
{
|
|
11888
12344
|
className: "function-command-option operator-command-option",
|
|
@@ -11896,14 +12352,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11896
12352
|
setOperator3MenuOpen(false);
|
|
11897
12353
|
focusSurface();
|
|
11898
12354
|
},
|
|
11899
|
-
children: /* @__PURE__ */ (0,
|
|
12355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11900
12356
|
},
|
|
11901
12357
|
command.id
|
|
11902
12358
|
)) })
|
|
11903
12359
|
]
|
|
11904
12360
|
}
|
|
11905
12361
|
),
|
|
11906
|
-
/* @__PURE__ */ (0,
|
|
12362
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11907
12363
|
"div",
|
|
11908
12364
|
{
|
|
11909
12365
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11914,7 +12370,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11914
12370
|
}
|
|
11915
12371
|
},
|
|
11916
12372
|
children: [
|
|
11917
|
-
/* @__PURE__ */ (0,
|
|
12373
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11918
12374
|
"button",
|
|
11919
12375
|
{
|
|
11920
12376
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11927,7 +12383,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11927
12383
|
children: renderOperatorMenuButtonLabel(DOT_COMMANDS[0], "\u2026")
|
|
11928
12384
|
}
|
|
11929
12385
|
),
|
|
11930
|
-
/* @__PURE__ */ (0,
|
|
12386
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertDots, hidden: !dotMenuOpen, children: DOT_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11931
12387
|
"button",
|
|
11932
12388
|
{
|
|
11933
12389
|
className: "function-command-option operator-command-option",
|
|
@@ -11941,14 +12397,14 @@ ${arabic || currentMessages.empty}`;
|
|
|
11941
12397
|
setDotMenuOpen(false);
|
|
11942
12398
|
focusSurface();
|
|
11943
12399
|
},
|
|
11944
|
-
children: /* @__PURE__ */ (0,
|
|
12400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11945
12401
|
},
|
|
11946
12402
|
command.id
|
|
11947
12403
|
)) })
|
|
11948
12404
|
]
|
|
11949
12405
|
}
|
|
11950
12406
|
),
|
|
11951
|
-
/* @__PURE__ */ (0,
|
|
12407
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
11952
12408
|
"div",
|
|
11953
12409
|
{
|
|
11954
12410
|
className: "function-command-menu operator-command-menu",
|
|
@@ -11959,7 +12415,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11959
12415
|
}
|
|
11960
12416
|
},
|
|
11961
12417
|
children: [
|
|
11962
|
-
/* @__PURE__ */ (0,
|
|
12418
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11963
12419
|
"button",
|
|
11964
12420
|
{
|
|
11965
12421
|
className: "icon-btn function-command-btn operator-command-btn",
|
|
@@ -11972,7 +12428,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11972
12428
|
children: renderOperatorMenuButtonLabel(INTEGRAL_COMMANDS[0], "\u222B")
|
|
11973
12429
|
}
|
|
11974
12430
|
),
|
|
11975
|
-
/* @__PURE__ */ (0,
|
|
12431
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "function-command-options operator-command-options", role: "menu", "aria-label": messages.insertIntegrals, hidden: !integralMenuOpen, children: INTEGRAL_COMMANDS.map((command) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
11976
12432
|
"button",
|
|
11977
12433
|
{
|
|
11978
12434
|
className: "function-command-option operator-command-option",
|
|
@@ -11986,7 +12442,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
11986
12442
|
setIntegralMenuOpen(false);
|
|
11987
12443
|
focusSurface();
|
|
11988
12444
|
},
|
|
11989
|
-
children: /* @__PURE__ */ (0,
|
|
12445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: shouldMirrorOperatorDisplay(command) ? "operator-command-label operator-command-label--mirror" : "operator-command-label", children: renderOperatorCommandLabel(command) })
|
|
11990
12446
|
},
|
|
11991
12447
|
command.id
|
|
11992
12448
|
)) })
|
|
@@ -11994,28 +12450,28 @@ ${arabic || currentMessages.empty}`;
|
|
|
11994
12450
|
}
|
|
11995
12451
|
)
|
|
11996
12452
|
] }),
|
|
11997
|
-
/* @__PURE__ */ (0,
|
|
11998
|
-
/* @__PURE__ */ (0,
|
|
11999
|
-
/* @__PURE__ */ (0,
|
|
12000
|
-
/* @__PURE__ */ (0,
|
|
12453
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-scripts", role: "group", "aria-label": messages.scripts, children: [
|
|
12454
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSuperscript, "aria-label": messages.addSuperscript, onClick: () => runtimeRef.current?.addSup(), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-script-icon toolbar-script-icon--sup", "aria-hidden": "true", children: [
|
|
12455
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0646" }),
|
|
12456
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0633" })
|
|
12001
12457
|
] }) }),
|
|
12002
|
-
/* @__PURE__ */ (0,
|
|
12003
|
-
/* @__PURE__ */ (0,
|
|
12004
|
-
/* @__PURE__ */ (0,
|
|
12458
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { className: "icon-btn script-icon-btn", type: "button", title: messages.addSubscript, "aria-label": messages.addSubscript, onClick: () => runtimeRef.current?.addSub(), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-script-icon toolbar-script-icon--sub", "aria-hidden": "true", children: [
|
|
12459
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0646" }),
|
|
12460
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0633" })
|
|
12005
12461
|
] }) }),
|
|
12006
|
-
/* @__PURE__ */ (0,
|
|
12007
|
-
/* @__PURE__ */ (0,
|
|
12008
|
-
/* @__PURE__ */ (0,
|
|
12462
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title: messages.removeSuperscript, "aria-label": messages.removeSuperscript, onClick: () => runtimeRef.current?.removeSup(), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sup", "aria-hidden": "true", children: [
|
|
12463
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0646" }),
|
|
12464
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\xD7" })
|
|
12009
12465
|
] }) }),
|
|
12010
|
-
/* @__PURE__ */ (0,
|
|
12011
|
-
/* @__PURE__ */ (0,
|
|
12012
|
-
/* @__PURE__ */ (0,
|
|
12466
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { className: "icon-btn script-icon-btn remove-script-btn", type: "button", title: messages.removeSubscript, "aria-label": messages.removeSubscript, onClick: () => runtimeRef.current?.removeSub(), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "toolbar-remove-script-icon toolbar-remove-script-icon--sub", "aria-hidden": "true", children: [
|
|
12467
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u0646" }),
|
|
12468
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\xD7" })
|
|
12013
12469
|
] }) })
|
|
12014
12470
|
] }),
|
|
12015
|
-
/* @__PURE__ */ (0,
|
|
12016
|
-
/* @__PURE__ */ (0,
|
|
12017
|
-
/* @__PURE__ */ (0,
|
|
12018
|
-
/* @__PURE__ */ (0,
|
|
12471
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "toolbar-group toolbar-settings", role: "group", "aria-label": messages.inputStyles, children: [
|
|
12472
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { className: "icon-btn delete-node-btn", type: "button", title: messages.deleteSelectedStructure, "aria-label": messages.deleteSelectedStructure, onClick: () => runtimeRef.current?.deleteStructure(), children: "\xD7" }),
|
|
12473
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { ref: splitTypingBtnRef, id: "toggle-split-leaf-typing", className: "icon-btn ligature-btn", type: "button", title: messages.toggleLetterMerging, "aria-label": messages.toggleLetterMerging, onClick: () => runtimeRef.current?.toggleSplitLeafTyping(), children: "\u0633\u0635\u0639" }),
|
|
12474
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
12019
12475
|
"div",
|
|
12020
12476
|
{
|
|
12021
12477
|
className: "character-font-menu",
|
|
@@ -12026,7 +12482,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12026
12482
|
}
|
|
12027
12483
|
},
|
|
12028
12484
|
children: [
|
|
12029
|
-
/* @__PURE__ */ (0,
|
|
12485
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12030
12486
|
"button",
|
|
12031
12487
|
{
|
|
12032
12488
|
ref: characterFontBtnRef,
|
|
@@ -12041,8 +12497,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
12041
12497
|
children: boldCharacterStyle ? boldCharacterStyleLabel2(uiLocale) : characterFontOption(selectedCharacterFont).label
|
|
12042
12498
|
}
|
|
12043
12499
|
),
|
|
12044
|
-
/* @__PURE__ */ (0,
|
|
12045
|
-
/* @__PURE__ */ (0,
|
|
12500
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "character-font-options", role: "listbox", "aria-label": messages.chooseWritingFont, hidden: !characterFontMenuOpen, children: [
|
|
12501
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12046
12502
|
"button",
|
|
12047
12503
|
{
|
|
12048
12504
|
type: "button",
|
|
@@ -12059,7 +12515,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12059
12515
|
children: boldCharacterStyleLabel2(uiLocale)
|
|
12060
12516
|
}
|
|
12061
12517
|
),
|
|
12062
|
-
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ (0,
|
|
12518
|
+
CHARACTER_FONT_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12063
12519
|
"button",
|
|
12064
12520
|
{
|
|
12065
12521
|
type: "button",
|
|
@@ -12082,7 +12538,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12082
12538
|
]
|
|
12083
12539
|
}
|
|
12084
12540
|
),
|
|
12085
|
-
/* @__PURE__ */ (0,
|
|
12541
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
12086
12542
|
"div",
|
|
12087
12543
|
{
|
|
12088
12544
|
className: "digit-form-menu",
|
|
@@ -12093,7 +12549,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12093
12549
|
}
|
|
12094
12550
|
},
|
|
12095
12551
|
children: [
|
|
12096
|
-
/* @__PURE__ */ (0,
|
|
12552
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12097
12553
|
"button",
|
|
12098
12554
|
{
|
|
12099
12555
|
ref: digitFormBtnRef,
|
|
@@ -12108,7 +12564,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12108
12564
|
children: digitFormLabel(selectedDigitForm2)
|
|
12109
12565
|
}
|
|
12110
12566
|
),
|
|
12111
|
-
/* @__PURE__ */ (0,
|
|
12567
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "digit-form-options", role: "listbox", "aria-label": messages.chooseDigitForm, hidden: !digitMenuOpen, children: DIGIT_FORM_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12112
12568
|
"button",
|
|
12113
12569
|
{
|
|
12114
12570
|
type: "button",
|
|
@@ -12132,7 +12588,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12132
12588
|
)
|
|
12133
12589
|
] })
|
|
12134
12590
|
] }),
|
|
12135
|
-
/* @__PURE__ */ (0,
|
|
12591
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12136
12592
|
"div",
|
|
12137
12593
|
{
|
|
12138
12594
|
ref: surfaceRef,
|
|
@@ -12142,7 +12598,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12142
12598
|
"aria-label": messages.equationEditor
|
|
12143
12599
|
}
|
|
12144
12600
|
),
|
|
12145
|
-
/* @__PURE__ */ (0,
|
|
12601
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12146
12602
|
"textarea",
|
|
12147
12603
|
{
|
|
12148
12604
|
ref: inputRef,
|
|
@@ -12156,8 +12612,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
12156
12612
|
tabIndex: -1
|
|
12157
12613
|
}
|
|
12158
12614
|
),
|
|
12159
|
-
/* @__PURE__ */ (0,
|
|
12160
|
-
/* @__PURE__ */ (0,
|
|
12615
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: renderErrorRef, className: "error", hidden: true }),
|
|
12616
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12161
12617
|
"button",
|
|
12162
12618
|
{
|
|
12163
12619
|
type: "button",
|
|
@@ -12169,18 +12625,18 @@ ${arabic || currentMessages.empty}`;
|
|
|
12169
12625
|
}
|
|
12170
12626
|
)
|
|
12171
12627
|
] }),
|
|
12172
|
-
/* @__PURE__ */ (0,
|
|
12173
|
-
debugEnabled ? /* @__PURE__ */ (0,
|
|
12174
|
-
/* @__PURE__ */ (0,
|
|
12175
|
-
/* @__PURE__ */ (0,
|
|
12176
|
-
/* @__PURE__ */ (0,
|
|
12177
|
-
/* @__PURE__ */ (0,
|
|
12628
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("section", { id: previewPanelId, className: "panel panel-preview", "aria-label": messages.renderPreview, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: mathOutputRef, className: "preview-box" }) }),
|
|
12629
|
+
debugEnabled ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "panel", children: [
|
|
12630
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dev-strip", children: [
|
|
12631
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dev-badge", children: messages.development }),
|
|
12632
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: latexLinesRef, className: "ascii" }),
|
|
12633
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: passivePreviewRef, className: "passive-preview-text" })
|
|
12178
12634
|
] }),
|
|
12179
|
-
/* @__PURE__ */ (0,
|
|
12180
|
-
/* @__PURE__ */ (0,
|
|
12181
|
-
/* @__PURE__ */ (0,
|
|
12182
|
-
/* @__PURE__ */ (0,
|
|
12183
|
-
/* @__PURE__ */ (0,
|
|
12635
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { marginTop: 12 }, children: [
|
|
12636
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "debug-head", children: [
|
|
12637
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", onClick: () => void copyDebugText(currentMathObjectJsonText()), children: "Copy MathObject JSON" }),
|
|
12638
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", "aria-expanded": debugImportOpen, onClick: openDebugMathObjectImport, children: "Import MathObject JSON" }),
|
|
12639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12184
12640
|
"button",
|
|
12185
12641
|
{
|
|
12186
12642
|
type: "button",
|
|
@@ -12200,7 +12656,7 @@ ${arabic || currentMessages.empty}`;
|
|
|
12200
12656
|
children: debugBodyHidden ? messages.showDebugLog : messages.hideDebugLog
|
|
12201
12657
|
}
|
|
12202
12658
|
),
|
|
12203
|
-
/* @__PURE__ */ (0,
|
|
12659
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12204
12660
|
"button",
|
|
12205
12661
|
{
|
|
12206
12662
|
type: "button",
|
|
@@ -12215,8 +12671,8 @@ ${arabic || currentMessages.empty}`;
|
|
|
12215
12671
|
}
|
|
12216
12672
|
)
|
|
12217
12673
|
] }),
|
|
12218
|
-
debugImportOpen ? /* @__PURE__ */ (0,
|
|
12219
|
-
/* @__PURE__ */ (0,
|
|
12674
|
+
debugImportOpen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "debug-json-import", children: [
|
|
12675
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12220
12676
|
"textarea",
|
|
12221
12677
|
{
|
|
12222
12678
|
value: debugImportText,
|
|
@@ -12228,9 +12684,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
12228
12684
|
}
|
|
12229
12685
|
}
|
|
12230
12686
|
),
|
|
12231
|
-
/* @__PURE__ */ (0,
|
|
12232
|
-
/* @__PURE__ */ (0,
|
|
12233
|
-
/* @__PURE__ */ (0,
|
|
12687
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "debug-head", children: [
|
|
12688
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", onClick: applyDebugMathObjectImport, children: "Apply" }),
|
|
12689
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
12234
12690
|
"button",
|
|
12235
12691
|
{
|
|
12236
12692
|
type: "button",
|
|
@@ -12242,9 +12698,9 @@ ${arabic || currentMessages.empty}`;
|
|
|
12242
12698
|
}
|
|
12243
12699
|
)
|
|
12244
12700
|
] }),
|
|
12245
|
-
debugImportError ? /* @__PURE__ */ (0,
|
|
12701
|
+
debugImportError ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "debug-json-error", children: debugImportError }) : null
|
|
12246
12702
|
] }) : null,
|
|
12247
|
-
/* @__PURE__ */ (0,
|
|
12703
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: debugLogRef, className: "debug-log" })
|
|
12248
12704
|
] })
|
|
12249
12705
|
] }) : null
|
|
12250
12706
|
] })
|