Commit 650fc10
authored
feat(superdoc): deprecate ProseMirror internals and editor commands (SD-2434) (#2674)
* feat(superdoc): deprecate ProseMirror internals and editor commands in public API (SD-2434)
Add soft deprecation layer to steer consumers toward the Document API
(editor.doc) ahead of the planned ProseMirror removal:
- Add @deprecated JSDoc to editor.state, editor.view, editor.schema,
editor.commands, editor.chain(), editor.can(), editor.dispatch()
- Add @deprecated to ProseMirror and command type re-exports from both
super-editor and superdoc packages
- Wrap editor instances at consumer boundary (onEditorCreate callback)
with a Proxy that emits one-time runtime deprecation warnings
- Internal code paths are unaffected — Proxy only applies at the
broadcastEditorCreate/broadcastEditorBeforeCreate boundary
* docs: add deprecation notices for ProseMirror internals and editor commands (SD-2254)
- Update ProseMirror migration guide with deprecation warnings and
Document API examples as the recommended alternative
- Add deprecation banner to editor commands section in methods.mdx
- Update AGENTS.md to recommend Document API for programmatic access
instead of editor.commands
* docs: hide extensions section from nav and add gap analysis (SD-2254)
- Remove Extensions group from docs.json navigation
- Add hidden: true frontmatter to all 57 extension pages (still
accessible via direct URL for existing users)
- Add EXTENSION-TO-DOCAPI-GAPS.md mapping all 66 extension commands
that lack Document API equivalents, categorized by priority
* fix(superdoc): bind proxy reads to target for private field compatibility (SD-2434)
Use Reflect.get with target instead of receiver so Editor getters that
access private fields (#commandService, #documentApi, etc.) work
correctly through the deprecation proxy. Also bind returned methods to
the target instance.
* fix(superdoc): cache bound functions in proxy and add unit tests (SD-2434)
- Cache bound functions in a WeakMap so repeated method access through
the deprecation proxy returns the same reference (preserves identity)
- Add 18 unit tests covering warnOnce deduplication, deprecated/
non-deprecated property access, function binding, guard clauses,
double-wrap prevention, and unwrapEditor round-tripping
* docs: restructure navigation for developer experience (SD-2254)
Reorganize docs sidebar to match how developers think:
- Rename "Modules" → "Features" and move theming/fonts there
- Promote Document API to top-level section (was nested under
Document Engine)
- Promote AI Agents to top-level (was nested under Document Engine)
- Dissolve "Document Engine" — SDKs and CLI become "SDKs & Tools"
- Rename "Core" → "API Reference" and move to bottom
- Add MCP Server to AI Agents nav (was only reachable via subpage)
- Remove fonts/theming from Getting Started (now under Features)
- Keep Resources as standalone section
No file moves — navigation-only restructure. URLs unchanged.
* Revert "docs: restructure navigation for developer experience (SD-2254)"
This reverts commit a969086.
* chore: remove gap analysis doc from repo (SD-2434)
* docs: add commands-to-Document API migration guide (SD-2254)
- Write migration guide mapping editor.commands patterns to editor.doc
equivalents (formatting, comments, track changes, tables, lists, etc.)
- Add guide to docs navigation under Migration section
- Update deprecation runtime warning URL to point to migration guide
- Tighten prosemirror migration guide voice to match brand guidelines
* docs: remove emojis from migration guide code comments (SD-2254)
Replace emoji markers in code examples with plain text labels to
align with brand voice guidelines.1 parent d0aa2cb commit 650fc10
69 files changed
Lines changed: 653 additions & 79 deletions
File tree
- apps/docs
- core/supereditor
- extensions
- guides/migration
- packages
- super-editor/src
- editors/v1/core
- superdoc
- src
- composables
- core
- helpers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 160 | | |
224 | 161 | | |
225 | 162 | | |
| |||
266 | 203 | | |
267 | 204 | | |
268 | 205 | | |
| 206 | + | |
269 | 207 | | |
270 | 208 | | |
271 | 209 | | |
| |||
0 commit comments