import { type ReactNode } from 'react' import { useWorkspaceId } from '@/client/features/workspace/WorkspaceContext' import { type AppletSegment, appletScope, appletStyleKey } from './applet-cache' import { useAppletStyle } from './applet-styles' type AppletMountProps = { segment: AppletSegment name: string version: number children: ReactNode } // The style scope for one mounted applet: puts the `data-applet` attribute the // bundle's scoped CSS selectors key off (see server/bundler/applet-css.ts) on a // wrapper filling the parent box, and keeps the applet's