import { type ReactNode } from 'react' import { AppletPresenceProvider } from '@/client/features/collab' import { useWorkspaceId } from '@/client/features/workspace/workspace-context' import { type AppletSegment, appletId, appletStyleKey } from './applet-cache' import { useAppletStyle } from './applet-styles' type AppletContainerProps = { 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/applets/applet-css.ts) on a // wrapper filling the parent box, and keeps the applet's