You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture/package-boundaries.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,9 +109,9 @@ The `superdoc` package currently exposes the following entries via `package.json
109
109
|`./super-editor`| Yes | Legacy public compatibility surface |`imports-sub-export.ts`| Was effectively public when no other headless path existed. `Editor`, `PresentationEditor`, `getStarterExtensions`, `Extensions`, `SuperToolbar`, `SuperConverter`, `DocxZipper` and most of the surface are now exported from `superdoc` itself. Kept exported, not advertised, migration target is `superdoc`. See Decision 1. |
110
110
|`./ui`| Yes | Public subpath |`imports-ui.ts`| Stays |
111
111
|`./ui/react`| Yes | Public subpath |`imports-ui-react.ts`| Stays |
|`./headless-toolbar`| Yes |Legacy public compatibility surface |`imports-headless-toolbar.ts`|Kept exported, not advertised. New custom UI integrations should use `superdoc/ui`. See Decision 4.|
113
+
|`./headless-toolbar/react`| Yes |Legacy public compatibility surface |`imports-headless-toolbar-react.ts`|Framework helper for the legacy headless toolbar. Migration target is `superdoc/ui/react`. See Decision 4.|
114
+
|`./headless-toolbar/vue`| Yes |Legacy public compatibility surface |`imports-headless-toolbar-vue.ts`|Framework helper for the legacy headless toolbar. New work that needs a Vue UI controller should track that as a separate decision; the legacy entry is kept compiling. See Decision 4.|
115
115
|`./converter`| Yes (SD-2953) | Legacy public compatibility surface |`imports-converter.ts`| DOCX conversion is also reachable through `Editor.open` / `Editor.loadXmlData` / `SuperConverter` exported from `superdoc`. Kept exported, not advertised, migration target is `superdoc`. Types added in SD-2953 to satisfy strict-mode consumers. |
116
116
|`./docx-zipper`| Yes (SD-2953) | Legacy public compatibility surface |`imports-docx-zipper.ts`|`DocxZipper` is exported from `superdoc`. Kept exported, not advertised, migration target is `superdoc`. Types added in SD-2953. |
117
117
|`./file-zipper`| Yes (SD-2953) | Legacy public compatibility surface |`imports-file-zipper.ts`|`createZip` is exported from `superdoc`. Kept exported, not advertised, migration target is `superdoc`. Types added in SD-2953. |
@@ -182,7 +182,20 @@ The relocation pattern is what `superdoc` currently uses for several internal-bu
182
182
183
183
**Context.**`./converter`, `./docx-zipper`, `./file-zipper` are exported subpaths whose functionality (DOCX conversion, zipping) is also reachable through `superdoc`'s main entry: `Editor.open`, `Editor.loadXmlData`, `SuperConverter`, `DocxZipper`, `createZip` are all exported from `superdoc`.
184
184
185
-
**Decision.** All three subpaths are classified as **legacy public compatibility surface**. Migration target is `superdoc` itself (the symbols already exist there). We keep them exported, stop advertising them, and point new use at `superdoc`. SD-2953 added `types` fields and matrix fixtures so strict-mode consumers no longer hit TS7016; the export-coverage audit (`check-export-coverage.cjs`) now enforces that every `package.json` exports entry carries types, an asset classification, or a documented runtime-only allowlist entry.
185
+
`./headless-toolbar` is the same shape with a different migration target: the next-generation custom UI story is `superdoc/ui` and `superdoc/ui/react` (the typed UI controller). Existing consumers of the headless-toolbar surface keep compiling; new integrations should use the UI controller entries.
186
+
187
+
**Decision.**`./converter`, `./docx-zipper`, `./file-zipper`, and the `./headless-toolbar` family (`./headless-toolbar`, `./headless-toolbar/react`, `./headless-toolbar/vue`) are classified as **legacy public compatibility surface**.
188
+
189
+
| Subpath | Migration target |
190
+
| --- | --- |
191
+
|`./converter`|`SuperConverter` from `superdoc`|
192
+
|`./docx-zipper`|`DocxZipper` from `superdoc`|
193
+
|`./file-zipper`|`createZip` from `superdoc`|
194
+
|`./headless-toolbar`|`superdoc/ui`|
195
+
|`./headless-toolbar/react`|`superdoc/ui/react`|
196
+
|`./headless-toolbar/vue`| Track a Vue UI controller as a separate decision; the legacy entry is kept compiling. |
197
+
198
+
We keep them exported, stop advertising them, and point new use at the migration target. SD-2953 added `types` fields and matrix fixtures so strict-mode consumers no longer hit TS7016; the export-coverage audit (`check-export-coverage.cjs`) now enforces that every `package.json` exports entry carries types, an asset classification, or a documented runtime-only allowlist entry. SD-3179 lands the source-side facade for `./headless-toolbar` under `packages/superdoc/src/public/legacy/` and extends SD-3176's no-growth snapshot list to cover `./headless-toolbar`, `./headless-toolbar/react`, and `./headless-toolbar/vue` so these subpaths cannot expand silently.
console.error(' A command (setBold or insertComment) does not return `boolean` through the facade.');
156
-
console.error(' This is the SD-2965 regression vector: specific command signatures were dropped or failed to flow through the facade, and EditorCommands fell back to the `AnyCommand` indexer.');
console.error(' A command (setBold or insertComment) does not return `boolean` through the facade.');
194
+
console.error(' This is the SD-2965 regression vector: specific command signatures were dropped or failed to flow through the facade, and EditorCommands fell back to the `AnyCommand` indexer.');
0 commit comments