refactor(orchestra): make @novus/orchestra a self-contained package#31
Open
feledori wants to merge 2 commits into
Open
refactor(orchestra): make @novus/orchestra a self-contained package#31feledori wants to merge 2 commits into
feledori wants to merge 2 commits into
Conversation
- Move `three` to optional peerDependencies (used only as a type import in the unexported Theatre R3F `Group` helper); add `@react-three/fiber` as an optional peer for the `<group>` intrinsic it renders. - Drop reliance on the app-declared `Window.THEATRE_PROJECT_ID` ambient: cast at the write site in theatre/index (matching the read in studio), and remove the now-orphaned global from the app's utils/types.d.ts. - Add a README documenting exports, peers, and the soft host expectations (Tailwind tokens for the panel UI, `--columns` for the grid overlay).
Makes the dev panel self-contained so it drops into any React app: - Cmdo renders via createPortal instead of @base-ui/react Dialog. - Panel + grid overlay styled with CSS Modules, no Tailwind tokens. - Remove clsx; classNames composed with template strings. - Own the typed window.THEATRE_PROJECT_ID global in theatre/index (supersedes the prior cast/removal); studio reads it directly. - Add react-dom peer (createPortal); README updated.
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.
Summary
Hardens
@novus/orchestra(the dev debug panel) into a package that drops into any React app — no Tailwind, no UI-primitive dependency, no app-owned globals. Two commits:1. Dependency correctness + decoupling
three→ optionalpeerDependency(only a type import in the unexported R3FGrouphelper); added@react-three/fiberas an optional peer for the<group>it renders.2. Self-contained panel
Cmdorenders viacreatePortal+ the existing keydown handler instead of@base-ui/reactDialog. (react-domadded as a peer.)bg-primary/secondaryutility classes.theatre/indexdeclares and writes the typedwindow.THEATRE_PROJECT_IDitself (andstudioreads it directly), so the app'sutils/types.d.tsno longer needs to declare it. Importing the Theatre runtime makes the global readable + typed anywhere.READMEdocumenting exports, peers, and the remaining soft host expectation (the grid overlay reads--columns/--gap, already overridable).Dependency tally
@theatre/core,@theatre/studio,hamo,stats-gl,tempus,zustandreact,react-domthree,@react-three/fiber@base-ui/react,clsx,three(→ optional peer)Test Plan
bun install—@base-ui/react+clsxout of the lockfile; peers resolvebun run check— lint 0/0, format, typecheck cleanbun run build— green