@drghaliasri/butex 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-cli.js +103 -62
- package/dist/document-cli.js.map +1 -1
- package/dist/document.js +103 -62
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +103 -62
- package/dist/document.mjs.map +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.global.js +14 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react-document-preview.js +28 -8
- package/dist/react-document-preview.js.map +1 -1
- package/dist/react-document-preview.mjs +28 -8
- package/dist/react-document-preview.mjs.map +1 -1
- package/dist/react-document.js +29 -8
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +29 -8
- package/dist/react-document.mjs.map +1 -1
- package/dist/react.d.mts +12 -0
- package/dist/react.d.ts +12 -0
- package/dist/react.js +29 -8
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +29 -8
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.d.mts
CHANGED
|
@@ -522,6 +522,18 @@ declare const ATOMIC_COMMANDS: {
|
|
|
522
522
|
readonly level: 1;
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
|
+
readonly thinSpace: {
|
|
526
|
+
readonly id: "thinSpace";
|
|
527
|
+
readonly category: "spacing";
|
|
528
|
+
readonly englishTex: "\\,";
|
|
529
|
+
readonly arabicTex: "\\,";
|
|
530
|
+
readonly arabicLabel: "";
|
|
531
|
+
readonly title: "فراغ رفيع";
|
|
532
|
+
readonly spacing: {
|
|
533
|
+
readonly direction: "positive";
|
|
534
|
+
readonly level: 1;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
525
537
|
readonly mediumSpace: {
|
|
526
538
|
readonly id: "mediumSpace";
|
|
527
539
|
readonly category: "spacing";
|
package/dist/react.d.ts
CHANGED
|
@@ -522,6 +522,18 @@ declare const ATOMIC_COMMANDS: {
|
|
|
522
522
|
readonly level: 1;
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
|
+
readonly thinSpace: {
|
|
526
|
+
readonly id: "thinSpace";
|
|
527
|
+
readonly category: "spacing";
|
|
528
|
+
readonly englishTex: "\\,";
|
|
529
|
+
readonly arabicTex: "\\,";
|
|
530
|
+
readonly arabicLabel: "";
|
|
531
|
+
readonly title: "فراغ رفيع";
|
|
532
|
+
readonly spacing: {
|
|
533
|
+
readonly direction: "positive";
|
|
534
|
+
readonly level: 1;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
525
537
|
readonly mediumSpace: {
|
|
526
538
|
readonly id: "mediumSpace";
|
|
527
539
|
readonly category: "spacing";
|
package/dist/react.js
CHANGED
|
@@ -712,6 +712,15 @@ var ATOMIC_COMMANDS = {
|
|
|
712
712
|
title: "\u0641\u0631\u0627\u063A \u0633\u0627\u0644\u0628 \u0631\u0641\u064A\u0639",
|
|
713
713
|
spacing: { direction: "negative", level: 1 }
|
|
714
714
|
},
|
|
715
|
+
thinSpace: {
|
|
716
|
+
id: "thinSpace",
|
|
717
|
+
category: "spacing",
|
|
718
|
+
englishTex: "\\,",
|
|
719
|
+
arabicTex: "\\,",
|
|
720
|
+
arabicLabel: "",
|
|
721
|
+
title: "\u0641\u0631\u0627\u063A \u0631\u0641\u064A\u0639",
|
|
722
|
+
spacing: { direction: "positive", level: 1 }
|
|
723
|
+
},
|
|
715
724
|
mediumSpace: {
|
|
716
725
|
id: "mediumSpace",
|
|
717
726
|
category: "spacing",
|
|
@@ -1732,6 +1741,10 @@ function renderNodeEnglish(node, options) {
|
|
|
1732
1741
|
}
|
|
1733
1742
|
if (node.kind === "char") {
|
|
1734
1743
|
if (node.sourceLatex) {
|
|
1744
|
+
if (node.wrapperCommand === "\\boldarabic" || node.wrapperCommand === "\\mathbf") {
|
|
1745
|
+
const boldSource = node.sourceLatex.startsWith("\\mathbf{") ? node.sourceLatex : `\\mathbf{${node.sourceLatex}}`;
|
|
1746
|
+
return `${boldSource}${latinScripts(node, options)}`;
|
|
1747
|
+
}
|
|
1735
1748
|
return `${node.sourceLatex}${latinScripts(node, options)}`;
|
|
1736
1749
|
}
|
|
1737
1750
|
if (node.wrapperCommand) {
|
|
@@ -2673,6 +2686,7 @@ var ENGLISH_COMMAND_TITLES = {
|
|
|
2673
2686
|
C: "Complex numbers",
|
|
2674
2687
|
H: "Quaternions",
|
|
2675
2688
|
negThinSpace: "Negative thin space",
|
|
2689
|
+
thinSpace: "Thin space",
|
|
2676
2690
|
mediumSpace: "Medium space",
|
|
2677
2691
|
thickSpace: "Thick space",
|
|
2678
2692
|
quadSpace: "Large space",
|
|
@@ -9094,20 +9108,27 @@ function editableWrapperCommand(node) {
|
|
|
9094
9108
|
return null;
|
|
9095
9109
|
}
|
|
9096
9110
|
const child = singleCommandChar(node);
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9111
|
+
let editorNode;
|
|
9112
|
+
if (child) {
|
|
9113
|
+
const normalized = normalizeCharImportExpr(child.expr);
|
|
9114
|
+
editorNode = createEditorNode("char", normalized.expr);
|
|
9115
|
+
if (normalized.characterFont !== "default") {
|
|
9116
|
+
editorNode.characterFont = normalized.characterFont;
|
|
9117
|
+
}
|
|
9118
|
+
} else {
|
|
9119
|
+
if (node.optionalArgs.length || node.mandatoryArgs.length !== 1) return null;
|
|
9120
|
+
const nodes = node.mandatoryArgs[0]?.chain;
|
|
9121
|
+
if (!nodes || nodes.length !== 1 || !(nodes[0] instanceof CommandNode)) return null;
|
|
9122
|
+
const nested = charFromTextLikeCommand(nodes[0]);
|
|
9123
|
+
if (!nested?.editable) return null;
|
|
9124
|
+
editorNode = nested.node;
|
|
9104
9125
|
}
|
|
9105
9126
|
editorNode.wrapperCommand = node.name === "\\mathtt" ? "\\mathtt" : node.name === "\\mathbf" ? "\\mathbf" : node.name === "\\boldarabic" ? "\\boldarabic" : "\\unit";
|
|
9106
9127
|
const scripts = attachScripts(node, editorNode);
|
|
9107
9128
|
if (scripts) {
|
|
9108
9129
|
return scripts;
|
|
9109
9130
|
}
|
|
9110
|
-
if (!editorNode.sourceLatex && node.name === "\\mathsf") {
|
|
9131
|
+
if (!editorNode.sourceLatex && node.name === "\\mathsf" && child) {
|
|
9111
9132
|
editorNode.sourceLatex = `\\mathsf{${child.expr}}`;
|
|
9112
9133
|
}
|
|
9113
9134
|
return { editable: true, node: editorNode };
|