@drghaliasri/butex 6.1.5 → 7.0.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.
- package/README.md +43 -12
- package/dist/document.js +21 -4
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +21 -4
- package/dist/document.mjs.map +1 -1
- package/dist/document2-cli.js +551 -5
- package/dist/document2-cli.js.map +1 -1
- package/dist/document2.d.mts +62 -2
- package/dist/document2.d.ts +62 -2
- package/dist/document2.js +476 -51
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs +476 -51
- package/dist/document2.mjs.map +1 -1
- package/dist/index.global.js +104 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +104 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +104 -6
- package/dist/index.mjs.map +1 -1
- package/dist/react-document.js +2066 -599
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +2064 -596
- package/dist/react-document.mjs.map +1 -1
- package/dist/react-document2.d.mts +12 -5
- package/dist/react-document2.d.ts +12 -5
- package/dist/react-document2.js +3704 -1172
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +3692 -1159
- package/dist/react-document2.mjs.map +1 -1
- package/dist/react.d.mts +9 -2
- package/dist/react.d.ts +9 -2
- package/dist/react.js +1954 -507
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1955 -507
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -173,7 +173,7 @@ Shipped as a separate entry so apps that do not use React never pull it in.
|
|
|
173
173
|
- Import: `import { ButexEditor } from 'butex/react'`.
|
|
174
174
|
- Peer dependencies when using this entry: `react` and `react-dom` (^18 or ^19).
|
|
175
175
|
- The component wraps `Editor.createEditorRuntime` (toolbar, surface, MathJax preview strip, optional dev panels via `debug`).
|
|
176
|
-
- Touch devices use a textarea-backed input bridge, so tapping the structured equation surface opens the software keyboard and supports normal text, deletion, and composed/IME input without making TeX strings the editor state.
|
|
176
|
+
- Touch devices use a textarea-backed input bridge, so tapping the structured equation surface opens the software keyboard and supports normal text, deletion, and composed/IME input without making TeX strings the editor state. When `window.visualViewport` exposes valid metrics, BuTeX automatically follows its visible bounds and re-reveals the active caret after keyboard or orientation resizing; `100dvh` remains the no-API fallback.
|
|
177
177
|
- Load MathJax and register BuTeX **before** relying on the preview (same timing as the GUI contract above). Equation preview in `ButexEditor` uses the same `renderBuTeXMathIsland` path as document math islands (output follows the loaded bundle: SVG when `tex2svg` is available, otherwise CHTML). Optional legacy `mountBuTeXMathTypeset` (`typesetPromise`) remains exported for hosts that still rely on it.
|
|
178
178
|
- Next.js App Router: put BuTeX in a **client component** (`'use client'`).
|
|
179
179
|
|
|
@@ -183,11 +183,17 @@ Shipped as a separate entry so apps that do not use React never pull it in.
|
|
|
183
183
|
import { ButexEditor } from 'butex/react';
|
|
184
184
|
|
|
185
185
|
export default function Page() {
|
|
186
|
-
return <ButexEditor uiLocale="en" defaultSide="english" />;
|
|
186
|
+
return <ButexEditor uiLocale="en" defaultSide="english" showSideSwitcher={false} />;
|
|
187
187
|
}
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
`uiLocale` selects Arabic (`"ar"`, the default) or English (`"en"`) GUI labels, tooltips, errors, accessibility text, and chrome direction. `defaultSide` independently selects the initial `"english"` or `"arabic"` equation side;
|
|
190
|
+
`uiLocale` selects Arabic (`"ar"`, the default) or English (`"en"`) GUI labels, tooltips, errors, accessibility text, and chrome direction. `defaultSide` independently selects the initial `"english"` or `"arabic"` equation side. Side controls remain visible by default for standalone compatibility; pass `showSideSwitcher={false}` to hide both the desktop switch and compact-sheet side choices without removing either synchronized equation tree.
|
|
191
|
+
|
|
192
|
+
Equation-toolbar responsiveness is automatic and package-owned. At a layout viewport width of 768px or less, the wrapped desktop toolbar is replaced by a compact command hierarchy: Undo, Redo, Fraction, Superscript, Subscript, Delimiters, Delete, and More. Advanced commands remain available in localized Structures, Functions, Operators, Matrices, Typography, Spacing, and Digit forms sheets. The rendered preview stays mounted but starts collapsed in compact mode so the structured surface receives the available height. Above 768px the existing desktop toolbar and preview remain unchanged. Use `responsiveMode="desktop"` or `responsiveMode="compact"` only when the host intentionally needs to override the automatic workflow.
|
|
193
|
+
|
|
194
|
+
Compact command sheets trap focus while open. Dismissing a sheet restores its trigger, while running an editing command restores the textarea-backed input bridge. Wide and nested equations pan locally inside the structured surface; edits and caret navigation reveal the active position by the smallest required horizontal movement without scrolling the host page or reacting to panning alone.
|
|
195
|
+
|
|
196
|
+
There is no configurable breakpoint or keyboard-aware prop. These behaviors are automatic enhancements and do not change the equation AST or session API. BuTeX never calls `window.scrollTo` or locks the host document body; hosts should leave the editor's fixed overlay outside transformed or unexpectedly clipping ancestors and should test their own nested scrolling shell with the target mobile keyboards.
|
|
191
197
|
|
|
192
198
|
### Document AST (`butex/document`)
|
|
193
199
|
|
|
@@ -292,6 +298,8 @@ const updated = applyDocument2Command(canonical, {
|
|
|
292
298
|
|
|
293
299
|
Block insertions accept `{ end: true }`, `{ before_block_id }`, or `{ after_block_id }`; missing targets fail explicitly. The command union also includes stable-ID inline token operations, list/item operations, and table cell/row/column operations. List and table targets are found recursively, while row and column coordinates are zero-based. Column shape changes require the complete resulting LaTeX `columns` specification.
|
|
294
300
|
|
|
301
|
+
Article authoring commands can move top-level blocks, patch `meta`, manage the ordered reference catalog by normalized key, insert the derived bibliography block, revise figure/table captions and labels, and update an existing figure's host asset association or include value. Reference anchors use `{ before_reference_key }`, `{ after_reference_key }`, or `{ end: true }`. Asset upload/storage and session revisions remain host-owned; see [`docs/fastapi-document2-worker-contract.md`](docs/fastapi-document2-worker-contract.md) for the complete command and error contract.
|
|
302
|
+
|
|
295
303
|
Whole-field replacement rejects formatted text, citations, references, and math so an agent cannot silently discard structured content. Inline math insertion/replacement requires one complete delimited `source` plus a matching structured `MathObject`; BuTeX does not parse raw LaTeX into an equation AST.
|
|
296
304
|
|
|
297
305
|
### Document worker CLI
|
|
@@ -481,31 +489,54 @@ export function ArticleEditorWithUpload() {
|
|
|
481
489
|
}
|
|
482
490
|
```
|
|
483
491
|
|
|
484
|
-
`insertImageBlock` matches the toolbar figure button (focus-aware insert + undo snapshot). Pass `{ assetId, value?, label?, thumbUrl? }` to set both live `assetId` and wire `asset_id`; passing a non-empty string remains supported and treats that string as both `value` and `asset_id`. Use `updateImageBlockAsset(blockId, ref)` to set a host asset on an existing image block, `updateImageBlockValue(blockId, value)` to change only the path value while preserving any existing asset identity, and `getDocumentJson()` to read the canonical wire JSON without host-side AST mutation. BuTeX never uploads image bytes; hosts provide `resolveImageUrl`, optionally `onRequestImagePick`, `listImageAssets`, or `renderImageBlockEditor` for picker/inventory UI.
|
|
492
|
+
`insertImageBlock` matches the toolbar figure button (focus-aware insert + undo snapshot). Pass `{ assetId, value?, label?, thumbUrl? }` to set both live `assetId` and wire `asset_id`; passing a non-empty string remains supported and treats that string as both `value` and `asset_id`. New figures are centered by default, and each image block exposes a **Center figure** checkbox backed by the existing JSON `centered` field and LaTeX `\centering` output. Use `updateImageBlockAsset(blockId, ref)` to set a host asset on an existing image block, `updateImageBlockValue(blockId, value)` to change only the path value while preserving any existing asset identity, and `getDocumentJson()` to read the canonical wire JSON without host-side AST mutation. BuTeX never uploads image bytes; hosts provide `resolveImageUrl`, optionally `onRequestImagePick`, `listImageAssets`, or `renderImageBlockEditor` for picker/inventory UI.
|
|
485
493
|
|
|
486
|
-
Host apps still register BuTeX with MathJax before preview rendering. `uiLocale` selects Arabic (`"ar"`, the default) or English (`"en"`) document-editor chrome and is passed to the embedded equation editor. `documentDirection` independently controls prose inputs and preview flow without creating a second document tree. `equationSide` independently controls whether structured equations open, render, and save from the `"english"` or `"arabic"` side. Set `editableEquations={false}` to show math islands without equation insertion, deletion, or editor access. Set `previewOnly={true}` to render only the read-only document preview with no toolbar, editor panel, or equation drawer. Optional `\includegraphics` `asset_id` is preserved on import; pass `resolveImageUrl={({ assetId, value }) => …})` so preview can load S3/CDN/local assets while plain `value` URLs keep working without a resolver. Document JSON may include root `meta` (`title`, `authors`, structured Hijri `date` `{ day, month, year }` with Arabic month names such as `"محرم"`, `abstract`) plus a `references` catalog (`key`, `authors`, `title`, `year`, `url`, `venue`) and `\cite{key1,key2}` spans in text values. Pass `documentMeta` to seed missing meta fields from the host; JSON keys win when present. The editor always centers a fixed basmala line before the title block and a closing ḥamdala after the body (preview + LaTeX). Hijri date uses day/month/year dropdowns (no calendar conversion; default year 1448). The editor shows numeric cite chips and a bibliography block. RTL preview/chips render reversed labels such as `[٣،٢،١]` (Arabic comma); LTR stays `[1, 2, 3]`. Pass `digitForm` (`western` / `arabicIndic` / `persianIndic`, defaulting from `documentDirection`) or use the toolbar digit control. LaTeX export keeps logical `\cite{…}` key order for XeLaTeX; digit shaping and bidi display in PDF belong in the host preamble (`bidi`/polyglossia + font `Mapping`, see `references/commands.py`). Range compression (`[3–7]`) is not implemented yet. Raw-only equations keep their original source because the browser does not parse raw LaTeX into equation ASTs. Document editor v2 defaults to **`tex-svg.js`**; use `tex-chtml.js` only if you pass `mathOutput="chtml"`.
|
|
494
|
+
Host apps still register BuTeX with MathJax before preview rendering. `uiLocale` selects Arabic (`"ar"`, the default) or English (`"en"`) document-editor chrome and is passed to the embedded equation editor. `documentDirection` independently controls prose inputs and preview flow without creating a second document tree. `equationSide` independently controls whether structured equations open, render, and save from the `"english"` or `"arabic"` side; the embedded drawer hides side-switching controls so editing remains locked to that host-selected side. Set `editableEquations={false}` to show math islands without equation insertion, deletion, or editor access. Set `previewOnly={true}` to render only the read-only document preview with no toolbar, editor panel, or equation drawer. Optional `\includegraphics` `asset_id` is preserved on import; pass `resolveImageUrl={({ assetId, value }) => …})` so preview can load S3/CDN/local assets while plain `value` URLs keep working without a resolver. Document JSON may include root `meta` (`title`, `authors`, structured Hijri `date` `{ day, month, year }` with Arabic month names such as `"محرم"`, `abstract`) plus a `references` catalog (`key`, `authors`, `title`, `year`, `url`, `venue`) and `\cite{key1,key2}` spans in text values. Pass `documentMeta` to seed missing meta fields from the host; JSON keys win when present. The editor always centers a fixed basmala line before the title block and a closing ḥamdala after the body (preview + LaTeX). Hijri date uses day/month/year dropdowns (no calendar conversion; default year 1448). The editor shows numeric cite chips and a bibliography block. RTL preview/chips render reversed labels such as `[٣،٢،١]` (Arabic comma); LTR stays `[1, 2, 3]`. Pass `digitForm` (`western` / `arabicIndic` / `persianIndic`, defaulting from `documentDirection`) or use the toolbar digit control. LaTeX export keeps logical `\cite{…}` key order for XeLaTeX; digit shaping and bidi display in PDF belong in the host preamble (`bidi`/polyglossia + font `Mapping`, see `references/commands.py`). Range compression (`[3–7]`) is not implemented yet. Raw-only equations keep their original source because the browser does not parse raw LaTeX into equation ASTs. Document editor v2 defaults to **`tex-svg.js`**; use `tex-chtml.js` only if you pass `mathOutput="chtml"`.
|
|
487
495
|
|
|
488
496
|
### Styling/theming contract
|
|
489
497
|
|
|
490
498
|
- Core editor classes (`.surface`, `.chain`, `.slot`, `.node`, `.scripts`, `.delim*`, etc.) are shipped from `src/editor/styles.ts`.
|
|
491
499
|
- Theme with **one namespace**, `--butex-*`, on `.butex-widget` (or an ancestor of the editor surface). Defaults are set on `ButexEditor`’s root; hosts override accents, borders, **`--butex-surface-bg` / `--butex-surface-fg`**, **`--butex-preview-bg` / `--butex-preview-fg`**, focus/slot/selection, scripts, optional **`--butex-dev-*`** / **`--butex-dev-inset-*`** when using `debug`, etc., without redefining structure classes.
|
|
492
500
|
- Document editor theming is scoped under `.butex-document-widget`. Override `--butex-document-*` variables on that root or an ancestor, especially `--butex-document-bg`, `--butex-document-fg`, `--butex-document-panel`, `--butex-document-border`, `--butex-document-accent`, `--butex-document-preview-bg`, `--butex-document-drawer-bg`, `--butex-document-input-bg`, `--butex-document-table-border`, `--butex-document-math-bg`, and `--butex-document-dev-bg`.
|
|
493
|
-
- Document editor v2 theming is scoped under `.butex-document2-widget`. Override `--butex-document2-*` variables on that root or an ancestor; defaults inherit from the existing `--butex-*` variables where practical, including accent, panel, border, preview, focus, danger/error, and debug colors. The embedded equation editor opens as a centered modal (backdrop + panel); its BuTeX chrome reads the same `--butex-document2-*` tokens via a scoped bridge, so hosts normally theme once on `.butex-document2-widget` without a second equation theme. The built-in editor uses a **sticky compact icon toolbar** (Arabic `نص` formatting icons, heading glyphs, inline `$…$` vs display `\[…\]` math buttons with tooltips, a labeled references menu, and a table size popover), **focus-aware block insertion** after the active block, **↑/↓ block reorder**, **math delete** (chip × and drawer button), **document undo/redo** (toolbar + Ctrl/⌘Z, Ctrl/⌘Shift+Z, Ctrl+Y) via AST snapshots, and theme-tinted block cards. Preview tables
|
|
501
|
+
- Document editor v2 theming is scoped under `.butex-document2-widget`. Override `--butex-document2-*` variables on that root or an ancestor; defaults inherit from the existing `--butex-*` variables where practical, including accent, panel, border, preview, focus, danger/error, and debug colors. The embedded equation editor opens as a centered modal (backdrop + panel); its BuTeX chrome reads the same `--butex-document2-*` tokens via a scoped bridge, so hosts normally theme once on `.butex-document2-widget` without a second equation theme. The built-in editor uses a **sticky compact icon toolbar** (Arabic `نص` formatting icons, heading glyphs, inline `$…$` vs display `\[…\]` math buttons with tooltips, a labeled references menu, and a table size popover), **focus-aware block insertion** after the active block, **↑/↓ block reorder**, **math delete** (chip × and drawer button), **document undo/redo** (toolbar + Ctrl/⌘Z, Ctrl/⌘Shift+Z, Ctrl+Y) via AST snapshots, and theme-tinted block cards. Preview tables keep black cell borders and scroll inside their preview region when their columns cannot shrink safely; raw `\raw` blocks stay out of preview until dedicated rendering exists.
|
|
502
|
+
|
|
503
|
+
Both React editors register shrinkable inline-size containers for local overflow containment, but interaction mode follows the **layout viewport**, not the editor container. At a viewport width of 900px or narrower, Document Editor v2 automatically presents one principal panel at a time with an accessible Edit/Preview control; at 768px or narrower, the equation editor uses its compact toolbar and categorized sheets. This keeps a narrow editor inside a wide desktop page on the refined desktop workflow. Opening a software keyboard does not change modes because `visualViewport` is used only to reposition the equation modal, not to select a toolbar. At 430px or narrower, phone spacing, safe areas, and local scrolling apply. `previewOnly` continues to render Preview alone without either toolbar.
|
|
504
|
+
|
|
505
|
+
Both components accept `responsiveMode="auto" | "desktop" | "compact"` (`"auto"` is the default). Hosts normally use one component tree and leave the mode automatic; force a mode only for an intentional desktop or touch-oriented shell:
|
|
506
|
+
|
|
507
|
+
```tsx
|
|
508
|
+
<ButexEditor responsiveMode="desktop" />
|
|
509
|
+
<ButexDocumentEditor2 responsiveMode="compact" />
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
`desktop` and `compact` select the toolbar/panel workflow. Physical phone modal sizing remains viewport-based, so forcing compact mode in a wide kiosk does not turn the equation drawer into an unnecessarily wide full-screen overlay.
|
|
513
|
+
|
|
514
|
+
Edit/Preview changes are announced through a localized polite status region. Closing an embedded equation restores the originating math chip or text/block position; saving focuses the updated or newly inserted equation location, and deletion focuses adjacent editable text when possible. Nested equation command sheets remain above the drawer in the focus stack, so Escape closes only the top surface.
|
|
515
|
+
|
|
516
|
+
The automatic 900px and 768px breakpoints remain package defaults; `responsiveMode` is the supported override when a host deliberately needs another workflow. BuTeX does not display document-level saved/dirty state: persistence remains owned by the host through `onDocumentJsonChange`, `onDocumentChange`, or the imperative JSON getter. Wide matrices and other unbreakable equations scroll inside the equation surface, preview, or document math island; caret movement reveals the active position without intentionally scrolling the host page.
|
|
494
517
|
|
|
495
518
|
#### Keeping the Document Editor v2 toolbar sticky
|
|
496
519
|
|
|
497
|
-
`<ButexDocumentEditor2 />` injects `style#butex-document2-widget-styles`; its main toolbar ships with `position: sticky`, `top:
|
|
520
|
+
`<ButexDocumentEditor2 />` injects `style#butex-document2-widget-styles`; its main toolbar ships with `position: sticky`, `top: var(--butex-document2-sticky-top)`, and a stacking layer. If a strict CSP blocks injected inline styles, embed `DOCUMENT2_WIDGET_CSS` through the host's approved global stylesheet or nonced style path, after Tailwind Preflight or other resets.
|
|
498
521
|
|
|
499
|
-
Do not override `.butex-document2-widget__toolbar` with `position: static
|
|
522
|
+
Do not override `.butex-document2-widget__toolbar` with `position: static` or `position: fixed`. Avoid `overflow: auto`, `scroll`, or `hidden` on editor ancestors unless that ancestor is intentionally the constrained vertical scrolling container; sticky positioning follows the nearest such ancestor. Avoid `transform`, `filter`, or `contain` values that turn an ancestor into a containing block for the fixed equation overlay. `overflow-x: clip` by itself does not require an override. For a fixed application header, set the supported sticky-offset variable on the editor root:
|
|
500
523
|
|
|
501
524
|
```css
|
|
502
|
-
.article-editor
|
|
503
|
-
top: var(--app-header-height, 0px);
|
|
525
|
+
.article-editor.butex-document2-widget {
|
|
526
|
+
--butex-document2-sticky-top: var(--app-header-height, 0px);
|
|
504
527
|
}
|
|
505
528
|
```
|
|
506
529
|
|
|
530
|
+
The default stacking order is toolbar (`--butex-document2-z-toolbar: 20`), toolbar popovers (`--butex-document2-z-popover: 30`), document overlays (`--butex-document2-z-overlay: 40`), then the equation modal (`--butex-document2-z-equation: 50`). Override those variables on the editor root when coordinating with a host stacking system. Safe-area defaults come from `env(safe-area-inset-*)`; hosts may set `--butex-safe-area-top`, `--butex-safe-area-right`, `--butex-safe-area-bottom`, and `--butex-safe-area-left` on the editor root when they need explicit values.
|
|
531
|
+
|
|
507
532
|
When diagnosing host CSS, verify that `#butex-document2-widget-styles` exists and that `getComputedStyle(toolbar).position` is `sticky` before adding overrides.
|
|
508
533
|
|
|
534
|
+
The Phase 4 viewport and accessibility hardening adds no prop, entrypoint, AST, or JSON migration. The repository's recommended mobile and keyboard matrix, evidence status, and release limits are recorded in [`docs/responsive-mobile-validation.md`](docs/responsive-mobile-validation.md).
|
|
535
|
+
|
|
536
|
+
### Migrating to 7.0.0
|
|
537
|
+
|
|
538
|
+
Version 7 makes the responsive workflows above the package defaults: Document2 switches to its single-panel workflow at a 900px viewport, and the equation editor switches to its compact command hierarchy at a 768px viewport. Existing call sites remain valid; the additive `responsiveMode` prop is available when a host must force either workflow. Equation/document ASTs, JSON formats, runtime methods, and package entrypoints are unchanged. Upgrades from 6.1.1 also include the validated Document2 public entrypoint and LaTeX/export fixes released in 6.1.2–6.1.5.
|
|
539
|
+
|
|
509
540
|
## Demo
|
|
510
541
|
|
|
511
542
|
From repo root (after `npm run build`):
|
|
@@ -518,9 +549,9 @@ Open:
|
|
|
518
549
|
|
|
519
550
|
- `http://localhost:4173/demo/` (MathJax + `\arabsqrt`)
|
|
520
551
|
- `http://localhost:4173/demo/parser.html` (parser-only normalize preview)
|
|
521
|
-
- **Equation editor (React):** run `cd demo/editor-app && npm install && npm run dev`, then open the URL Vite prints (see `demo/editor.html` for a short pointer). The equation editor demo loads MathJax SVG from `public/vendor
|
|
552
|
+
- **Equation editor (React):** run `cd demo/editor-app && npm install && npm run dev`, then open the URL Vite prints (see `demo/editor.html` for a short pointer). The equation editor demo loads MathJax SVG from `public/vendor/` and includes portrait/landscape frames, a constrained host scroller, visible-viewport diagnostics, UI-language and equation-side controls, wide equations, and matrices.
|
|
522
553
|
- **Document editor (React):** run `cd demo/document-editor-app && npm install && npm run dev`, then open the URL Vite prints (see `demo/document.html` for a short pointer).
|
|
523
|
-
- **Document editor v2 (React):** run `cd demo/document-editor-app2 && npm install && npm run dev`, then open the URL Vite prints. The v2 demo loads MathJax SVG
|
|
554
|
+
- **Document editor v2 (React):** run `cd demo/document-editor-app2 && npm install && npm run dev`, then open the URL Vite prints. The v2 demo loads MathJax SVG, exercises metadata, editable wide math and matrices, lists, tables, figures, citations, and bibliography, and includes 320, 360, 375, 390, 430, 768, 900px, and desktop-width presets. Its realistic host-shell mode adds a sticky application header, constrained vertical scroller, safe-area overrides, surrounding content, locale/side controls, and visible-viewport diagnostics. Optional bottom dev panels (LaTeX + AST) appear only if you append `?debug=1` to the URL or pass the `debug` prop from your host app.
|
|
524
555
|
|
|
525
556
|
### Editor MVP notes (`demo/editor-app`)
|
|
526
557
|
|
package/dist/document.js
CHANGED
|
@@ -2598,14 +2598,20 @@ var BUTEX_EDITOR_CSS = `
|
|
|
2598
2598
|
${BUTEX_FONT_FACE_CSS}
|
|
2599
2599
|
|
|
2600
2600
|
.surface {
|
|
2601
|
+
background: var(--butex-surface-bg, linear-gradient(180deg, #ffffff 0%, #fafbfc 100%));
|
|
2601
2602
|
border: 1px solid var(--butex-border, #e2e8f0);
|
|
2602
2603
|
border-radius: 12px;
|
|
2603
|
-
min-height: 100px;
|
|
2604
|
-
padding: 8px 10px;
|
|
2605
|
-
background: var(--butex-surface-bg, linear-gradient(180deg, #ffffff 0%, #fafbfc 100%));
|
|
2606
2604
|
color: var(--butex-surface-fg, #0f172a);
|
|
2607
|
-
outline: none;
|
|
2608
2605
|
cursor: text;
|
|
2606
|
+
max-width: 100%;
|
|
2607
|
+
min-height: 100px;
|
|
2608
|
+
min-width: 0;
|
|
2609
|
+
outline: none;
|
|
2610
|
+
overflow-x: auto;
|
|
2611
|
+
overflow-y: hidden;
|
|
2612
|
+
overscroll-behavior-inline: contain;
|
|
2613
|
+
padding: 8px 10px;
|
|
2614
|
+
touch-action: pan-x pan-y;
|
|
2609
2615
|
transition: box-shadow 0.15s ease, border-color 0.15s ease;
|
|
2610
2616
|
}
|
|
2611
2617
|
|
|
@@ -2670,6 +2676,17 @@ ${CHARACTER_FONT_CSS}
|
|
|
2670
2676
|
50% { opacity: 0; }
|
|
2671
2677
|
}
|
|
2672
2678
|
|
|
2679
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2680
|
+
.surface {
|
|
2681
|
+
scroll-behavior: auto;
|
|
2682
|
+
transition: none;
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
.caret {
|
|
2686
|
+
animation: none;
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2673
2690
|
.node {
|
|
2674
2691
|
display: inline-flex;
|
|
2675
2692
|
align-items: stretch;
|