@drghaliasri/butex 6.1.5 → 7.0.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.
@@ -475,6 +475,7 @@ type PreviewBlock2 = {
475
475
  src: string;
476
476
  assetId?: string;
477
477
  options: Record<string, string>;
478
+ centered?: boolean;
478
479
  caption?: string;
479
480
  label?: string;
480
481
  numberLabel?: string;
@@ -475,6 +475,7 @@ type PreviewBlock2 = {
475
475
  src: string;
476
476
  assetId?: string;
477
477
  options: Record<string, string>;
478
+ centered?: boolean;
478
479
  caption?: string;
479
480
  label?: string;
480
481
  numberLabel?: string;
package/dist/document2.js CHANGED
@@ -3899,14 +3899,20 @@ var BUTEX_EDITOR_CSS = `
3899
3899
  ${BUTEX_FONT_FACE_CSS}
3900
3900
 
3901
3901
  .surface {
3902
+ background: var(--butex-surface-bg, linear-gradient(180deg, #ffffff 0%, #fafbfc 100%));
3902
3903
  border: 1px solid var(--butex-border, #e2e8f0);
3903
3904
  border-radius: 12px;
3904
- min-height: 100px;
3905
- padding: 8px 10px;
3906
- background: var(--butex-surface-bg, linear-gradient(180deg, #ffffff 0%, #fafbfc 100%));
3907
3905
  color: var(--butex-surface-fg, #0f172a);
3908
- outline: none;
3909
3906
  cursor: text;
3907
+ max-width: 100%;
3908
+ min-height: 100px;
3909
+ min-width: 0;
3910
+ outline: none;
3911
+ overflow-x: auto;
3912
+ overflow-y: hidden;
3913
+ overscroll-behavior-inline: contain;
3914
+ padding: 8px 10px;
3915
+ touch-action: pan-x pan-y;
3910
3916
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
3911
3917
  }
3912
3918
 
@@ -3971,6 +3977,17 @@ ${CHARACTER_FONT_CSS}
3971
3977
  50% { opacity: 0; }
3972
3978
  }
3973
3979
 
3980
+ @media (prefers-reduced-motion: reduce) {
3981
+ .surface {
3982
+ scroll-behavior: auto;
3983
+ transition: none;
3984
+ }
3985
+
3986
+ .caret {
3987
+ animation: none;
3988
+ }
3989
+ }
3990
+
3974
3991
  .node {
3975
3992
  display: inline-flex;
3976
3993
  align-items: stretch;
@@ -7756,6 +7773,7 @@ function blockPreview(block, islands, output, equationSide, document2, previewOp
7756
7773
  src: block.value,
7757
7774
  ...block.assetId !== void 0 ? { assetId: block.assetId } : {},
7758
7775
  options: block.options,
7776
+ centered: block.centered,
7759
7777
  ...block.captionEnabled && block.caption.trim().length > 0 ? { caption: block.caption.trim() } : {},
7760
7778
  ...label.length > 0 ? { label, numberLabel: floatNumberLabel(document2, label, previewOptions) } : {},
7761
7779
  ...block.metadata ? { metadata: { ...block.metadata } } : {}