Skip to content

feat(mention): add @mention plugin with async query and live-preview …#126

Open
asdasd123-w wants to merge 1 commit into
floatboatai:mainfrom
asdasd123-w:feat/mention/add-plugin-mention
Open

feat(mention): add @mention plugin with async query and live-preview …#126
asdasd123-w wants to merge 1 commit into
floatboatai:mainfrom
asdasd123-w:feat/mention/add-plugin-mention

Conversation

@asdasd123-w

Copy link
Copy Markdown

Summary

Introduces @floatboat/nexus-plugin-mention, a headless mention plugin for Nexus-Editor.

Motivation

What's included

File Purpose
src/index.ts Public API: createMentionPlugin() factory
src/mention-types.ts Strict TypeScript types
src/mention-ast.ts remark plugin for [@name](id)mention node
src/mention-extension.ts CM6 ViewPlugin: trigger detection, floating menu
src/mention-menu.ts Headless DOM builder with full ARIA
src/mention-widget.ts Live-preview chip widget
tests/*.test.ts Vitest unit + integration tests
openspec/.../proposal.md OpenSpec design doc

Features

  • Trigger-based: type @ to open menu
  • Async query: debounced with AbortController cancellation
  • Keyboard navigation: ↑ ↓ Enter Esc Tab
  • ARIA accessible: role="listbox", aria-selected, aria-activedescendant
  • Headless: zero built-in CSS
  • AST round-trip: [@name](id)mention mdast node
  • Live preview: styled chips when cursor is away

Backwards Compatibility

Fully additive. No breaking changes.

AI Disclosure

Portions of this PR were generated with AI assistance and manually reviewed for correctness, style consistency, and test coverage.

…widget

- Add plugin-mention package with headless floating menu
- Extend mdast with mention node type via remark plugin
- Provide CM6 ViewPlugin for @-trigger detection and keyboard navigation
- Add live-preview widget for rendered mention chips
- Include full test coverage and OpenSpec proposal

Closes roadmap item floatboatai#20 (prerequisite for shared comments / @mention)
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants