components/wordnav
실험과 기능 검증 · 64 / 64

WordNav

ui.widgets.Textarea

문자 체계를 넘나드는 단어 단위 커서 이동.

BEHAVIOR CONTRACT

단어 이동은 Unicode 단어 경계를 따르며 그리스 문자, 키릴 문자, 이모지를 넘나듭니다.

RECORDED INTERACTION

harness가 ⌥←로 단어 단위 이동을 합니다.

examples/storybook/stories.zig:4575
pub fn buildWordNav(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 12);
    try c.appendChild(a, try label(cx, "Word navigation — Alt+←/→ jumps whole Greek/Cyrillic words; double-click selects the word; family emoji is one cluster"));

    const ta = try W.Textarea(.{
        .label_text = "Mixed-script sample",
        .value = WORDNAV_TEXT,
        .rows = 3,
        .width = 560,
    }).mount(scope, cx);
    ta.meta.ownership.meta.test_id = "story.wordnav.ta";
    try c.appendChild(a, ta);

    try c.appendChild(a, try label(cx, "Expected Alt+Right stops (byte offsets): 7 14 27 34 40 46 72 75"));
    return c;
}
GitHub에서 소스 보기examples/storybook/stories.zig:4575

Storybook에 있는 이 story의 원본 코드입니다(zenit 5f9add5+wip 2026-09-30). W는 ui.widgets이며, col / row / label은 Storybook 내부의 작은 레이아웃 헬퍼입니다.

zenit · 이중 라이선스오픈 소스 프로젝트는 GPL-3.0-only로 무료 사용할 수 있으며, 비공개 소스나 상용 제품에는 상용 라이선스가 필요합니다.작성자 연락처: zongyi.xzy#gmail.com (#을 @로 바꾸세요)zenit 5f9add5+wip 2026-09-30