@drghaliasri/butex 4.4.0 → 5.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.
@@ -48,6 +48,82 @@ declare class ChainNode {
48
48
  toArabicLatex(): string;
49
49
  }
50
50
 
51
+ type EditorSide = 'english' | 'arabic';
52
+ type EditorNodeKind = 'char' | 'number' | 'operator' | 'delimiter' | 'frac' | 'sqrt' | 'env' | 'atomicCommand' | 'atomicOperatorCommand';
53
+ type MatrixEnvStyle = 'matrix' | 'pmatrix' | 'bmatrix' | 'Bmatrix' | 'vmatrix' | 'Vmatrix';
54
+ type GridEnvName = MatrixEnvStyle | 'array' | 'aligned';
55
+ type EnvColumnAlignment = 'l' | 'c' | 'r';
56
+ type CharacterFontId = 'default' | 'takween' | 'diwani' | 'diwaniOutline';
57
+ type DigitFormId = 'western' | 'arabicIndic' | 'persianIndic';
58
+ type EditorSyncState = 'synced' | 'diverged';
59
+ type EditorChain = {
60
+ id: string;
61
+ nodes: EditorNode[];
62
+ };
63
+ type EditorNode = {
64
+ id: string;
65
+ kind: EditorNodeKind;
66
+ expr: string;
67
+ characterFont?: CharacterFontId;
68
+ superscript: EditorChain | null;
69
+ subscript: EditorChain | null;
70
+ leftDelimExpr: string;
71
+ rightDelimExpr: string;
72
+ innerExpr: EditorChain | null;
73
+ numerator: EditorChain | null;
74
+ denominator: EditorChain | null;
75
+ radicand: EditorChain | null;
76
+ rootIndex: EditorChain | null;
77
+ envName: GridEnvName | null;
78
+ matrixStyle: MatrixEnvStyle | null;
79
+ matrixRows: EditorChain[][] | null;
80
+ columnAlignments: EnvColumnAlignment[] | null;
81
+ };
82
+ type EditorCaret = {
83
+ chainId: string;
84
+ index: number;
85
+ };
86
+ type EditorSelectionRange = {
87
+ chainId: string;
88
+ anchorIndex: number;
89
+ focusIndex: number;
90
+ };
91
+ type EditorSyncMap = Record<string, {
92
+ expr: EditorSyncState;
93
+ }>;
94
+ type EditorDebugEntry = {
95
+ timestamp: string;
96
+ command: string;
97
+ activeSide: EditorSide;
98
+ englishLatex: string;
99
+ arabicLatex: string;
100
+ renderOk: boolean;
101
+ renderError: string | null;
102
+ note: string;
103
+ };
104
+ type EditorSession = {
105
+ englishTree: EditorChain;
106
+ arabicTree: EditorChain;
107
+ activeSide: EditorSide;
108
+ /** When true, each typed letter/digit inserts a new char/number leaf; when false, merge into adjacent same-kind leaves. */
109
+ splitLeafTyping: boolean;
110
+ /** One-shot: when true, the next insertChar/insertNumber bypasses leaf-merge (used by Space in merge mode). */
111
+ forceSplitNextLeaf: boolean;
112
+ /** When true and active side is Arabic, merged number typing prepends digits (RTL-style); still mirrored on EN/AR. */
113
+ arabicReverseNumberTyping: boolean;
114
+ /** Font applied to newly typed char nodes. */
115
+ currentCharacterFont: CharacterFontId;
116
+ /** Digit glyph form used for editor display and LaTeX preview output. */
117
+ currentDigitForm: DigitFormId;
118
+ caret: EditorCaret;
119
+ /** Whole-node range selection inside a single chain (anchor==focus means no selection). */
120
+ selection: EditorSelectionRange | null;
121
+ selectedNodeId: string | null;
122
+ selectedStructureNodeId: string | null;
123
+ sync: EditorSyncMap;
124
+ debugLog: EditorDebugEntry[];
125
+ };
126
+
51
127
  type MathNode = {
52
128
  nodeType: 'MathObject';
53
129
  mathMode: string;
@@ -63,19 +139,48 @@ type MathObject2Json = {
63
139
  lines: ChainJson[];
64
140
  closing: string;
65
141
  };
142
+ type Reference2Json = {
143
+ key: string;
144
+ authors?: string;
145
+ title?: string;
146
+ year?: string;
147
+ url?: string;
148
+ venue?: string;
149
+ };
150
+ type HijriMonthId = 'محرم' | 'صفر' | 'ربيع الأول' | 'ربيع الآخر' | 'جمادى الأولى' | 'جمادى الآخرة' | 'رجب' | 'شعبان' | 'رمضان' | 'شوال' | 'ذو القعدة' | 'ذو الحجة';
151
+ type Document2HijriDate = {
152
+ day: number;
153
+ month: HijriMonthId;
154
+ year: number;
155
+ };
156
+ type Document2Meta = {
157
+ title: string;
158
+ authors: string;
159
+ date: Document2HijriDate;
160
+ abstract: string;
161
+ };
66
162
  type Document2Json = {
67
163
  node_type: 'DocumentObject';
164
+ meta?: Document2Meta;
165
+ references?: Reference2Json[];
68
166
  blocks: Document2BlockJson[];
69
167
  };
70
168
  type Document2BlockJson = {
71
169
  command: string;
72
170
  value?: string;
171
+ /** Stable host asset identity (e.g. S3 key / UUID); optional for \\includegraphics. */
172
+ asset_id?: string;
73
173
  math_objects?: MathObject2Json[];
74
174
  options?: Record<string, string>;
75
175
  closing?: string;
76
176
  items?: Document2ListItemJson[];
77
177
  rows?: string[][];
78
178
  columns?: string;
179
+ caption?: string;
180
+ label?: string;
181
+ caption_enabled?: boolean;
182
+ label_enabled?: boolean;
183
+ centered?: boolean;
79
184
  };
80
185
  type Document2ListItemJson = {
81
186
  value: string;
@@ -87,6 +192,15 @@ type Document2Diagnostic = {
87
192
  message: string;
88
193
  path: string;
89
194
  };
195
+ type Reference2 = {
196
+ id: string;
197
+ key: string;
198
+ authors: string;
199
+ title: string;
200
+ year: string;
201
+ url: string;
202
+ venue: string;
203
+ };
90
204
  type TextToken2 = {
91
205
  id: string;
92
206
  kind: 'text';
@@ -104,8 +218,22 @@ type MathToken2 = {
104
218
  editable: boolean;
105
219
  reason?: string;
106
220
  sourceOwner: 'imported-structured' | 'raw' | 'editor';
221
+ /** When true on display math, export as equation env with \\label. */
222
+ labelEnabled?: boolean;
223
+ label?: string;
224
+ };
225
+ type CiteToken2 = {
226
+ id: string;
227
+ kind: 'cite';
228
+ keys: string[];
229
+ };
230
+ type RefToken2 = {
231
+ id: string;
232
+ kind: 'ref';
233
+ keys: string[];
234
+ refCommand: 'ref' | 'eqref';
107
235
  };
108
- type InlineToken2 = TextToken2 | MathToken2;
236
+ type InlineToken2 = TextToken2 | MathToken2 | CiteToken2 | RefToken2;
109
237
  type InlineField2 = {
110
238
  id: string;
111
239
  tokens: InlineToken2[];
@@ -115,6 +243,8 @@ type TextBlock2 = {
115
243
  kind: 'textBlock';
116
244
  command: '\\section' | '\\subsection' | '\\subsubsection' | '\\paragraph';
117
245
  field: InlineField2;
246
+ /** When true on \\paragraph, center in preview and LaTeX export. */
247
+ centered?: boolean;
118
248
  };
119
249
  type ListItem2 = {
120
250
  id: string;
@@ -128,6 +258,13 @@ type ListBlock2 = {
128
258
  closing: '\\end{itemize}' | '\\end{enumerate}';
129
259
  items: ListItem2[];
130
260
  };
261
+ type FloatMeta2 = {
262
+ centered: boolean;
263
+ captionEnabled: boolean;
264
+ caption: string;
265
+ labelEnabled: boolean;
266
+ label: string;
267
+ };
131
268
  type TableBlock2 = {
132
269
  id: string;
133
270
  kind: 'table';
@@ -135,13 +272,21 @@ type TableBlock2 = {
135
272
  closing: '\\end{tabular}';
136
273
  columns: string;
137
274
  rows: InlineField2[][];
138
- };
275
+ } & FloatMeta2;
139
276
  type ImageBlock2 = {
140
277
  id: string;
141
278
  kind: 'image';
142
279
  command: '\\includegraphics';
143
280
  value: string;
281
+ /** Host asset identity from wire `asset_id`; preserved across value edits. */
282
+ assetId?: string;
144
283
  options: Record<string, string>;
284
+ } & FloatMeta2;
285
+ type BibliographyBlock2 = {
286
+ id: string;
287
+ kind: 'bibliography';
288
+ command: '\\begin{thebibliography}';
289
+ closing: '\\end{thebibliography}';
145
290
  };
146
291
  type RawBlock2 = {
147
292
  id: string;
@@ -149,9 +294,11 @@ type RawBlock2 = {
149
294
  command: '\\raw';
150
295
  value: string;
151
296
  };
152
- type Document2Block = TextBlock2 | ListBlock2 | TableBlock2 | ImageBlock2 | RawBlock2;
297
+ type Document2Block = TextBlock2 | ListBlock2 | TableBlock2 | ImageBlock2 | BibliographyBlock2 | RawBlock2;
153
298
  type Document2Node = {
154
299
  nodeType: 'DocumentObject';
300
+ meta: Document2Meta;
301
+ references: Reference2[];
155
302
  blocks: Document2Block[];
156
303
  diagnostics: Document2Diagnostic[];
157
304
  };
@@ -165,8 +312,39 @@ type PreviewInline2 = {
165
312
  display: boolean;
166
313
  output: Document2MathOutput;
167
314
  editable: boolean;
315
+ } | {
316
+ kind: 'cite';
317
+ id: string;
318
+ keys: string[];
319
+ label: string;
320
+ } | {
321
+ kind: 'ref';
322
+ id: string;
323
+ keys: string[];
324
+ refCommand: 'ref' | 'eqref';
325
+ label: string;
168
326
  };
169
327
  type PreviewBlock2 = {
328
+ kind: 'basmala';
329
+ id: string;
330
+ text: string;
331
+ tex: string;
332
+ } | {
333
+ kind: 'titleBlock';
334
+ id: string;
335
+ title?: string;
336
+ authors?: string;
337
+ date?: string;
338
+ } | {
339
+ kind: 'abstract';
340
+ id: string;
341
+ text: string;
342
+ } | {
343
+ kind: 'closing';
344
+ id: string;
345
+ text: string;
346
+ tex: string;
347
+ } | {
170
348
  kind: 'heading';
171
349
  id: string;
172
350
  level: 1 | 2 | 3;
@@ -175,6 +353,7 @@ type PreviewBlock2 = {
175
353
  kind: 'paragraph';
176
354
  id: string;
177
355
  inlines: PreviewInline2[];
356
+ centered?: boolean;
178
357
  } | {
179
358
  kind: 'list';
180
359
  id: string;
@@ -188,11 +367,31 @@ type PreviewBlock2 = {
188
367
  kind: 'table';
189
368
  id: string;
190
369
  rows: PreviewInline2[][][];
370
+ caption?: string;
371
+ label?: string;
372
+ numberLabel?: string;
191
373
  } | {
192
374
  kind: 'image';
193
375
  id: string;
194
376
  src: string;
377
+ assetId?: string;
195
378
  options: Record<string, string>;
379
+ caption?: string;
380
+ label?: string;
381
+ numberLabel?: string;
382
+ } | {
383
+ kind: 'bibliography';
384
+ id: string;
385
+ items: Array<{
386
+ id: string;
387
+ numberLabel: string;
388
+ key: string;
389
+ authors: string;
390
+ title: string;
391
+ year: string;
392
+ url: string;
393
+ venue: string;
394
+ }>;
196
395
  }
197
396
  /** Preview-only: raw / unknown blocks are omitted from preview until we add proper rendering. */
198
397
  | {
@@ -200,86 +399,16 @@ type PreviewBlock2 = {
200
399
  id: string;
201
400
  };
202
401
 
203
- type EditorSide = 'english' | 'arabic';
204
- type EditorNodeKind = 'char' | 'number' | 'operator' | 'delimiter' | 'frac' | 'sqrt' | 'env' | 'atomicCommand' | 'atomicOperatorCommand';
205
- type MatrixEnvStyle = 'matrix' | 'pmatrix' | 'bmatrix' | 'Bmatrix' | 'vmatrix' | 'Vmatrix';
206
- type GridEnvName = MatrixEnvStyle | 'array' | 'aligned';
207
- type EnvColumnAlignment = 'l' | 'c' | 'r';
208
- type CharacterFontId = 'default' | 'takween' | 'diwani' | 'diwaniOutline';
209
- type DigitFormId = 'western' | 'arabicIndic' | 'persianIndic';
210
- type EditorSyncState = 'synced' | 'diverged';
211
- type EditorChain = {
212
- id: string;
213
- nodes: EditorNode[];
214
- };
215
- type EditorNode = {
216
- id: string;
217
- kind: EditorNodeKind;
218
- expr: string;
219
- characterFont?: CharacterFontId;
220
- superscript: EditorChain | null;
221
- subscript: EditorChain | null;
222
- leftDelimExpr: string;
223
- rightDelimExpr: string;
224
- innerExpr: EditorChain | null;
225
- numerator: EditorChain | null;
226
- denominator: EditorChain | null;
227
- radicand: EditorChain | null;
228
- rootIndex: EditorChain | null;
229
- envName: GridEnvName | null;
230
- matrixStyle: MatrixEnvStyle | null;
231
- matrixRows: EditorChain[][] | null;
232
- columnAlignments: EnvColumnAlignment[] | null;
233
- };
234
- type EditorCaret = {
235
- chainId: string;
236
- index: number;
237
- };
238
- type EditorSelectionRange = {
239
- chainId: string;
240
- anchorIndex: number;
241
- focusIndex: number;
242
- };
243
- type EditorSyncMap = Record<string, {
244
- expr: EditorSyncState;
245
- }>;
246
- type EditorDebugEntry = {
247
- timestamp: string;
248
- command: string;
249
- activeSide: EditorSide;
250
- englishLatex: string;
251
- arabicLatex: string;
252
- renderOk: boolean;
253
- renderError: string | null;
254
- note: string;
255
- };
256
- type EditorSession = {
257
- englishTree: EditorChain;
258
- arabicTree: EditorChain;
259
- activeSide: EditorSide;
260
- /** When true, each typed letter/digit inserts a new char/number leaf; when false, merge into adjacent same-kind leaves. */
261
- splitLeafTyping: boolean;
262
- /** One-shot: when true, the next insertChar/insertNumber bypasses leaf-merge (used by Space in merge mode). */
263
- forceSplitNextLeaf: boolean;
264
- /** When true and active side is Arabic, merged number typing prepends digits (RTL-style); still mirrored on EN/AR. */
265
- arabicReverseNumberTyping: boolean;
266
- /** Font applied to newly typed char nodes. */
267
- currentCharacterFont: CharacterFontId;
268
- /** Digit glyph form used for editor display and LaTeX preview output. */
269
- currentDigitForm: DigitFormId;
270
- caret: EditorCaret;
271
- /** Whole-node range selection inside a single chain (anchor==focus means no selection). */
272
- selection: EditorSelectionRange | null;
273
- selectedNodeId: string | null;
274
- selectedStructureNodeId: string | null;
275
- sync: EditorSyncMap;
276
- debugLog: EditorDebugEntry[];
277
- };
278
-
279
402
  type ButexUiLocale = 'ar' | 'en';
280
403
 
404
+ type Document2MetaProp = Partial<Omit<Document2Meta, 'date'>> & {
405
+ date?: Partial<Document2HijriDate>;
406
+ };
407
+
281
408
  type ButexDocumentEditor2Props = {
282
409
  initialDocument?: Document2Json | Document2Node;
410
+ /** Seed article metadata when JSON/node omits fields (JSON wins when present). */
411
+ documentMeta?: Document2MetaProp;
283
412
  className?: string;
284
413
  debug?: boolean;
285
414
  documentDirection?: 'rtl' | 'ltr';
@@ -289,6 +418,14 @@ type ButexDocumentEditor2Props = {
289
418
  previewOnly?: boolean;
290
419
  uiLocale?: ButexUiLocale;
291
420
  mathOutput?: Document2MathOutput;
421
+ /** Digit shaping for citation and bibliography numbers (western / arabicIndic / persianIndic). */
422
+ digitForm?: DigitFormId;
423
+ onDigitFormChange?: (digitForm: DigitFormId) => void;
424
+ /** Host maps assetId / literal value to a browser-loadable image URL (S3, CDN, local). */
425
+ resolveImageUrl?: (ref: {
426
+ assetId?: string;
427
+ value: string;
428
+ }) => string;
292
429
  onDocumentChange?: (document: Document2Node) => void;
293
430
  onLatexChange?: (latex: string) => void;
294
431
  };
@@ -296,16 +433,23 @@ type Document2InitialState = {
296
433
  document: Document2Node;
297
434
  error: string | null;
298
435
  };
299
- declare function resolveInitialDocument2(initialDocument: Document2Json | Document2Node | undefined, uiLocale?: ButexUiLocale): Document2InitialState;
300
- declare function ButexDocumentEditor2({ initialDocument, className, debug, documentDirection, equationSide, editableEquations, previewOnly, uiLocale, mathOutput, onDocumentChange, onLatexChange, }: ButexDocumentEditor2Props): react_jsx_runtime.JSX.Element;
436
+ declare function resolveInitialDocument2(initialDocument: Document2Json | Document2Node | undefined, uiLocale?: ButexUiLocale, documentMeta?: Document2MetaProp): Document2InitialState;
437
+ declare function ButexDocumentEditor2({ initialDocument, documentMeta, className, debug, documentDirection, equationSide, editableEquations, previewOnly, uiLocale, mathOutput, digitForm: digitFormProp, onDigitFormChange, resolveImageUrl, onDocumentChange, onLatexChange, }: ButexDocumentEditor2Props): react_jsx_runtime.JSX.Element;
301
438
 
302
439
  type DocumentInsertToolbarProps = {
303
440
  canUndo: boolean;
304
441
  canRedo: boolean;
305
442
  editableEquations?: boolean;
306
443
  uiLocale?: ButexUiLocale;
444
+ digitForm?: DigitFormId;
445
+ selectionCount?: number;
446
+ canMoveSelectionUp?: boolean;
447
+ canMoveSelectionDown?: boolean;
307
448
  onUndo: () => void;
308
449
  onRedo: () => void;
450
+ onMoveSelectionUp?: () => void;
451
+ onMoveSelectionDown?: () => void;
452
+ onDeleteSelection?: () => void;
309
453
  onAddSection: () => void;
310
454
  onAddSubsection: () => void;
311
455
  onAddSubsubsection: () => void;
@@ -316,14 +460,26 @@ type DocumentInsertToolbarProps = {
316
460
  onAddList: () => void;
317
461
  onAddEnumerate: () => void;
318
462
  onAddFigure: () => void;
319
- };
320
- declare function DocumentInsertToolbar({ canUndo, canRedo, editableEquations, uiLocale, onUndo, onRedo, onAddSection, onAddSubsection, onAddSubsubsection, onAddParagraph, onAddInlineEquation, onAddDisplayEquation, onAddTable, onAddList, onAddEnumerate, onAddFigure, }: DocumentInsertToolbarProps): react_jsx_runtime.JSX.Element;
463
+ onInsertCitation: () => void;
464
+ onInsertInternalRef: () => void;
465
+ onInsertBibliography: () => void;
466
+ onManageReferences: () => void;
467
+ onManageLabels: () => void;
468
+ onOpenArticleMeta?: () => void;
469
+ onDigitFormChange: (digitForm: DigitFormId) => void;
470
+ };
471
+ declare function DocumentInsertToolbar({ canUndo, canRedo, editableEquations, uiLocale, digitForm, selectionCount, canMoveSelectionUp, canMoveSelectionDown, onUndo, onRedo, onMoveSelectionUp, onMoveSelectionDown, onDeleteSelection, onAddSection, onAddSubsection, onAddSubsubsection, onAddParagraph, onAddInlineEquation, onAddDisplayEquation, onAddTable, onAddList, onAddEnumerate, onAddFigure, onInsertCitation, onInsertInternalRef, onInsertBibliography, onManageReferences, onManageLabels, onOpenArticleMeta, onDigitFormChange, }: DocumentInsertToolbarProps): react_jsx_runtime.JSX.Element;
321
472
 
322
- declare function DocumentPreview({ blocks, output, documentDirection, uiLocale, }: {
473
+ type ResolveDocument2ImageUrl = (ref: {
474
+ assetId?: string;
475
+ value: string;
476
+ }) => string;
477
+ declare function DocumentPreview({ blocks, output, documentDirection, uiLocale, resolveImageUrl, }: {
323
478
  blocks: PreviewBlock2[];
324
479
  output: Document2MathOutput;
325
480
  documentDirection?: 'rtl' | 'ltr';
326
481
  uiLocale?: ButexUiLocale;
482
+ resolveImageUrl?: ResolveDocument2ImageUrl;
327
483
  }): react_jsx_runtime.JSX.Element;
328
484
 
329
485
  type EquationMathMode = 'inline' | 'display';
@@ -334,29 +490,43 @@ type EquationDrawerProps = {
334
490
  canDelete?: boolean;
335
491
  equationSide?: EditorSide;
336
492
  uiLocale?: ButexUiLocale;
493
+ labelEnabled?: boolean;
494
+ label?: string;
495
+ onLabelEnabledChange?: (enabled: boolean) => void;
496
+ onLabelChange?: (label: string) => void;
337
497
  onMathModeChange: (mode: EquationMathMode) => void;
338
498
  onClose: () => void;
339
499
  onSave: (session: EditorSession) => void;
340
500
  onDelete?: () => void;
341
501
  };
342
- declare function EquationDrawer({ session, reason, mathMode, canDelete, equationSide, uiLocale, onMathModeChange, onClose, onSave, onDelete, }: EquationDrawerProps): react_jsx_runtime.JSX.Element;
502
+ declare function EquationDrawer({ session, reason, mathMode, canDelete, equationSide, uiLocale, labelEnabled, label, onLabelEnabledChange, onLabelChange, onMathModeChange, onClose, onSave, onDelete, }: EquationDrawerProps): react_jsx_runtime.JSX.Element;
343
503
 
344
504
  type InlineFieldProps = {
345
505
  field: InlineField2;
346
506
  blockId?: string;
507
+ references?: Reference2[];
508
+ documentNode?: Document2Node;
347
509
  documentDirection?: 'rtl' | 'ltr';
510
+ digitForm?: DigitFormId;
348
511
  mathOutput?: Document2MathOutput;
349
512
  equationSide?: EditorSide;
350
513
  editableEquations?: boolean;
514
+ editableCitations?: boolean;
351
515
  uiLocale?: ButexUiLocale;
352
516
  onTextChange: (fieldId: string, tokenId: string, text: string) => void;
353
517
  onOpenMath: (token: MathToken2) => void;
354
518
  onDeleteMath?: (tokenId: string) => void;
519
+ onOpenCite?: (token: CiteToken2) => void;
520
+ onDeleteCite?: (tokenId: string) => void;
521
+ onOpenRef?: (token: RefToken2) => void;
522
+ onDeleteRef?: (tokenId: string) => void;
355
523
  onFieldFocus?: (blockId: string, fieldId: string, textTokenId: string, caretOffset: number) => void;
356
524
  onMathFocus?: (blockId: string, fieldId: string, tokenId: string) => void;
525
+ onCiteFocus?: (blockId: string, fieldId: string, tokenId: string) => void;
526
+ onRefFocus?: (blockId: string, fieldId: string, tokenId: string) => void;
357
527
  onFieldBlur?: () => void;
358
528
  };
359
- declare function InlineField({ field, blockId, documentDirection, mathOutput, equationSide, editableEquations, uiLocale, onTextChange, onOpenMath, onDeleteMath, onFieldFocus, onMathFocus, onFieldBlur, }: InlineFieldProps): react_jsx_runtime.JSX.Element;
529
+ declare function InlineField({ field, blockId, references, documentNode, documentDirection, digitForm, mathOutput, equationSide, editableEquations, editableCitations, uiLocale, onTextChange, onOpenMath, onDeleteMath, onOpenCite, onDeleteCite, onOpenRef, onDeleteRef, onFieldFocus, onMathFocus, onCiteFocus, onRefFocus, onFieldBlur, }: InlineFieldProps): react_jsx_runtime.JSX.Element;
360
530
 
361
531
  type MathChipProps = {
362
532
  token: MathToken2;
@@ -384,7 +554,7 @@ type MathIslandProps = {
384
554
  };
385
555
  declare function MathIsland({ id, tex, display, output }: MathIslandProps): react_jsx_runtime.JSX.Element;
386
556
 
387
- declare const DOCUMENT2_WIDGET_CSS = "\n.butex-document2-widget {\n --butex-document2-bg: var(--butex-bg, #f8fafc);\n --butex-document2-fg: var(--butex-fg, #0f172a);\n --butex-document2-muted: var(--butex-muted, #64748b);\n --butex-document2-panel: var(--butex-panel, #ffffff);\n --butex-document2-border: var(--butex-border, #e2e8f0);\n --butex-document2-accent: var(--butex-accent, #0d9488);\n --butex-document2-accent-bg: var(--butex-toolbar-hover-bg, rgba(13, 148, 136, 0.08));\n --butex-document2-focus-shadow: var(--butex-focus-shadow, rgba(13, 148, 136, 0.16));\n --butex-document2-danger: var(--butex-danger, #dc2626);\n --butex-document2-error: var(--butex-error, #b91c1c);\n --butex-document2-error-bg: var(--butex-error-bg, #fef2f2);\n --butex-document2-preview-bg: var(--butex-preview-bg, #ffffff);\n --butex-document2-preview-fg: var(--butex-preview-fg, var(--butex-document2-fg));\n --butex-document2-preview-font: \"Amiri\", \"Noto Serif Arabic\", Georgia, \"Times New Roman\", serif;\n --butex-document2-drawer-bg: var(--butex-document2-panel);\n --butex-document2-input-bg: #ffffff;\n --butex-document2-raw-bg: #f8fafc;\n --butex-document2-math-bg: var(--butex-document2-accent-bg);\n --butex-document2-math-border: rgba(13, 148, 136, 0.35);\n --butex-document2-text-token-bg: var(--butex-text-token-bg, color-mix(in srgb, var(--butex-document2-panel) 86%, var(--butex-document2-bg)));\n --butex-document2-text-token-border: var(--butex-text-token-border, color-mix(in srgb, var(--butex-document2-border) 86%, var(--butex-document2-muted)));\n --butex-document2-math-inline-bg: var(--butex-math-inline-bg, color-mix(in srgb, var(--butex-document2-accent) 10%, var(--butex-document2-panel)));\n --butex-document2-math-display-bg: var(--butex-math-display-bg, color-mix(in srgb, var(--butex-document2-accent) 7%, var(--butex-document2-bg)));\n --butex-document2-collapse-bg: var(--butex-collapse-bg, color-mix(in srgb, var(--butex-document2-muted) 8%, var(--butex-document2-panel)));\n --butex-document2-dev-bg: var(--butex-dev-bg, #fffbeb);\n --butex-document2-dev-border: var(--butex-dev-border, #fcd34d);\n --butex-document2-dev-code-bg: var(--butex-dev-inset-bg, #ffffff);\n --butex-document2-dev-code-fg: var(--butex-dev-inset-fg, var(--butex-document2-fg));\n box-sizing: border-box;\n color: var(--butex-document2-fg);\n direction: rtl;\n font-family: ui-sans-serif, system-ui, \"Segoe UI\", Tahoma, Arial, sans-serif;\n line-height: 1.45;\n}\n\n.butex-document2-widget *,\n.butex-document2-widget *::before,\n.butex-document2-widget *::after {\n box-sizing: inherit;\n}\n\n.butex-document2-widget__shell,\n.butex-document2-widget__editor-panel,\n.butex-document2-widget__blocks,\n.butex-document2-widget__dev,\n.butex-document2-widget__field {\n display: grid;\n gap: 10px;\n min-width: 0;\n}\n\n.butex-document2-widget__toolbar,\n.butex-document2-widget__panel,\n.butex-document2-widget__block,\n.butex-document2-widget__dev {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 12px;\n min-width: 0;\n padding: 12px;\n}\n\n.butex-document2-widget__toolbar {\n position: sticky;\n top: 0;\n z-index: 20;\n box-shadow: 0 4px 16px color-mix(in srgb, var(--butex-document2-fg) 6%, transparent);\n gap: 6px;\n}\n\n.butex-document2-widget__toolbar-insert {\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n\n.butex-document2-widget__toolbar-group {\n align-items: center;\n border-inline-start: 1px solid color-mix(in srgb, var(--butex-document2-border) 75%, transparent);\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n padding-inline-start: 6px;\n}\n\n.butex-document2-widget__toolbar-group:first-child {\n border-inline-start: 0;\n padding-inline-start: 0;\n}\n\n.butex-document2-widget__icon-btn {\n align-items: center;\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n cursor: pointer;\n display: inline-flex;\n font-weight: 700;\n justify-content: center;\n line-height: 1;\n min-height: 30px;\n min-width: 30px;\n padding: 0 6px;\n}\n\n.butex-document2-widget__icon-btn:hover:not(:disabled),\n.butex-document2-widget__icon-btn[aria-pressed=\"true\"] {\n background: var(--butex-document2-accent-bg);\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget__icon-btn:disabled {\n cursor: not-allowed;\n opacity: 0.45;\n}\n\n.butex-document2-widget__icon-btn--h1 {\n font-size: 1.15rem;\n}\n\n.butex-document2-widget__icon-btn--h2 {\n font-size: 1rem;\n}\n\n.butex-document2-widget__icon-btn--h3 {\n font-size: 0.88rem;\n}\n\n.butex-document2-widget__icon-math-inline {\n font-family: ui-monospace, Consolas, monospace;\n font-size: 0.78rem;\n font-weight: 600;\n}\n\n.butex-document2-widget__icon-math-display {\n font-size: 0.82rem;\n font-weight: 700;\n}\n\n.butex-document2-widget__block-actions {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.butex-document2-widget button.butex-document2-widget__block-collapse {\n align-items: center;\n background: var(--butex-document2-collapse-bg);\n border-color: color-mix(in srgb, var(--butex-document2-border) 70%, var(--butex-document2-muted));\n display: inline-flex;\n font-weight: 800;\n justify-content: center;\n min-height: 26px;\n min-width: 26px;\n padding: 0;\n}\n\n.butex-document2-widget__math-chip-wrap {\n align-items: center;\n display: inline-flex;\n gap: 2px;\n}\n\n.butex-document2-widget__math-chip-wrap[data-display=\"true\"] {\n flex: 1 1 100%;\n justify-content: center;\n width: 100%;\n}\n\n.butex-document2-widget__math-chip-delete {\n background: transparent;\n border: 1px solid color-mix(in srgb, var(--butex-document2-danger) 35%, var(--butex-document2-border));\n border-radius: 6px;\n color: var(--butex-document2-danger);\n cursor: pointer;\n font-size: 0.85rem;\n line-height: 1;\n min-height: 24px;\n min-width: 24px;\n padding: 0;\n}\n\n.butex-document2-widget__table-cell {\n flex: 1 1 8rem;\n min-width: 8rem;\n}\n\n.butex-document2-widget__block--table .butex-document2-widget__inline-text {\n min-height: 3.5em;\n min-width: min(12ch, 100%);\n}\n\n.butex-document2-widget__table-popover {\n display: inline-block;\n position: relative;\n}\n\n.butex-document2-widget__table-popover-panel {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 10px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--butex-document2-fg) 12%, transparent);\n display: grid;\n gap: 8px;\n inset-inline-end: 0;\n padding: 10px;\n position: absolute;\n top: calc(100% + 6px);\n width: min(220px, 70vw);\n z-index: 30;\n}\n\n.butex-document2-widget__table-popover-panel label {\n color: var(--butex-document2-muted);\n display: grid;\n font-size: 0.82rem;\n gap: 4px;\n}\n\n.butex-document2-widget__toolbar-row {\n align-items: center;\n border-block-end: 1px solid color-mix(in srgb, var(--butex-document2-border) 70%, transparent);\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-block-end: 8px;\n padding-block-end: 8px;\n width: 100%;\n}\n\n.butex-document2-widget__toolbar-row:last-child {\n border-block-end: 0;\n margin-block-end: 0;\n padding-block-end: 0;\n}\n\n.butex-document2-widget__toolbar-label {\n color: var(--butex-document2-muted);\n font-size: 0.78rem;\n font-weight: 600;\n margin-inline-end: 4px;\n white-space: nowrap;\n}\n\n.butex-document2-widget__block-header {\n align-items: center;\n border-block-end: 1px solid color-mix(in srgb, var(--butex-document2-border) 80%, transparent);\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n justify-content: space-between;\n margin-block-end: 10px;\n padding-block-end: 8px;\n}\n\n.butex-document2-widget__block-title {\n align-items: center;\n color: var(--butex-document2-fg);\n display: inline-flex;\n gap: 8px;\n font-weight: 700;\n}\n\n.butex-document2-widget__block--section .butex-document2-widget__block-title {\n font-size: 1.12rem;\n}\n\n.butex-document2-widget__block--subsection .butex-document2-widget__block-title {\n font-size: 1.04rem;\n}\n\n.butex-document2-widget__block--subsubsection .butex-document2-widget__block-title {\n font-size: 0.98rem;\n}\n\n.butex-document2-widget__block--paragraph .butex-document2-widget__block-title {\n color: var(--butex-document2-muted);\n font-size: 0.86rem;\n font-weight: 600;\n}\n\n.butex-document2-widget__block--list .butex-document2-widget__block-title,\n.butex-document2-widget__block--table .butex-document2-widget__block-title,\n.butex-document2-widget__block--image .butex-document2-widget__block-title,\n.butex-document2-widget__block--raw .butex-document2-widget__block-title {\n font-size: 0.9rem;\n}\n\n.butex-document2-widget__block--section {\n background: color-mix(in srgb, var(--butex-document2-accent) 9%, var(--butex-document2-panel));\n border-inline-start: 4px solid var(--butex-document2-accent);\n}\n\n.butex-document2-widget__block--subsection {\n background: color-mix(in srgb, var(--butex-document2-accent) 6%, var(--butex-document2-panel));\n border-inline-start: 3px solid color-mix(in srgb, var(--butex-document2-accent) 78%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__block--subsubsection {\n background: color-mix(in srgb, var(--butex-document2-accent) 4%, var(--butex-document2-panel));\n border-inline-start: 3px solid var(--butex-document2-border);\n}\n\n.butex-document2-widget__block--paragraph {\n border-inline-start: 2px solid color-mix(in srgb, var(--butex-document2-muted) 35%, transparent);\n}\n\n.butex-document2-widget__block--list {\n background: color-mix(in srgb, var(--butex-document2-bg) 55%, var(--butex-document2-panel));\n border-inline-start: 3px solid color-mix(in srgb, var(--butex-document2-accent) 55%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__block--table {\n background: color-mix(in srgb, var(--butex-document2-bg) 40%, var(--butex-document2-panel));\n border-inline-start: 3px solid var(--butex-document2-border);\n}\n\n.butex-document2-widget__block--image {\n background: color-mix(in srgb, var(--butex-document2-muted) 6%, var(--butex-document2-panel));\n border-inline-start: 3px dashed color-mix(in srgb, var(--butex-document2-muted) 45%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__block--raw {\n background: color-mix(in srgb, var(--butex-document2-muted) 8%, var(--butex-document2-panel));\n border-inline-start: 3px dashed var(--butex-document2-muted);\n}\n\n.butex-document2-widget__block--collapsed {\n background: var(--butex-document2-collapse-bg);\n}\n\n.butex-document2-widget__block--collapsed .butex-document2-widget__block-header {\n margin-block-end: 8px;\n}\n\n.butex-document2-widget__block-summary {\n background: color-mix(in srgb, var(--butex-document2-panel) 72%, transparent);\n border: 1px dashed color-mix(in srgb, var(--butex-document2-border) 70%, var(--butex-document2-muted));\n border-radius: 8px;\n color: var(--butex-document2-muted);\n font-size: 0.86rem;\n line-height: 1.5;\n min-width: 0;\n overflow-wrap: anywhere;\n padding: 8px 10px;\n}\n\n.butex-document2-widget__list-item-actions {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-block-start: 6px;\n}\n\n.butex-document2-widget__list-item-content {\n display: grid;\n gap: 8px;\n min-width: 0;\n}\n\n.butex-document2-widget__list-footer {\n border-block-start: 1px dashed color-mix(in srgb, var(--butex-document2-border) 85%, transparent);\n margin-block-start: 10px;\n padding-block-start: 10px;\n}\n\n.butex-document2-widget__button--danger:hover {\n border-color: var(--butex-document2-danger);\n color: var(--butex-document2-danger);\n}\n\n.butex-document2-widget__image-src-label {\n color: var(--butex-document2-muted);\n display: block;\n font-size: 0.82rem;\n margin-block-end: 4px;\n}\n\n.butex-document2-widget__toolbar,\n.butex-document2-widget__row {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.butex-document2-widget button {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n cursor: pointer;\n min-height: 32px;\n padding: 0 10px;\n}\n\n.butex-document2-widget button:hover,\n.butex-document2-widget button[aria-pressed=\"true\"] {\n background: var(--butex-document2-accent-bg);\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget button:focus-visible,\n.butex-document2-widget input:focus-visible,\n.butex-document2-widget textarea:focus-visible {\n border-color: var(--butex-document2-accent);\n box-shadow: 0 0 0 3px var(--butex-document2-focus-shadow);\n outline: none;\n}\n\n.butex-document2-widget input {\n background: var(--butex-document2-input-bg);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n font: inherit;\n min-height: 34px;\n padding: 7px 9px;\n}\n\n.butex-document2-widget textarea {\n background: var(--butex-document2-input-bg);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n font: inherit;\n line-height: 1.45;\n padding: 7px 9px;\n}\n\n.butex-document2-widget__layout {\n align-items: start;\n display: grid;\n gap: 12px;\n grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);\n transition: grid-template-columns 0.22s ease;\n}\n\n.butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-open {\n grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);\n}\n\n/* One visible panel: a single track so the panel fills the widget (previewOnly / hide editor / hide preview). */\n.butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-closed,\n.butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-open,\n.butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-closed {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.butex-document2-widget__editor-panel,\n.butex-document2-widget__preview-panel {\n min-width: 0;\n opacity: 1;\n overflow-x: hidden;\n overflow-y: auto;\n transform: translateX(0);\n transition:\n opacity 0.18s ease,\n transform 0.22s ease,\n padding 0.22s ease,\n border-width 0.22s ease,\n box-shadow 0.22s ease;\n}\n\n/* When previewOnly (or display:none) leaves a lone panel, span the full grid. */\n.butex-document2-widget__editor-panel:only-child,\n.butex-document2-widget__preview-panel:only-child {\n grid-column: 1 / -1;\n width: 100%;\n}\n\n.butex-document2-widget__layout--editor-closed .butex-document2-widget__editor-panel,\n.butex-document2-widget__layout--preview-closed .butex-document2-widget__preview-panel {\n display: none;\n}\n\n.butex-document2-widget__inline-field {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n max-width: 100%;\n min-width: 0;\n width: 100%;\n}\n\n.butex-document2-widget__inline-text {\n background: var(--butex-document2-text-token-bg);\n border-color: var(--butex-document2-text-token-border);\n box-sizing: border-box;\n flex: 0 1 auto;\n max-width: 100%;\n min-height: 2.75em;\n min-width: 3ch;\n overflow-wrap: break-word;\n overflow-y: hidden;\n resize: none;\n text-align: start;\n white-space: pre-wrap;\n width: auto;\n word-break: break-word;\n}\n\n.butex-document2-widget__inline-text:hover {\n border-color: color-mix(in srgb, var(--butex-document2-text-token-border) 55%, var(--butex-document2-accent));\n}\n\n.butex-document2-widget__inline-field input {\n min-width: 12ch;\n}\n\n.butex-document2-widget__math-chip {\n background: var(--butex-document2-math-inline-bg);\n border-color: color-mix(in srgb, var(--butex-document2-math-border) 70%, var(--butex-document2-accent));\n border-width: 1.5px;\n direction: ltr;\n display: inline-flex;\n font-family: inherit;\n gap: 4px;\n max-width: 100%;\n min-height: 30px;\n overflow: visible;\n padding: 3px 7px;\n unicode-bidi: isolate;\n}\n\n.butex-document2-widget__math-chip:hover,\n.butex-document2-widget__math-chip:focus-visible {\n background: color-mix(in srgb, var(--butex-document2-accent) 12%, var(--butex-document2-panel));\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget__math-chip[data-editable=\"false\"] {\n border-style: dashed;\n color: var(--butex-document2-muted);\n}\n\n.butex-document2-widget__math-chip[data-display=\"true\"] {\n background: var(--butex-document2-math-display-bg);\n border-color: color-mix(in srgb, var(--butex-document2-accent) 50%, var(--butex-document2-border));\n border-width: 1.5px;\n border-radius: 10px;\n box-shadow: 0 5px 16px color-mix(in srgb, var(--butex-document2-fg) 8%, transparent);\n justify-content: center;\n margin-block: 4px;\n min-height: 54px;\n padding: 10px 12px;\n width: min(100%, 36rem);\n}\n\n.butex-document2-widget__preview {\n background: var(--butex-document2-preview-bg);\n color: var(--butex-document2-preview-fg);\n font-family: var(--butex-document2-preview-font);\n font-size: 1.08rem;\n line-height: 1.9;\n max-width: 100%;\n min-width: 0;\n overflow-wrap: break-word;\n text-align: start;\n word-break: break-word;\n}\n\n.butex-document2-widget__preview h1,\n.butex-document2-widget__preview h2,\n.butex-document2-widget__preview h3,\n.butex-document2-widget__preview p,\n.butex-document2-widget__preview li {\n max-width: 100%;\n overflow-wrap: break-word;\n white-space: normal;\n word-break: break-word;\n}\n\n.butex-document2-widget__preview h1 {\n font-size: 1.75rem;\n font-weight: 700;\n line-height: 1.35;\n margin: 0 0 14px;\n}\n\n.butex-document2-widget__preview h2 {\n font-size: 1.4rem;\n font-weight: 600;\n line-height: 1.4;\n margin: 0 0 12px;\n}\n\n.butex-document2-widget__preview h3 {\n font-size: 1.2rem;\n font-weight: 600;\n line-height: 1.45;\n margin: 0 0 10px;\n}\n\n.butex-document2-widget__preview p {\n margin: 0 0 12px;\n}\n\n.butex-document2-widget__preview ul,\n.butex-document2-widget__preview ol {\n margin: 0 0 12px;\n padding-inline-start: 24px;\n}\n\n.butex-document2-widget__preview ul {\n list-style-type: disc;\n}\n\n.butex-document2-widget__preview ol {\n list-style-type: decimal;\n}\n\n.butex-document2-widget__preview img {\n display: block;\n height: auto;\n max-width: 100%;\n}\n\n.butex-document2-widget__preview table {\n border-collapse: collapse;\n border: 1px solid #000000;\n margin: 12px 0;\n max-width: 100%;\n table-layout: fixed;\n width: 100%;\n}\n\n.butex-document2-widget__preview td {\n border: 1px solid #000000;\n max-width: 100%;\n overflow-wrap: break-word;\n padding: 6px 8px;\n white-space: normal;\n word-break: break-word;\n}\n\n.butex-document2-widget__math-island {\n direction: ltr;\n display: inline-block;\n line-height: normal;\n margin: 0 2px;\n overflow: visible;\n unicode-bidi: isolate;\n vertical-align: middle;\n}\n\n/* Guard against host CSS resets (e.g. Tailwind Preflight's `svg { display: block }`).\n * MathJax v4 inline line-breaking emits an equation as several sibling <svg> chunks;\n * a block-level svg reset stacks them vertically inside the island. */\n.butex-document2-widget mjx-container svg {\n display: inline;\n}\n\n.butex-document2-widget__math-chip .butex-document2-widget__math-island {\n margin: 0;\n}\n\n.butex-document2-widget__math-island[data-render-state=\"loading\"] {\n opacity: 0.72;\n}\n\n.butex-document2-widget__math-island[data-render-state=\"error\"] {\n color: var(--butex-document2-error);\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 0.88rem;\n max-width: 100%;\n overflow-wrap: anywhere;\n white-space: normal;\n}\n\n.butex-document2-widget__math-island[data-display=\"true\"] {\n display: block;\n margin: 10px 0;\n text-align: center;\n}\n\n.butex-document2-widget__math-chip .butex-document2-widget__math-island[data-display=\"true\"] {\n margin: 0;\n}\n\n.butex-document2-widget__raw {\n background: var(--butex-document2-raw-bg);\n border-radius: 8px;\n direction: ltr;\n padding: 8px;\n text-align: left;\n white-space: pre-wrap;\n}\n\n.butex-document2-widget__error {\n background: var(--butex-document2-error-bg);\n border: 1px solid var(--butex-document2-error);\n border-radius: 8px;\n color: var(--butex-document2-error);\n padding: 10px;\n}\n\n.butex-document2-widget__equation-modal {\n align-items: center;\n display: flex;\n inset: 0;\n justify-content: center;\n padding: 16px;\n position: fixed;\n z-index: 30;\n}\n\n.butex-document2-widget__equation-modal-backdrop {\n background: color-mix(in srgb, var(--butex-document2-fg) 34%, transparent);\n border: 0;\n cursor: pointer;\n display: block;\n height: 100%;\n inset: 0;\n margin: 0;\n padding: 0;\n position: absolute;\n width: 100%;\n}\n\n.butex-document2-widget__equation-modal-panel {\n background: var(--butex-document2-drawer-bg);\n border: 1px solid var(--butex-document2-border);\n border-radius: 12px;\n box-shadow: 0 18px 48px color-mix(in srgb, var(--butex-document2-fg) 18%, transparent);\n display: grid;\n gap: 12px;\n max-height: min(90vh, 900px);\n max-width: min(720px, 100%);\n overflow: auto;\n padding: 14px;\n position: relative;\n width: min(680px, 100%);\n z-index: 1;\n}\n\n/* Map document v2 tokens onto BuTeX equation editor chrome when embedded in this modal. */\n.butex-document2-widget__equation-modal-panel .butex-widget {\n --butex-bg: var(--butex-document2-bg);\n --butex-fg: var(--butex-document2-fg);\n --butex-muted: var(--butex-document2-muted);\n --butex-accent: var(--butex-document2-accent);\n --butex-accent-hover: color-mix(in srgb, var(--butex-document2-accent) 82%, #000000);\n --butex-toolbar-hover-bg: var(--butex-document2-accent-bg);\n --butex-toolbar-hover-border: var(--butex-document2-accent);\n --butex-danger: var(--butex-document2-danger);\n --butex-danger-bg: color-mix(in srgb, var(--butex-document2-danger) 12%, transparent);\n --butex-danger-border: color-mix(in srgb, var(--butex-document2-danger) 48%, transparent);\n --butex-on-accent: #ffffff;\n --butex-border: var(--butex-document2-border);\n --butex-panel: var(--butex-document2-panel);\n --butex-preview-bg: var(--butex-document2-preview-bg);\n --butex-preview-fg: var(--butex-document2-preview-fg);\n --butex-error: var(--butex-document2-error);\n --butex-error-bg: var(--butex-document2-error-bg);\n --butex-error-border: color-mix(in srgb, var(--butex-document2-error) 32%, var(--butex-document2-panel));\n --butex-shadow-md: 0 4px 14px color-mix(in srgb, var(--butex-document2-fg) 10%, transparent);\n --butex-dev-bg: var(--butex-document2-dev-bg);\n --butex-dev-border: var(--butex-document2-dev-border);\n --butex-dev-badge: var(--butex-dev-badge, #b45309);\n --butex-dev-badge-fg: var(--butex-dev-badge-fg, #ffffff);\n --butex-dev-muted: var(--butex-dev-muted, #92400e);\n --butex-dev-inset-bg: var(--butex-document2-dev-code-bg);\n --butex-dev-inset-border: color-mix(in srgb, var(--butex-document2-dev-border) 45%, transparent);\n --butex-dev-inset-fg: var(--butex-document2-dev-code-fg);\n --butex-surface-bg: linear-gradient(\n 180deg,\n var(--butex-document2-panel) 0%,\n color-mix(in srgb, var(--butex-document2-panel) 88%, var(--butex-document2-bg)) 100%\n );\n --butex-surface-fg: var(--butex-document2-fg);\n --butex-focus-border: color-mix(in srgb, var(--butex-document2-accent) 45%, transparent);\n --butex-focus-shadow: var(--butex-document2-focus-shadow);\n --butex-slot-hover: var(--butex-document2-accent-bg);\n --butex-selection-bg: color-mix(in srgb, var(--butex-document2-accent) 34%, transparent);\n --butex-selection-border: color-mix(in srgb, var(--butex-document2-accent) 90%, #0f172a);\n --butex-caret: var(--butex-document2-fg);\n --butex-node-hover: color-mix(in srgb, var(--butex-document2-muted) 14%, transparent);\n --butex-node-selected-bg: var(--butex-document2-accent-bg);\n --butex-node-selected-border: color-mix(in srgb, var(--butex-document2-accent) 45%, transparent);\n --butex-script-border: var(--butex-document2-border);\n --butex-script-bg: color-mix(in srgb, var(--butex-document2-bg) 35%, var(--butex-document2-panel));\n --butex-script-color: var(--butex-document2-muted);\n --butex-delim-color: var(--butex-document2-muted);\n --butex-frac-bar: currentColor;\n}\n\n.butex-document2-widget__dev {\n background: var(--butex-document2-dev-bg);\n border-color: var(--butex-document2-dev-border);\n}\n\n.butex-document2-widget__dev pre {\n background: var(--butex-document2-dev-code-bg);\n color: var(--butex-document2-dev-code-fg);\n direction: ltr;\n margin: 0;\n max-height: 220px;\n overflow: auto;\n padding: 10px;\n text-align: left;\n white-space: pre-wrap;\n}\n\n.butex-document2-widget__dev-diagnostic {\n background: rgba(251, 191, 36, 0.18);\n border: 1px solid rgba(217, 119, 6, 0.4);\n border-radius: 8px;\n color: #92400e;\n margin: 0;\n padding: 8px 10px;\n}\n\n@media (max-width: 900px) {\n .butex-document2-widget__layout,\n .butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-open,\n .butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-closed,\n .butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-open,\n .butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-closed {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .butex-document2-widget__layout,\n .butex-document2-widget__editor-panel,\n .butex-document2-widget__preview-panel {\n transition: none;\n }\n}\n";
557
+ declare const DOCUMENT2_WIDGET_CSS = "\n.butex-document2-widget {\n --butex-document2-bg: var(--butex-bg, #f8fafc);\n --butex-document2-fg: var(--butex-fg, #0f172a);\n --butex-document2-muted: var(--butex-muted, #64748b);\n --butex-document2-panel: var(--butex-panel, #ffffff);\n --butex-document2-border: var(--butex-border, #e2e8f0);\n --butex-document2-accent: var(--butex-accent, #0d9488);\n --butex-document2-accent-bg: var(--butex-toolbar-hover-bg, rgba(13, 148, 136, 0.08));\n --butex-document2-focus-shadow: var(--butex-focus-shadow, rgba(13, 148, 136, 0.16));\n --butex-document2-danger: var(--butex-danger, #dc2626);\n --butex-document2-error: var(--butex-error, #b91c1c);\n --butex-document2-error-bg: var(--butex-error-bg, #fef2f2);\n --butex-document2-preview-bg: var(--butex-preview-bg, #ffffff);\n --butex-document2-preview-fg: var(--butex-preview-fg, var(--butex-document2-fg));\n --butex-document2-preview-font: \"Amiri\", \"Noto Serif Arabic\", Georgia, \"Times New Roman\", serif;\n --butex-document2-drawer-bg: var(--butex-document2-panel);\n --butex-document2-input-bg: #ffffff;\n --butex-document2-raw-bg: #f8fafc;\n --butex-document2-math-bg: var(--butex-document2-accent-bg);\n --butex-document2-math-border: rgba(13, 148, 136, 0.35);\n --butex-document2-text-token-bg: var(--butex-text-token-bg, color-mix(in srgb, var(--butex-document2-panel) 86%, var(--butex-document2-bg)));\n --butex-document2-text-token-border: var(--butex-text-token-border, color-mix(in srgb, var(--butex-document2-border) 86%, var(--butex-document2-muted)));\n --butex-document2-math-inline-bg: var(--butex-math-inline-bg, color-mix(in srgb, var(--butex-document2-accent) 10%, var(--butex-document2-panel)));\n --butex-document2-math-display-bg: var(--butex-math-display-bg, color-mix(in srgb, var(--butex-document2-accent) 7%, var(--butex-document2-bg)));\n --butex-document2-collapse-bg: var(--butex-collapse-bg, color-mix(in srgb, var(--butex-document2-muted) 8%, var(--butex-document2-panel)));\n --butex-document2-dev-bg: var(--butex-dev-bg, #fffbeb);\n --butex-document2-dev-border: var(--butex-dev-border, #fcd34d);\n --butex-document2-dev-code-bg: var(--butex-dev-inset-bg, #ffffff);\n --butex-document2-dev-code-fg: var(--butex-dev-inset-fg, var(--butex-document2-fg));\n box-sizing: border-box;\n color: var(--butex-document2-fg);\n direction: rtl;\n font-family: ui-sans-serif, system-ui, \"Segoe UI\", Tahoma, Arial, sans-serif;\n line-height: 1.45;\n}\n\n.butex-document2-widget *,\n.butex-document2-widget *::before,\n.butex-document2-widget *::after {\n box-sizing: inherit;\n}\n\n.butex-document2-widget__shell,\n.butex-document2-widget__editor-panel,\n.butex-document2-widget__blocks,\n.butex-document2-widget__dev,\n.butex-document2-widget__field {\n display: grid;\n gap: 10px;\n min-width: 0;\n}\n\n.butex-document2-widget__toolbar,\n.butex-document2-widget__panel,\n.butex-document2-widget__block,\n.butex-document2-widget__dev {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 12px;\n min-width: 0;\n padding: 12px;\n}\n\n.butex-document2-widget__toolbar {\n position: sticky;\n top: 0;\n z-index: 20;\n box-shadow: 0 4px 16px color-mix(in srgb, var(--butex-document2-fg) 6%, transparent);\n gap: 6px;\n}\n\n.butex-document2-widget__toolbar-insert {\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n\n.butex-document2-widget__toolbar-group {\n align-items: center;\n border-inline-start: 1px solid color-mix(in srgb, var(--butex-document2-border) 75%, transparent);\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n padding-inline-start: 6px;\n}\n\n.butex-document2-widget__toolbar-group:first-child {\n border-inline-start: 0;\n padding-inline-start: 0;\n}\n\n.butex-document2-widget__icon-btn {\n align-items: center;\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n cursor: pointer;\n display: inline-flex;\n font-weight: 700;\n justify-content: center;\n line-height: 1;\n min-height: 30px;\n min-width: 30px;\n padding: 0 6px;\n}\n\n.butex-document2-widget__icon-btn:hover:not(:disabled),\n.butex-document2-widget__icon-btn[aria-pressed=\"true\"] {\n background: var(--butex-document2-accent-bg);\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget__icon-btn:disabled {\n cursor: not-allowed;\n opacity: 0.45;\n}\n\n.butex-document2-widget__icon-btn--h1 {\n font-size: 1.15rem;\n}\n\n.butex-document2-widget__icon-btn--h2 {\n font-size: 1rem;\n}\n\n.butex-document2-widget__icon-btn--h3 {\n font-size: 0.88rem;\n}\n\n.butex-document2-widget__icon-math-inline {\n font-family: ui-monospace, Consolas, monospace;\n font-size: 0.78rem;\n font-weight: 600;\n}\n\n.butex-document2-widget__icon-math-display {\n font-size: 0.82rem;\n font-weight: 700;\n}\n\n.butex-document2-widget__icon-bibliography {\n display: inline-flex;\n line-height: 0;\n}\n\n.butex-document2-widget__icon-bibliography svg {\n display: block;\n}\n\n.butex-document2-widget__float-meta {\n display: grid;\n gap: 8px;\n margin-top: 8px;\n}\n\n.butex-document2-widget__float-meta--compact {\n gap: 4px;\n}\n\n.butex-document2-widget__float-meta-toggle {\n align-items: center;\n display: inline-flex;\n gap: 6px;\n font-size: 0.9rem;\n}\n\n.butex-document2-widget__preview-paragraph--centered {\n text-align: center;\n}\n\n.butex-document2-widget__labels-help {\n color: color-mix(in srgb, var(--butex-document2-fg) 72%, transparent);\n font-size: 0.9rem;\n margin: 0 0 10px;\n}\n\n.butex-document2-widget__preview-float {\n margin: 0.75rem 0;\n text-align: center;\n}\n\n.butex-document2-widget__preview-float figcaption {\n color: color-mix(in srgb, var(--butex-document2-fg) 80%, transparent);\n font-size: 0.92rem;\n margin-top: 0.4rem;\n text-align: center;\n}\n\n.butex-document2-widget__preview-float-number {\n font-weight: 600;\n}\n\n.butex-document2-widget__preview-ref {\n font-variant-numeric: tabular-nums;\n}\n\n.butex-document2-widget__ref-chip {\n border-style: dashed;\n}\n\n.butex-document2-widget__block-actions {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.butex-document2-widget button.butex-document2-widget__block-collapse {\n align-items: center;\n background: var(--butex-document2-collapse-bg);\n border-color: color-mix(in srgb, var(--butex-document2-border) 70%, var(--butex-document2-muted));\n display: inline-flex;\n font-weight: 800;\n justify-content: center;\n min-height: 26px;\n min-width: 26px;\n padding: 0;\n}\n\n.butex-document2-widget__math-chip-wrap {\n align-items: center;\n display: inline-flex;\n gap: 2px;\n}\n\n.butex-document2-widget__math-chip-wrap[data-display=\"true\"] {\n flex: 1 1 100%;\n justify-content: center;\n width: 100%;\n}\n\n.butex-document2-widget__math-chip-delete {\n background: transparent;\n border: 1px solid color-mix(in srgb, var(--butex-document2-danger) 35%, var(--butex-document2-border));\n border-radius: 6px;\n color: var(--butex-document2-danger);\n cursor: pointer;\n font-size: 0.85rem;\n line-height: 1;\n min-height: 24px;\n min-width: 24px;\n padding: 0;\n}\n\n.butex-document2-widget__table-cell {\n flex: 1 1 8rem;\n min-width: 8rem;\n}\n\n.butex-document2-widget__block--table .butex-document2-widget__inline-text {\n min-height: 3.5em;\n min-width: min(12ch, 100%);\n}\n\n.butex-document2-widget__table-popover {\n display: inline-block;\n position: relative;\n}\n\n.butex-document2-widget__table-popover-panel {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 10px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--butex-document2-fg) 12%, transparent);\n display: grid;\n gap: 8px;\n inset-inline-end: 0;\n padding: 10px;\n position: absolute;\n top: calc(100% + 6px);\n width: min(220px, 70vw);\n z-index: 30;\n}\n\n.butex-document2-widget__table-popover-panel label {\n color: var(--butex-document2-muted);\n display: grid;\n font-size: 0.82rem;\n gap: 4px;\n}\n\n.butex-document2-widget__toolbar-row {\n align-items: center;\n border-block-end: 1px solid color-mix(in srgb, var(--butex-document2-border) 70%, transparent);\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-block-end: 8px;\n padding-block-end: 8px;\n width: 100%;\n}\n\n.butex-document2-widget__toolbar-row:last-child {\n border-block-end: 0;\n margin-block-end: 0;\n padding-block-end: 0;\n}\n\n.butex-document2-widget__toolbar-label {\n color: var(--butex-document2-muted);\n font-size: 0.78rem;\n font-weight: 600;\n margin-inline-end: 4px;\n white-space: nowrap;\n}\n\n.butex-document2-widget__block-header {\n align-items: center;\n border-block-end: 1px solid color-mix(in srgb, var(--butex-document2-border) 80%, transparent);\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n justify-content: space-between;\n margin-block-end: 10px;\n padding-block-end: 8px;\n}\n\n.butex-document2-widget__block-select {\n accent-color: var(--butex-document2-accent);\n cursor: pointer;\n flex: 0 0 auto;\n height: 1rem;\n margin: 0;\n width: 1rem;\n}\n\n.butex-document2-widget__block--selected {\n background: var(--butex-document2-accent-bg);\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--butex-document2-accent) 45%, transparent);\n}\n\n.butex-document2-widget__selection-count {\n color: var(--butex-document2-muted);\n font-size: 0.78rem;\n font-weight: 600;\n padding-inline: 4px;\n white-space: nowrap;\n}\n\n.butex-document2-widget__block-title {\n align-items: center;\n color: var(--butex-document2-fg);\n display: inline-flex;\n gap: 8px;\n font-weight: 700;\n}\n\n.butex-document2-widget__block--section .butex-document2-widget__block-title {\n font-size: 1.12rem;\n}\n\n.butex-document2-widget__block--subsection .butex-document2-widget__block-title {\n font-size: 1.04rem;\n}\n\n.butex-document2-widget__block--subsubsection .butex-document2-widget__block-title {\n font-size: 0.98rem;\n}\n\n.butex-document2-widget__block--paragraph .butex-document2-widget__block-title {\n color: var(--butex-document2-muted);\n font-size: 0.86rem;\n font-weight: 600;\n}\n\n.butex-document2-widget__block--list .butex-document2-widget__block-title,\n.butex-document2-widget__block--table .butex-document2-widget__block-title,\n.butex-document2-widget__block--image .butex-document2-widget__block-title,\n.butex-document2-widget__block--raw .butex-document2-widget__block-title {\n font-size: 0.9rem;\n}\n\n.butex-document2-widget__block--section {\n background: color-mix(in srgb, var(--butex-document2-accent) 9%, var(--butex-document2-panel));\n border-inline-start: 4px solid var(--butex-document2-accent);\n}\n\n.butex-document2-widget__block--subsection {\n background: color-mix(in srgb, var(--butex-document2-accent) 6%, var(--butex-document2-panel));\n border-inline-start: 3px solid color-mix(in srgb, var(--butex-document2-accent) 78%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__block--subsubsection {\n background: color-mix(in srgb, var(--butex-document2-accent) 4%, var(--butex-document2-panel));\n border-inline-start: 3px solid var(--butex-document2-border);\n}\n\n.butex-document2-widget__block--paragraph {\n border-inline-start: 2px solid color-mix(in srgb, var(--butex-document2-muted) 35%, transparent);\n}\n\n.butex-document2-widget__block--list {\n background: color-mix(in srgb, var(--butex-document2-bg) 55%, var(--butex-document2-panel));\n border-inline-start: 3px solid color-mix(in srgb, var(--butex-document2-accent) 55%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__block--table {\n background: color-mix(in srgb, var(--butex-document2-bg) 40%, var(--butex-document2-panel));\n border-inline-start: 3px solid var(--butex-document2-border);\n}\n\n.butex-document2-widget__block--image {\n background: color-mix(in srgb, var(--butex-document2-muted) 6%, var(--butex-document2-panel));\n border-inline-start: 3px dashed color-mix(in srgb, var(--butex-document2-muted) 45%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__block--raw {\n background: color-mix(in srgb, var(--butex-document2-muted) 8%, var(--butex-document2-panel));\n border-inline-start: 3px dashed var(--butex-document2-muted);\n}\n\n.butex-document2-widget__block--collapsed {\n background: var(--butex-document2-collapse-bg);\n}\n\n.butex-document2-widget__block--collapsed .butex-document2-widget__block-header {\n margin-block-end: 8px;\n}\n\n.butex-document2-widget__block-summary {\n background: color-mix(in srgb, var(--butex-document2-panel) 72%, transparent);\n border: 1px dashed color-mix(in srgb, var(--butex-document2-border) 70%, var(--butex-document2-muted));\n border-radius: 8px;\n color: var(--butex-document2-muted);\n font-size: 0.86rem;\n line-height: 1.5;\n min-width: 0;\n overflow-wrap: anywhere;\n padding: 8px 10px;\n}\n\n.butex-document2-widget__list-item-actions {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-block-start: 6px;\n}\n\n.butex-document2-widget__list-item-content {\n display: grid;\n gap: 8px;\n min-width: 0;\n}\n\n.butex-document2-widget__list-footer {\n border-block-start: 1px dashed color-mix(in srgb, var(--butex-document2-border) 85%, transparent);\n margin-block-start: 10px;\n padding-block-start: 10px;\n}\n\n.butex-document2-widget__button--danger:hover {\n border-color: var(--butex-document2-danger);\n color: var(--butex-document2-danger);\n}\n\n.butex-document2-widget__image-src-label {\n color: var(--butex-document2-muted);\n display: block;\n font-size: 0.82rem;\n margin-block-end: 4px;\n}\n\n.butex-document2-widget__toolbar,\n.butex-document2-widget__row {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.butex-document2-widget button {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n cursor: pointer;\n min-height: 32px;\n padding: 0 10px;\n}\n\n.butex-document2-widget button:hover,\n.butex-document2-widget button[aria-pressed=\"true\"] {\n background: var(--butex-document2-accent-bg);\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget button:focus-visible,\n.butex-document2-widget input:focus-visible,\n.butex-document2-widget textarea:focus-visible {\n border-color: var(--butex-document2-accent);\n box-shadow: 0 0 0 3px var(--butex-document2-focus-shadow);\n outline: none;\n}\n\n.butex-document2-widget input {\n background: var(--butex-document2-input-bg);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n font: inherit;\n min-height: 34px;\n padding: 7px 9px;\n}\n\n.butex-document2-widget textarea {\n background: var(--butex-document2-input-bg);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: var(--butex-document2-fg);\n font: inherit;\n line-height: 1.45;\n padding: 7px 9px;\n}\n\n.butex-document2-widget__layout {\n align-items: start;\n display: grid;\n gap: 12px;\n grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);\n transition: grid-template-columns 0.22s ease;\n}\n\n.butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-open {\n grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);\n}\n\n/* One visible panel: a single track so the panel fills the widget (previewOnly / hide editor / hide preview). */\n.butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-closed,\n.butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-open,\n.butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-closed {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.butex-document2-widget__editor-panel,\n.butex-document2-widget__preview-panel {\n min-width: 0;\n opacity: 1;\n overflow-x: hidden;\n overflow-y: auto;\n transform: translateX(0);\n transition:\n opacity 0.18s ease,\n transform 0.22s ease,\n padding 0.22s ease,\n border-width 0.22s ease,\n box-shadow 0.22s ease;\n}\n\n/* When previewOnly (or display:none) leaves a lone panel, span the full grid. */\n.butex-document2-widget__editor-panel:only-child,\n.butex-document2-widget__preview-panel:only-child {\n grid-column: 1 / -1;\n width: 100%;\n}\n\n.butex-document2-widget__layout--editor-closed .butex-document2-widget__editor-panel,\n.butex-document2-widget__layout--preview-closed .butex-document2-widget__preview-panel {\n display: none;\n}\n\n.butex-document2-widget__inline-field {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n max-width: 100%;\n min-width: 0;\n width: 100%;\n}\n\n.butex-document2-widget__inline-text {\n background: var(--butex-document2-text-token-bg);\n border-color: var(--butex-document2-text-token-border);\n box-sizing: border-box;\n flex: 0 1 auto;\n max-width: 100%;\n min-height: 2.75em;\n min-width: 3ch;\n overflow-wrap: break-word;\n overflow-y: hidden;\n resize: none;\n text-align: start;\n white-space: pre-wrap;\n width: auto;\n word-break: break-word;\n}\n\n.butex-document2-widget__inline-text:hover {\n border-color: color-mix(in srgb, var(--butex-document2-text-token-border) 55%, var(--butex-document2-accent));\n}\n\n.butex-document2-widget__inline-field input {\n min-width: 12ch;\n}\n\n.butex-document2-widget__math-chip {\n background: var(--butex-document2-math-inline-bg);\n border-color: color-mix(in srgb, var(--butex-document2-math-border) 70%, var(--butex-document2-accent));\n border-width: 1.5px;\n direction: ltr;\n display: inline-flex;\n font-family: inherit;\n gap: 4px;\n max-width: 100%;\n min-height: 30px;\n overflow: visible;\n padding: 3px 7px;\n unicode-bidi: isolate;\n}\n\n.butex-document2-widget__math-chip:hover,\n.butex-document2-widget__math-chip:focus-visible {\n background: color-mix(in srgb, var(--butex-document2-accent) 12%, var(--butex-document2-panel));\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget__math-chip[data-editable=\"false\"] {\n border-style: dashed;\n color: var(--butex-document2-muted);\n}\n\n.butex-document2-widget__math-chip[data-display=\"true\"] {\n background: var(--butex-document2-math-display-bg);\n border-color: color-mix(in srgb, var(--butex-document2-accent) 50%, var(--butex-document2-border));\n border-width: 1.5px;\n border-radius: 10px;\n box-shadow: 0 5px 16px color-mix(in srgb, var(--butex-document2-fg) 8%, transparent);\n justify-content: center;\n margin-block: 4px;\n min-height: 54px;\n padding: 10px 12px;\n width: min(100%, 36rem);\n}\n\n.butex-document2-widget__preview {\n background: var(--butex-document2-preview-bg);\n color: var(--butex-document2-preview-fg);\n font-family: var(--butex-document2-preview-font);\n font-size: 1.08rem;\n line-height: 1.9;\n max-width: 100%;\n min-width: 0;\n overflow-wrap: break-word;\n text-align: start;\n word-break: break-word;\n}\n\n.butex-document2-widget__preview h1,\n.butex-document2-widget__preview h2,\n.butex-document2-widget__preview h3,\n.butex-document2-widget__preview p,\n.butex-document2-widget__preview li {\n max-width: 100%;\n overflow-wrap: break-word;\n white-space: normal;\n word-break: break-word;\n}\n\n.butex-document2-widget__preview h1 {\n font-size: 1.75rem;\n font-weight: 700;\n line-height: 1.35;\n margin: 0 0 14px;\n}\n\n.butex-document2-widget__preview h2 {\n font-size: 1.4rem;\n font-weight: 600;\n line-height: 1.4;\n margin: 0 0 12px;\n}\n\n.butex-document2-widget__preview h3 {\n font-size: 1.2rem;\n font-weight: 600;\n line-height: 1.45;\n margin: 0 0 10px;\n}\n\n.butex-document2-widget__preview p {\n margin: 0 0 12px;\n}\n\n.butex-document2-widget__preview ul,\n.butex-document2-widget__preview ol {\n margin: 0 0 12px;\n padding-inline-start: 24px;\n}\n\n.butex-document2-widget__preview ul {\n list-style-type: disc;\n}\n\n.butex-document2-widget__preview ol {\n list-style-type: decimal;\n}\n\n.butex-document2-widget__preview img {\n display: block;\n height: auto;\n max-width: 100%;\n}\n\n.butex-document2-widget__preview table {\n border-collapse: collapse;\n border: 1px solid #000000;\n margin: 12px 0;\n max-width: 100%;\n table-layout: fixed;\n width: 100%;\n}\n\n.butex-document2-widget__preview td {\n border: 1px solid #000000;\n max-width: 100%;\n overflow-wrap: break-word;\n padding: 6px 8px;\n white-space: normal;\n word-break: break-word;\n}\n\n.butex-document2-widget__math-island {\n direction: ltr;\n display: inline-block;\n line-height: normal;\n margin: 0 2px;\n overflow: visible;\n unicode-bidi: isolate;\n vertical-align: middle;\n}\n\n/* Guard against host CSS resets (e.g. Tailwind Preflight's `svg { display: block }`).\n * MathJax v4 inline line-breaking emits an equation as several sibling <svg> chunks;\n * a block-level svg reset stacks them vertically inside the island. */\n.butex-document2-widget mjx-container svg {\n display: inline;\n}\n\n.butex-document2-widget__math-chip .butex-document2-widget__math-island {\n margin: 0;\n}\n\n.butex-document2-widget__math-island[data-render-state=\"loading\"] {\n opacity: 0.72;\n}\n\n.butex-document2-widget__math-island[data-render-state=\"error\"] {\n color: var(--butex-document2-error);\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 0.88rem;\n max-width: 100%;\n overflow-wrap: anywhere;\n white-space: normal;\n}\n\n.butex-document2-widget__math-island[data-display=\"true\"] {\n display: block;\n margin: 10px 0;\n text-align: center;\n}\n\n.butex-document2-widget__math-chip .butex-document2-widget__math-island[data-display=\"true\"] {\n margin: 0;\n}\n\n.butex-document2-widget__raw {\n background: var(--butex-document2-raw-bg);\n border-radius: 8px;\n direction: ltr;\n padding: 8px;\n text-align: left;\n white-space: pre-wrap;\n}\n\n.butex-document2-widget__error {\n background: var(--butex-document2-error-bg);\n border: 1px solid var(--butex-document2-error);\n border-radius: 8px;\n color: var(--butex-document2-error);\n padding: 10px;\n}\n\n.butex-document2-widget__equation-modal {\n align-items: center;\n display: flex;\n inset: 0;\n justify-content: center;\n padding: 16px;\n position: fixed;\n z-index: 30;\n}\n\n.butex-document2-widget__equation-modal-backdrop {\n background: color-mix(in srgb, var(--butex-document2-fg) 34%, transparent);\n border: 0;\n cursor: pointer;\n display: block;\n height: 100%;\n inset: 0;\n margin: 0;\n padding: 0;\n position: absolute;\n width: 100%;\n}\n\n.butex-document2-widget__equation-modal-panel {\n background: var(--butex-document2-drawer-bg);\n border: 1px solid var(--butex-document2-border);\n border-radius: 12px;\n box-shadow: 0 18px 48px color-mix(in srgb, var(--butex-document2-fg) 18%, transparent);\n display: grid;\n gap: 12px;\n max-height: min(90vh, 900px);\n max-width: min(720px, 100%);\n overflow: auto;\n padding: 14px;\n position: relative;\n width: min(680px, 100%);\n z-index: 1;\n}\n\n/* Map document v2 tokens onto BuTeX equation editor chrome when embedded in this modal. */\n.butex-document2-widget__equation-modal-panel .butex-widget {\n --butex-bg: var(--butex-document2-bg);\n --butex-fg: var(--butex-document2-fg);\n --butex-muted: var(--butex-document2-muted);\n --butex-accent: var(--butex-document2-accent);\n --butex-accent-hover: color-mix(in srgb, var(--butex-document2-accent) 82%, #000000);\n --butex-toolbar-hover-bg: var(--butex-document2-accent-bg);\n --butex-toolbar-hover-border: var(--butex-document2-accent);\n --butex-danger: var(--butex-document2-danger);\n --butex-danger-bg: color-mix(in srgb, var(--butex-document2-danger) 12%, transparent);\n --butex-danger-border: color-mix(in srgb, var(--butex-document2-danger) 48%, transparent);\n --butex-on-accent: #ffffff;\n --butex-border: var(--butex-document2-border);\n --butex-panel: var(--butex-document2-panel);\n --butex-preview-bg: var(--butex-document2-preview-bg);\n --butex-preview-fg: var(--butex-document2-preview-fg);\n --butex-error: var(--butex-document2-error);\n --butex-error-bg: var(--butex-document2-error-bg);\n --butex-error-border: color-mix(in srgb, var(--butex-document2-error) 32%, var(--butex-document2-panel));\n --butex-shadow-md: 0 4px 14px color-mix(in srgb, var(--butex-document2-fg) 10%, transparent);\n --butex-dev-bg: var(--butex-document2-dev-bg);\n --butex-dev-border: var(--butex-document2-dev-border);\n --butex-dev-badge: var(--butex-dev-badge, #b45309);\n --butex-dev-badge-fg: var(--butex-dev-badge-fg, #ffffff);\n --butex-dev-muted: var(--butex-dev-muted, #92400e);\n --butex-dev-inset-bg: var(--butex-document2-dev-code-bg);\n --butex-dev-inset-border: color-mix(in srgb, var(--butex-document2-dev-border) 45%, transparent);\n --butex-dev-inset-fg: var(--butex-document2-dev-code-fg);\n --butex-surface-bg: linear-gradient(\n 180deg,\n var(--butex-document2-panel) 0%,\n color-mix(in srgb, var(--butex-document2-panel) 88%, var(--butex-document2-bg)) 100%\n );\n --butex-surface-fg: var(--butex-document2-fg);\n --butex-focus-border: color-mix(in srgb, var(--butex-document2-accent) 45%, transparent);\n --butex-focus-shadow: var(--butex-document2-focus-shadow);\n --butex-slot-hover: var(--butex-document2-accent-bg);\n --butex-selection-bg: color-mix(in srgb, var(--butex-document2-accent) 34%, transparent);\n --butex-selection-border: color-mix(in srgb, var(--butex-document2-accent) 90%, #0f172a);\n --butex-caret: var(--butex-document2-fg);\n --butex-node-hover: color-mix(in srgb, var(--butex-document2-muted) 14%, transparent);\n --butex-node-selected-bg: var(--butex-document2-accent-bg);\n --butex-node-selected-border: color-mix(in srgb, var(--butex-document2-accent) 45%, transparent);\n --butex-script-border: var(--butex-document2-border);\n --butex-script-bg: color-mix(in srgb, var(--butex-document2-bg) 35%, var(--butex-document2-panel));\n --butex-script-color: var(--butex-document2-muted);\n --butex-delim-color: var(--butex-document2-muted);\n --butex-frac-bar: currentColor;\n}\n\n.butex-document2-widget__dev {\n background: var(--butex-document2-dev-bg);\n border-color: var(--butex-document2-dev-border);\n}\n\n.butex-document2-widget__dev pre {\n background: var(--butex-document2-dev-code-bg);\n color: var(--butex-document2-dev-code-fg);\n direction: ltr;\n margin: 0;\n max-height: 220px;\n overflow: auto;\n padding: 10px;\n text-align: left;\n white-space: pre-wrap;\n}\n\n.butex-document2-widget__dev-diagnostic {\n background: rgba(251, 191, 36, 0.18);\n border: 1px solid rgba(217, 119, 6, 0.4);\n border-radius: 8px;\n color: #92400e;\n margin: 0;\n padding: 8px 10px;\n}\n\n@media (max-width: 900px) {\n .butex-document2-widget__layout,\n .butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-open,\n .butex-document2-widget__layout--editor-open.butex-document2-widget__layout--preview-closed,\n .butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-open,\n .butex-document2-widget__layout--editor-closed.butex-document2-widget__layout--preview-closed {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .butex-document2-widget__layout,\n .butex-document2-widget__editor-panel,\n .butex-document2-widget__preview-panel {\n transition: none;\n }\n}\n\n.butex-document2-widget__cite-chip-wrap {\n align-items: center;\n display: inline-flex;\n gap: 2px;\n margin-inline: 2px;\n max-width: 100%;\n vertical-align: baseline;\n}\n\n.butex-document2-widget__cite-chip {\n background: color-mix(in srgb, var(--butex-document2-accent) 8%, var(--butex-document2-panel));\n border: 1.5px solid color-mix(in srgb, var(--butex-document2-accent) 45%, var(--butex-document2-border));\n border-radius: 6px;\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n font: inherit;\n font-variant-numeric: tabular-nums;\n line-height: 1.3;\n min-height: 28px;\n padding: 2px 8px;\n}\n\n.butex-document2-widget__cite-chip[data-editable=\"false\"] {\n border-style: dashed;\n cursor: default;\n}\n\n.butex-document2-widget__cite-chip:hover,\n.butex-document2-widget__cite-chip:focus-visible {\n background: color-mix(in srgb, var(--butex-document2-accent) 14%, var(--butex-document2-panel));\n border-color: var(--butex-document2-accent);\n}\n\n.butex-document2-widget__cite-chip-delete {\n background: transparent;\n border: none;\n color: var(--butex-document2-muted);\n cursor: pointer;\n font: inherit;\n line-height: 1;\n padding: 0 4px;\n}\n\n.butex-document2-widget__preview-cite {\n color: inherit;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.butex-document2-widget__preview-bibliography,\n.butex-document2-widget__bibliography-editor {\n display: grid;\n gap: 0.5rem;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.butex-document2-widget__preview-bibliography li,\n.butex-document2-widget__bibliography-editor li {\n display: grid;\n gap: 0.25rem;\n grid-template-columns: auto 1fr;\n}\n\n.butex-document2-widget__preview-bib-number {\n font-variant-numeric: tabular-nums;\n}\n\n.butex-document2-widget__block--bibliography {\n border-color: color-mix(in srgb, var(--butex-document2-accent) 35%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__digit-form-menu {\n position: relative;\n}\n\n.butex-document2-widget__digit-form-options {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, #000 16%, transparent);\n display: grid;\n gap: 2px;\n inset-inline-start: 0;\n margin-top: 4px;\n padding: 4px;\n position: absolute;\n top: 100%;\n z-index: 5;\n}\n\n.butex-document2-widget__digit-form-option {\n background: transparent;\n border: none;\n border-radius: 6px;\n color: inherit;\n cursor: pointer;\n font: inherit;\n padding: 6px 10px;\n text-align: start;\n}\n\n.butex-document2-widget__digit-form-option[aria-selected=\"true\"],\n.butex-document2-widget__digit-form-option:hover {\n background: color-mix(in srgb, var(--butex-document2-accent) 12%, var(--butex-document2-panel));\n}\n\n.butex-document2-widget__cite-picker-backdrop,\n.butex-document2-widget__refs-backdrop {\n align-items: center;\n background: color-mix(in srgb, #000 35%, transparent);\n display: flex;\n inset: 0;\n justify-content: center;\n padding: 1rem;\n position: fixed;\n z-index: 40;\n}\n\n.butex-document2-widget__cite-picker,\n.butex-document2-widget__refs-panel {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 12px;\n box-shadow: 0 16px 40px color-mix(in srgb, #000 22%, transparent);\n display: grid;\n gap: 0.75rem;\n max-height: min(80vh, 640px);\n max-width: 560px;\n overflow: auto;\n padding: 1rem;\n width: min(100%, 560px);\n}\n\n.butex-document2-widget__cite-picker-header,\n.butex-document2-widget__refs-header,\n.butex-document2-widget__cite-picker-footer,\n.butex-document2-widget__refs-item-head {\n align-items: center;\n display: flex;\n gap: 0.5rem;\n justify-content: space-between;\n}\n\n.butex-document2-widget__cite-picker-list,\n.butex-document2-widget__refs-list {\n display: grid;\n gap: 0.5rem;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.butex-document2-widget__cite-picker-item,\n.butex-document2-widget__refs-field {\n display: grid;\n gap: 0.25rem;\n}\n\n.butex-document2-widget__cite-picker-item {\n align-items: start;\n grid-template-columns: auto 1fr;\n}\n\n.butex-document2-widget__cite-picker-meta,\n.butex-document2-widget__cite-picker-empty {\n color: var(--butex-document2-muted);\n display: block;\n font-size: 0.92em;\n}\n\n.butex-document2-widget__refs-grid {\n display: grid;\n gap: 0.5rem;\n grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));\n}\n\n.butex-document2-widget__refs-field input {\n background: var(--butex-document2-input-bg, var(--butex-document2-panel));\n border: 1px solid var(--butex-document2-border);\n border-radius: 6px;\n color: inherit;\n font: inherit;\n padding: 0.4rem 0.55rem;\n width: 100%;\n}\n\n.butex-document2-widget__refs-item {\n border: 1px solid var(--butex-document2-border);\n border-radius: 10px;\n display: grid;\n gap: 0.5rem;\n padding: 0.75rem;\n}\n\n.butex-document2-widget__refs-item-actions {\n display: inline-flex;\n gap: 0.25rem;\n}\n\n.butex-document2-widget__primary-btn {\n background: var(--butex-document2-accent);\n border: none;\n border-radius: 8px;\n color: #fff;\n cursor: pointer;\n font: inherit;\n padding: 0.45rem 0.8rem;\n}\n\n.butex-document2-widget__primary-btn:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.butex-document2-widget__article-meta {\n background: color-mix(in srgb, var(--butex-document2-panel) 92%, var(--butex-document2-accent-bg));\n border: 1px solid var(--butex-document2-border);\n border-radius: 10px;\n display: grid;\n gap: 0.75rem;\n margin-bottom: 0.85rem;\n padding: 0.85rem 0.9rem;\n}\n\n.butex-document2-widget__article-meta-header {\n align-items: center;\n display: flex;\n gap: 0.5rem;\n justify-content: space-between;\n}\n\n.butex-document2-widget__article-meta-badge {\n background: var(--butex-document2-accent-bg);\n border: 1px solid color-mix(in srgb, var(--butex-document2-accent) 35%, var(--butex-document2-border));\n border-radius: 999px;\n color: var(--butex-document2-accent);\n font-size: 0.78rem;\n font-weight: 600;\n padding: 0.15rem 0.55rem;\n}\n\n.butex-document2-widget__article-meta-date-preview {\n color: color-mix(in srgb, var(--butex-document2-fg) 70%, transparent);\n font-size: 0.92rem;\n margin: 0.15rem 0 0;\n}\n\n.butex-document2-widget__article-meta-fixed {\n color: color-mix(in srgb, var(--butex-document2-fg) 78%, transparent);\n font-size: 0.95rem;\n line-height: 1.7;\n margin: 0;\n text-align: center;\n}\n\n.butex-document2-widget__article-meta-grid {\n display: grid;\n gap: 0.65rem;\n}\n\n.butex-document2-widget__article-meta-field {\n display: grid;\n gap: 0.3rem;\n font-size: 0.92rem;\n}\n\n.butex-document2-widget__article-meta-field input,\n.butex-document2-widget__article-meta-field textarea {\n background: var(--butex-document2-input-bg, var(--butex-document2-panel));\n border: 1px solid var(--butex-document2-border);\n border-radius: 6px;\n color: inherit;\n font: inherit;\n padding: 0.4rem 0.55rem;\n width: 100%;\n}\n\n.butex-document2-widget__article-meta-date {\n display: grid;\n gap: 0.45rem;\n grid-template-columns: minmax(4rem, 1fr) minmax(7rem, 2fr) minmax(5rem, 1.2fr);\n}\n\n.butex-document2-widget__hijri-menu {\n position: relative;\n}\n\n.butex-document2-widget__hijri-menu-trigger {\n appearance: none;\n background-color: var(--butex-document2-input-bg, var(--butex-document2-panel));\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.2 1.3L6 6.1l4.8-4.8 1.2 1.2L6 8.5 0 2.5z'/%3E%3C/svg%3E\");\n background-position: left 0.65rem center;\n background-repeat: no-repeat;\n background-size: 0.7rem;\n border: 1px solid var(--butex-document2-border);\n border-radius: 8px;\n color: inherit;\n cursor: pointer;\n font: inherit;\n min-height: 2.35rem;\n padding: 0.45rem 0.7rem 0.45rem 1.7rem;\n text-align: start;\n transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;\n width: 100%;\n}\n\n.butex-document2-widget[dir=\"rtl\"] .butex-document2-widget__hijri-menu-trigger {\n background-position: right 0.65rem center;\n padding: 0.45rem 1.7rem 0.45rem 0.7rem;\n}\n\n.butex-document2-widget__hijri-menu-trigger:hover,\n.butex-document2-widget__hijri-menu-trigger[aria-expanded=\"true\"] {\n background-color: color-mix(in srgb, var(--butex-document2-accent-bg) 55%, var(--butex-document2-panel));\n border-color: color-mix(in srgb, var(--butex-document2-accent) 45%, var(--butex-document2-border));\n}\n\n.butex-document2-widget__hijri-menu-trigger:focus-visible {\n border-color: var(--butex-document2-accent);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--butex-document2-accent) 28%, transparent);\n outline: none;\n}\n\n.butex-document2-widget__hijri-menu-list {\n background: var(--butex-document2-panel);\n border: 1px solid var(--butex-document2-border);\n border-radius: 10px;\n box-shadow: 0 12px 28px color-mix(in srgb, #000 18%, transparent);\n inset-inline-start: 0;\n list-style: none;\n margin: 0.3rem 0 0;\n max-height: 14rem;\n overflow-x: hidden;\n overflow-y: auto;\n padding: 0.35rem;\n position: absolute;\n scrollbar-color: color-mix(in srgb, var(--butex-document2-muted) 55%, transparent) transparent;\n scrollbar-width: thin;\n top: 100%;\n width: 100%;\n z-index: 12;\n}\n\n.butex-document2-widget__hijri-menu-list::-webkit-scrollbar {\n width: 0.55rem;\n}\n\n.butex-document2-widget__hijri-menu-list::-webkit-scrollbar-track {\n background: transparent;\n margin: 0.35rem 0;\n}\n\n.butex-document2-widget__hijri-menu-list::-webkit-scrollbar-thumb {\n background: color-mix(in srgb, var(--butex-document2-muted) 45%, transparent);\n border: 2px solid transparent;\n border-radius: 999px;\n background-clip: padding-box;\n}\n\n.butex-document2-widget__hijri-menu-list::-webkit-scrollbar-thumb:hover {\n background: color-mix(in srgb, var(--butex-document2-accent) 55%, var(--butex-document2-muted));\n background-clip: padding-box;\n border: 2px solid transparent;\n}\n\n.butex-document2-widget__hijri-menu-option {\n background: transparent;\n border: none;\n border-radius: 7px;\n color: inherit;\n cursor: pointer;\n display: block;\n font: inherit;\n padding: 0.45rem 0.65rem;\n text-align: start;\n width: 100%;\n}\n\n.butex-document2-widget__hijri-menu-option:hover,\n.butex-document2-widget__hijri-menu-option[aria-selected=\"true\"] {\n background: color-mix(in srgb, var(--butex-document2-accent) 14%, var(--butex-document2-panel));\n}\n\n.butex-document2-widget__hijri-menu-option:focus-visible {\n outline: 2px solid color-mix(in srgb, var(--butex-document2-accent) 55%, transparent);\n outline-offset: -2px;\n}\n\n.butex-document2-widget__visually-hidden {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.butex-document2-widget__preview-basmala,\n.butex-document2-widget__preview-closing {\n margin: 0.35rem 0 0.85rem;\n}\n\n.butex-document2-widget__preview-basmala .butex-document2-widget__math-island[data-display=\"true\"],\n.butex-document2-widget__preview-closing .butex-document2-widget__math-island[data-display=\"true\"] {\n margin: 0;\n}\n\n.butex-document2-widget__preview-title-block {\n background: color-mix(in srgb, var(--butex-document2-accent-bg) 55%, transparent);\n border: 1px solid color-mix(in srgb, var(--butex-document2-border) 75%, transparent);\n border-radius: 10px;\n margin: 0.5rem 0 1rem;\n padding: 0.85rem 1rem;\n text-align: center;\n}\n\n.butex-document2-widget__preview-article-title {\n font-size: 1.45rem;\n font-weight: 700;\n line-height: 1.35;\n margin: 0 0 0.45rem;\n}\n\n.butex-document2-widget__preview-article-authors,\n.butex-document2-widget__preview-article-date {\n margin: 0.2rem 0;\n}\n\n.butex-document2-widget__preview-article-date {\n color: color-mix(in srgb, var(--butex-document2-fg) 72%, transparent);\n font-size: 0.95rem;\n}\n\n.butex-document2-widget__preview-abstract {\n background: color-mix(in srgb, var(--butex-document2-panel) 88%, var(--butex-document2-muted));\n border: 1px dashed color-mix(in srgb, var(--butex-document2-border) 85%, transparent);\n border-radius: 8px;\n margin: 0.75rem 0 1rem;\n padding: 0.75rem 0.9rem;\n}\n\n.butex-document2-widget__preview-abstract-label {\n font-size: 1rem;\n font-weight: 700;\n margin: 0 0 0.35rem;\n}\n\n.butex-document2-widget__preview-abstract p {\n margin: 0;\n}\n\n.butex-document2-widget__preview-empty-body {\n color: var(--butex-document2-muted);\n font-style: italic;\n text-align: center;\n}\n";
388
558
  declare function injectBuTeXDocument2Styles(doc?: Document): void;
389
559
 
390
560
  export { ButexDocumentEditor2, type ButexDocumentEditor2Props, type ButexUiLocale, DOCUMENT2_WIDGET_CSS, type Document2InitialState, DocumentInsertToolbar, type DocumentInsertToolbarProps, DocumentPreview, EquationDrawer, InlineField, MathChip, MathIsland, injectBuTeXDocument2Styles, resolveInitialDocument2 };