@drghaliasri/butex 7.3.1 → 7.3.2

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.
Files changed (43) hide show
  1. package/dist/document.d.mts +1 -1
  2. package/dist/document.d.ts +1 -1
  3. package/dist/document.js +27 -0
  4. package/dist/document.js.map +1 -1
  5. package/dist/document.mjs +27 -0
  6. package/dist/document.mjs.map +1 -1
  7. package/dist/document2-cli.js +47 -0
  8. package/dist/document2-cli.js.map +1 -1
  9. package/dist/document2.d.mts +1 -1
  10. package/dist/document2.d.ts +1 -1
  11. package/dist/document2.js +47 -0
  12. package/dist/document2.js.map +1 -1
  13. package/dist/document2.mjs +47 -0
  14. package/dist/document2.mjs.map +1 -1
  15. package/dist/index.d.mts +7 -2
  16. package/dist/index.d.ts +7 -2
  17. package/dist/index.global.js +44 -0
  18. package/dist/index.global.js.map +1 -1
  19. package/dist/index.js +44 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +44 -0
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/react-document.js +58 -0
  24. package/dist/react-document.js.map +1 -1
  25. package/dist/react-document.mjs +58 -0
  26. package/dist/react-document.mjs.map +1 -1
  27. package/dist/react-document2-preview.js +41 -0
  28. package/dist/react-document2-preview.js.map +1 -1
  29. package/dist/react-document2-preview.mjs +41 -0
  30. package/dist/react-document2-preview.mjs.map +1 -1
  31. package/dist/react-document2.d.mts +1 -1
  32. package/dist/react-document2.d.ts +1 -1
  33. package/dist/react-document2.js +58 -0
  34. package/dist/react-document2.js.map +1 -1
  35. package/dist/react-document2.mjs +58 -0
  36. package/dist/react-document2.mjs.map +1 -1
  37. package/dist/react.d.mts +1 -1
  38. package/dist/react.d.ts +1 -1
  39. package/dist/react.js +58 -0
  40. package/dist/react.js.map +1 -1
  41. package/dist/react.mjs +58 -0
  42. package/dist/react.mjs.map +1 -1
  43. package/package.json +1 -1
package/dist/document.mjs CHANGED
@@ -2043,6 +2043,10 @@ function renderNodeArabic(node, options) {
2043
2043
  const content = `${node.leftDelimExpr}${renderChainArabic(node.innerExpr, options)}${node.rightDelimExpr}`;
2044
2044
  return arabicScripts(node, content, options);
2045
2045
  }
2046
+ if (node.kind === "boxed" && node.innerExpr) {
2047
+ const content = `\\boxed{${renderChainArabic(node.innerExpr, options)}}`;
2048
+ return arabicScripts(node, content, options);
2049
+ }
2046
2050
  if (node.kind === "frac" && node.numerator && node.denominator) {
2047
2051
  const content = `\\frac{${renderChainArabic(node.numerator, options)}}{${renderChainArabic(node.denominator, options)}}`;
2048
2052
  return arabicScripts(node, content, options);
@@ -2151,6 +2155,21 @@ var rightDelimExpr = buildDelimiterExpr(
2151
2155
  [")", "]", "\\}", "\\rfloor", "\\rceil", "\\rangle", "`", "|", "\\|", "\\rvert", "\\vert", "\\rVert", "\\Vert"]
2152
2156
  );
2153
2157
 
2158
+ // src/editor/display/boxed.ts
2159
+ var BOXED_CSS = `
2160
+ .boxed-command {
2161
+ display: inline-flex;
2162
+ align-items: center;
2163
+ border: 1.5px solid currentColor;
2164
+ padding: 0.12em 0.22em;
2165
+ min-height: 1.25em;
2166
+ }
2167
+
2168
+ .boxed-command > .chain {
2169
+ min-height: auto;
2170
+ }
2171
+ `.trim();
2172
+
2154
2173
  // src/editor/display/frac.ts
2155
2174
  var FRAC_CSS = `
2156
2175
  .frac {
@@ -2823,6 +2842,8 @@ ${CHARACTER_FONT_CSS}
2823
2842
 
2824
2843
  ${DELIMITER_CSS}
2825
2844
 
2845
+ ${BOXED_CSS}
2846
+
2826
2847
  ${FRAC_CSS}
2827
2848
 
2828
2849
  ${SQRT_CSS}
@@ -2955,6 +2976,12 @@ function editorNodeToAstNode(node) {
2955
2976
  return inner;
2956
2977
  }
2957
2978
  astNode = new DelimiterNode(node.leftDelimExpr, inner.chain, node.rightDelimExpr);
2979
+ } else if (node.kind === "boxed" && node.innerExpr) {
2980
+ const inner = editorChainToAstChain(node.innerExpr);
2981
+ if (!inner.ok) {
2982
+ return inner;
2983
+ }
2984
+ astNode = new CommandNode("\\boxed", [], [inner.chain]);
2958
2985
  } else if (node.kind === "frac" && node.numerator && node.denominator) {
2959
2986
  const numerator = editorChainToAstChain(node.numerator);
2960
2987
  const denominator = editorChainToAstChain(node.denominator);