Skip to content

Release v5.21.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 13:48
f049913

Extension components now run in the Stage browser runtime. A screen's Stage:extensionComponent element loads the extension's frontend and renders React components in Stage's own React tree or mounts any other kind into a host element, over the context of Scene's extension contract.

Added

  • React and mount extension components, with user, tenant, locale, theme, public settings, strings, invoke, raise and on, and the useUser, useTenant, useLocale, useTheme, useSettings, useStrings, useInvoke, useRaise and useTrigger hooks. Language and theme changes update the context. (#1070)
  • A placeholder, marked busy, while a component loads, and a readable message when the module does not export it or exports it as the other kind. A package's placeholder is shown in a frame that cannot run script.
  • invoke goes through the host with one interaction identity across waits and refuses an ability outside the contract in the browser as well as on the host. Secrets never reach the browser: the page asks only for the identity, the public settings and invocations.
  • @cratis/scene.extensions is a shared module on the page's import map, so an extension's hooks read the context Stage provides.
  • Documentation of the browser side in Run extension components.

Changed

  • Stage now depends on version 5.3.0 of every Scene package, up from 5.1.0, and on @cratis/scene.extensions 5.3.0. Scene 5.3.1 is not used until @cratis/scene.extensions 5.3.1 is published.
  • A screen's on <signal> interactions are not yet bound to a raised signal, because Scene 5.3.0 has no trigger kind for one. Raised signals reach StageExtensionServicesProvider's onSignal and a stage-extension-signal event on the component's element.