studioShare
uses tcmts.studio.StudioFrame, which uses process
Set up the forge's pages to show in the studio's frame (its column of tabs), a definition's with how it runs below
its code and what to do with it (Edit, for code and files kept as written that are text; Rename and Delete; on the
codebase's own branch, as another is only read), each reading the branch the browser reads (studioCodebase);
and the machine's slots watched from then on (slotSamples): what every studio page does first.
import { isBytes } from "#codebase/tcmts/cli/files"; import { definitionActions, definitionExtra, pageFrame, servedCodebase, servedFor } from "#codebase/tcmts/share"; import { DefinitionActions, HowItRuns, studioCodebase, StudioFrame, watchSlots } from "#codebase/tcmts/studio"; export function studioShare(): void { pageFrame.current = StudioFrame; definitionExtra.current = HowItRuns; definitionActions.current = ({ name, hash }) => { const cb = servedCodebase().cb; const rec = cb.store.getDef(hash); if (!rec || studioCodebase().cb !== cb) return undefined; const usedBy = [ ...new Set(cb.store.namedDependents(hash).flatMap((d) => cb.store.pathsOf(d).slice(0, 1))), ].sort(); return ( <DefinitionActions name={name} usedBy={usedBy} editable={!(rec.kind === "file" && isBytes(rec))} /> ); }; servedFor.current = studioCodebase; watchSlots(); }
uses
- tcmts.cli.files.isBytes
- tcmts.share.definitionActions
- tcmts.share.definitionExtra
- tcmts.share.pageFrame
- tcmts.share.servedCodebase
- tcmts.share.servedFor
- tcmts.studio.DefinitionActions
- tcmts.studio.HowItRuns
- tcmts.studio.StudioFrame
- tcmts.studio.studioCodebase
- tcmts.studio.watchSlots
used by
- tcmts.studio.AppOutputPage
- tcmts.studio.AppPage
- tcmts.studio.DataIndexPage
- tcmts.studio.JobsPage
- tcmts.studio.LibrariesPage
- tcmts.studio.NeedsFixingPage
- tcmts.studio.OverviewPage
- tcmts.studio.PackagePage
- tcmts.studio.PackagesPage
- tcmts.studio.ProcessesPage
- tcmts.studio.ReleasesIndexPage
- tcmts.studio.ScratchIndexPage
- tcmts.studio.ScratchPage
- tcmts.studio.SlotsPage
- tcmts.studio.StudioBranchesPage
- tcmts.studio.StudioCodePage
- tcmts.studio.StudioContributionPage
- tcmts.studio.StudioContributionsPage
- tcmts.studio.StudioEntryPage
- tcmts.studio.StudioFrontPage
- tcmts.studio.StudioHistoryPage
- tcmts.studio.StudioReleasesPage
- tcmts.studio.StudioSearchPage
- tcmts.studio.TablePage
- tcmts.studio.TestsPage
- tcmts.studio.TraceOfPage
- tcmts.studio.TracePage
- tcmts.studio.TracesPage