feat(types): legacy headless-toolbar public facade entry (SD-3179)#3359
Merged
caio-pizzol merged 1 commit intoMay 17, 2026
Merged
Conversation
Stacked on PR #3358 (SD-3178). Second facade file in the path-as-contract scaffold under SD-3175 / Phase 3. `superdoc/headless-toolbar`, `superdoc/headless-toolbar/react`, and `superdoc/headless-toolbar/vue` are reclassified as legacy public compatibility surface. Existing consumers keep compiling with full types; new custom UI integrations should use `superdoc/ui` and `superdoc/ui/react` instead. The next-generation typed UI controller replaces the default headless-toolbar path. Source facade: - packages/superdoc/src/public/legacy/headless-toolbar.ts: 16 named exports (3 runtime + 13 types) mirroring src/headless-toolbar.js + src/headless-toolbar.d.ts. Lives under legacy/ to mark it compat-only. - vite.config.js + ensure-types.cjs: build wiring for the new entry. - verify-public-facade-emit.cjs: refactored to be config-driven via a FACADE_ENTRIES list. Adding a new facade file is now a single append. - src/public/legacy/headless-toolbar.test.ts: 3 smoke assertions. Policy: - docs/architecture/package-boundaries.md: inventory table rows for `./headless-toolbar` and its react/vue subpaths reclassified from Public subpath to Legacy public compatibility surface. Decision 4's migration table extended to cover all three. No-growth enforcement (extends SD-3176): - tests/consumer-typecheck/snapshot-superdoc-legacy-exports.mjs: adds `./headless-toolbar`, `./headless-toolbar/react`, and `./headless-toolbar/vue` to the SUBPATHS list. - snapshots/: three new baselines (16/1/1 resolved exports). - README updated with the new entries. No package.json#exports change. Phase 4 owns the contract flip. Empirically verified the multi-entry facade verifier: - clean: OK, 2 entries (root: 4 exports, legacy/headless-toolbar: 16) - drift on legacy/headless-toolbar facade .d.ts: exit 1 - leak in legacy/headless-toolbar facade .d.ts: exit 1 - command-signature probe still fires on root entry only Empirically verified the no-growth gate: - clean across all 7 subpaths: OK - drift on superdoc/headless-toolbar published .d.ts: exit 1
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Second facade file under SD-3178 / Phase 3 of SD-3175 (path-as-contract architecture). Reframes the
./headless-toolbarfamily as legacy public compatibility surface rather than supported new API.What changes
superdoc/headless-toolbar,superdoc/headless-toolbar/react, andsuperdoc/headless-toolbar/vueare reclassified as legacy public compatibility surface indocs/architecture/package-boundaries.md(inventory table + Decision 4 migration table). Existing consumers keep compiling with full types; new custom UI integrations should usesuperdoc/uiandsuperdoc/ui/react.packages/superdoc/src/public/legacy/headless-toolbar.tsmirrors the 16-name surface (3 runtime + 13 types) under the path-as-contract structure. Named exports only.ensure-types.cjs.verify-public-facade-emit.cjsrefactored to be config-driven via aFACADE_ENTRIESlist. Adding a new facade file is now a single append. Root entry keeps the command-signature probe; the headless-toolbar entry doesn't need it (noEditorCommandsexposure).tests/consumer-typecheck/snapshot-superdoc-legacy-exports.mjs: SD-3176's no-growth gate extended to cover the three headless-toolbar subpaths. Three new baseline files (16/1/1 resolved exports). Snapshots README updated.No
package.json#exportschange. Phase 4 owns the contract flip.Verified locally
.d.ts@superdoc/*leak in facade.d.tssuperdoc/headless-toolbarpublished.d.tsRelated