@barocss/math-editor 0.1.0 → 0.2.1

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 (99) hide show
  1. package/ADAPTERS.md +31 -2
  2. package/API-JAVASCRIPT.md +157 -0
  3. package/API-REACT.md +202 -0
  4. package/API-SESSION.md +163 -0
  5. package/API-SOLID.md +90 -0
  6. package/API-SVELTE.md +83 -0
  7. package/API-VUE.md +104 -0
  8. package/API-WEB-COMPONENT.md +128 -0
  9. package/CHANGELOG.md +21 -0
  10. package/EMBEDDING.md +7 -0
  11. package/IMPLEMENTATION.md +132 -1
  12. package/JSON-MODEL.md +441 -0
  13. package/LATEX-GUIDE.md +254 -0
  14. package/LATEX-MODEL.md +290 -0
  15. package/LATEX-SCOPE.md +260 -4
  16. package/LOCALIZATION.md +7 -1
  17. package/README.md +97 -4
  18. package/RELEASING.md +1 -1
  19. package/ROADMAP.md +111 -16
  20. package/SUPPORT.md +134 -13
  21. package/SYMBOLS.md +33 -1
  22. package/VALIDATION.md +175 -0
  23. package/dist/core.d.ts +2 -0
  24. package/dist/core.d.ts.map +1 -1
  25. package/dist/core.js +2 -0
  26. package/dist/core.js.map +1 -1
  27. package/dist/document-codec.d.ts +4 -0
  28. package/dist/document-codec.d.ts.map +1 -0
  29. package/dist/document-codec.js +37 -0
  30. package/dist/document-codec.js.map +1 -0
  31. package/dist/dom/menu-position.d.ts +3 -0
  32. package/dist/dom/menu-position.d.ts.map +1 -0
  33. package/dist/dom/menu-position.js +44 -0
  34. package/dist/dom/menu-position.js.map +1 -0
  35. package/dist/dom/toolbar.d.ts +2 -0
  36. package/dist/dom/toolbar.d.ts.map +1 -1
  37. package/dist/dom/toolbar.js +16 -1
  38. package/dist/dom/toolbar.js.map +1 -1
  39. package/dist/dom.d.ts +1 -0
  40. package/dist/dom.d.ts.map +1 -1
  41. package/dist/dom.js +153 -24
  42. package/dist/dom.js.map +1 -1
  43. package/dist/editor-labels.d.ts.map +1 -1
  44. package/dist/editor-labels.js +42 -0
  45. package/dist/editor-labels.js.map +1 -1
  46. package/dist/fences.d.ts +11 -0
  47. package/dist/fences.d.ts.map +1 -0
  48. package/dist/fences.js +21 -0
  49. package/dist/fences.js.map +1 -0
  50. package/dist/index.d.ts +3 -1
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +2 -0
  53. package/dist/index.js.map +1 -1
  54. package/dist/latex.d.ts +26 -0
  55. package/dist/latex.d.ts.map +1 -0
  56. package/dist/latex.js +689 -0
  57. package/dist/latex.js.map +1 -0
  58. package/dist/locales/en.js +109 -2
  59. package/dist/locales/en.json +109 -2
  60. package/dist/locales/ko.js +121 -3
  61. package/dist/locales/ko.json +121 -3
  62. package/dist/math-editor-toolbar.d.ts +5 -2
  63. package/dist/math-editor-toolbar.d.ts.map +1 -1
  64. package/dist/math-editor-toolbar.js +10 -6
  65. package/dist/math-editor-toolbar.js.map +1 -1
  66. package/dist/math-editor.d.ts +24 -4
  67. package/dist/math-editor.d.ts.map +1 -1
  68. package/dist/math-editor.js +236 -40
  69. package/dist/math-editor.js.map +1 -1
  70. package/dist/model.d.ts +10 -2
  71. package/dist/model.d.ts.map +1 -1
  72. package/dist/model.js +262 -9
  73. package/dist/model.js.map +1 -1
  74. package/dist/range.d.ts +3 -1
  75. package/dist/range.d.ts.map +1 -1
  76. package/dist/range.js +162 -6
  77. package/dist/range.js.map +1 -1
  78. package/dist/react.d.ts +1 -1
  79. package/dist/react.d.ts.map +1 -1
  80. package/dist/session.d.ts +3 -0
  81. package/dist/session.d.ts.map +1 -1
  82. package/dist/session.js +9 -1
  83. package/dist/session.js.map +1 -1
  84. package/dist/suggestions.d.ts +4 -0
  85. package/dist/suggestions.d.ts.map +1 -1
  86. package/dist/suggestions.js +161 -22
  87. package/dist/suggestions.js.map +1 -1
  88. package/dist/symbols.d.ts +1 -1
  89. package/dist/symbols.d.ts.map +1 -1
  90. package/dist/symbols.js +56 -5
  91. package/dist/symbols.js.map +1 -1
  92. package/package.json +3 -2
  93. package/src/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  94. package/src/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  95. package/src/fonts/KaTeX_Main-Bold.woff2 +0 -0
  96. package/src/fonts/KaTeX_Main-Regular.woff2 +0 -0
  97. package/src/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  98. package/src/fonts/LICENSE-KaTeX.txt +21 -0
  99. package/src/style.css +868 -45
package/ROADMAP.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  This roadmap describes priorities, not release promises. The current package is an independent editing prototype. Production integration requires the reliability work below even if additional notation is implemented first.
4
4
 
5
+ ## Remaining LaTeX priorities: workspace review, 2026-09-08
6
+
7
+ These are proposals, not accepted import syntax. Complete each feature through the model, parser, exporter, suggestions and both editing surfaces before calling it supported.
8
+
9
+ | Order | Candidate syntax | Value | Required contract |
10
+ | --- | --- | --- | --- |
11
+ | 1 — implemented in workspace | `\lVert x\rVert`, `\left\|x\right\|` | Norms and vector notation | One-slot norm, scalable double bars, wrapping, aliases and round trips implemented; release remains open |
12
+ | 2 — implemented in workspace | `\iiint`, `\oint` | Multiple and contour integration | Operator variants with editable lower/upper/body slots and slanted bound placement |
13
+ | 3 — implemented in workspace | `\overbrace`, `\underbrace` | Annotated groups and derivations | Body/annotation model, script attachment policy and scalable braces |
14
+ | 4 — implemented in workspace | `\tilde`, `\bar`, `\dot`, `\ddot`, `\widehat`, `\widetilde` | Statistics, derivatives and estimates | Distinguish fixed and stretchy accents; nested editing and glyph geometry |
15
+ | 5 — implemented in workspace | `\nolimits`, `\limsup`, `\liminf` | Explicit operator placement and limit variants | Preserve placement metadata; migrate the current `limits: true` contract deliberately |
16
+ | 6 — implemented in workspace | `\,`, `\:`, `\;`, `\!` | Fine mathematical spacing | Bounded spacing kinds, negative-gap hit testing and canonical export; `\quad`/`\qquad` already work |
17
+ | 7 — four commands implemented in workspace | `\dfrac`, `\tfrac`, `\dbinom`, `\tbinom` | Common pasted formula compatibility | Preserve `mathStyle` metadata and explicit command export; general `\displaystyle` / `\textstyle` declarations remain open |
18
+ | 8 — implemented in workspace | `\mathbf`, `\mathcal`, broader `\mathbb` | Common mathematical alphabets | One-slot alphabet structures, bundled fonts, semantic colors and nested editing; decorative glyph coverage is Latin capitals |
19
+ | 9 — implemented in workspace | `\xrightarrow`, `\xleftarrow` | Labeled transformations and reactions | Two math-label slots, optional lower-label parsing, fixed arrowhead and expanding shaft; other extensible arrows remain open |
20
+ | 10 — `equation*` implemented; others open | `equation`, `align`, `split`, `array` | Broader imported equation layouts | Define numbering exclusions, alignment columns and normalization before adding environments |
21
+
22
+ Do not accept arbitrary macros, package loading, external resources or full TeX documents. Chemical formulas can use text, scripts and arrows; dedicated `\ce`/mhchem grammar and equation balancing are not supported.
23
+
24
+ Norms are implemented in the workspace. Triple and contour integrals are implemented in the workspace. Annotated over/under braces are implemented in the workspace. Six additional accents are implemented in the workspace. Operator placement, fine spacing and explicit fraction/binomial sizes are implemented in the workspace. General style declarations and further compatibility features remain open. Keep visual editing and atomic failure tests in the same change as parsing. Note inline editing is resolved according to the user. Further product integration is outside this math-editor release.
25
+
26
+ ## LaTeX loader and Note integration — 2026-09-08
27
+
28
+ - Scope contract written in [LaTeX import/export](LATEX-SCOPE.md): bounded model grammar, explicit exclusions, diagnostics and acceptance gates.
29
+ - Core parser and saved-document validation: implemented and tested in the workspace; included in 0.2.0.
30
+ - Catalog/template and catalog-driven nested structure-pair round-trip checks pass. Explicit demo import and Note popup draft integration are implemented; product trial tests cover apply/cancel, persistence and source fallback. Wider platform testing remains open.
31
+ - Version 0.2.0 includes bounded LaTeX import. Do not advertise workspace imports as released support.
32
+
5
33
  ## Locale extension and cleanup — 2026-09-08
6
34
 
7
35
  - Completed key-only translation lookup and shared editor path labels; removed source-text conversion and custom formatting callbacks.
@@ -24,10 +52,10 @@ This roadmap describes priorities, not release promises. The current package is
24
52
  | Independently mounted editor/toolbar/LaTeX/preview | Implemented | Framework component conveniences only if real hosts need them |
25
53
  | Host Enter/commit/cancel contract and modal suggestions | Implemented | Product selection/undo integration and real IME/browser matrix |
26
54
  | Layout lab: inline, next-block flow, popup draft/cancel/apply | Implemented | Integrate the actual Note node view first |
27
- | Note/Word/Site/Slide persistence adapters | Not implemented | Versioned math payload, tex-only fallback, OMML conversion and host transactions |
55
+ | Note/Word/Site/Slide persistence adapters | Note workspace popup trial implemented | Validate other browsers and real host caret/undo workflows; Word/Site/Slide adapters and OMML conversion remain open |
28
56
  | Downloadable SVG/PNG output | Not implemented | Dedicated renderer/export contract, fonts and scaling |
29
57
 
30
- See [Embedding](EMBEDDING.md) for existing Note/Word model boundaries. The next concrete target is one real Note integration with a preserved host caret and one coherent undo path, not simultaneous schema replacement in all four products.
58
+ See [Embedding](EMBEDDING.md) for existing Note/Word model boundaries. Note has a popup integration trial. The user confirmed that Note inline editing is resolved. This release focuses on math-editor; product-specific validation is tracked separately.
31
59
 
32
60
  ## Integration progress — 2026-09-07
33
61
 
@@ -42,13 +70,13 @@ See [Embedding](EMBEDDING.md) for existing Note/Word model boundaries. The next
42
70
  | ESM subpath distribution / optional framework peers | Implemented | Release approval, registry publication, bundle budgets |
43
71
  | Rich React renderer remains available | Preserved | Move main export only after measured parity |
44
72
 
45
- Next: finish the native symbol panel and precise range highlights; unify token editing/composition behavior; add keyboard structural selection. Then integrate one real inline host and measure load/typing cost. Do not add new notation to both renderers independently before shared behavior is stable. See [adapter parity and API](ADAPTERS.md).
73
+ Next integration work: finish the native symbol panel and precise range highlights; unify token editing/composition behavior; add keyboard structural selection. Measure load/typing cost in host products; Note inline editing is already resolved. Do not add new notation to both renderers independently before shared behavior is stable. See [adapter parity and API](ADAPTERS.md).
46
74
 
47
75
  ## Delivered baseline
48
76
 
49
77
  - Korean/English library UI and demo; bilingual search aliases in both modes.
50
78
  - Native input at the active token, passive expression rendering, lexical role colors and composition-aware suggestions.
51
- - Thirteen structure kinds, multiline documents, aligned equations, cases and editable matrices.
79
+ - The original structures plus combined scripts, indexed roots, accents, binomials, limits, literal/upright text, independent fences, annotations, spacing and double integrals; multiline documents, aligned equations, cases and editable matrices.
52
80
  - Model ranges, balanced copy/cut/paste, wrapping, undo/redo and LaTeX export.
53
81
  - Identity/zero matrix presets, column vectors and editable formula templates.
54
82
  - A demo-only KaTeX rendering view and automated model/Chromium regression tests.
@@ -60,28 +88,32 @@ Next: finish the native symbol panel and precise range highlights; unify token e
60
88
  | Real input-method matrix | macOS and Windows Korean composition, cancellation, blur and locale change preserve text and commit once; currently deferred by user request |
61
89
  | Keyboard model ranges | Shift+arrows extend/collapse across tokens and structures; typing replaces selection; undo restores a predictable caret |
62
90
  | Structural navigation | Predictable up/down movement in fractions, roots and scripts; direction and selection affinity covered by tests |
63
- | Saved-document validation | Reject malformed shapes and duplicate IDs; version migration and recoverable failure behavior |
91
+ | Saved-document validation | Shape/duplicate-ID validation is implemented; version migration and host recovery remain |
64
92
  | Host session adapter | Enter/exit and save work in one target product; a single coherent undo path across host and formula |
65
93
  | Browser/accessibility coverage | Safari, Firefox and Windows Chromium; screen-reader names and suggestion announcements; touch selection and narrow layouts |
66
94
  | Performance budget | Agree supported document size/depth; benchmark typing, selection, paste and 100-step undo before optimizing |
67
95
 
68
96
  ## Priority 2 — More notation
69
97
 
70
- | Feature | Acceptance criteria |
71
- |---|---|
72
- | Combined superscript/subscript | One shared base, consistent script order, cursor navigation, clipboard and LaTeX round trip |
73
- | Indexed roots and binomials | Editable root index / upper-lower entries; nested sizing, wrapping and deletion rules |
74
- | Functions and logarithms | Named operators with proper LaTeX spacing and editable arguments; distinguish variable names from operators |
75
- | Limits and derivatives | Explicit slots and approach notation; distinguish derivative structures from the existing symbol |
76
- | Text in formulas and cases | Dedicated natural-language mode, escaping, localization-independent content, IME and clipboard support |
77
- | Accents and annotations | Vectors, bars, hats and over/under braces with editable children |
78
- | More templates | Deterministic model builders, localized discovery, one-step undo; no hidden computed values or false solver claims |
98
+ See the [LaTeX editing guide](LATEX-GUIDE.md) for supported examples and the next implementation order.
99
+
100
+ | Feature | Current status | Remaining work |
101
+ |---|---|---|
102
+ | Combined superscript/subscript | Implemented in workspace | Wider browser/IME validation and release |
103
+ | Literal text and 19 named functions/custom names | Implemented in workspace | Mixed text/math and styled text remain excluded |
104
+ | Indexed roots | Implemented in workspace | Wider nested-layout/browser validation and release |
105
+ | Vectors, hats and overlines | Implemented in workspace | Wider layout/browser validation and release |
106
+ | Binomials | Implemented in workspace | Implemented and Chromium-tested; wider browsers and release remain |
107
+ | Limits | Implemented in workspace | Approach slot and dedicated operator placement; `lim` is not in the current function catalog |
108
+ | Additional delimiters | Implemented in workspace | Independent left/right metadata, mixed and invisible ends |
109
+ | Over/under annotations | Implemented in workspace | Implemented and Chromium-tested; wider browsers and release remain |
110
+ | More templates | Ongoing | Deterministic builders, localized discovery and one-step undo |
79
111
 
80
112
  ## Priority 3 — Interchange and richer grids
81
113
 
82
114
  | Feature | Acceptance criteria |
83
115
  |---|---|
84
- | Subset LaTeX import | Define a grammar and supported environments; preserve unsupported input visibly instead of silently dropping it |
116
+ | Subset LaTeX import — implemented in workspace | Extend the documented grammar incrementally; preserve unsupported input without changing the existing formula |
85
117
  | Rectangular cell selection | Row/column geometry, copy/paste shape rules, partial destination handling and undo |
86
118
  | Matrix transformations | Transpose and delimiter changes preserve all cell contents and caret; no implicit numeric computation |
87
119
  | Drag matrix size picker | Accessible keyboard equivalent, touch behavior, 1–20 bounds and one-step insertion |
@@ -98,5 +130,68 @@ Declared variables/constants, stable symbol references, binding scopes, computat
98
130
  2. Preserve IDs outside edits, regenerate inserted identities and support one-step undo for structural actions.
99
131
  3. Cover Korean/English UI, aliases, accessibility labels and composition interaction.
100
132
  4. Verify deterministic model transformations and representative real browser interaction.
101
- 5. Render the supported LaTeX and document unsupported cases.
133
+ 5. Render the supported LaTeX with KaTeX and compare it with both rich React and native editing surfaces. Inspect passive and focused states, empty/populated slots and nested examples. Adjust glyph shapes, baselines, script sizes, spacing and caret-induced movement before marking the feature complete. Record intentional editing-space differences and unsupported cases.
102
134
  6. Update the support table, README and implementation notes with actual behavior.
135
+
136
+ ### 2026-09-08 — Framework API documentation
137
+
138
+ Added dedicated Pure JavaScript, React, Web Component, Vue 3, Svelte and Solid guides,
139
+ plus the shared session/DOM API reference. Guides document the 0.2.0 APIs and distinguish them from
140
+ future options, describe mount-only versus mutable settings and explain
141
+ persistence, ownership, cleanup and renderer parity. React/Solid examples type-check;
142
+ Vue/Svelte complete examples compile; the 19-page HTML documentation build and new-guide
143
+ cross-document/heading links are verified. Website publication is documentation-only;
144
+ the npm version and deployed runtime artifact are unchanged.
145
+
146
+ ### API guide practical examples (2026-09-08)
147
+
148
+ - Added isolated JavaScript/React modal drafts with Apply/Cancel, React session history, Vue document switching, Svelte 5 runes, Solid history/templates, Web Component form submission, and shared debounced browser storage with restore/error handling.
149
+ - Verified React/Solid/storage TypeScript, Vue/Svelte compilation, Chromium modal/form/storage behavior, documentation links and demo production build. Server persistence remains host-owned; examples use published 0.1.0 APIs.
150
+
151
+ ### Combined scripts — workspace implementation
152
+
153
+ - [x] Shared `scripts` model: `[base, subscript, superscript]`, JSON validation and LaTeX export.
154
+ - [x] Both LaTeX script orders, nested placement, duplicate-script diagnostics.
155
+ - [x] React/native rendering, completion from an existing script, Tab traversal and empty-side deletion.
156
+ - [x] Include this addition in the 0.2.0 release.
157
+
158
+ ### Text and function notation — workspace implementation
159
+
160
+ - [x] Literal text node, escaped LaTeX interchange, text-only slot validation and editing.
161
+ - [x] Editable operator-name node, 19 standard functions, custom names and scripts on function names.
162
+ - [x] Shared suggestions, English/Korean messages, native/React editing and round-trip checks.
163
+ - [x] Indexed roots with two slots, selection wrapping, literal typing and empty-index deletion.
164
+ - [x] Vector, hat and overline accents with editable bodies and selection wrapping.
165
+ - [x] Additional delimiters, mixed/invisible ends and overset/underset annotations.
166
+ - [x] Over/under brace annotations with editable annotation/body slots.
167
+ - [x] Explicit side-placement import/export (`\nolimits`); a dedicated toolbar switch remains open.
168
+
169
+ - [x] Workspace: `limit` condition/body model, LaTeX import/export, localized suggestions and React/native editing.
170
+ - [x] Semantic function color for named/custom operators and the limit glyph.
171
+
172
+ ### Workspace: imported notation compatibility
173
+
174
+ - Implemented `quad`/`qquad` as zero-slot spacing nodes, including suggestion insertion and deletion/Undo.
175
+ - Preserved explicit `limits: true` on sum/product/integral/limit nodes through import/export.
176
+ - Implemented one-slot `roman` groups: scoped `\rm` declarations normalize to `\mathrm{…}`. Parsing restores the enclosing expression boundary after nested groups.
177
+ - Regression fixtures include the reported quotient limit with Chinese text, the three-sum inequality and the chain-rule derivative.
178
+
179
+ - Implemented in workspace: double integrals (`\iint`), localized suggestions, domain/bounds/body editing, explicit limits preservation, and regression coverage for the reported mean-value equation.
180
+
181
+ ## Latest presentation status — 2026-09-08
182
+
183
+ Completed in the workspace: scalable fences and radicals, slanted integral side bounds, visible absolute bars, aligned script bases, lining numerals, borderless token focus, 117 symbols including 31 arrows, substring discovery and all-direction `-`/`->` suggestions. See [validation](VALIDATION.md) for the targeted Chromium checks. Full browser/accessibility coverage, native/rich React interaction parity, product-specific integration validation remain separate.
184
+
185
+ ## Spacing audit follow-up — 2026-09-08
186
+
187
+ Seven rich React/KaTeX comparisons are complete; production fixes are pending. Prioritize grid delimiter shapes, nested fraction/script sizing, script separation, grid row spacing and accent clearance, then reduce the measured 20px first-boundary focus expansion. See [the comparison findings](VALIDATION.md#editor-versus-katex-spacing-audit--2026-09-08). Repeat the revised layouts in native DOM and test active inner slots before marking the work complete.
188
+
189
+ Spacing follow-up implemented: shared grid fence shapes, tighter grid/fraction/script/accent layouts, bounded nested fraction sizes, and a smaller boundary focus target. Chromium import/edit checks pass; the measured first-boundary expansion fell from 20px to 8px. Full recursive math-style sizing, additional browser/accessibility checks and eliminating all cursor-induced movement remain open.
190
+
191
+ Workspace toolbar overflow is implemented: configurable structure-button limits and More/Fewer controls, rich React/native filtering, and always-visible history actions. Context-sensitive grouping and user-persisted toolbar customization remain future work.
192
+
193
+ Locale regression: misplaced alphabet/arrow messages moved inside `messages`; pack-shape/build validation and en/ko browser coverage added.
194
+
195
+ ### 0.2.1
196
+
197
+ Keyboard model selection with Shift+arrows and `{` cases discovery are implemented. The dedicated demo adds sized PNG download/copy and fit preview; image generation remains site-only. Pixel-column vertical selection and rectangular grid ranges remain future work.
package/SUPPORT.md CHANGED
@@ -2,23 +2,53 @@
2
2
 
3
3
  This is a presentation and editing scope, not a claim of full LaTeX or computer-algebra support. Blank slots remain editable and export as empty groups. All catalog symbols are exercised against KaTeX in unit tests.
4
4
 
5
+ ## Editing / LaTeX parity (0.2.0)
6
+
7
+ | Existing editor capability | Export | Editable import | Acceptance |
8
+ |---|---|---|---|
9
+ | 117 catalog symbols | Yes | Yes | Every symbol round-trips; aliases normalize |
10
+ | Fractions, roots, scripts and three delimiter structures | Yes | Yes | Empty/filled slots and nested pairs |
11
+ | Sums, products and integrals | Yes | Yes | Limits and bodies preserved |
12
+ | All six matrix environments | Yes | Yes | Rectangular cells and environment preserved |
13
+ | Two-column alignment and cases | Yes | Yes | Cell structure preserved |
14
+ | Top-level multiple lines | `gathered` | Yes | Root/additional lines preserved; rejected by inline host |
15
+ | Identity/zero matrices, vectors, formula templates | Yes | Yes | Restored as editable structure, not template IDs |
16
+ | Arbitrary TeX styling, macros and unsupported model nodes | No | No | Fail atomically; source editor fallback |
17
+
18
+ The [LaTeX contract](LATEX-SCOPE.md) defines syntax, limits and normalization. Version 0.2.0 includes the bounded loader described here. UI interaction parity between rich React and native renderers remains a separate concern.
19
+
20
+ See the [LaTeX editing guide](LATEX-GUIDE.md) for input examples and prioritized additions.
21
+
5
22
  ## Structural notation
6
23
 
7
- | Family | Implemented input / structure | LaTeX output | Limits |
24
+ | Family | Implemented input / structure | LaTeX output | Upper/lower limits | Editable condition/body | `\limsup`, `\liminf` | Not evaluation |
25
+ | Limits |
8
26
  |---|---|---|---|
9
27
  | Fractions | Two editable slots; wrap a selection as numerator | `\frac{a}{b}` | No automatic algebraic simplification |
10
- | Square roots | Editable radicand; selection wrapping | `\sqrt{x}` | Indexed roots not yet implemented |
11
- | Powers | Base and superscript; automatic parentheses when wrapping a compound base | `{x}^{2}` | No combined sub/superscript structure |
28
+ | Upper/lower limits | Editable condition/body | `\limsup`, `\liminf` | Not evaluation |
29
+ | Limits | Editable approach condition and expression | `\\lim_{x\\to 0}{x}` | One lower condition; `\limits` accepted, `\nolimits` supported in workspace |
30
+ | Binomial coefficients | Two editable terms; selection wrapping | `\\binom{n}{k}` | Parentheses without a fraction bar |
31
+ | Square roots | Editable radicand; selection wrapping | `\sqrt{x}` | Use `indexedRoot` for an explicit index |
32
+ | Indexed roots | Index and radicand; selection wrapping | `\sqrt[n]{x}` | Empty index can be removed to recover a square root |
33
+ | Additional accents | Fixed wave/bar/dots and wide hat/wave; one editable body | `\tilde`, `\bar`, `\dot`, `\ddot`, `\widehat`, `\widetilde` | Fixed variants do not stretch across a long body |
34
+ | Accents | Editable body; selection wrapping | `\vec{x}`, `\hat{x}`, `\overline{AB}` | Additional wide accents are separate structures; overset/underset are separate supported structures |
35
+ | Brace annotations | Editable annotation and body, selection wrapping | `\overbrace{a+b}^{n}`, `\underbrace{a+b}_{n}` | No automatic algebraic grouping |
36
+ | Powers | Base and superscript; automatic parentheses when wrapping a compound base | `{x}^{2}` | Combined scripts use a separate shared-base node |
37
+ | Combined scripts | Shared base, lower and upper slots | `{x}_{i}^{2}` | Explicit grouping can still represent nesting |
38
+ | Literal text | One editable literal row | `\text{otherwise}` | No embedded math or text styling |
39
+ | Named functions | Editable upright name, 19 standard functions and custom names | `\sin x`, `\operatorname{custom}` | Arguments remain adjacent math; no evaluation |
12
40
  | Subscripts | Base and lower script | `{x}_{i}` | No declaration or index semantics |
13
41
  | Parentheses | Editable group | `\left(x\right)` | Generic group; no function-argument semantics |
14
42
  | Brackets | Editable group | `\left[x\right]` | Not an interval data type |
43
+ | Norm | One editable body; selected-expression wrapping | `\left\Vert x\right\Vert` | Not numerical evaluation |
15
44
  | Absolute value | Editable group | `\left|x\right|` | No evaluation |
16
45
  | Sum | Lower limit, upper limit, body | `\sum_{i=1}^{n}x` | No bound-variable resolution |
17
46
  | Product | Lower limit, upper limit, body | `\prod_{i=1}^{n}x` | No evaluation |
47
+ | Triple / contour integrals | Three editable slots; side bounds or explicit limits | `\iiint`, `\oint` | No computation; `\nolimits` supported in workspace |
18
48
  | Integral | Lower limit, upper limit, integrand | `\int_{a}^{b}x` | Differential entered as text; no integration engine |
19
49
  | Matrices / vectors | Editable nested cells; row/column changes | `matrix`, `pmatrix`, `bmatrix`, `Bmatrix`, `vmatrix`, `Vmatrix` | 1–20 rows and columns; no rectangular cell clipboard |
20
50
  | Aligned equations | Two columns, left side right-aligned and right side left-aligned | `aligned` | 1–20 rows, one alignment point; type the relation explicitly |
21
- | Cases | Expression and condition columns, left brace | `cases` | 1–20 rows; conditions are math, not a dedicated text mode |
51
+ | Cases | Expression and condition columns, left brace | `cases` | 1–20 rows; conditions accept math and literal text nodes |
22
52
  | Multiple document lines | Split/join top-level rows | `gathered` | No wrapping several document lines into one structure |
23
53
 
24
54
  ## Editing, discovery and integration
@@ -26,9 +56,9 @@ This is a presentation and editing scope, not a claim of full LaTeX or computer-
26
56
  | Area | Supported | Remaining boundary |
27
57
  |---|---|---|
28
58
  | Languages | Korean and English UI, demo, accessible names, hints and suggestions | Custom host labels require host translation |
29
- | Discovery | All-symbol grid with English/Korean/glyph/LaTeX search, click to insert | Scroll through the complete 90-symbol catalog |
59
+ | Discovery | All-symbol grid with English/Korean/glyph/LaTeX search, click to insert | Scroll through the complete 117-symbol catalog |
30
60
  | Line numbers | UI gutter for multiple top-level rows, optional prop | Excluded from math output and clipboard |
31
- | Aliases | English and Korean in both locales; longest symbolic trigger first | Prefix search, not natural-language parsing |
61
+ | Aliases | English and Korean in both locales; longest symbolic trigger first | Substring matching with exact matches first; no natural-language parsing |
32
62
  | Native input | Active token only; composition draft held stable | Real OS IME validation deferred |
33
63
  | Roles | Variables, numeric literals, symbols, spaces | Lexical colors are not semantic declarations |
34
64
  | Selection | Partial text, drag across tokens/structures, whole document in preview | No keyboard Shift-arrow model expansion or rectangular cell selection |
@@ -60,10 +90,35 @@ For the compact three-column reference, see [Symbol names](./SYMBOLS.md).
60
90
 
61
91
  The table below is generated from `src/symbols.ts`. Aliases are space-separated alternative names. Korean labels are also searchable. LaTeX control words receive separating whitespace during export. Literal Latin names and numbers remain ordinary text; typing a LaTeX command does not imply general LaTeX parsing.
62
92
 
63
- Catalog size: **90 symbols**.
93
+ Catalog size: **117 symbols**.
64
94
 
65
95
  | Glyph | English label | Korean label | English aliases | Symbolic triggers | LaTeX |
66
96
  |---|---|---|---|---|---|
97
+ | ↑ | Up arrow | 위쪽 화살표 | uparrow arrow 화살표 | - -> | `\\uparrow` |
98
+ | ↕ | Up-down arrow | 상하 화살표 | updownarrow arrow 화살표 | - -> | `\\updownarrow` |
99
+ | ⇐ | Double left arrow | 왼쪽 이중 화살표 | Leftarrow arrow 화살표 | - -> | `\\Leftarrow` |
100
+ | ⇑ | Double up arrow | 위쪽 이중 화살표 | Uparrow arrow 화살표 | - -> | `\\Uparrow` |
101
+ | ⇓ | Double down arrow | 아래쪽 이중 화살표 | Downarrow arrow 화살표 | - -> | `\\Downarrow` |
102
+ | ⇕ | Double up-down arrow | 상하 이중 화살표 | Updownarrow arrow 화살표 | - -> | `\\Updownarrow` |
103
+ | ↗ | Northeast arrow | 오른쪽 위 대각선 화살표 | nearrow arrow 화살표 | - -> | `\\nearrow` |
104
+ | ↘ | Southeast arrow | 오른쪽 아래 대각선 화살표 | searrow arrow 화살표 | - -> | `\\searrow` |
105
+ | ↙ | Southwest arrow | 왼쪽 아래 대각선 화살표 | swarrow arrow 화살표 | - -> | `\\swarrow` |
106
+ | ↖ | Northwest arrow | 왼쪽 위 대각선 화살표 | nwarrow arrow 화살표 | - -> | `\\nwarrow` |
107
+ | ⟶ | Long right arrow | 긴 오른쪽 화살표 | longrightarrow arrow 화살표 | - -> | `\\longrightarrow` |
108
+ | ⟵ | Long left arrow | 긴 왼쪽 화살표 | longleftarrow arrow 화살표 | - -> | `\\longleftarrow` |
109
+ | ⟷ | Long left-right arrow | 긴 양방향 화살표 | longleftrightarrow arrow 화살표 | - | `\\longleftrightarrow` |
110
+ | ⟹ | Long double right arrow | 긴 오른쪽 이중 화살표 | Longrightarrow arrow 화살표 | - -> | `\\Longrightarrow` |
111
+ | ⟸ | Long double left arrow | 긴 왼쪽 이중 화살표 | Longleftarrow arrow 화살표 | - -> | `\\Longleftarrow` |
112
+ | ⟺ | Long double left-right arrow | 긴 양방향 이중 화살표 | Longleftrightarrow arrow | — | `\\Longleftrightarrow` |
113
+ | ↪ | Hook right arrow | 갈고리 오른쪽 화살표 | hookrightarrow arrow 화살표 | - -> | `\\hookrightarrow` |
114
+ | ↩ | Hook left arrow | 갈고리 왼쪽 화살표 | hookleftarrow arrow 화살표 | - -> | `\\hookleftarrow` |
115
+ | ⇀ | Right harpoon up | 오른쪽 위 반쪽 화살표 | rightharpoonup arrow 화살표 | - -> | `\\rightharpoonup` |
116
+ | ↼ | Left harpoon up | 왼쪽 위 반쪽 화살표 | leftharpoonup arrow 화살표 | - -> | `\\leftharpoonup` |
117
+ | ⇁ | Right harpoon down | 오른쪽 아래 반쪽 화살표 | rightharpoondown arrow 화살표 | - -> | `\\rightharpoondown` |
118
+ | ↽ | Left harpoon down | 왼쪽 아래 반쪽 화살표 | leftharpoondown arrow 화살표 | - -> | `\\leftharpoondown` |
119
+ | ⇌ | Equilibrium right-left arrows | 평형 오른쪽 왼쪽 화살표 | rightleftharpoons arrow 화살표 | - -> | `\\rightleftharpoons` |
120
+ | ⇋ | Equilibrium left-right arrows | 평형 왼쪽 오른쪽 화살표 | leftrightharpoons arrow 화살표 | - -> | `\\leftrightharpoons` |
121
+ | ↓ | Down arrow | 아래쪽 화살표 | downarrow down 아래화살표 아래쪽화살표 | - -> | `\\downarrow` |
67
122
  | ∋ | Contains as an element | 원소를 포함 | ni contains | — | `\ni` |
68
123
  | ⊃ | Superset | 상위집합 | supset superset | — | `\supset` |
69
124
  | ⊇ | Superset or equal | 상위집합 또는 같음 | supseteq | — | `\supseteq` |
@@ -78,7 +133,7 @@ Catalog size: **90 symbols**.
78
133
  | ∥ | Parallel | 평행 | parallel | — | `\parallel` |
79
134
  | ≅ | Congruent | 합동 | cong congruent | — | `\cong` |
80
135
  | ∼ | Similar | 닮음 | sim similar | — | `\sim` |
81
- | ↦ | Maps to | 대응 | mapsto maps | |-> | `\mapsto` |
136
+ | ↦ | Maps to | 대응 | mapsto maps arrow 화살표 | \|-> - -> | `\\mapsto` |
82
137
  | … | Ellipsis | 말줄임표 | ldots ellipsis | — | `\ldots` |
83
138
  | ⋯ | Centered dots | 가로 점 | cdots | — | `\cdots` |
84
139
  | ⋮ | Vertical dots | 세로 점 | vdots | — | `\vdots` |
@@ -101,11 +156,11 @@ Catalog size: **90 symbols**.
101
156
  | ≤ | Less than or equal | 작거나 같음 | leq less | <= <- < | `\le` |
102
157
  | ≥ | Greater than or equal | 크거나 같음 | geq greater | >= >- > | `\ge` |
103
158
  | ∝ | Proportional | 비례 | proportional | ~ | `\propto` |
104
- | → | Right arrow | 오른쪽 화살표 | rightarrow arrow | -> - | `\to` |
105
- | ← | Left arrow | 왼쪽 화살표 | leftarrow arrow | <- < | `\leftarrow` |
106
- | ↔ | Left-right arrow | 양방향 화살표 | leftrightarrow arrow | <-> | `\leftrightarrow` |
107
- | ⇒ | Implies | 함의 | implies arrow | => = | `\Rightarrow` |
108
- | ⇔ | If and only if | 필요충분 | iff arrow | <=> | `\Leftrightarrow` |
159
+ | → | Right arrow | 오른쪽 화살표 | rightarrow arrow | -> - | `\\to` |
160
+ | ← | Left arrow | 왼쪽 화살표 | leftarrow arrow | <- < - -> | `\\leftarrow` |
161
+ | ↔ | Left-right arrow | 양방향 화살표 | leftrightarrow arrow | <-> - -> | `\\leftrightarrow` |
162
+ | ⇒ | Implies | 함의 | implies arrow 화살표 | => = - -> | `\\Rightarrow` |
163
+ | ⇔ | If and only if | 필요충분 | iff arrow 화살표 | <=> - -> | `\\Leftrightarrow` |
109
164
  | ∈ | Element of | 원소 | in element | E | `\in` |
110
165
  | ∉ | Not an element of | 원소 아님 | notin element | E/ | `\notin` |
111
166
  | ∀ | For all | 모든 | forall | A | `\forall` |
@@ -158,3 +213,69 @@ Catalog size: **90 symbols**.
158
213
  ## Renderer availability
159
214
 
160
215
  This formula catalog describes the shared model and the existing rich React editor. New native DOM/framework surfaces share the notation model but have a smaller interaction UI. See the [renderer parity table](ADAPTERS.md#current-renderer-parity) before choosing an adapter.
216
+
217
+ ### Combined scripts (workspace)
218
+
219
+ `x_i^2` and `x^2_i` load into one `scripts` node with slots `[base, subscript, superscript]`. In either renderer, enter `^` at the end of a subscript and choose Exponent, or `_` at the end of an exponent and choose Subscript. The other script is added to the same base. Tab / Shift+Tab move between slots; Backspace in an empty script removes only that side. Explicit grouping such as `{x_i}^2` still represents nesting. Repeated scripts without grouping remain syntax errors. Available in 0.2.0.
220
+
221
+ ### Contextual selection menu (workspace)
222
+
223
+ Selecting a range opens wrapping actions beside the selection in both renderers, including toolbar-free inline surfaces. Actions include fraction, square root, superscript, subscript, parentheses, brackets and absolute value. A multi-line selection keeps the actions disabled. Applying an action preserves the selected model content and supports Undo. React also respects the host's excluded structure list.
224
+
225
+ ### Literal text and functions (workspace)
226
+
227
+ Type `text` or `텍스트` and select Text to write a description, then Tab to resume math. Type `sin`, `cos`, `log` and choose the corresponding function suggestion; `operatorname` opens an editable custom name. Function arguments remain ordinary neighboring math. LaTeX import supports `\text{otherwise}`, the 19 names listed in [LaTeX scope](LATEX-SCOPE.md), and `\operatorname{custom}`. Imported names and text can be edited in React and native adapters. Mixed math inside text and text styling remain unsupported.
228
+
229
+ ### Spacing, explicit limits and upright math (workspace)
230
+
231
+ | Input | Model / export policy |
232
+ | --- | --- |
233
+ | `\quad`, `\qquad` | Zero-slot spacing structures, one/two em; original command preserved |
234
+ | `\sum\limits_{i=1}^n`, `\prod\limits`, `\int\limits`, `\lim\limits` | Operator with `limits: true`; explicit directive preserved |
235
+ | `\mathrm{dx}` | One-slot `roman` math group; same command exported |
236
+ | `{\rm dx}` | Scoped upright declaration; normalizes to `\mathrm{dx}` |
237
+
238
+ Type `quad` / `qquad` (or `간격` / `큰간격`) for an explicit gap. The caret resumes after the gap; Backspace there removes it and Undo restores it. Type `mathrm` / `직립체` for an editable upright group. Math inside a roman group keeps semantic colors and structure editing. It is not a literal text group.
239
+
240
+ `\limits` is accepted immediately after the supported operator, before its scripts. Arbitrary TeX dimensions (`\hspace`, `\kern`) and other font declarations remain unsupported. These additions are included in 0.2.0.
241
+
242
+ ## Additional fences and annotations (workspace)
243
+
244
+ | Input | Model | Editing |
245
+ | --- | --- | --- |
246
+ | `\left\{x\right\}` | `braces`, one body slot | Search `braces` or `중괄호` |
247
+ | `\langle u,v\rangle` or `\left\langle u,v\right\rangle` | `angle`, one body slot | Search `angle`, `내적` or `꺾쇠괄호` |
248
+ | `\left(a,b\right]` | `openClosed`, one body slot | Search `openclosed` or `열린닫힌구간` |
249
+ | `\left[a,b\right)` | `closedOpen`, one body slot | Search `closedopen` or `닫힌열린구간` |
250
+ | Other `\left…\right…` pairs, including `\left.x\right|` | `fenced`, one body slot and independent `left`/`right` | Imported ends are preserved; `.` denotes an invisible end |
251
+ | `\overset{a}{b}` | `overset`, `[annotation, body]` | Search `overset` or `위주석`; Tab moves from annotation to body |
252
+ | `\underset{a}{b}` | `underset`, `[annotation, body]` | Search `underset` or `아래주석`; Tab follows model order, even though the annotation is below |
253
+
254
+ Select an expression and choose a fence or annotation in the regular suggestion menu. Fences wrap the expression and resume after it. Annotations keep the selected expression in the body and focus the empty annotation slot. Nested fractions, scripts and other editable structures are allowed in both annotation slots. Backspace after a structure removes its wrapper while preserving its content; Undo restores it.
255
+
256
+ All structured fences scale with their contents. Short angle notation normalizes to scalable `\left\langle…\right\rangle` on export. Supported physical ends are `(`, `)`, `[`, `]`, `{`, `}`, `⟨`, `⟩`, `|` and `.`. Plain punctuation stays literal unless imported with a structural command. Double norm bars, `\big`/`\Big`, `\overbrace` and `\underbrace` remain unsupported.
257
+
258
+
259
+ ### Double integrals (workspace)
260
+
261
+ `\iint_R f(x,y)` imports as `doubleIntegral` with exactly three slots: `[lower/domain, upper, body]`, matching integral navigation. Missing bounds remain editable empty slots. `\iint\limits` preserves the explicit placement directive. Export uses `\iint_{lower}^{upper}{body}`. Search `iint`, `이중적분` or `∬` to insert; Tab visits the domain, upper bound and body in order. The reported expression with `\rm dx \rm dy`, `\xi`, `\eta` and `\text{Area}` is covered by import/round-trip and browser editing fixtures. This is notation support, not numerical integration. Triple and contour integrals remain outside this addition.
262
+
263
+ Fine spacing: `\,`, `\:`, `\;`, `\!` are preserved as zero-slot structures. Positive spacing expands and negative thin spacing contracts the next boundary; these are not editable text spaces.
264
+
265
+ ## Explicit sizes (0.2.0)
266
+
267
+ `\dfrac`, `\tfrac`, `\dbinom` and `\tbinom` can be imported and edited without losing their size choice on export. Type `dfrac`, `tfrac`, `dbinom` or `tbinom` and select the matching suggestion, then edit the two slots with Tab. See [JSON size mapping](LATEX-MODEL.md#explicit-fraction-and-binomial-sizes--workspace). General `\displaystyle` and `\textstyle` declarations remain unsupported.
268
+
269
+ ### Math alphabet support (workspace)
270
+
271
+ `\mathbf`, `\mathcal` and multi-letter `\mathbb` now support import, suggestions, range wrapping, editing and export. See [alphabet scope and examples](LATEX-GUIDE.md#mathematical-alphabets--020). Available in 0.2.0.
272
+
273
+ ### Labeled arrows (workspace)
274
+
275
+ `\xrightarrow[below]{above}` and `\xleftarrow[below]{above}` support parsing, suggestions, editable math labels and export. See [label syntax and slot order](LATEX-GUIDE.md#labeled-arrows--020). Available in 0.2.0.
276
+
277
+ ## Keyboard ranges and brace discovery (0.2.1)
278
+
279
+ Shift+Left/Right extends or shrinks the same model range used by dragging. Structures are crossed as balanced units; copied and deleted ranges use existing model normalization. Shift+Up/Down extends to an adjacent top-level document line, using a logical text offset rather than pixel-based column matching; grid-cell rectangular selection is not added. Copy, cut, wrapping, deletion and Undo use the existing range behavior. IME composition and modifier shortcuts retain their existing handling.
280
+
281
+ Typing `{` offers both paired braces and cases. Paired braces remain the first candidate; choose Cases explicitly to insert its editable grid.
package/SYMBOLS.md CHANGED
@@ -1,9 +1,34 @@
1
1
  # Symbol names / 기호 이름 목록
2
2
 
3
- All 90 supported symbols. Use **All symbols / 전체 기호** in the editor to browse and insert them before typing. Both English and Korean searches work in either UI language. The full aliases, triggers and LaTeX mappings are in [SUPPORT.md](./SUPPORT.md).
3
+ All 117 supported symbols. Use **All symbols / 전체 기호** in the editor to browse and insert them before typing. Both English and Korean searches work in either UI language. The full aliases, triggers and LaTeX mappings are in [SUPPORT.md](./SUPPORT.md).
4
4
 
5
5
  | Symbol / 기호 | English / 영문 | Korean / 한글 |
6
6
  |---|---|---|
7
+ | ↑ | Up arrow | 위쪽 화살표 |
8
+ | ↕ | Up-down arrow | 상하 화살표 |
9
+ | ⇐ | Double left arrow | 왼쪽 이중 화살표 |
10
+ | ⇑ | Double up arrow | 위쪽 이중 화살표 |
11
+ | ⇓ | Double down arrow | 아래쪽 이중 화살표 |
12
+ | ⇕ | Double up-down arrow | 상하 이중 화살표 |
13
+ | ↗ | Northeast arrow | 오른쪽 위 대각선 화살표 |
14
+ | ↘ | Southeast arrow | 오른쪽 아래 대각선 화살표 |
15
+ | ↙ | Southwest arrow | 왼쪽 아래 대각선 화살표 |
16
+ | ↖ | Northwest arrow | 왼쪽 위 대각선 화살표 |
17
+ | ⟶ | Long right arrow | 긴 오른쪽 화살표 |
18
+ | ⟵ | Long left arrow | 긴 왼쪽 화살표 |
19
+ | ⟷ | Long left-right arrow | 긴 양방향 화살표 |
20
+ | ⟹ | Long double right arrow | 긴 오른쪽 이중 화살표 |
21
+ | ⟸ | Long double left arrow | 긴 왼쪽 이중 화살표 |
22
+ | ⟺ | Long double left-right arrow | 긴 양방향 이중 화살표 |
23
+ | ↪ | Hook right arrow | 갈고리 오른쪽 화살표 |
24
+ | ↩ | Hook left arrow | 갈고리 왼쪽 화살표 |
25
+ | ⇀ | Right harpoon up | 오른쪽 위 반쪽 화살표 |
26
+ | ↼ | Left harpoon up | 왼쪽 위 반쪽 화살표 |
27
+ | ⇁ | Right harpoon down | 오른쪽 아래 반쪽 화살표 |
28
+ | ↽ | Left harpoon down | 왼쪽 아래 반쪽 화살표 |
29
+ | ⇌ | Equilibrium right-left arrows | 평형 오른쪽 왼쪽 화살표 |
30
+ | ⇋ | Equilibrium left-right arrows | 평형 왼쪽 오른쪽 화살표 |
31
+ | ↓ | Down arrow | 아래쪽 화살표 |
7
32
  | ∋ | Contains as an element | 원소를 포함 |
8
33
  | ⊃ | Superset | 상위집합 |
9
34
  | ⊇ | Superset or equal | 상위집합 또는 같음 |
@@ -94,3 +119,10 @@ All 90 supported symbols. Use **All symbols / 전체 기호** in the editor to b
94
119
  | Φ | Uppercase Phi | 대문자 파이 / 피 |
95
120
  | Ψ | Uppercase Psi | 대문자 프사이 |
96
121
  | Ω | Uppercase Omega | 대문자 오메가 |
122
+
123
+ ## Slanted relations (workspace)
124
+
125
+ | Symbol | English | Korean | LaTeX |
126
+ |---|---|---|---|
127
+ | ⩾ | Greater than or equal (slanted) | 크거나 같음 (기울임) | `\geqslant` |
128
+ | ⩽ | Less than or equal (slanted) | 작거나 같음 (기울임) | `\leqslant` |