@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.
- package/ADAPTERS.md +170 -0
- package/CHANGELOG.md +13 -0
- package/EMBEDDING.md +95 -0
- package/IMPLEMENTATION.md +111 -0
- package/LATEX-SCOPE.md +7 -0
- package/LICENSE +23 -0
- package/LOCALIZATION.md +97 -0
- package/README.md +151 -0
- package/RELEASING.md +31 -0
- package/ROADMAP.md +102 -0
- package/SUPPORT.md +160 -0
- package/SYMBOLS.md +96 -0
- package/VALIDATION.md +85 -0
- package/dist/core.d.ts +11 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +11 -0
- package/dist/core.js.map +1 -0
- package/dist/dom/elements.d.ts +3 -0
- package/dist/dom/elements.d.ts.map +1 -0
- package/dist/dom/elements.js +9 -0
- package/dist/dom/elements.js.map +1 -0
- package/dist/dom/toolbar.d.ts +11 -0
- package/dist/dom/toolbar.d.ts.map +1 -0
- package/dist/dom/toolbar.js +46 -0
- package/dist/dom/toolbar.js.map +1 -0
- package/dist/dom.d.ts +32 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +581 -0
- package/dist/dom.js.map +1 -0
- package/dist/editor-labels.d.ts +9 -0
- package/dist/editor-labels.d.ts.map +1 -0
- package/dist/editor-labels.js +31 -0
- package/dist/editor-labels.js.map +1 -0
- package/dist/enter-policy.d.ts +11 -0
- package/dist/enter-policy.d.ts.map +1 -0
- package/dist/enter-policy.js +13 -0
- package/dist/enter-policy.js.map +1 -0
- package/dist/i18n.d.ts +20 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +58 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/lines.d.ts +7 -0
- package/dist/lines.d.ts.map +1 -0
- package/dist/lines.js +51 -0
- package/dist/lines.js.map +1 -0
- package/dist/locales/en.js +214 -0
- package/dist/locales/en.json +213 -0
- package/dist/locales/ko.js +214 -0
- package/dist/locales/ko.json +213 -0
- package/dist/math-editor-toolbar.d.ts +24 -0
- package/dist/math-editor-toolbar.d.ts.map +1 -0
- package/dist/math-editor-toolbar.js +21 -0
- package/dist/math-editor-toolbar.js.map +1 -0
- package/dist/math-editor.d.ts +23 -0
- package/dist/math-editor.d.ts.map +1 -0
- package/dist/math-editor.js +692 -0
- package/dist/math-editor.js.map +1 -0
- package/dist/matrix.d.ts +29 -0
- package/dist/matrix.d.ts.map +1 -0
- package/dist/matrix.js +125 -0
- package/dist/matrix.js.map +1 -0
- package/dist/model.d.ts +74 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +262 -0
- package/dist/model.js.map +1 -0
- package/dist/outputs.d.ts +13 -0
- package/dist/outputs.d.ts.map +1 -0
- package/dist/outputs.js +61 -0
- package/dist/outputs.js.map +1 -0
- package/dist/range.d.ts +30 -0
- package/dist/range.d.ts.map +1 -0
- package/dist/range.js +275 -0
- package/dist/range.js.map +1 -0
- package/dist/react.d.ts +11 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +20 -0
- package/dist/react.js.map +1 -0
- package/dist/session.d.ts +50 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +116 -0
- package/dist/session.js.map +1 -0
- package/dist/solid.d.ts +12 -0
- package/dist/solid.d.ts.map +1 -0
- package/dist/solid.js +9 -0
- package/dist/solid.js.map +1 -0
- package/dist/suggestions.d.ts +27 -0
- package/dist/suggestions.d.ts.map +1 -0
- package/dist/suggestions.js +125 -0
- package/dist/suggestions.js.map +1 -0
- package/dist/svelte.d.ts +5 -0
- package/dist/svelte.d.ts.map +1 -0
- package/dist/svelte.js +14 -0
- package/dist/svelte.js.map +1 -0
- package/dist/symbol-browser.d.ts +8 -0
- package/dist/symbol-browser.d.ts.map +1 -0
- package/dist/symbol-browser.js +32 -0
- package/dist/symbol-browser.js.map +1 -0
- package/dist/symbols.d.ts +3 -0
- package/dist/symbols.d.ts.map +1 -0
- package/dist/symbols.js +94 -0
- package/dist/symbols.js.map +1 -0
- package/dist/templates.d.ts +16 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +86 -0
- package/dist/templates.js.map +1 -0
- package/dist/tokens.d.ts +11 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +24 -0
- package/dist/tokens.js.map +1 -0
- package/dist/vue.d.ts +5 -0
- package/dist/vue.d.ts.map +1 -0
- package/dist/vue.js +16 -0
- package/dist/vue.js.map +1 -0
- package/dist/web-component.d.ts +10 -0
- package/dist/web-component.d.ts.map +1 -0
- package/dist/web-component.js +67 -0
- package/dist/web-component.js.map +1 -0
- package/package.json +124 -0
- package/src/style.css +781 -0
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# @barocss/math-editor
|
|
2
|
+
|
|
3
|
+
An embeddable math editor with a framework-independent model, an existing rich React UI, and a new native DOM surface for pure JavaScript, Web Components, Vue, Svelte, Solid and React. Write expressions in place, select existing math, and wrap it in fractions, roots, powers or delimiters. The demo includes a live KaTeX preview.
|
|
4
|
+
|
|
5
|
+
**Status:** working prototype, not yet a production-ready replacement for the math features in Note, Word or Slides. This package does not calculate, solve equations or parse arbitrary LaTeX.
|
|
6
|
+
|
|
7
|
+
See [framework adapters and inline/custom toolbar integration](ADAPTERS.md), [custom locales](LOCALIZATION.md), and [progress / roadmap](ROADMAP.md). The new native renderer has explicit parity gaps; existing React consumers keep their current UI.
|
|
8
|
+
|
|
9
|
+
For editor-only, external toolbar, LaTeX, preview, inline and popup compositions, see [Embedding](EMBEDDING.md) and `/layouts.html` in the demo.
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
Install version 0.1.0 from npm:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @barocss/math-editor@0.1.0
|
|
17
|
+
# For the rich React UI:
|
|
18
|
+
npm install react react-dom
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Import `@barocss/math-editor/style.css` once. Framework-free consumers use `/core` and `/dom`; each framework adapter has its own subpath. See [ADAPTERS.md](ADAPTERS.md).
|
|
22
|
+
|
|
23
|
+
To develop the package and demo from this monorepo:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pnpm install
|
|
27
|
+
pnpm --filter @barocss/math-editor build
|
|
28
|
+
pnpm --filter @barocss/math-demo dev
|
|
29
|
+
# http://localhost:5184
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
A workspace consumer should declare `"@barocss/math-editor": "workspace:*"`. Framework peer dependencies are optional; React consumers install React and React DOM (>=18).
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { MathEditor, createMathDocument, type MathDocument } from '@barocss/math-editor';
|
|
36
|
+
import '@barocss/math-editor/style.css';
|
|
37
|
+
|
|
38
|
+
function Formula({ documentId, saved, save }: {
|
|
39
|
+
documentId: string;
|
|
40
|
+
saved?: MathDocument;
|
|
41
|
+
save: (document: MathDocument, latex: string) => void;
|
|
42
|
+
}) {
|
|
43
|
+
return (
|
|
44
|
+
<MathEditor
|
|
45
|
+
key={documentId}
|
|
46
|
+
locale="en"
|
|
47
|
+
defaultValue={saved ?? createMathDocument()}
|
|
48
|
+
onChange={save}
|
|
49
|
+
onExit={direction => console.log('Return focus to the host:', direction)}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
| Prop | Contract |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `defaultValue?: MathDocument` | Read on mount. Change the React `key` to open another document. This is not a controlled `value` prop. |
|
|
58
|
+
| `locale?: MathLocale` | Defaults to `ko`. Changes UI text without resetting the document or undo history. |
|
|
59
|
+
| `toolbar?: boolean` | Show the rich React toolbar panels; defaults to `true`. |
|
|
60
|
+
| `toolbarEnd?: ReactNode` | Host actions such as reset/save appended to the toolbar. |
|
|
61
|
+
| `showTokenLegend?: boolean` | Show lexical color guidance; defaults to `true`. |
|
|
62
|
+
| `showLineNumbers?: boolean` | Defaults to `true`. Displays UI-only line numbers when there are two or more top-level rows. Never included in the model, clipboard or LaTeX. |
|
|
63
|
+
| `label?: string` | Host-provided accessible group name; otherwise localized. Hosts translate their own custom label. |
|
|
64
|
+
| `onChange?(document, latex)` | Receives committed model changes and their LaTeX output. IME drafts are not published. |
|
|
65
|
+
| `onExit?(direction)` | Requests host focus restoration at an outer navigation boundary: -1 before, +1 after. |
|
|
66
|
+
|
|
67
|
+
## Suggestion ordering
|
|
68
|
+
|
|
69
|
+
Matching literal characters appear before editable structures and templates. For example, `/` offers `÷` then Fraction; `^` offers `∧` before the script structures; `sum` offers `+`, `±`, then the editable sum. To create a fraction, type `x/`, press Down once, then Enter. The same ranking applies to all adapters.
|
|
70
|
+
|
|
71
|
+
## Editing flows
|
|
72
|
+
|
|
73
|
+
Use **All symbols** to browse all 90 symbols without knowing a name in advance. Search by glyph, English/Korean name, alias or LaTeX command, then click to insert at the last caret or replace the model selection. Escape closes the browser. Search-field clipboard actions do not affect the formula.
|
|
74
|
+
|
|
75
|
+
- Type `x/`, then Enter: convert to a fraction and enter the denominator. `/`, `^` and `_` remain opt-in suggestions, not immediate structural conversions.
|
|
76
|
+
- Type `matrix`, `identity`, `aligned` or `cases`, then choose a suggestion. Korean aliases work in both UI languages.
|
|
77
|
+
- Type `30degree`, `30도` or `30각도`, then Enter to insert `30°` on the current line. `angle` inserts the separate symbol `∠`.
|
|
78
|
+
- Search `reals`, `integers`, `setminus`, `parallel`, or their Korean names. [The complete catalog](./SUPPORT.md) lists every symbol and alias.
|
|
79
|
+
- Use the template selector for zero matrices, column vectors, the quadratic formula and the Pythagorean theorem. Every part remains editable. Template insertion replaces a model selection if one is active; otherwise it inserts at the caret.
|
|
80
|
+
- Click a token to edit it. Only the current token mounts a native `input`; the others are ordinary elements. Blur switches to preview. Escape closes suggestions first, then returns to preview.
|
|
81
|
+
- Drag to select math. The selection tools and main toolbar wrap it in a fraction, root, power, subscript, parentheses, brackets or absolute value. Fractions focus the denominator; powers/subscripts focus their new slot; roots/delimiters place the caret after the structure.
|
|
82
|
+
- Complex power bases receive parentheses. Existing structured delimiters are preserved. This is a conservative display rule, not symbolic algebra.
|
|
83
|
+
|
|
84
|
+
Variables, numeric literals and symbols use distinct colors. Classification is lexical: a letter named `c` or `e` is not automatically a declared constant. The model does not resolve names or binding scopes.
|
|
85
|
+
|
|
86
|
+
## Keyboard reference
|
|
87
|
+
|
|
88
|
+
| Context | Key | Action |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| Suggestions | Up / Down, Enter | Choose and apply; IME composition reserves these keys for the input method |
|
|
91
|
+
| Any active slot | Tab / Shift+Tab | Traverse tokens and structural slots |
|
|
92
|
+
| Token boundary | Left / Right | Move into a neighboring token or slot |
|
|
93
|
+
| Top-level row | Enter | Split the row, unless applying a suggestion |
|
|
94
|
+
| Start of a later top-level row | Backspace | Join the previous row |
|
|
95
|
+
| Grid | Up / Down | Move to the same column in the adjacent row |
|
|
96
|
+
| Grid | Shift+Enter | Insert a row |
|
|
97
|
+
| Matrix | Shift+Space | Insert a column |
|
|
98
|
+
| Grid | Alt+Shift+Up | Delete the current row |
|
|
99
|
+
| Matrix | Alt+Shift+Left | Delete the current column |
|
|
100
|
+
| Aligned / cases | Enter | Insert a row, unless applying a suggestion |
|
|
101
|
+
| Just after a fraction/root/delimiter | Backspace | Unwrap, preserving contents |
|
|
102
|
+
| Outer grid edge | Backspace / Delete | Delete empty grid; select filled grid first, press again to delete |
|
|
103
|
+
| Preview surface | Cmd/Ctrl+A | Select the whole math document |
|
|
104
|
+
| Active input | Cmd/Ctrl+A | Select the current token text |
|
|
105
|
+
| Preview surface | Enter / F2 | Enter editing |
|
|
106
|
+
| Model selection | Cmd/Ctrl+C / X / V | Copy / cut / replace with clipboard contents |
|
|
107
|
+
| Model selection | Backspace / Delete | Delete selection |
|
|
108
|
+
| Editor | Cmd/Ctrl+Z / Cmd/Ctrl+Shift+Z | Undo / redo |
|
|
109
|
+
|
|
110
|
+
## Selection and clipboard boundaries
|
|
111
|
+
|
|
112
|
+
A range within one row preserves partial text and balanced structures. Selecting across a numerator and denominator expands to their common fraction; selecting across matrix cells expands to their common matrix. This is not a spreadsheet-style rectangular cell selection. Multiple document lines can be copied, replaced or deleted, but cannot be wrapped into a single structure.
|
|
113
|
+
|
|
114
|
+
Internal copies include `application/x-barocss-math+json` and plain-text LaTeX. Paste validates the custom payload and generates fresh IDs. Plain external text is inserted literally; newlines become top-level rows. Multiple-line paste into a nested slot is rejected without changing the document. If a destination strips custom clipboard formats, pasting back provides text rather than reconstructed math.
|
|
115
|
+
|
|
116
|
+
The demo's **Copy** button exports LaTeX only. General LaTeX import is not implemented.
|
|
117
|
+
|
|
118
|
+
## Model and package boundaries
|
|
119
|
+
|
|
120
|
+
`MathDocument` stores `version: 1`, a `root` row and optional `additionalLines`. Rows alternate text boundaries and structures; even an empty boundary is a valid caret address. LaTeX is an export format, not the editing source.
|
|
121
|
+
|
|
122
|
+
- Main export: model, React editor, navigation, matrices, range/clipboard operations, tokens, suggestions, templates, symbols and localization.
|
|
123
|
+
- `@barocss/math-editor/core`: all framework-free model helpers, sessions, suggestions and locale registration; no React dependency.
|
|
124
|
+
- `@barocss/math-editor/style.css`: explicit UI stylesheet using `me-` classes.
|
|
125
|
+
- KaTeX is a demo runtime dependency and a package test dependency; the library renderer does not require it.
|
|
126
|
+
|
|
127
|
+
Only pass trusted, well-formed saved documents to `defaultValue`. `parseFragment` validates clipboard fragments; it is not a saved-document validation API. Locale is host UI state and is not serialized in the math document.
|
|
128
|
+
|
|
129
|
+
## Source maintenance
|
|
130
|
+
|
|
131
|
+
Source, tests and CSS use the package Prettier configuration. `pnpm --filter @barocss/math-editor format:check` checks readability conventions. Toolbar presentation, output views, locale data and host Enter policy are separate modules; caret/IME invariants are documented at the event boundaries.
|
|
132
|
+
|
|
133
|
+
## Verification and next steps
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
pnpm --filter @barocss/math-editor test:run
|
|
137
|
+
pnpm --filter @barocss/math-editor type-check
|
|
138
|
+
pnpm --filter @barocss/math-editor build
|
|
139
|
+
pnpm --filter @barocss/math-demo type-check
|
|
140
|
+
pnpm exec tsc --noEmit -p apps/math-demo/tsconfig.tests.json
|
|
141
|
+
pnpm --filter @barocss/math-demo build
|
|
142
|
+
pnpm --filter @barocss/math-demo test:e2e
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The demo consumes package exports from `dist`; rebuild the package before browser tests. Browser tests use Playwright Chromium and start port 5184 if needed. Actual OS Korean IME tests remain deferred at the user's request.
|
|
146
|
+
|
|
147
|
+
- [Symbol / English / Korean name table](./SYMBOLS.md)
|
|
148
|
+
- [Supported formulas, templates and full symbol catalog](./SUPPORT.md)
|
|
149
|
+
- [Implementation guide](./IMPLEMENTATION.md)
|
|
150
|
+
- [Validation evidence and limitations](./VALIDATION.md)
|
|
151
|
+
- [Roadmap and acceptance criteria](./ROADMAP.md)
|
package/RELEASING.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Releasing math editor
|
|
2
|
+
|
|
3
|
+
The source stays in this monorepo. Release only `@barocss/math-editor`; framework subpaths share its version. The initial release is **0.1.0**, public, on the **latest** npm tag.
|
|
4
|
+
|
|
5
|
+
## Local release
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
# Repository root. Login is handled by npm, never by storing credentials in the repository.
|
|
9
|
+
npm login
|
|
10
|
+
pnpm release:math:prepare
|
|
11
|
+
# After reviewing changes and browser validation:
|
|
12
|
+
pnpm release:math
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Both commands check formatting, types and unit tests, clean/build the package, create a temporary tarball and verify all package entry points. The publish command sends only that verified tarball to the public npm registry. It never runs recursive publishing. `pnpm release` is an alias for this math-only workflow. npm may request account authentication or 2FA during publishing.
|
|
16
|
+
|
|
17
|
+
Before releasing UI changes, also run `pnpm --filter @barocss/math-demo test:e2e` and the demo build. Verify the intended package name/version and changelog. A version already published to npm must never be reused. The repository's release workflow is manual validation only; it does not publish on main pushes.
|
|
18
|
+
|
|
19
|
+
## Subsequent versions
|
|
20
|
+
|
|
21
|
+
1. Run `pnpm changeset`, select only `@barocss/math-editor`, and write a user-facing change summary.
|
|
22
|
+
2. Use patch for compatible fixes and minor for features. During 0.x development, clearly identify breaking API changes in a minor release. Reserve 1.0.0 for the agreed stable API.
|
|
23
|
+
3. Run `pnpm version:math`. It checks the Changesets release plan and refuses changes affecting other packages before running version/changelog generation.
|
|
24
|
+
4. Review and commit the version/changelog and any dependency/lockfile changes with the implementation. Run release validation, then publish locally.
|
|
25
|
+
5. Record a package-specific Git tag such as `math-editor-v0.1.1` on the release commit, and update the site with the matching package version.
|
|
26
|
+
|
|
27
|
+
The first 0.1.0 changelog is seeded explicitly; do not add a version-bump changeset just to publish the initial version. Avoid `pnpm version-packages` for a math-only release because that command processes the entire workspace plan.
|
|
28
|
+
|
|
29
|
+
## Website
|
|
30
|
+
|
|
31
|
+
`apps/math-demo` remains the site source. The intended static deployment repository is `barocss/math-editor-site`, with GitHub Pages at `math-editor.barocss.com`. Website deployment is separate from npm publication; page-only changes do not require a package version bump. Keep the displayed version and built editor version in sync. Successful npm publication alone does not mean the site or DNS has been configured.
|
package/ROADMAP.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Math editor roadmap
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## Locale extension and cleanup — 2026-09-08
|
|
6
|
+
|
|
7
|
+
- Completed key-only translation lookup and shared editor path labels; removed source-text conversion and custom formatting callbacks.
|
|
8
|
+
- Added JSON French example, matrix-family aliases and NFC/combining-mark search. Language tests cover French, Japanese, Chinese, Arabic, Hindi and German without claiming complete language packs.
|
|
9
|
+
- Documented bundled en/ko versus host-supplied translations in [LOCALIZATION.md](LOCALIZATION.md). Complete reviewed third-language packs, RTL interaction and native OS IME testing remain open.
|
|
10
|
+
- Build now cleans its generated directory so deleted modules are excluded from packages.
|
|
11
|
+
|
|
12
|
+
## Locale keys and suggestion ranking — 2026-09-08
|
|
13
|
+
|
|
14
|
+
- Completed English semantic keys in all library/demo JSON packs and static UI call sites. Catalogs and renderers now use keyed messages and named parameters; source-text conversion and formatting hooks have been removed.
|
|
15
|
+
- Matching literal symbols now precede structural/template candidates. `/` selects `÷` by default; choose the following Fraction candidate to create a fraction. Relative ordering and uppercase Greek preference remain stable.
|
|
16
|
+
|
|
17
|
+
## Composition and maintainability — 2026-09-08
|
|
18
|
+
|
|
19
|
+
| Work | Status | Next gate |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Source/CSS formatting and behavioral comments | Implemented | Continue splitting renderer internals when their behavior is unified |
|
|
22
|
+
| React/native toolbar extraction and host action slot | Implemented | Contextual tool catalog shared across both renderers |
|
|
23
|
+
| JSON locale packs, named templates, regional fallback | Implemented | English semantic JSON keys completed; complete third-language packs |
|
|
24
|
+
| Independently mounted editor/toolbar/LaTeX/preview | Implemented | Framework component conveniences only if real hosts need them |
|
|
25
|
+
| Host Enter/commit/cancel contract and modal suggestions | Implemented | Product selection/undo integration and real IME/browser matrix |
|
|
26
|
+
| 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 |
|
|
28
|
+
| Downloadable SVG/PNG output | Not implemented | Dedicated renderer/export contract, fonts and scaling |
|
|
29
|
+
|
|
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.
|
|
31
|
+
|
|
32
|
+
## Integration progress — 2026-09-07
|
|
33
|
+
|
|
34
|
+
| Work | Status | Remaining gate |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Framework-free session / public commands | Implemented | Host-wide undo integration, performance and document validation |
|
|
37
|
+
| Native DOM surface / pure JS entry | Integration preview | Rich React selection, catalog and composition parity |
|
|
38
|
+
| Web Component / Vue / Svelte / Solid / React native wrappers | Implemented | Wider framework-version matrix and SSR/hydration strategy |
|
|
39
|
+
| Optional and separately mounted toolbar | Implemented in native surface | Context-sensitive professional toolbar and symbol browser |
|
|
40
|
+
| Inline single-top-level-line policy | Implemented in native surface | Real product prose integration, baseline/keyboard exit UX |
|
|
41
|
+
| External locale dictionary / aliases / fallback / direction | Implemented | Complete extra language packs and RTL audit |
|
|
42
|
+
| ESM subpath distribution / optional framework peers | Implemented | Release approval, registry publication, bundle budgets |
|
|
43
|
+
| Rich React renderer remains available | Preserved | Move main export only after measured parity |
|
|
44
|
+
|
|
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).
|
|
46
|
+
|
|
47
|
+
## Delivered baseline
|
|
48
|
+
|
|
49
|
+
- Korean/English library UI and demo; bilingual search aliases in both modes.
|
|
50
|
+
- 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.
|
|
52
|
+
- Model ranges, balanced copy/cut/paste, wrapping, undo/redo and LaTeX export.
|
|
53
|
+
- Identity/zero matrix presets, column vectors and editable formula templates.
|
|
54
|
+
- A demo-only KaTeX rendering view and automated model/Chromium regression tests.
|
|
55
|
+
|
|
56
|
+
## Priority 1 — Reliable editing and integration
|
|
57
|
+
|
|
58
|
+
| Work | Acceptance criteria |
|
|
59
|
+
|---|---|
|
|
60
|
+
| 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
|
+
| Keyboard model ranges | Shift+arrows extend/collapse across tokens and structures; typing replaces selection; undo restores a predictable caret |
|
|
62
|
+
| 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 |
|
|
64
|
+
| Host session adapter | Enter/exit and save work in one target product; a single coherent undo path across host and formula |
|
|
65
|
+
| Browser/accessibility coverage | Safari, Firefox and Windows Chromium; screen-reader names and suggestion announcements; touch selection and narrow layouts |
|
|
66
|
+
| Performance budget | Agree supported document size/depth; benchmark typing, selection, paste and 100-step undo before optimizing |
|
|
67
|
+
|
|
68
|
+
## Priority 2 — More notation
|
|
69
|
+
|
|
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 |
|
|
79
|
+
|
|
80
|
+
## Priority 3 — Interchange and richer grids
|
|
81
|
+
|
|
82
|
+
| Feature | Acceptance criteria |
|
|
83
|
+
|---|---|
|
|
84
|
+
| Subset LaTeX import | Define a grammar and supported environments; preserve unsupported input visibly instead of silently dropping it |
|
|
85
|
+
| Rectangular cell selection | Row/column geometry, copy/paste shape rules, partial destination handling and undo |
|
|
86
|
+
| Matrix transformations | Transpose and delimiter changes preserve all cell contents and caret; no implicit numeric computation |
|
|
87
|
+
| Drag matrix size picker | Accessible keyboard equivalent, touch behavior, 1–20 bounds and one-step insertion |
|
|
88
|
+
| Multi-alignment and multiline wrapping | Explicit grouping semantics; do not flatten lines or move relation signs unexpectedly |
|
|
89
|
+
| External clipboard compatibility | Verify custom-format survival and LaTeX fallback across target browsers and applications |
|
|
90
|
+
|
|
91
|
+
## Later, only with product requirements
|
|
92
|
+
|
|
93
|
+
Declared variables/constants, stable symbol references, binding scopes, computation, collaborative editing, and server persistence are distinct systems. Do not infer that lexical colors or a quadratic formula template already provide these capabilities.
|
|
94
|
+
|
|
95
|
+
## Definition of done for each addition
|
|
96
|
+
|
|
97
|
+
1. State the supported input and its exact output/caret behavior.
|
|
98
|
+
2. Preserve IDs outside edits, regenerate inserted identities and support one-step undo for structural actions.
|
|
99
|
+
3. Cover Korean/English UI, aliases, accessibility labels and composition interaction.
|
|
100
|
+
4. Verify deterministic model transformations and representative real browser interaction.
|
|
101
|
+
5. Render the supported LaTeX and document unsupported cases.
|
|
102
|
+
6. Update the support table, README and implementation notes with actual behavior.
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Supported math and editing features
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## Structural notation
|
|
6
|
+
|
|
7
|
+
| Family | Implemented input / structure | LaTeX output | Limits |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| 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 |
|
|
12
|
+
| Subscripts | Base and lower script | `{x}_{i}` | No declaration or index semantics |
|
|
13
|
+
| Parentheses | Editable group | `\left(x\right)` | Generic group; no function-argument semantics |
|
|
14
|
+
| Brackets | Editable group | `\left[x\right]` | Not an interval data type |
|
|
15
|
+
| Absolute value | Editable group | `\left|x\right|` | No evaluation |
|
|
16
|
+
| Sum | Lower limit, upper limit, body | `\sum_{i=1}^{n}x` | No bound-variable resolution |
|
|
17
|
+
| Product | Lower limit, upper limit, body | `\prod_{i=1}^{n}x` | No evaluation |
|
|
18
|
+
| Integral | Lower limit, upper limit, integrand | `\int_{a}^{b}x` | Differential entered as text; no integration engine |
|
|
19
|
+
| Matrices / vectors | Editable nested cells; row/column changes | `matrix`, `pmatrix`, `bmatrix`, `Bmatrix`, `vmatrix`, `Vmatrix` | 1–20 rows and columns; no rectangular cell clipboard |
|
|
20
|
+
| 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 |
|
|
22
|
+
| Multiple document lines | Split/join top-level rows | `gathered` | No wrapping several document lines into one structure |
|
|
23
|
+
|
|
24
|
+
## Editing, discovery and integration
|
|
25
|
+
|
|
26
|
+
| Area | Supported | Remaining boundary |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| 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 |
|
|
30
|
+
| 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 |
|
|
32
|
+
| Native input | Active token only; composition draft held stable | Real OS IME validation deferred |
|
|
33
|
+
| Roles | Variables, numeric literals, symbols, spaces | Lexical colors are not semantic declarations |
|
|
34
|
+
| Selection | Partial text, drag across tokens/structures, whole document in preview | No keyboard Shift-arrow model expansion or rectangular cell selection |
|
|
35
|
+
| Wrapping | Fraction, root, power, subscript, parentheses, brackets, absolute value | One balanced row; cross-slot range expands to common structure |
|
|
36
|
+
| Clipboard | Structured internal fragment plus LaTeX text; cut/paste replacement | External LaTeX is literal text; nested multiline paste rejected |
|
|
37
|
+
| History | Undo/redo of model changes and caret, up to 100 prior states | No shared host undo adapter yet |
|
|
38
|
+
| Deletion | Text boundaries, line join, structure unwrap, two-step filled-grid deletion | General structural deletion rules are still limited |
|
|
39
|
+
| Serialization | Version-1 JSON document and change callback | No persistence service, saved-document validator or migrations |
|
|
40
|
+
| Preview | Demo-only KaTeX view | Library renders its own editable presentation |
|
|
41
|
+
| Accessibility | Localized labels, combobox suggestions, keyboard slot navigation | Not a complete mathematical screen-reader implementation |
|
|
42
|
+
| Computation | None | No solving, simplification, units engine or collaboration |
|
|
43
|
+
|
|
44
|
+
## Editable templates and presets
|
|
45
|
+
|
|
46
|
+
| Template / preset | Sizes | Discovery | Behavior |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| Empty matrix | 2×2, 3×3, 4×4 | `matrix`, `행`, `행렬`; matrix menu | Editable empty cells |
|
|
49
|
+
| Identity matrix | 2×2, 3×3, 4×4 | `identity`, `단위`, `단위행렬`; matrix menu | Diagonal 1, other entries 0 |
|
|
50
|
+
| Zero matrix | 2×2, 3×3, 4×4 | `zero`, `영행렬`; template menu | All entries 0, editable |
|
|
51
|
+
| Column vector | 2×1, 3×1 | `vector`, `column`, `벡터`, `열벡터`; template menu | Empty editable column; existing generic matrix candidates may also match |
|
|
52
|
+
| Quadratic formula | One expression | `quadratic`, `근의공식`; template menu | `x=(-b±√(b²−4ac))/(2a)` using fraction/root/power nodes; assumes a≠0 mathematically, does not enforce it |
|
|
53
|
+
| Pythagorean theorem | One expression | `pythagorean`, `피타고라스`; template menu | `a²+b²=c²` using editable power nodes |
|
|
54
|
+
|
|
55
|
+
Template insertion uses fresh IDs and is undoable. Template search aliases do not include spaces as a complete multiword query parser: use the compact aliases shown above. A template is not a solver.
|
|
56
|
+
|
|
57
|
+
## Symbol catalog
|
|
58
|
+
|
|
59
|
+
For the compact three-column reference, see [Symbol names](./SYMBOLS.md).
|
|
60
|
+
|
|
61
|
+
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
|
+
|
|
63
|
+
Catalog size: **90 symbols**.
|
|
64
|
+
|
|
65
|
+
| Glyph | English label | Korean label | English aliases | Symbolic triggers | LaTeX |
|
|
66
|
+
|---|---|---|---|---|---|
|
|
67
|
+
| ∋ | Contains as an element | 원소를 포함 | ni contains | — | `\ni` |
|
|
68
|
+
| ⊃ | Superset | 상위집합 | supset superset | — | `\supset` |
|
|
69
|
+
| ⊇ | Superset or equal | 상위집합 또는 같음 | supseteq | — | `\supseteq` |
|
|
70
|
+
| ⊈ | Not a subset or equal | 부분집합 아님 | nsubseteq | — | `\nsubseteq` |
|
|
71
|
+
| ∖ | Set difference | 차집합 | setminus difference | — | `\setminus` |
|
|
72
|
+
| ℕ | Natural numbers | 자연수 집합 | naturals natural | — | `\mathbb{N}` |
|
|
73
|
+
| ℤ | Integers | 정수 집합 | integers integer | — | `\mathbb{Z}` |
|
|
74
|
+
| ℚ | Rational numbers | 유리수 집합 | rationals rational | — | `\mathbb{Q}` |
|
|
75
|
+
| ℝ | Real numbers | 실수 집합 | reals real | — | `\mathbb{R}` |
|
|
76
|
+
| ℂ | Complex numbers | 복소수 집합 | complexes complex | — | `\mathbb{C}` |
|
|
77
|
+
| ⊥ | Perpendicular | 수직 | perp perpendicular | — | `\perp` |
|
|
78
|
+
| ∥ | Parallel | 평행 | parallel | — | `\parallel` |
|
|
79
|
+
| ≅ | Congruent | 합동 | cong congruent | — | `\cong` |
|
|
80
|
+
| ∼ | Similar | 닮음 | sim similar | — | `\sim` |
|
|
81
|
+
| ↦ | Maps to | 대응 | mapsto maps | |-> | `\mapsto` |
|
|
82
|
+
| … | Ellipsis | 말줄임표 | ldots ellipsis | — | `\ldots` |
|
|
83
|
+
| ⋯ | Centered dots | 가로 점 | cdots | — | `\cdots` |
|
|
84
|
+
| ⋮ | Vertical dots | 세로 점 | vdots | — | `\vdots` |
|
|
85
|
+
| ⋱ | Diagonal dots | 대각 점 | ddots | — | `\ddots` |
|
|
86
|
+
| ° | Degree | 도 | degree degrees 각도 | — | `{}^{\circ}` |
|
|
87
|
+
| ∠ | Angle | 각 기호 | angle | — | `\angle` |
|
|
88
|
+
| + | Plus | 더하기 | plus sum | + | `+` |
|
|
89
|
+
| − | Minus | 빼기 | minus | - | `-` |
|
|
90
|
+
| ± | Plus or minus | 플러스 마이너스 | plusminus sum | +- + | `\pm` |
|
|
91
|
+
| ∓ | Minus or plus | 마이너스 플러스 | minusplus | -+ - | `\mp` |
|
|
92
|
+
| × | Times | 곱하기 | times multiply | * | `\times` |
|
|
93
|
+
| · | Dot | 가운데 점 | dot multiply | * | `\cdot` |
|
|
94
|
+
| ÷ | Divide | 나누기 | divide division | / | `\div` |
|
|
95
|
+
| = | Equal | 같음 | equal | = | `=` |
|
|
96
|
+
| ≠ | Not equal | 같지 않음 | neq unequal | != /= = | `\ne` |
|
|
97
|
+
| ≈ | Approximately equal | 근삿값 | approx | ~ ~~ = | `\approx` |
|
|
98
|
+
| ≡ | Equivalent | 동치 | equiv | === = | `\equiv` |
|
|
99
|
+
| < | Less than | 작음 | less | < | `<` |
|
|
100
|
+
| > | Greater than | 큼 | greater | > | `>` |
|
|
101
|
+
| ≤ | Less than or equal | 작거나 같음 | leq less | <= <- < | `\le` |
|
|
102
|
+
| ≥ | Greater than or equal | 크거나 같음 | geq greater | >= >- > | `\ge` |
|
|
103
|
+
| ∝ | 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` |
|
|
109
|
+
| ∈ | Element of | 원소 | in element | E | `\in` |
|
|
110
|
+
| ∉ | Not an element of | 원소 아님 | notin element | E/ | `\notin` |
|
|
111
|
+
| ∀ | For all | 모든 | forall | A | `\forall` |
|
|
112
|
+
| ∃ | There exists | 존재 | exists | E | `\exists` |
|
|
113
|
+
| ∪ | Union | 합집합 | union | U | `\cup` |
|
|
114
|
+
| ∩ | Intersection | 교집합 | intersection | — | `\cap` |
|
|
115
|
+
| ⊂ | Subset | 부분집합 | subset | < | `\subset` |
|
|
116
|
+
| ⊆ | Subset or equal | 부분집합 또는 같음 | subseteq | <= | `\subseteq` |
|
|
117
|
+
| ∅ | Empty set | 공집합 | emptyset | — | `\emptyset` |
|
|
118
|
+
| ∞ | Infinity | 무한대 | infinity infty | — | `\infty` |
|
|
119
|
+
| ∂ | Partial derivative | 편미분 | partial derivative | — | `\partial` |
|
|
120
|
+
| ∇ | Nabla | 나블라 | nabla gradient | — | `\nabla` |
|
|
121
|
+
| ∧ | Logical and | 논리곱 | and wedge | ^ | `\wedge` |
|
|
122
|
+
| ∨ | Logical or | 논리합 | or vee | — | `\vee` |
|
|
123
|
+
| ¬ | Logical not | 부정 | not neg | ! | `\neg` |
|
|
124
|
+
| α | Alpha | 알파 | alpha | — | `\alpha` |
|
|
125
|
+
| β | Beta | 베타 | beta | — | `\beta` |
|
|
126
|
+
| γ | Gamma | 감마 | gamma | — | `\gamma` |
|
|
127
|
+
| δ | Delta | 델타 | delta | — | `\delta` |
|
|
128
|
+
| ε | Epsilon | 엡실론 | epsilon | — | `\epsilon` |
|
|
129
|
+
| ζ | Zeta | 제타 | zeta | — | `\zeta` |
|
|
130
|
+
| η | Eta | 에타 | eta | — | `\eta` |
|
|
131
|
+
| θ | Theta | 세타 | theta | — | `\theta` |
|
|
132
|
+
| ι | Iota | 이오타 | iota | — | `\iota` |
|
|
133
|
+
| κ | Kappa | 카파 | kappa | — | `\kappa` |
|
|
134
|
+
| λ | Lambda | 람다 | lambda | — | `\lambda` |
|
|
135
|
+
| μ | Mu | 뮤 | mu | — | `\mu` |
|
|
136
|
+
| ν | Nu | 뉴 | nu | — | `\nu` |
|
|
137
|
+
| ξ | Xi | 크시 | xi | — | `\xi` |
|
|
138
|
+
| π | Pi | 파이 | pi | — | `\pi` |
|
|
139
|
+
| ρ | Rho | 로 | rho | — | `\rho` |
|
|
140
|
+
| σ | Sigma | 시그마 | sigma | — | `\sigma` |
|
|
141
|
+
| τ | Tau | 타우 | tau | — | `\tau` |
|
|
142
|
+
| υ | Upsilon | 입실론 | upsilon | — | `\upsilon` |
|
|
143
|
+
| φ | Phi | 파이 / 피 | phi | — | `\phi` |
|
|
144
|
+
| χ | Chi | 카이 | chi | — | `\chi` |
|
|
145
|
+
| ψ | Psi | 프사이 | psi | — | `\psi` |
|
|
146
|
+
| ω | Omega | 오메가 | omega | — | `\omega` |
|
|
147
|
+
| Γ | Uppercase Gamma | 대문자 감마 | Gamma | — | `\Gamma` |
|
|
148
|
+
| Δ | Uppercase Delta | 대문자 델타 | Delta | — | `\Delta` |
|
|
149
|
+
| Θ | Uppercase Theta | 대문자 세타 | Theta | — | `\Theta` |
|
|
150
|
+
| Λ | Uppercase Lambda | 대문자 람다 | Lambda | — | `\Lambda` |
|
|
151
|
+
| Ξ | Uppercase Xi | 대문자 크시 | Xi | — | `\Xi` |
|
|
152
|
+
| Π | Uppercase Pi | 대문자 파이 | Pi | — | `\Pi` |
|
|
153
|
+
| Σ | Uppercase Sigma | 대문자 시그마 | Sigma | — | `\Sigma` |
|
|
154
|
+
| Φ | Uppercase Phi | 대문자 파이 / 피 | Phi | — | `\Phi` |
|
|
155
|
+
| Ψ | Uppercase Psi | 대문자 프사이 | Psi | — | `\Psi` |
|
|
156
|
+
| Ω | Uppercase Omega | 대문자 오메가 | Omega | — | `\Omega` |
|
|
157
|
+
|
|
158
|
+
## Renderer availability
|
|
159
|
+
|
|
160
|
+
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.
|
package/SYMBOLS.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Symbol names / 기호 이름 목록
|
|
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).
|
|
4
|
+
|
|
5
|
+
| Symbol / 기호 | English / 영문 | Korean / 한글 |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| ∋ | Contains as an element | 원소를 포함 |
|
|
8
|
+
| ⊃ | Superset | 상위집합 |
|
|
9
|
+
| ⊇ | Superset or equal | 상위집합 또는 같음 |
|
|
10
|
+
| ⊈ | Not a subset or equal | 부분집합 아님 |
|
|
11
|
+
| ∖ | Set difference | 차집합 |
|
|
12
|
+
| ℕ | Natural numbers | 자연수 집합 |
|
|
13
|
+
| ℤ | Integers | 정수 집합 |
|
|
14
|
+
| ℚ | Rational numbers | 유리수 집합 |
|
|
15
|
+
| ℝ | Real numbers | 실수 집합 |
|
|
16
|
+
| ℂ | Complex numbers | 복소수 집합 |
|
|
17
|
+
| ⊥ | Perpendicular | 수직 |
|
|
18
|
+
| ∥ | Parallel | 평행 |
|
|
19
|
+
| ≅ | Congruent | 합동 |
|
|
20
|
+
| ∼ | Similar | 닮음 |
|
|
21
|
+
| ↦ | Maps to | 대응 |
|
|
22
|
+
| … | Ellipsis | 말줄임표 |
|
|
23
|
+
| ⋯ | Centered dots | 가로 점 |
|
|
24
|
+
| ⋮ | Vertical dots | 세로 점 |
|
|
25
|
+
| ⋱ | Diagonal dots | 대각 점 |
|
|
26
|
+
| ° | Degree | 도 |
|
|
27
|
+
| ∠ | Angle | 각 기호 |
|
|
28
|
+
| + | Plus | 더하기 |
|
|
29
|
+
| − | Minus | 빼기 |
|
|
30
|
+
| ± | Plus or minus | 플러스 마이너스 |
|
|
31
|
+
| ∓ | Minus or plus | 마이너스 플러스 |
|
|
32
|
+
| × | Times | 곱하기 |
|
|
33
|
+
| · | Dot | 가운데 점 |
|
|
34
|
+
| ÷ | Divide | 나누기 |
|
|
35
|
+
| = | Equal | 같음 |
|
|
36
|
+
| ≠ | Not equal | 같지 않음 |
|
|
37
|
+
| ≈ | Approximately equal | 근삿값 |
|
|
38
|
+
| ≡ | Equivalent | 동치 |
|
|
39
|
+
| < | Less than | 작음 |
|
|
40
|
+
| > | Greater than | 큼 |
|
|
41
|
+
| ≤ | Less than or equal | 작거나 같음 |
|
|
42
|
+
| ≥ | Greater than or equal | 크거나 같음 |
|
|
43
|
+
| ∝ | Proportional | 비례 |
|
|
44
|
+
| → | Right arrow | 오른쪽 화살표 |
|
|
45
|
+
| ← | Left arrow | 왼쪽 화살표 |
|
|
46
|
+
| ↔ | Left-right arrow | 양방향 화살표 |
|
|
47
|
+
| ⇒ | Implies | 함의 |
|
|
48
|
+
| ⇔ | If and only if | 필요충분 |
|
|
49
|
+
| ∈ | Element of | 원소 |
|
|
50
|
+
| ∉ | Not an element of | 원소 아님 |
|
|
51
|
+
| ∀ | For all | 모든 |
|
|
52
|
+
| ∃ | There exists | 존재 |
|
|
53
|
+
| ∪ | Union | 합집합 |
|
|
54
|
+
| ∩ | Intersection | 교집합 |
|
|
55
|
+
| ⊂ | Subset | 부분집합 |
|
|
56
|
+
| ⊆ | Subset or equal | 부분집합 또는 같음 |
|
|
57
|
+
| ∅ | Empty set | 공집합 |
|
|
58
|
+
| ∞ | Infinity | 무한대 |
|
|
59
|
+
| ∂ | Partial derivative | 편미분 |
|
|
60
|
+
| ∇ | Nabla | 나블라 |
|
|
61
|
+
| ∧ | Logical and | 논리곱 |
|
|
62
|
+
| ∨ | Logical or | 논리합 |
|
|
63
|
+
| ¬ | Logical not | 부정 |
|
|
64
|
+
| α | Alpha | 알파 |
|
|
65
|
+
| β | Beta | 베타 |
|
|
66
|
+
| γ | Gamma | 감마 |
|
|
67
|
+
| δ | Delta | 델타 |
|
|
68
|
+
| ε | Epsilon | 엡실론 |
|
|
69
|
+
| ζ | Zeta | 제타 |
|
|
70
|
+
| η | Eta | 에타 |
|
|
71
|
+
| θ | Theta | 세타 |
|
|
72
|
+
| ι | Iota | 이오타 |
|
|
73
|
+
| κ | Kappa | 카파 |
|
|
74
|
+
| λ | Lambda | 람다 |
|
|
75
|
+
| μ | Mu | 뮤 |
|
|
76
|
+
| ν | Nu | 뉴 |
|
|
77
|
+
| ξ | Xi | 크시 |
|
|
78
|
+
| π | Pi | 파이 |
|
|
79
|
+
| ρ | Rho | 로 |
|
|
80
|
+
| σ | Sigma | 시그마 |
|
|
81
|
+
| τ | Tau | 타우 |
|
|
82
|
+
| υ | Upsilon | 입실론 |
|
|
83
|
+
| φ | Phi | 파이 / 피 |
|
|
84
|
+
| χ | Chi | 카이 |
|
|
85
|
+
| ψ | Psi | 프사이 |
|
|
86
|
+
| ω | Omega | 오메가 |
|
|
87
|
+
| Γ | Uppercase Gamma | 대문자 감마 |
|
|
88
|
+
| Δ | Uppercase Delta | 대문자 델타 |
|
|
89
|
+
| Θ | Uppercase Theta | 대문자 세타 |
|
|
90
|
+
| Λ | Uppercase Lambda | 대문자 람다 |
|
|
91
|
+
| Ξ | Uppercase Xi | 대문자 크시 |
|
|
92
|
+
| Π | Uppercase Pi | 대문자 파이 |
|
|
93
|
+
| Σ | Uppercase Sigma | 대문자 시그마 |
|
|
94
|
+
| Φ | Uppercase Phi | 대문자 파이 / 피 |
|
|
95
|
+
| Ψ | Uppercase Psi | 대문자 프사이 |
|
|
96
|
+
| Ω | Uppercase Omega | 대문자 오메가 |
|
package/VALIDATION.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Validation report
|
|
2
|
+
|
|
3
|
+
Updated: 2026-09-07. Scope: independent math editor prototype, Korean/English UI, active-input rendering, model selection, wrapping and editable templates.
|
|
4
|
+
|
|
5
|
+
**Result:** 71 unit tests and 61 Chromium tests passed (132 total, no skipped tests). Package/demo builds and package/demo/browser-test type checks passed.
|
|
6
|
+
|
|
7
|
+
## Automated coverage
|
|
8
|
+
|
|
9
|
+
| Suite | Cases | Evidence |
|
|
10
|
+
|---|---:|---|
|
|
11
|
+
| Model | 7 | Structural insertion, operand boundaries, nested content, navigation, history and export |
|
|
12
|
+
| Suggestions | 16 | Longest symbolic triggers, bilingual aliases, replacements, degree symbols and grid presets |
|
|
13
|
+
| Matrix | 13 | Geometry, limits, row/column editing, nested slots, delimiters and KaTeX |
|
|
14
|
+
| Lines | 8 | Split/join, top-level navigation, aligned equations and cases |
|
|
15
|
+
| Tokens | 5 | Lexical roles, Unicode offsets and boundary affinity |
|
|
16
|
+
| Grid deletion | 4 | Empty/filled deletion, preserved content and undo |
|
|
17
|
+
| Ranges | 8 | Partial/reversed/multiline selection, clipboard validation, fresh IDs and wrapping |
|
|
18
|
+
| Locales/templates/catalog | 10 | Complete catalog label translation, bilingual candidate IDs, 7 template trees and all 90 symbols rendered with KaTeX |
|
|
19
|
+
| Chromium browser | 61 | Existing input flows plus language switching, translated controls, new template editing, nested wrapping and live preview |
|
|
20
|
+
|
|
21
|
+
Commands and setup are documented in the [README](./README.md). The package must be built before the demo/browser checks because the demo consumes `dist` exports. Type checks cover the package, demo and browser test sources. Production builds cover the package and demo.
|
|
22
|
+
|
|
23
|
+
The test helper activates passive tokens by clicking them before typing; it does not bypass the editor model. Pointer selection tests use real mouse movement. Most automated clipboard tests dispatch ClipboardEvent with DataTransfer payloads; they do not claim OS clipboard compatibility across applications.
|
|
24
|
+
|
|
25
|
+
## Manual in-app checks
|
|
26
|
+
|
|
27
|
+
Earlier checks in the current development session verified:
|
|
28
|
+
|
|
29
|
+
- Matrix input, row/column changes, deletion and undo with caret restoration.
|
|
30
|
+
- Multiline equations, aligned equations and cases with exported/live-rendered output.
|
|
31
|
+
- Fraction creation followed by actual Cmd+C/Cmd+V structured duplication and undo.
|
|
32
|
+
- Selecting `a+b`, wrapping as `(a+b)²`, wrapping the result into a fraction, and entering `30degree` in the denominator.
|
|
33
|
+
|
|
34
|
+
The in-app browser also verified the complete English demo/editor UI, quadratic-template insertion and live rendering, then a Korean-to-English switch preserving the inserted formula. Automated tests additionally verified undo retention, translated matrix controls and Korean aliases in English mode.
|
|
35
|
+
|
|
36
|
+
## Explicit limits
|
|
37
|
+
|
|
38
|
+
- Real OS Korean IME testing is deferred at the user's request. Synthetic composition events verify guarding and draft handling only.
|
|
39
|
+
- Automated browser coverage is Chromium on macOS. Narrow viewport checks are not mobile-browser or touch validation.
|
|
40
|
+
- Full screen-reader math navigation, high contrast, and every theme are not certified.
|
|
41
|
+
- There is no saved-document validator, persistence/restart-recovery test, migration path or host-wide undo integration.
|
|
42
|
+
- Rectangular matrix selections, keyboard model range extension, general LaTeX import and symbolic computation are not implemented.
|
|
43
|
+
- Deep nesting and very large expressions have no agreed performance budget yet.
|
|
44
|
+
|
|
45
|
+
## Integration gates
|
|
46
|
+
|
|
47
|
+
Before shipping inside a host product, test actual input methods and target browsers, establish a single undo owner, validate saved documents, verify focus across host/math boundaries, and define recoverable clipboard/import failures. Every new structure must have localized labels, deterministic transformations, one-step structural undo, browser interaction coverage and supported LaTeX output.
|
|
48
|
+
|
|
49
|
+
## Line numbers and symbol discovery
|
|
50
|
+
|
|
51
|
+
Three browser tests verify the UI-only line gutter through split/join/undo, its exclusion from LaTeX and model clipboard, the complete 90-symbol grid, bilingual search, insertion before typing, range replacement, undo, Escape and clipboard isolation in the search field. A native Home key did not move the caret in the macOS test environment; the test uses the supported Left arrow to reach the line start. The in-app browser visually confirmed the full symbol grid with names and search focus.
|
|
52
|
+
|
|
53
|
+
## Framework-neutral integration — 2026-09-07
|
|
54
|
+
|
|
55
|
+
- **76 unit tests passed**, including session snapshot isolation, navigation versus document notifications, atomic selection wrapping, inline rejection without data loss, and custom locale alias/fallback/direction behavior.
|
|
56
|
+
- **73 Chromium tests passed**: the previous 61 tests plus 12 native/adapter tests. The added cases mount real Vue and React components, a compiled Svelte 5 component, a Solid owner/directive, a Web Component and pure DOM surfaces. They verify fraction input, suggestion acceptance, undo, teardown, reconnect persistence, inline policy, external toolbar wrapping, custom French discovery and matrix row changes.
|
|
57
|
+
- Package and demo TypeScript checks, browser test type checking and both production builds passed. The adapter lab is also included in the production build.
|
|
58
|
+
- A packed tarball was extracted into a temporary directory. Five entry points (`core`, `dom`, `web-component`, `vue`, `svelte`) imported without framework peers or browser globals; main/React/Solid entries imported after installing links to only their relevant local peers. All eight JS export paths and declared CSS/type targets exist. This is a local packaging smoke test, not publication or an exhaustive downstream TypeScript/bundler matrix.
|
|
59
|
+
- The in-app browser visually verified the adapter lab and actual pure-JS `x/ → ↓ → Enter → 2` input, producing `\frac{x}{2}`. Inline mode displays without the block editor's large surface and toolbar.
|
|
60
|
+
|
|
61
|
+
Remaining adapter gates: exact range highlighting, active-input cross-structure dragging, token-level edit colors, composition preview parity, native all-symbol/context toolbars, reactive-option/version matrix and accessibility/browser coverage. Native `MathEditorSurface` is not advertised as complete rich React parity. OS IME testing remains deferred.
|
|
62
|
+
|
|
63
|
+
## Composition, source readability and JSON locales — 2026-09-08
|
|
64
|
+
|
|
65
|
+
- 81 unit tests pass. New coverage checks host Enter precedence, inline grid row editing, JSON key/parameter parity, JSON-only dynamic translations and regional fallback. The JSON registration example also passes a strict TypeScript check without a direction cast.
|
|
66
|
+
- The complete 77-case Chromium suite passed after the toolbar extraction, source/CSS formatting, locale migration and first four layout tests. The final layout suite adds English JSON page/editor coverage and passes all five cases (78 distinct browser cases across the suites).
|
|
67
|
+
- Package/demo build and type checks, browser-test type checking and the package `format:check` pass. The package build emits plain ESM locale modules from canonical JSON for runtime compatibility.
|
|
68
|
+
- Browser coverage verifies removal of the sample title strip, reset inside the toolbar, independent panel toggles without content loss or spurious onChange, inline completion, next-block creation, popup draft cancellation, mouse selection inside a modal and undoing popup apply as one source edit.
|
|
69
|
+
- The in-app browser visually confirmed the reduced sample header and the inline/Note-style layout examples. These examples do not claim installation into the actual Note/Word/Site/Slide products; their data/undo bridges and real OS IME coverage remain open.
|
|
70
|
+
|
|
71
|
+
## English message keys and literal-symbol ordering — 2026-09-08
|
|
72
|
+
|
|
73
|
+
83 unit tests pass, including an invariant that every library/demo locale message key is an English semantic identifier and both languages have matching keys. Literal-symbol ordering is covered for `/`, `^`, `*`, `sum` and `division` in Korean and English; uppercase Greek and matrix preset ordering are preserved.
|
|
74
|
+
|
|
75
|
+
All 78 distinct Chromium scenarios pass across the full run and corrected editing-suite rerun. The initial full run had one test-locator failure: the new assertion selected the page's language option instead of the suggestion list. Scoping it to the math listbox resolved that failure. Keyboard tests now explicitly choose Fraction after the leading ÷ candidate, and shared-adapter tests verify the same order. Build, type, formatting and packed export checks pass.
|
|
76
|
+
|
|
77
|
+
Earlier validation entries describe their historical default ordering. Current fraction input is `x/ → Down → Enter → 2`, or type `frac` / `분수` to find the structure directly.
|
|
78
|
+
|
|
79
|
+
## Key-only localization and external-language discovery — 2026-09-08
|
|
80
|
+
|
|
81
|
+
91 unit tests pass. New cases cover JSON-provided labels/details/aliases, matrix-family aliases, French regional fallback, shared localized slot paths, Japanese/Chinese/Arabic/Hindi/German queries, decomposed accents and template dimensions. Removed source-label conversion and formatting hooks are no longer part of the API.
|
|
82
|
+
|
|
83
|
+
79 distinct Chromium scenarios pass across the full suite and the five-case locale-suite rerun. The full run passed 78 cases; the new empty-fraction test initially expected denominator focus instead of the intended numerator-first behavior. The corrected test verifies both localized slots via Tab and converts a decomposed French query to a symbol. An earlier adapter-example variable-name collision was also fixed before this run.
|
|
84
|
+
|
|
85
|
+
Package/demo builds, package and browser-test type checks, formatting, and packed runtime/type/CSS exports pass. Built output is cleaned before compilation so removed modules cannot remain in the package. Language search fixtures are not complete translations or OS IME/RTL validation.
|