Skip to content

Commit 567d5db

Browse files
committed
fix(examples): export PublicToolbarItemId from superdoc/ui barrel; add pnpm-setup to custom-ui CI
The earlier change in this PR added `type PublicToolbarItemId` to the consumer-facing `superdoc/ui` re-export list (packages/superdoc/ src/ui.d.ts) but never landed the corresponding source export in the inner barrel at packages/super-editor/src/ui/index.ts. With `skipLibCheck: true`, TypeScript silently masked the broken re-export; consumers writing `import type { PublicToolbarItemId } from 'superdoc/ui'` would still pass typecheck against the dist but would fail without skipLibCheck (and would not actually resolve to the typed union when chased through). Add the missing source export so the chain is real. The new custom-ui CI matrix job restores the workspace cache and invokes the smoke test, but does not run pnpm/action-setup. The example's package.json predev hook calls `pnpm --filter superdoc build`, and the playwright config falls back to `pnpm --dir <example> run dev` when the example has no local node_modules (pnpm-hoisted layout). Both require pnpm on PATH. Add pnpm setup so the smoke test can launch its dev server.
1 parent 67f9d5a commit 567d5db

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ci-examples.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,14 @@ jobs:
211211
~/.cache/ms-playwright
212212
key: examples-workspace-${{ github.sha }}
213213

214+
# The vanilla custom-ui examples have a `predev` hook that
215+
# runs `pnpm --filter superdoc build`, and the playwright
216+
# config falls back to `pnpm --dir <example> run dev` when an
217+
# example has no local node_modules (the pnpm-hoisted layout).
218+
# Both require pnpm on PATH; the cache restore alone does not
219+
# provide it.
220+
- uses: pnpm/action-setup@v4
221+
214222
- name: Run smoke test
215223
working-directory: examples/__tests__
216224
run: EXAMPLE=editor/custom-ui/${{ matrix.surface }}/${{ matrix.framework }} npx playwright test

packages/super-editor/src/ui/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
export { createSuperDocUI } from './create-super-doc-ui.js';
2020
export { shallowEqual } from './equality.js';
2121
export { BUILT_IN_COMMAND_IDS } from '../headless-toolbar/types.js';
22+
export type { PublicToolbarItemId } from '../headless-toolbar/types.js';
2223

2324
// Re-export the document-side shapes the controller surfaces so
2425
// consumers can type their components without reaching into the

0 commit comments

Comments
 (0)