@barocss/math-editor 0.1.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.
Files changed (123) hide show
  1. package/ADAPTERS.md +170 -0
  2. package/CHANGELOG.md +13 -0
  3. package/EMBEDDING.md +95 -0
  4. package/IMPLEMENTATION.md +111 -0
  5. package/LATEX-SCOPE.md +7 -0
  6. package/LICENSE +23 -0
  7. package/LOCALIZATION.md +97 -0
  8. package/README.md +151 -0
  9. package/RELEASING.md +31 -0
  10. package/ROADMAP.md +102 -0
  11. package/SUPPORT.md +160 -0
  12. package/SYMBOLS.md +96 -0
  13. package/VALIDATION.md +85 -0
  14. package/dist/core.d.ts +11 -0
  15. package/dist/core.d.ts.map +1 -0
  16. package/dist/core.js +11 -0
  17. package/dist/core.js.map +1 -0
  18. package/dist/dom/elements.d.ts +3 -0
  19. package/dist/dom/elements.d.ts.map +1 -0
  20. package/dist/dom/elements.js +9 -0
  21. package/dist/dom/elements.js.map +1 -0
  22. package/dist/dom/toolbar.d.ts +11 -0
  23. package/dist/dom/toolbar.d.ts.map +1 -0
  24. package/dist/dom/toolbar.js +46 -0
  25. package/dist/dom/toolbar.js.map +1 -0
  26. package/dist/dom.d.ts +32 -0
  27. package/dist/dom.d.ts.map +1 -0
  28. package/dist/dom.js +581 -0
  29. package/dist/dom.js.map +1 -0
  30. package/dist/editor-labels.d.ts +9 -0
  31. package/dist/editor-labels.d.ts.map +1 -0
  32. package/dist/editor-labels.js +31 -0
  33. package/dist/editor-labels.js.map +1 -0
  34. package/dist/enter-policy.d.ts +11 -0
  35. package/dist/enter-policy.d.ts.map +1 -0
  36. package/dist/enter-policy.js +13 -0
  37. package/dist/enter-policy.js.map +1 -0
  38. package/dist/i18n.d.ts +20 -0
  39. package/dist/i18n.d.ts.map +1 -0
  40. package/dist/i18n.js +58 -0
  41. package/dist/i18n.js.map +1 -0
  42. package/dist/index.d.ts +12 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +12 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/lines.d.ts +7 -0
  47. package/dist/lines.d.ts.map +1 -0
  48. package/dist/lines.js +51 -0
  49. package/dist/lines.js.map +1 -0
  50. package/dist/locales/en.js +214 -0
  51. package/dist/locales/en.json +213 -0
  52. package/dist/locales/ko.js +214 -0
  53. package/dist/locales/ko.json +213 -0
  54. package/dist/math-editor-toolbar.d.ts +24 -0
  55. package/dist/math-editor-toolbar.d.ts.map +1 -0
  56. package/dist/math-editor-toolbar.js +21 -0
  57. package/dist/math-editor-toolbar.js.map +1 -0
  58. package/dist/math-editor.d.ts +23 -0
  59. package/dist/math-editor.d.ts.map +1 -0
  60. package/dist/math-editor.js +692 -0
  61. package/dist/math-editor.js.map +1 -0
  62. package/dist/matrix.d.ts +29 -0
  63. package/dist/matrix.d.ts.map +1 -0
  64. package/dist/matrix.js +125 -0
  65. package/dist/matrix.js.map +1 -0
  66. package/dist/model.d.ts +74 -0
  67. package/dist/model.d.ts.map +1 -0
  68. package/dist/model.js +262 -0
  69. package/dist/model.js.map +1 -0
  70. package/dist/outputs.d.ts +13 -0
  71. package/dist/outputs.d.ts.map +1 -0
  72. package/dist/outputs.js +61 -0
  73. package/dist/outputs.js.map +1 -0
  74. package/dist/range.d.ts +30 -0
  75. package/dist/range.d.ts.map +1 -0
  76. package/dist/range.js +275 -0
  77. package/dist/range.js.map +1 -0
  78. package/dist/react.d.ts +11 -0
  79. package/dist/react.d.ts.map +1 -0
  80. package/dist/react.js +20 -0
  81. package/dist/react.js.map +1 -0
  82. package/dist/session.d.ts +50 -0
  83. package/dist/session.d.ts.map +1 -0
  84. package/dist/session.js +116 -0
  85. package/dist/session.js.map +1 -0
  86. package/dist/solid.d.ts +12 -0
  87. package/dist/solid.d.ts.map +1 -0
  88. package/dist/solid.js +9 -0
  89. package/dist/solid.js.map +1 -0
  90. package/dist/suggestions.d.ts +27 -0
  91. package/dist/suggestions.d.ts.map +1 -0
  92. package/dist/suggestions.js +125 -0
  93. package/dist/suggestions.js.map +1 -0
  94. package/dist/svelte.d.ts +5 -0
  95. package/dist/svelte.d.ts.map +1 -0
  96. package/dist/svelte.js +14 -0
  97. package/dist/svelte.js.map +1 -0
  98. package/dist/symbol-browser.d.ts +8 -0
  99. package/dist/symbol-browser.d.ts.map +1 -0
  100. package/dist/symbol-browser.js +32 -0
  101. package/dist/symbol-browser.js.map +1 -0
  102. package/dist/symbols.d.ts +3 -0
  103. package/dist/symbols.d.ts.map +1 -0
  104. package/dist/symbols.js +94 -0
  105. package/dist/symbols.js.map +1 -0
  106. package/dist/templates.d.ts +16 -0
  107. package/dist/templates.d.ts.map +1 -0
  108. package/dist/templates.js +86 -0
  109. package/dist/templates.js.map +1 -0
  110. package/dist/tokens.d.ts +11 -0
  111. package/dist/tokens.d.ts.map +1 -0
  112. package/dist/tokens.js +24 -0
  113. package/dist/tokens.js.map +1 -0
  114. package/dist/vue.d.ts +5 -0
  115. package/dist/vue.d.ts.map +1 -0
  116. package/dist/vue.js +16 -0
  117. package/dist/vue.js.map +1 -0
  118. package/dist/web-component.d.ts +10 -0
  119. package/dist/web-component.d.ts.map +1 -0
  120. package/dist/web-component.js +67 -0
  121. package/dist/web-component.js.map +1 -0
  122. package/package.json +124 -0
  123. package/src/style.css +781 -0
package/src/style.css ADDED
@@ -0,0 +1,781 @@
1
+ .me-editor {
2
+ --me-accent: #236957;
3
+ --me-line: #d9e1dd;
4
+ color: #202c27;
5
+ font-family: system-ui, sans-serif;
6
+ }
7
+ .me-tools {
8
+ display: flex;
9
+ align-items: center;
10
+ flex-wrap: wrap;
11
+ gap: 4px;
12
+ padding: 12px;
13
+ border-bottom: 1px solid var(--me-line);
14
+ }
15
+ .me-tools button {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 7px;
19
+ background: transparent;
20
+ border: 1px solid transparent;
21
+ border-radius: 6px;
22
+ padding: 7px 9px;
23
+ color: inherit;
24
+ cursor: pointer;
25
+ font: 12px system-ui;
26
+ }
27
+ .me-tools button span {
28
+ font: 20px Georgia, serif;
29
+ }
30
+ .me-tools button:hover {
31
+ background: #edf3ef;
32
+ }
33
+ .me-tools button:disabled {
34
+ opacity: 0.35;
35
+ cursor: default;
36
+ }
37
+ .me-tools button:focus-visible {
38
+ outline: 2px solid var(--me-accent);
39
+ }
40
+ .me-divider {
41
+ height: 20px;
42
+ border-left: 1px solid var(--me-line);
43
+ margin: 0 6px;
44
+ }
45
+ .me-surface {
46
+ min-height: 190px;
47
+ padding: 48px 32px;
48
+ display: flex;
49
+ align-items: center;
50
+ overflow-x: auto;
51
+ overflow-y: visible;
52
+ }
53
+ .me-row {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ white-space: nowrap;
57
+ min-height: 1.5em;
58
+ }
59
+ .me-run {
60
+ position: relative;
61
+ display: inline-flex;
62
+ align-items: center;
63
+ }
64
+ .me-input,
65
+ .me-measure {
66
+ font: italic 22px Georgia, 'Times New Roman', serif;
67
+ line-height: 1.35;
68
+ min-width: 1ch;
69
+ border: 0;
70
+ border-radius: 3px;
71
+ padding: 2px 0;
72
+ background: transparent;
73
+ color: inherit;
74
+ text-align: center;
75
+ outline: none;
76
+ }
77
+ .me-input:focus {
78
+ background: #e7f2ed;
79
+ box-shadow: 0 2px 0 var(--me-accent);
80
+ }
81
+ .me-input::placeholder {
82
+ color: #aabbb1;
83
+ }
84
+ .me-structure {
85
+ display: inline-flex;
86
+ align-items: center;
87
+ margin: 0 3px;
88
+ }
89
+ .me-fraction {
90
+ flex-direction: column;
91
+ }
92
+ .me-fraction > .me-slot:first-child {
93
+ border-bottom: 1.5px solid currentColor;
94
+ width: 100%;
95
+ text-align: center;
96
+ }
97
+ .me-fraction > .me-slot {
98
+ padding: 1px 5px;
99
+ }
100
+ .me-root > .me-slot {
101
+ border-top: 1.5px solid currentColor;
102
+ margin-top: 4px;
103
+ }
104
+ .me-radical {
105
+ font: 33px Georgia, serif;
106
+ }
107
+ .me-superscript > .me-slot:last-child {
108
+ align-self: flex-start;
109
+ transform: translateY(-0.3em);
110
+ }
111
+ .me-subscript > .me-slot:last-child {
112
+ align-self: flex-end;
113
+ transform: translateY(0.3em);
114
+ }
115
+ .me-superscript > .me-slot:last-child .me-input,
116
+ .me-subscript > .me-slot:last-child .me-input,
117
+ .me-superscript > .me-slot:last-child .me-measure,
118
+ .me-subscript > .me-slot:last-child .me-measure {
119
+ font-size: 16px;
120
+ }
121
+ .me-suggestions {
122
+ position: absolute;
123
+ z-index: 5;
124
+ top: 100%;
125
+ left: 0;
126
+ min-width: 180px;
127
+ padding: 5px;
128
+ border: 1px solid var(--me-line);
129
+ border-radius: 8px;
130
+ background: white;
131
+ box-shadow: 0 8px 24px #172c2420;
132
+ display: flex;
133
+ flex-direction: column;
134
+ }
135
+ .me-suggestions button {
136
+ display: flex;
137
+ justify-content: space-between;
138
+ gap: 20px;
139
+ border: 0;
140
+ background: white;
141
+ padding: 9px;
142
+ text-align: left;
143
+ color: #202c27;
144
+ border-radius: 4px;
145
+ cursor: pointer;
146
+ }
147
+ .me-suggestions button[aria-selected='true'] {
148
+ background: #e7f2ed;
149
+ }
150
+ .me-suggestions small {
151
+ color: #6a7b72;
152
+ }
153
+
154
+ /* The hidden twin uses browser font shaping, including CJK fallback fonts and IME drafts.
155
+ It owns layout; the overlaid input cannot impose its native 20-character width. */
156
+ .me-measure {
157
+ visibility: hidden;
158
+ white-space: pre;
159
+ pointer-events: none;
160
+ padding-inline: 0.2ch;
161
+ box-sizing: border-box;
162
+ }
163
+ .me-input {
164
+ position: absolute;
165
+ inset: 0;
166
+ width: 100%;
167
+ height: 100%;
168
+ min-width: 0;
169
+ box-sizing: border-box;
170
+ }
171
+ .me-empty .me-measure {
172
+ min-width: 32px;
173
+ min-height: calc(1.35em + 4px);
174
+ padding-inline: 4px;
175
+ }
176
+ .me-empty-boundary .me-measure {
177
+ min-width: 24px;
178
+ }
179
+ .me-slot .me-empty .me-measure {
180
+ min-width: 12px;
181
+ padding-inline: 1px;
182
+ }
183
+ .me-empty-boundary .me-input {
184
+ border: 1px dashed var(--me-line);
185
+ }
186
+ .me-suggestion-panel {
187
+ position: fixed;
188
+ z-index: 1000;
189
+ display: flex;
190
+ flex-direction: column;
191
+ width: min(336px, calc(100vw - 16px));
192
+ background: #fff;
193
+ color: #202c27;
194
+ border: 1px solid #d9e1dd;
195
+ border-radius: 10px;
196
+ box-shadow: 0 12px 32px #172c2426;
197
+ font: 13px/1.4 system-ui, sans-serif;
198
+ overflow: hidden;
199
+ }
200
+ .me-suggestion-heading,
201
+ .me-suggestion-footer {
202
+ padding: 10px 12px;
203
+ font-size: 11px;
204
+ color: #708075;
205
+ flex-shrink: 0;
206
+ }
207
+ .me-suggestion-heading {
208
+ display: flex;
209
+ justify-content: space-between;
210
+ border-bottom: 1px solid #edf0eb;
211
+ }
212
+ .me-suggestion-footer {
213
+ border-top: 1px solid #edf0eb;
214
+ }
215
+ .me-suggestion-panel .me-suggestions {
216
+ position: static;
217
+ min-height: 0;
218
+ min-width: 0;
219
+ overflow-y: auto;
220
+ box-shadow: none;
221
+ border: 0;
222
+ border-radius: 0;
223
+ flex: 1;
224
+ }
225
+ .me-suggestion-panel .me-suggestions button {
226
+ justify-content: flex-start;
227
+ align-items: center;
228
+ gap: 12px;
229
+ flex-shrink: 0;
230
+ min-height: 54px;
231
+ }
232
+ .me-candidate-glyph {
233
+ font: 26px Georgia, serif;
234
+ min-width: 42px;
235
+ text-align: center;
236
+ }
237
+ .me-suggestions strong {
238
+ display: block;
239
+ font-size: 13px;
240
+ font-weight: 500;
241
+ }
242
+ .me-suggestions small {
243
+ display: block;
244
+ margin-top: 3px;
245
+ font-size: 11px;
246
+ }
247
+ .me-limits {
248
+ display: inline-flex;
249
+ flex-direction: column;
250
+ align-items: center;
251
+ }
252
+ .me-limit .me-input,
253
+ .me-limit .me-measure {
254
+ font-size: 14px;
255
+ }
256
+ .me-operator-glyph {
257
+ font: 35px/1 Georgia, serif;
258
+ }
259
+ .me-large-operator {
260
+ gap: 8px;
261
+ }
262
+ .me-delimiter {
263
+ font: 28px/1 Georgia, serif;
264
+ }
265
+
266
+ /* Slot roles are presentation metadata, not a claim that text is a variable or constant. */
267
+ .me-row {
268
+ --me-ink: #2358a0;
269
+ --me-tint: #eff5ff;
270
+ --me-focus: #dbeaff;
271
+ --me-ring: #3676d3;
272
+ }
273
+ .me-row[data-math-role='numerator'],
274
+ .me-row[data-math-role='base'] {
275
+ --me-ink: #2358a0;
276
+ --me-tint: #eff5ff;
277
+ --me-focus: #dbeaff;
278
+ --me-ring: #3676d3;
279
+ }
280
+ .me-row[data-math-role='denominator'],
281
+ .me-row[data-math-role='radicand'] {
282
+ --me-ink: #086b60;
283
+ --me-tint: #eaf7f1;
284
+ --me-focus: #cef0e4;
285
+ --me-ring: #138777;
286
+ }
287
+ .me-row[data-math-role='exponent'],
288
+ .me-row[data-math-role='upper'] {
289
+ --me-ink: #88430b;
290
+ --me-tint: #fff4e5;
291
+ --me-focus: #ffe2b4;
292
+ --me-ring: #bd6a18;
293
+ }
294
+ .me-row[data-math-role='index'],
295
+ .me-row[data-math-role='lower'] {
296
+ --me-ink: #7c3d90;
297
+ --me-tint: #f8eefb;
298
+ --me-focus: #edd7f6;
299
+ --me-ring: #9d50b1;
300
+ }
301
+ .me-row[data-math-role='group'] {
302
+ --me-ink: #4e53a4;
303
+ --me-tint: #f1f0ff;
304
+ --me-focus: #e1dfff;
305
+ --me-ring: #726ad0;
306
+ }
307
+ .me-input {
308
+ color: var(--me-ink);
309
+ background: var(--me-tint);
310
+ border-radius: 4px;
311
+ caret-color: var(--me-ink);
312
+ }
313
+ .me-input:hover:not(:focus) {
314
+ background: var(--me-focus);
315
+ box-shadow: none;
316
+ }
317
+ .me-input:focus {
318
+ background: var(--me-focus);
319
+ outline: 2px solid var(--me-ring);
320
+ outline-offset: 1px;
321
+ box-shadow: 0 0 0 5px var(--me-tint);
322
+ }
323
+ .me-input::selection {
324
+ color: white;
325
+ background: var(--me-ring);
326
+ }
327
+ .me-input::placeholder {
328
+ color: var(--me-ink);
329
+ opacity: 0.45;
330
+ }
331
+ .me-empty-boundary .me-input:not(:focus) {
332
+ background: transparent;
333
+ box-shadow: none;
334
+ }
335
+ .me-empty-boundary .me-input:hover:not(:focus) {
336
+ background: var(--me-focus);
337
+ }
338
+ .me-empty-boundary .me-input:focus {
339
+ border-color: transparent;
340
+ }
341
+ @media (forced-colors: active) {
342
+ .me-input:focus {
343
+ outline: 2px solid Highlight;
344
+ }
345
+ }
346
+ .me-matrix {
347
+ display: inline-flex;
348
+ align-items: stretch;
349
+ gap: 4px;
350
+ margin: 4px 6px;
351
+ position: relative;
352
+ }
353
+ .me-matrix-grid {
354
+ display: grid;
355
+ align-items: center;
356
+ justify-items: center;
357
+ gap: 12px 18px;
358
+ padding: 9px 7px;
359
+ }
360
+ .me-matrix-cell {
361
+ min-width: 1.4ch;
362
+ display: flex;
363
+ align-items: center;
364
+ justify-content: center;
365
+ }
366
+ .me-matrix-delimiter {
367
+ width: 7px;
368
+ border-color: currentColor;
369
+ border-style: solid;
370
+ border-width: 1.5px 0;
371
+ align-self: stretch;
372
+ }
373
+ .me-matrix-left {
374
+ border-left-width: 1.5px;
375
+ }
376
+ .me-matrix-right {
377
+ border-right-width: 1.5px;
378
+ }
379
+ .me-matrix[data-environment='matrix'] > .me-matrix-delimiter {
380
+ display: none;
381
+ }
382
+ .me-matrix[data-environment='pmatrix'] > .me-matrix-left {
383
+ border-radius: 100% 0 0 100%;
384
+ }
385
+ .me-matrix[data-environment='pmatrix'] > .me-matrix-right {
386
+ border-radius: 0 100% 100% 0;
387
+ }
388
+ .me-matrix[data-environment='vmatrix'] > .me-matrix-delimiter,
389
+ .me-matrix[data-environment='Vmatrix'] > .me-matrix-delimiter {
390
+ border-top: 0;
391
+ border-bottom: 0;
392
+ width: 3px;
393
+ }
394
+ .me-matrix[data-environment='Vmatrix'] > .me-matrix-left {
395
+ border-left: 4px double;
396
+ }
397
+ .me-matrix[data-environment='Vmatrix'] > .me-matrix-right {
398
+ border-right: 4px double;
399
+ }
400
+ .me-matrix[data-environment='Bmatrix'] > .me-matrix-delimiter {
401
+ border: 0;
402
+ width: 9px;
403
+ position: relative;
404
+ }
405
+ .me-matrix[data-environment='Bmatrix'] > .me-matrix-delimiter:before,
406
+ .me-matrix[data-environment='Bmatrix'] > .me-matrix-delimiter:after {
407
+ content: '';
408
+ position: absolute;
409
+ width: 8px;
410
+ height: 50%;
411
+ border-left: 1.5px solid;
412
+ left: 1px;
413
+ }
414
+ .me-matrix[data-environment='Bmatrix'] > .me-matrix-delimiter:before {
415
+ top: 0;
416
+ border-radius: 8px 0 8px 0;
417
+ }
418
+ .me-matrix[data-environment='Bmatrix'] > .me-matrix-delimiter:after {
419
+ bottom: 0;
420
+ border-radius: 0 8px 0 8px;
421
+ }
422
+ .me-matrix[data-environment='Bmatrix'] > .me-matrix-right {
423
+ transform: scaleX(-1);
424
+ }
425
+ .me-matrix-tools {
426
+ display: flex;
427
+ align-items: center;
428
+ flex-wrap: wrap;
429
+ gap: 8px;
430
+ padding: 10px 14px;
431
+ border-bottom: 1px solid #dce2e8;
432
+ background: #f4f4fb;
433
+ font: 12px system-ui;
434
+ color: #4e53a4;
435
+ }
436
+ .me-matrix-tools button,
437
+ .me-matrix-tools select {
438
+ font: inherit;
439
+ color: inherit;
440
+ background: white;
441
+ border: 1px solid #d6d5e6;
442
+ border-radius: 5px;
443
+ padding: 6px 8px;
444
+ }
445
+ .me-matrix-tools button:disabled {
446
+ opacity: 0.35;
447
+ }
448
+ .me-matrix-tools small {
449
+ font-size: 11px;
450
+ color: #77758b;
451
+ }
452
+
453
+ .me-matrix-size {
454
+ font: inherit;
455
+ font-size: 12px;
456
+ color: inherit;
457
+ background: transparent;
458
+ border: 1px solid #dcdfe2;
459
+ border-radius: 5px;
460
+ padding: 6px;
461
+ max-width: 100%;
462
+ }
463
+
464
+ .me-document-lines {
465
+ display: flex;
466
+ flex-direction: column;
467
+ align-items: flex-start;
468
+ gap: 18px;
469
+ min-width: 0;
470
+ }
471
+ .me-document-line {
472
+ display: flex;
473
+ align-items: center;
474
+ min-height: 44px;
475
+ }
476
+ .me-matrix[data-structure='aligned'] > .me-matrix-grid {
477
+ column-gap: 8px;
478
+ }
479
+ .me-matrix[data-structure='aligned'] > .me-matrix-grid > .me-matrix-cell:nth-child(odd) {
480
+ justify-self: end;
481
+ }
482
+ .me-matrix[data-structure='aligned'] > .me-matrix-grid > .me-matrix-cell:nth-child(even),
483
+ .me-matrix[data-structure='cases'] > .me-matrix-grid > .me-matrix-cell {
484
+ justify-self: start;
485
+ }
486
+ .me-matrix[data-structure='cases'] > .me-matrix-right {
487
+ display: none;
488
+ }
489
+
490
+ .me-suggestions button:disabled {
491
+ cursor: default;
492
+ opacity: 0.65;
493
+ }
494
+ .me-run[data-token-kind='variable'] .me-input {
495
+ color: #245da1;
496
+ }
497
+ .me-run[data-token-kind='constant'] .me-input {
498
+ color: #a65316;
499
+ font-style: normal;
500
+ }
501
+ .me-run[data-token-kind='symbol'] .me-input {
502
+ color: #7853a6;
503
+ font-style: normal;
504
+ }
505
+ .me-run[data-token-kind='constant'] .me-measure,
506
+ .me-run[data-token-kind='symbol'] .me-measure {
507
+ font-style: normal;
508
+ }
509
+ .me-run[data-token-kind='space'] .me-input:not(:hover):not(:focus) {
510
+ background: transparent;
511
+ }
512
+ .me-run + .me-run {
513
+ margin-left: 1px;
514
+ }
515
+ .me-run[data-token-kind='space'] .me-measure {
516
+ min-width: 0;
517
+ padding-inline: 0;
518
+ }
519
+ .me-run[data-token-kind='space'],
520
+ .me-run[data-token-kind='space'] + .me-run {
521
+ margin-left: 0;
522
+ }
523
+ .me-token-legend {
524
+ display: flex;
525
+ flex-wrap: wrap;
526
+ align-items: center;
527
+ gap: 14px;
528
+ padding: 8px 16px;
529
+ border-bottom: 1px solid var(--me-line);
530
+ font: 11px system-ui;
531
+ color: #78857e;
532
+ }
533
+ .me-token-legend [data-kind='variable'] {
534
+ color: #245da1;
535
+ }
536
+ .me-token-legend [data-kind='constant'] {
537
+ color: #a65316;
538
+ }
539
+ .me-token-legend [data-kind='symbol'] {
540
+ color: #7853a6;
541
+ }
542
+
543
+ .me-matrix[data-selected='true'] {
544
+ outline: 2px solid #245da1;
545
+ outline-offset: 3px;
546
+ background: #245da112;
547
+ border-radius: 3px;
548
+ }
549
+ .me-grid-selection-hint {
550
+ padding: 8px 16px;
551
+ font: 12px system-ui;
552
+ color: #245da1;
553
+ background: #eef5ff;
554
+ }
555
+ .me-preview-token {
556
+ position: absolute;
557
+ inset: 0;
558
+ display: flex;
559
+ align-items: center;
560
+ justify-content: center;
561
+ white-space: pre;
562
+ font: italic 22px/1.35 Georgia, 'Times New Roman', serif;
563
+ color: var(--me-ink);
564
+ border-radius: 4px;
565
+ cursor: text;
566
+ user-select: none;
567
+ }
568
+ .me-preview-token:hover {
569
+ background: var(--me-focus);
570
+ }
571
+ .me-run[data-token-kind='variable'] .me-preview-token {
572
+ color: #245da1;
573
+ }
574
+ .me-run[data-token-kind='constant'] .me-preview-token {
575
+ color: #a65316;
576
+ font-style: normal;
577
+ }
578
+ .me-run[data-token-kind='symbol'] .me-preview-token {
579
+ color: #7853a6;
580
+ font-style: normal;
581
+ }
582
+ .me-superscript > .me-slot:last-child .me-preview-token,
583
+ .me-subscript > .me-slot:last-child .me-preview-token {
584
+ font-size: 16px;
585
+ }
586
+ .me-limit .me-preview-token {
587
+ font-size: 14px;
588
+ }
589
+ .me-range-highlight,
590
+ .me-empty[data-range-selected='true'] {
591
+ background: #b9d8ff;
592
+ color: inherit;
593
+ border-radius: 2px;
594
+ }
595
+ .me-surface:focus {
596
+ outline: none;
597
+ }
598
+ .me-surface:focus-visible {
599
+ outline: 2px solid #3676d3;
600
+ outline-offset: -2px;
601
+ }
602
+ .me-wrap-tools {
603
+ display: flex;
604
+ flex-wrap: wrap;
605
+ gap: 8px;
606
+ align-items: center;
607
+ padding: 8px 16px;
608
+ background: #eef5ff;
609
+ color: #245da1;
610
+ font: 12px system-ui;
611
+ border-bottom: 1px solid var(--me-line);
612
+ }
613
+ .me-wrap-tools button {
614
+ font: inherit;
615
+ color: inherit;
616
+ border: 1px solid #b9cee7;
617
+ background: white;
618
+ border-radius: 5px;
619
+ padding: 6px 10px;
620
+ cursor: pointer;
621
+ }
622
+ .me-wrap-tools button:hover {
623
+ background: #dbeaff;
624
+ }
625
+ .me-wrap-tools button:disabled {
626
+ opacity: 0.4;
627
+ cursor: default;
628
+ }
629
+ .me-line-number {
630
+ flex: 0 0 2.5ch;
631
+ margin-right: 16px;
632
+ text-align: right;
633
+ align-self: center;
634
+ color: #8a9790;
635
+ font: 11px/1.5 system-ui;
636
+ font-variant-numeric: tabular-nums;
637
+ user-select: none;
638
+ cursor: default;
639
+ }
640
+ .me-symbol-browser {
641
+ padding: 16px;
642
+ border-bottom: 1px solid var(--me-line);
643
+ background: #f6f8f6;
644
+ font: 12px/1.5 system-ui;
645
+ }
646
+ .me-symbol-browser-heading {
647
+ display: flex;
648
+ align-items: center;
649
+ justify-content: space-between;
650
+ gap: 12px;
651
+ }
652
+ .me-symbol-browser-heading small {
653
+ font-weight: 400;
654
+ color: #6a7b72;
655
+ margin-left: 8px;
656
+ }
657
+ .me-symbol-browser-heading button {
658
+ font: inherit;
659
+ background: white;
660
+ color: inherit;
661
+ border: 1px solid var(--me-line);
662
+ border-radius: 5px;
663
+ padding: 5px 10px;
664
+ cursor: pointer;
665
+ }
666
+ .me-symbol-search {
667
+ display: flex;
668
+ flex-direction: column;
669
+ gap: 5px;
670
+ margin-top: 12px;
671
+ }
672
+ .me-symbol-search input {
673
+ font: inherit;
674
+ border: 1px solid var(--me-line);
675
+ border-radius: 5px;
676
+ padding: 9px 10px;
677
+ min-width: 0;
678
+ background: white;
679
+ color: inherit;
680
+ }
681
+ .me-symbol-help {
682
+ color: #627469;
683
+ margin: 8px 0 12px;
684
+ }
685
+ .me-symbol-grid {
686
+ display: grid;
687
+ grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
688
+ gap: 6px;
689
+ max-height: 350px;
690
+ overflow: auto;
691
+ padding: 3px;
692
+ }
693
+ .me-symbol-grid button {
694
+ display: flex;
695
+ flex-direction: column;
696
+ align-items: center;
697
+ justify-content: center;
698
+ gap: 5px;
699
+ min-height: 74px;
700
+ padding: 8px 5px;
701
+ border: 1px solid var(--me-line);
702
+ border-radius: 6px;
703
+ background: white;
704
+ color: inherit;
705
+ font: 11px/1.3 system-ui;
706
+ cursor: pointer;
707
+ overflow-wrap: anywhere;
708
+ }
709
+ .me-symbol-grid button:hover {
710
+ background: #e7f2ed;
711
+ border-color: #9cbbac;
712
+ }
713
+ .me-symbol-glyph {
714
+ font: 25px/1.2 Georgia, 'Times New Roman', serif;
715
+ }
716
+ .me-symbol-browser button:focus-visible,
717
+ .me-symbol-search input:focus-visible {
718
+ outline: 2px solid var(--me-accent);
719
+ outline-offset: 2px;
720
+ }
721
+
722
+ /* Framework-neutral surface. Math direction remains LTR inside localized UI. */
723
+ .me-dom-editor {
724
+ display: block;
725
+ }
726
+ .me-dom-editor .me-surface {
727
+ display: block;
728
+ }
729
+ .me-dom-editor .me-document-line {
730
+ display: flex;
731
+ align-items: center;
732
+ }
733
+ .me-dom-editor .me-dom-variable {
734
+ color: var(--me-variable, #2563a6);
735
+ }
736
+ .me-dom-editor .me-dom-constant {
737
+ color: var(--me-number, #b45309);
738
+ }
739
+ .me-dom-editor .me-dom-symbol {
740
+ color: var(--me-symbol, #7650b2);
741
+ }
742
+ .me-dom-editor .me-dom-selected {
743
+ background: #dbeafe;
744
+ border-radius: 3px;
745
+ }
746
+ .me-dom-status {
747
+ display: block;
748
+ font: 12px/1.5 sans-serif;
749
+ }
750
+ .me-dom-status:empty {
751
+ display: none;
752
+ }
753
+ .me-dom-menu {
754
+ position: fixed;
755
+ z-index: 1000;
756
+ max-height: 230px;
757
+ overflow-y: auto;
758
+ width: 290px;
759
+ }
760
+ .me-dom-menu[hidden] {
761
+ display: none;
762
+ }
763
+ .me-dom-menu .me-suggestions {
764
+ position: static;
765
+ }
766
+ .me-dom-editor[data-mode='inline'] {
767
+ display: inline-block;
768
+ vertical-align: middle;
769
+ border: 0;
770
+ }
771
+ .me-dom-editor[data-mode='inline'] .me-surface {
772
+ display: inline-block;
773
+ padding: 2px 4px;
774
+ min-height: 0;
775
+ }
776
+ .me-dom-editor[data-mode='inline'] .me-document-lines {
777
+ display: inline-flex;
778
+ }
779
+ .me-dom-editor[data-mode='inline'] .me-document-line {
780
+ min-height: 0;
781
+ }