Skip to content

fix(types): relocate D1 layout declarations (SD-2893)#3133

Merged
caio-pizzol merged 2 commits intomainfrom
caio-pizzol/SD-2893-d1-shim-relocations
May 5, 2026
Merged

fix(types): relocate D1 layout declarations (SD-2893)#3133
caio-pizzol merged 2 commits intomainfrom
caio-pizzol/SD-2893-d1-shim-relocations

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Summary

  • relocate @superdoc/dom-contract declarations into the published superdoc dist and guard them in the declaration audit
  • relocate the public pm-adapter type subpaths currently reached by SuperDoc declarations (converter-context.js, sections/types.js) without publishing the full pm-adapter declaration tree
  • switch ConverterContext imports in presentation-editor code to the pm-adapter type subpath so emitted declarations do not force consumers through the broad pm-adapter barrel

Notes

This is the D1 slice of the SD-2830 / SD-2893 shim drain. It removes these entries from _internal-shims.d.ts:

  • @superdoc/dom-contract
  • @superdoc/pm-adapter
  • @superdoc/pm-adapter/sections/types.js

The shim list now remains at 6 known modules:

  • @superdoc/common
  • @superdoc/common/components/BasicUpload.vue
  • @superdoc/common/list-marker-utils
  • @superdoc/composables/useUiFontFamily.js
  • @superdoc/layout-engine
  • @superdoc/style-engine/ooxml

I intentionally did not include all of pm-adapter/src/**/*; that pulled additional internal-only packages (@superdoc/style-engine, @superdoc/word-layout, @superdoc/common/list-numbering) into the emitted declaration graph and kept the shim count at 9. The PR keeps pm-adapter relocation to the two public-referenced type files.

Verification

  • pnpm --filter superdoc run build:es
  • node tests/consumer-typecheck/typecheck-matrix.mjs -> 47 passed, 0 failed, 0 warnings
  • pnpm run type-check
  • pnpm --filter @superdoc/super-editor test src/editors/v1/core/presentation-editor/tests/FootnotesBuilder.test.ts
  • git diff --check

@caio-pizzol caio-pizzol requested a review from a team as a code owner May 4, 2026 23:49
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…ack (SD-2893)

vite.config.js: pm-adapter is included file-by-file because a full
src/**/* glob pulls @superdoc/style-engine and other internal packages
into the declaration graph, defeating the SD-2893 shim drain.

ensure-types.cjs: bare @superdoc/pm-adapter specifiers would rewrite to
a non-existent dist path. The audit gate's RELOCATED_PACKAGES list
rejects any unrewritten bare specifier at build time, so this is a
build failure rather than a silent consumer break.
@caio-pizzol caio-pizzol merged commit 375e44b into main May 5, 2026
67 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-2893-d1-shim-relocations branch May 5, 2026 00:27
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.44

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.88

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in @superdoc-dev/react v1.2.0-next.86

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in superdoc-cli v0.8.0-next.62

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in superdoc v1.30.0-next.45

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in superdoc-sdk v1.8.0-next.47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants