feat(editor): wire host to plugin SDK v0.1 - #61
Merged
Conversation
Adopt `@swarmnote/editor-core` v0.1 plugin SDK in the SwarmNote host: - `NoteEditor.tsx` constructs `plugins[]` from preferences snapshot (`buildEditorPlugins`); `host` object replaces deprecated top-level `imageResolver` / `uploadFile` - `refreshBlockImagesEffect` now imported from `@swarmnote/editor-core/plugins/blockImage` subpath (main entry no longer re-exports it) Preferences: - `preferencesStore` adds `enabledPlugins: EditorPluginId[]` (defaults to all 8 enabled) and `codeBlockMode`. `migrateLegacyFeatures` defensively translates v0.0.x `features.*` keys and clears them (idempotent) - New "编辑器插件" section in `routes/settings/general.tsx` lists per-plugin Switch + codeBlock mode Select i18n: 21 new English strings backfilled in `src/locales/en/messages.po`. Documentation: - `dev-notes/plans/editor-plugin-architecture.md` marked as implemented; v0.1 BREAKING change summary appended as release-notes / PR description source - `dev-notes/knowledge/editor.md` gains a Plugin SDK section with the key constraints (subpath imports, host capabilities, boot-time freeze) BREAKING CHANGE: Editor `features` 7 fields removed upstream in `@swarmnote/editor-core` v0.1; capability enablement now lives in `plugins[]`. v0.0.x preferences containing `features.*` keys are auto-migrated via `migrateLegacyFeatures`. Refs: OpenSpec change `add-editor-plugin-sdk-v01`; pairs with sibling commit 37db01c.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wire SwarmNote desktop host to
@swarmnote/editor-corev0.1 plugin SDK:host: EditorHostCapabilitiesinstead of legacy top-levelimageResolver/uploadFileplugins: []EditorFeatureTogglesflags now superseded by plugin opt-inDepends on sibling PR
swarm-apps/swarmnote-editor#2(feat/plugin-sdk-v0.1).Commits
0dfa1e8— feat(editor): wire host to plugin SDK v0.1Cross-repo refs
swarm-apps/swarmnote-editor#2(commit37db01c)Merge order
swarm-apps/swarmnote-editor#2→ sibling mainfeat/use-editor-react(depends on this) → developTest plan
pnpm build(Vite) passespnpm lint:cipasses