Luthor Maintainer Notes
Luthor Maintainer Notes
Section titled “Luthor Maintainer Notes”Maintainer-focused notes for @lyfie/luthor contributors.
Ownership boundaries
Section titled “Ownership boundaries”- New Lexical-derived feature implementations should live in
@lyfie/luthor-headlessfirst. @lyfie/luthorshould compose and re-export headless capabilities through preset UX.- Avoid introducing direct, preset-only Lexical logic unless it is strictly UI composition glue.
Core invariants
Section titled “Core invariants”core/types.tsis the contract between extension capability and UI components.core/commands.tsis the canonical command metadata source for keyboard, palette, and slash command consistency.presets/extensive/extensions.tsxis the single source for extensive preset extension stack defaults.presets/extensive/ExtensiveEditor.tsxis the runtime integration shell and should remain compositional.
Extension composition guidance
Section titled “Extension composition guidance”When adding capabilities to the extensive preset:
- Add/extend the headless extension first (if capability is missing).
- Wire extension config in
presets/extensive/extensions.tsx. - Update toolbar controls in
core/toolbar.tsxonly when UX needs new actions. - If command palette/slash exposure is needed, update
core/commands.ts. - Update docs:
documentation/developer/luthor/source-file-reference.mddocumentation/user/luthor/presets-and-configuration.md- package README files if public API changes.
Known implementation trade-offs
Section titled “Known implementation trade-offs”- Some extension configuration is currently mutated via casts (
as any) for flexibility. - Browser APIs (
document,window,URL.createObjectURL) are used in UI modules; SSR consumers require guards. - Global keyboard listeners can conflict with host-app shortcuts if not scoped.
- Source-mode transitions intentionally block on invalid user source input.
Release checklist for luthor package
Section titled “Release checklist for luthor package”- Build and lint pass from workspace root:
pnpm --filter @lyfie/luthor buildpnpm --filter @lyfie/luthor lint
- Validate preset docs and README links.
- Ensure any new exported APIs are listed in:
packages/luthor/README.mddocumentation/developer/luthor/source-file-reference.md
Related
Section titled “Related”- Architecture: architecture.md
- Source file reference: source-file-reference.md
- Extensive preset user guide: ../../user/luthor/extensive-editor.md