diff --git a/Makefile b/Makefile
index 9f2fae3..0b6656e 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,10 @@ examples-upload:
examples-build:
cd $(BITEXT) && npm run build
+.PHONY: dev
+dev:
+ cd bitext && npm run dev
+
.PHONY: agentsmd
agentsmd:
- curl -fsSL https://raw.githubusercontent.com/dani-polani/agents-init/main/install.sh | sh
+ curl -fsSL https://raw.githubusercontent.com/dani-polani/agents-init/main/install.sh | sh
\ No newline at end of file
diff --git a/bitext/src/app.css b/bitext/src/app.css
index d43f4d8..d3aa592 100644
--- a/bitext/src/app.css
+++ b/bitext/src/app.css
@@ -344,6 +344,23 @@ html {
pointer-events: none;
}
+/* Pinned-group color badges: a top layer (above words and the connector layer, which Bauhaus
+ drops below the words) so the badges stay visible and clickable under every style. */
+.preview-badge-layer {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ pointer-events: none;
+ z-index: 3;
+ overflow: visible;
+}
+
+.preview-badge-layer .pin-badge {
+ pointer-events: auto;
+ cursor: pointer;
+}
+
path.link-path {
pointer-events: none;
transition: stroke-width 0.12s ease;
diff --git a/bitext/src/lib/api/align.test.ts b/bitext/src/lib/api/align.test.ts
index 4f63a07..5f14e3b 100644
--- a/bitext/src/lib/api/align.test.ts
+++ b/bitext/src/lib/api/align.test.ts
@@ -179,8 +179,8 @@ describe('buildAlignUrl', () => {
});
it('keeps periods inside gloss tokens when tokenSplitChars omits the dot', () => {
- // With default ".-|", "1SG.NOM" would split into two tokens. With "-|" it stays one,
- // so word index 1 of the gloss line is "go.PST.IPFV" and the connection resolves.
+ // If "." were a separator, "1SG.NOM" would split into two tokens. With "-|" the dot is
+ // not a separator, so it stays one and word index 1 is "go.PST.IPFV" — the connection resolves.
const result = buildAlignUrl(ORIGIN, {
lines: ['1SG.NOM go.PST.IPFV', 'Я ходил'],
alignments: [
@@ -197,16 +197,14 @@ describe('buildAlignUrl', () => {
expect(c?.upperTokenId).toBe('l0-1');
});
- it('rejects gloss word index that only resolves under the default split chars', () => {
- // Under default ".-|", "1SG.NOM PST.IPFV" has 4 tokens, so word 3 exists.
- // We do NOT pass tokenSplitChars here, proving the dot still splits by default.
+ it('rejects a gloss word index that only existed under the old dot-splitting default', () => {
+ // The default is now "|"; the dot no longer splits. "1SG.NOM PST.IPFV" has 2 tokens,
+ // so word index 3 (which existed only when "." split by default) is out of range.
const result = buildAlignUrl(ORIGIN, {
lines: ['Я ходил', '1SG.NOM PST.IPFV'],
alignments: [[0, 1, 1, 3]]
});
- if (!('url' in result)) throw new Error('expected url');
- const state = decodeState(new URL(result.url).searchParams.get('data'));
- expect(state.project.connections[0]!.lowerTokenId).toBe('l1-3'); // "IPFV"
+ expect('err' in result).toBe(true);
});
it('rejects invalid tokenMergeChar (more than one character)', () => {
diff --git a/bitext/src/lib/api/align.ts b/bitext/src/lib/api/align.ts
index cd1cbd3..daf1828 100644
--- a/bitext/src/lib/api/align.ts
+++ b/bitext/src/lib/api/align.ts
@@ -39,7 +39,7 @@ export interface LineInput {
/** Global visual settings overrides. All fields optional; unset fields inherit defaults. */
export interface SettingsInput {
/** Color palette for connection lines. */
- palette?: 'pastel' | 'vivid' | 'academic';
+ palette?: 'pastel' | 'vivid';
/** Connection line shape. */
lineStyle?: 'straight' | 'curved';
/** Connection line thickness (1–8). */
diff --git a/bitext/src/lib/components/editor-shell/EditorPanels.svelte b/bitext/src/lib/components/editor-shell/EditorPanels.svelte
new file mode 100644
index 0000000..3e6fde8
--- /dev/null
+++ b/bitext/src/lib/components/editor-shell/EditorPanels.svelte
@@ -0,0 +1,14 @@
+
+
+{#if editorShellStore.tab === 'text'}
+
- 0% = every line uses one size · 100% = each line is sized on its own -
-- Preview, editor chips, and exports when enabled -
-Apply link color to
-- New links pick the next unused color from the palette. Changing the palette recolors every - existing link. -
-+
Upload font files once; they are stored in your browser. In the editor, set each line to Custom and pick the family name here.
diff --git a/bitext/src/lib/components/settings/LinguisticsTab.svelte b/bitext/src/lib/components/settings/LinguisticsTab.svelte deleted file mode 100644 index bd29197..0000000 --- a/bitext/src/lib/components/settings/LinguisticsTab.svelte +++ /dev/null @@ -1,154 +0,0 @@ - - -+
Copy a link with your alignment in the URL, or share to social media.
{#if browser} @@ -89,16 +88,14 @@+ Download +
++ Share +
++ New links pick the next unused color. Changing the palette recolors existing links. +
+ ++ 0% = every line uses one size · 100% = each line is sized on its own +
++ Soft limit: {MAX_LINES} lines — consider simplifying for shorter share links. +
+ {/if} ++ How text turns into linkable words. Applies to every line. +
+- See exactly which word matches which across stacked lines. Add rows for glosses or IPA if - you need them, click a word then its match on the line above or below, and export or share - the diagram, great for lessons, posts, or conlang notes. -
-- Created by - Dani. See other - tools for linguistics and conlanging. -
-
+
+
-
- - + {:else} + +
-Free · runs in your browser
++ A free, browser-based tool for drawing word-to-word and morpheme-to-morpheme links between + stacked lines of text: bilingual glosses, interlinear annotations, classroom handouts, and + social posts. Everything runs in your browser; your sentences are not stored on our servers + unless you choose to share them. +
+ -- {DISPLAY_NAME} is a free, - browser-based tool for drawing word-to-word and morpheme-to-morpheme links between stacked lines of - text such as bilingual glosses, interlinear annotations, classroom handouts, and social posts. Everything - runs in your browser; your sentences are not stored on our servers unless you choose to share them. -
+A short walkthrough of building an alignment from scratch.
+On this page
- -How it works
++ {step.body} +
+- You can add several lines (for example source, IPA, glosses, and a free translation). Each line - has its own font (Google Fonts or an uploaded file), text size, horizontal spacing between - words, and optional right-to-left layout for scripts such as Hebrew or Arabic. Lines can be - reordered so that only adjacent rows are - linkable — - {DISPLAY_NAME} always links the line above to the line directly below it. Open a line’s popover for - quick typography controls, or the full - Edit line - dialog to change text and see a live preview of how it splits into word boxes. -
-- Click tokens to create colored alignment links. Many-to-many groupings share one color so you - can see which tokens belong to the same correspondence. For each pair of adjacent lines you can - adjust the vertical gap and optionally hide the connector curves - while keeping the links in the data model — useful when a gloss row sits tight under a sentence. The - preview supports a clean “hide chrome” mode and fullscreen for screenshots. -
-The diagram
++ Each sentence keeps its own line and the connectors draw between them, so reordering, + splits, and dropped words stay obvious instead of being flattened into a stacked gloss. +
+- The settings panel uses icons for four areas. What each one does in plain language: -
-| or
- - when you need morpheme boundaries); set a
- join character so two written words still
- count as one box for linking (shown with a space in the preview); and optionally split punctuation
- into its own boxes or limit which punctuation splits.
- - The short summary next to the line editor (“Whitespace splits words…”) mirrors the same rules as - the Tokens tab; use the gear button there to jump straight to those controls. -
-Features
++ {feature.body} +
+
- Download the visualization as PNG, SVG, PDF,
- or a self-contained HTML file. You can
- also build a share link: the full project
- and visual settings are encoded in the
- ?data=
- URL parameter so anyone who opens the link sees the same alignment. The Share dialog adds a QR code,
- social targets, and a Data object action for
- JSON shaped like a curated preset (useful for authors and debugging).
-
A closer look
+
+
+ - Use Load example on the main page to open curated - projects (simple bilingual pair, Turkish interlinear with IPA and glosses, Hebrew and Arabic with - English, Tagalog compounds, Japanese–Chinese–English, and more). They illustrate RTL, multi-line stacks, - and tricky word-splitting cases. The clips below are the same motion demos as on the home page: linking - in the editor, and a conlang layout with a custom font and glosses. -
-
+
+ Examples
++ The gallery covers bilingual pairs, interlinear stacks, right-to-left scripts, and tricky + word-splitting cases. Open any one in the editor and adapt it. +
+Origin
+
+ + Word Aligner started in the conlang community. People who invent languages like to post + word-by-word breakdowns of a sentence to show how the grammar works, and there was no real + tool for it. They lined up words and drew arrows by hand in Paint or PowerPoint, in + whatever was open. It looked rough and took an afternoon. +
++ So this became a single editor: type two lines, click a word and then its match, and a + connector draws itself. Add a gloss or an IPA row, use a custom font for your script, and + export a clean image or share the link. It caught on in the conlang subreddit first, then + language teachers and linguists picked it up for the same reason. Seeing which word became + which is useful well beyond conlanging. +
- {DISPLAY_NAME} stays free and without aggressive ads. Hosting and ongoing upkeep still have a cost, - so I add a few optional partner links. Use them if you were already considering the service, it helps - keep the site running. The referral bonuses come from the provider. These are services I use myself. -
-+ {DISPLAY_NAME} stays free and without aggressive ads. Hosting and ongoing upkeep still have a cost, + so I add a few optional partner links. Use them if you were already considering the service, it + helps keep the site running. The referral bonuses come from the provider. These are services I use + myself. +
+- {DISPLAY_NAME} is built by Dani Polani — a fantasy author, the creator of the constructed language - Lemu Teloku, and a maker of tools for conlangers and linguists. A psychologist and linguist by training - and a self-taught developer, Dani builds small, focused tools and likes automating the tedious parts. -
-- The same attention to interlinear glosses and Leipzig-style conventions that goes into - documenting a constructed language shaped this tool. Alongside the language work there is a - wider creative world — drawings, an encyclopedia of Lemu Teloku and its setting, and other - handmade art projects. Offline, Dani is fond of literature, nineteenth-century technology, cats, - and seals. -
-- More of Dani's work and tools: - - danipolani.github.io - . -
++ {DISPLAY_NAME} is built by Dani Polani, a fantasy author, the creator of the constructed language + Lemu Teloku, and a maker of tools for conlangers and linguists. A psychologist and linguist by + training and a self-taught developer, Dani builds small, focused tools and likes automating the + tedious parts. +
++ The same attention to interlinear glosses and Leipzig-style conventions that goes into + documenting a constructed language shaped this tool. Alongside the language work there is a + wider creative world of drawings, an encyclopedia of Lemu Teloku and its setting, and other + handmade art projects. Offline, Dani is fond of literature, nineteenth-century technology, + cats, and seals. +
++ More of Dani's work and tools: + + danipolani.github.io + . +
+
- Questions or feedback about {DISPLAY_NAME}:
- {SITE_CONTACT_EMAIL}
- ·
-
+ Questions or feedback about {DISPLAY_NAME}:
+ {SITE_CONTACT_EMAIL}
+ ·
+
- We do not run accounts or store your text on our infrastructure. Details on analytics, feedback, - and fonts are in the - privacy policy. -
++ We do not run accounts or store your text on our infrastructure. Details on analytics, + feedback, and fonts are in the + privacy policy. +
++ No account, no machine translation. Open the editor and link two words to see how it feels. +
+ +
+
- New to the notation? Start with the - glossing abbreviations cheat sheet, then open any example below in the editor. -
-
+
{guide.blurb}
-Let your AI assistant build these diagrams from a plain request, on the same open API.
-Mobile-first concept
+A redesign for phones, where most people already use Word Aligner. Type two lines, connect words with a tap, and the result looks finished before you touch a single setting. The controls that used to confuse people are still here, just folded away until you want them.
+ +Rarely needed. The defaults above already produce a clean diagram.
+ + + +Why rework it
+Word Aligner works, and the recent auto-fit and pinch-zoom already fixed the worst of the output. What is left is the shape of the screen. The editor sits inside a long marketing scroll, so the controls that change the diagram live far below the diagram itself.
+Settings, style, and export stack below the preview and the examples. To change a color you scroll past the whole diagram, then scroll back to check the result. On a phone that is a lot of thumb travel for one small change.
+Style, Colors, Tokens, and Fonts sit behind four unlabeled icons. People do not know which one holds the setting they want, so the fine-tuning reads as intimidating rather than optional.
+Connecting words is tap-then-tap, which is good. But nothing on screen teaches it, the word targets are small, and removing a thread means hitting a thin line. First-timers guess.
+Editor, preview, settings, export, and share are five separate blocks in a column. There is no one place that says "this is where you make the picture."
+The new shape
+The diagram fills the screen and stays put. A bottom bar holds the three things you actually do, and each opens a sheet that slides up over the lower canvas so you always see the effect of a change. Export is the one primary action, kept in the top bar.
+Write or paste the two lines. Comfortable full-width fields, reorder by arrows, mark right-to-left, add a line.
+The canvas is live. Tap a word, then tap its match on the next line. A banner echoes the pinned word so the next step is obvious.
+Theme, palette, light or dark, straight or curved. Only choices that always look good. The confusing controls sit behind one "Fine-tune" row.
+Rarely needed. The defaults already produce a clean diagram.
+ + +Protection from a careless run
+The goal you set: someone types junk without understanding the tool and still gets something worth sharing. That is a design property, not a hope. It comes from what the interface refuses to let go wrong.
+The canvas opens on a real, connected example. The first thing a new user sees is a finished diagram, so they copy the pattern instead of facing an empty box.
+Auto-fit shrinks any line to a single row. A 200-character paste does not wrap, overflow, or break the threads. It just gets smaller and stays readable.
+Style, palette, background, and thread shape are the only always-visible choices. Every combination is curated to look designed. The controls that can make a mess are behind Fine-tune.
+Words carry padded hit areas, threads delete through a popover, and every button clears 44px. Fewer mis-taps means fewer accidental, ugly edits to undo.
+Decisions and why
+| Decision | Reasoning |
|---|---|
| Canvas-first app shell, not a marketing scroll | The diagram is the product. On a phone it should own the screen, with the SEO and marketing content kept on separate routes below or off the editor entirely. |
| Three labeled modes in a bottom bar: Text, Link, Style | Three verbs match what people do. A bottom bar is the natural thumb zone and the labels remove the guesswork of four unnamed icon tabs. |
| Link is the default mode | Connecting words is the core loop and the part people find least obvious. Landing there, with a teaching banner, puts the main gesture front and center. |
| Controls open as sheets over the lower canvas | You see the change while you make it. No scrolling away from the diagram to reach a slider and back to check it. |
| Export is the single primary action, kept in the top bar | One clear call to action per screen. Export is the outcome, so it stays visible and distinct from the three editing modes. |
| Fine-tuning folded behind one disclosure | Thickness, opacity, spacing, tokenization, and fonts matter to a few users and confuse the rest. Progressive disclosure serves both without a mode of their own. |
| Start on a real example | An empty editor invites bad first attempts. A working diagram is a template people edit toward, which raises the floor on output quality. |
| Bigger link and delete targets | Touch accuracy drives error rate. Padded words and a thread popover cut accidental edits, which is most of what makes a diagram look careless. |
Nothing is lost
+The redesign relocates features, it does not drop them. Each capability that exists today has a clear home in the new shape.
+Scaling up
+The same model widens cleanly. The canvas takes the center, and the three modes dock as a persistent right rail instead of sliding sheets. Nothing is relearned moving between phone and desktop.
+