feat: consume @tangle-network/ui via re-export bridge; ship 0.15.0#36
Merged
feat: consume @tangle-network/ui via re-export bridge; ship 0.15.0#36
Conversation
…m tsc
@tangle-network/ui@1.0.1 exposes ThemeToggle and useTheme on the
primitives subpath, which the root re-export shim depends on.
The bridge test imports via self-package-name (e.g.
@tangle-network/sandbox-ui/primitives) so it can run against the built
dist/ artifacts. tsc resolves '.' through the package's own exports
map and reports TS2209 ("project root is ambiguous") because both
src/ and dist/ are candidate roots. Excluding src/__tests__/** keeps
plain typecheck clean while vitest (test:bridge / pnpm test) still
builds first and runs the test against dist/.
esbuild collapses `export *` from external packages to a side-effect import, so consumers of @tangle-network/sandbox-ui/<subpath> were getting `undefined` for every named symbol. Replace each shim with explicit named re-exports of the @tangle-network/ui surface (mirroring the dist barrel). The bridge identity test now exercises 13 subpaths end-to-end against built dist/. Also re-add transitive deps that ui's optional editor/files/markdown subpaths pull at runtime (tiptap, hocuspocus, yjs, @pierre/trees, markdown stack, react-pdf, turndown, @nanostores/react) as devDependencies — they are not used by sandbox-ui's stay-behind src/ but the bridge test imports through subpaths that need them resolvable. The previously-removed peerDependenciesMeta entries stay dropped: those concerns live in @tangle-network/ui now.
|
Match release.yml — pnpm/action-setup needs an explicit version when there is no packageManager field in package.json.
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.
Closes #34. Implements the consumption side of the brand-network UI extraction (parent epic: tangle-network/brand#3).
What
@tangle-network/sandbox-ui@0.15.0adds@tangle-network/ui@^1.0.1as a peer dependency, deletes ~104 source files that were moved to ui in Phase B, and replaces them with one-line re-export shims. Public exports stay byte-equivalent to0.14.0: every name still resolves; types forward transitively.Single source of truth: every moved file lives in only one place —
@tangle-network/ui. The shims contain re-export statements only, no logic duplication.Commit-by-commit
chore(deps): add @tangle-network/ui peer; bump @tangle-network/brand to ^0.3.0package.jsononlyrefactor: replace moved subpaths with @tangle-network/ui re-export shimssrc/index.ts; rebind 41 deep imports across stay-behind codechore(deps): drop deps now provided transitively via @tangle-network/uidependencies/peerDependenciesMetatest: add re-export identity smoke; wire PR validation CIre-export-identity.test.ts+test:bridgescript +.github/workflows/ci.ymlchore: bump version 0.15.0; update CHANGELOGchore(deps): bump @tangle-network/ui to ^1.0.1; exclude __tests__ from tscThemeToggle/useThemeexposed in tangle-network/brand#13; tsconfig fix for self-package-name resolutionfix(shims): use named re-exports so bundled subpaths actually forwardexport * from <external>to a side-effect import; replaced each shim with explicit named re-exportsNotes
0.14.0per plan; that tag already shipped via the terminal-perf PR (feat(terminal): low-latency WebSocket transport + GPU rendering #35) before this branch landed, so the version bump moved to0.15.0.src/primitives/logo.tsxas stay-behind: sandbox-ui'sLogo(variant"sandbox",iconOnlyprop, "Tangle Sandbox" suffix) is genuinely different from brand's genericLogo— moving it to brand was a bulk-import false positive. The primitives shim re-exports everything from@tangle-network/ui/primitivesexceptLogo/TangleKnot/LogoProps; those come from./logo.src/workspace/artifact-pane.tsx: byte-identical withbrand/packages/ui/src/primitives/artifact-pane.tsx(true SSOT violation that the plan's path-only audit missed).workspace/index.tsnow re-exportsArtifactPanefrom@tangle-network/ui/primitives.InlineCode+ themedCodeBlock/CopyButtonon@tangle-network/ui/primitives(shipped in1.0.0).ThemeToggle+useThemeon@tangle-network/ui/primitives(shipped in1.0.1).Test plan
pnpm typecheck— clean.pnpm build— all 18 entries built. Bridged subpath bundles are tiny (e.g.dist/chat.jsis a thin re-export).pnpm test— 19 test files, 232 tests pass (13 of which are the new bridge identity assertions:Button,ChatMessage,RunGroup,OpenUIArtifactRenderer,FileTree,TiptapEditor,Markdown,GitHubLoginButton,cn,useAutoScroll,useSdkSession,activeSessionsAtom,CommandPreview— each verified to be===between@tangle-network/sandbox-ui/<subpath>and@tangle-network/ui/<subpath>).pnpm storybook(sandbox-coupled stories only — workspace + dashboard).agent-dev-container/products/sandbox/web) via local link.release.ymlpublishes@tangle-network/sandbox-ui@0.15.0to npm + GitHub Packages.Related
thoughts/shared/plans/2026-05-06-ISS-34-consume-ui-package.md