Repository navigation
Release v5.3.0
Extension frontends can now implement one documented contract, whatever they are built with, and every host supports it the same way.
Added
- New npm package
@cratis/scene.extensions1.0.0: the extension component contract with two component kinds,reactComponent(Component)(web only) andmountComponent((host, properties, context) => { update, unmount }), a framework-neutral floor for Vue, Svelte, Lit, web components or plain DOM. (#296) ExtensionContextwith the user, tenant, locale, theme, public settings, strings,invoke,raise,onand change notifications, andcreateExtensionContextfor hosts, previews and specs to build and change one.- React hooks
useExtensionContext,useUser,useTenant,useLocale,useTheme,useSettings,useStrings,useInvoke,useRaiseanduseTrigger, which re-render only when their own part changes, withExtensionContextProvider. - Composition in both directions:
MountedComponentlets a React component host a mount component,context.renderSlotandExtensionSlothost Scene content, andmountExtensionComponentgives a host one path for both kinds. - Frontend manifest types and
validateFrontendManifestfor thecomponentpart of an extension contract. - A conformance kit,
createExtensionConformanceChecks, that runs the same expectations against a component of either kind. resolveExtensionComponentin@cratis/scene.engineresolves extension components from a UI profile's packages alongside runtime packages, including shadowing and platform support.- Documentation: a contract reference and a how-to for building a component in React and with mount, linked with the Screenplay screens page and Stage custom packages.