Skip to content

Release v5.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 18:21
e726a29

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.extensions 1.0.0: the extension component contract with two component kinds, reactComponent(Component) (web only) and mountComponent((host, properties, context) => { update, unmount }), a framework-neutral floor for Vue, Svelte, Lit, web components or plain DOM. (#296)
  • ExtensionContext with the user, tenant, locale, theme, public settings, strings, invoke, raise, on and change notifications, and createExtensionContext for hosts, previews and specs to build and change one.
  • React hooks useExtensionContext, useUser, useTenant, useLocale, useTheme, useSettings, useStrings, useInvoke, useRaise and useTrigger, which re-render only when their own part changes, with ExtensionContextProvider.
  • Composition in both directions: MountedComponent lets a React component host a mount component, context.renderSlot and ExtensionSlot host Scene content, and mountExtensionComponent gives a host one path for both kinds.
  • Frontend manifest types and validateFrontendManifest for the component part of an extension contract.
  • A conformance kit, createExtensionConformanceChecks, that runs the same expectations against a component of either kind.
  • resolveExtensionComponent in @cratis/scene.engine resolves 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.