Skip to content

Commit 650fc10

Browse files
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

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/core/supereditor/methods.mdx

Lines changed: 4 additions & 0 deletions

apps/docs/docs.json

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -157,69 +157,6 @@
157157
"modules/whiteboard"
158158
]
159159
},
160-
{
161-
"group": "Extensions",
162-
"pages": [
163-
"extensions/overview",
164-
{
165-
"group": "All",
166-
"pages": [
167-
"extensions/block-node",
168-
"extensions/bold",
169-
"extensions/bookmarks",
170-
"extensions/bullet-list",
171-
"extensions/color",
172-
"extensions/content-block",
173-
"extensions/custom-selection",
174-
"extensions/document",
175-
"extensions/document-index",
176-
"extensions/dropcursor",
177-
"extensions/font-family",
178-
"extensions/font-size",
179-
"extensions/footnote",
180-
"extensions/format-commands",
181-
"extensions/gapcursor",
182-
"extensions/heading",
183-
"extensions/highlight",
184-
"extensions/history",
185-
"extensions/image",
186-
"extensions/italic",
187-
"extensions/line-break",
188-
"extensions/line-height",
189-
"extensions/link",
190-
"extensions/linked-styles",
191-
"extensions/list-item",
192-
"extensions/mention",
193-
"extensions/noderesizer",
194-
"extensions/ordered-list",
195-
"extensions/page-number",
196-
"extensions/paragraph",
197-
"extensions/permission-ranges",
198-
"extensions/placeholder",
199-
"extensions/popover-plugin",
200-
"extensions/run-item",
201-
"extensions/search",
202-
"extensions/shape-container",
203-
"extensions/shape-textbox",
204-
"extensions/context-menu",
205-
"extensions/strike",
206-
"extensions/structured-content",
207-
"extensions/tab",
208-
"extensions/table",
209-
"extensions/table-cell",
210-
"extensions/table-header",
211-
"extensions/table-of-contents",
212-
"extensions/table-row",
213-
"extensions/text-align",
214-
"extensions/text-indent",
215-
"extensions/text-style",
216-
"extensions/text-transform",
217-
"extensions/track-changes",
218-
"extensions/underline"
219-
]
220-
}
221-
]
222-
},
223160
{
224161
"group": "Solutions",
225162
"pages": [
@@ -266,6 +203,7 @@
266203
{
267204
"group": "Migration",
268205
"pages": [
206+
"guides/migration/document-api",
269207
"guides/migration/prosemirror",
270208
"guides/migration/breaking-changes-v1",
271209
"guides/migration/typescript-migration",

apps/docs/extensions/block-node.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/bold.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/bookmarks.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/bullet-list.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/color.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/comments.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/content-block.mdx

Lines changed: 1 addition & 0 deletions

apps/docs/extensions/context-menu.mdx

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)