@cratis/stage.runtime 4.190.12 → 4.191.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/App.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface StageSceneApplication {
21
21
  commandSchemas?: Record<string, string>;
22
22
  }
23
23
  /**
24
- * The registry a Stage renders with: Scene's core vocabulary, PrimeReact and the default blueprint, then any
24
+ * The registry a Stage renders with: Scene's core vocabulary, the libraries the profile lists (PrimeReact only then) and the default blueprint, then any
25
25
  * components the host adds, then the Stage's own table, action, form and chrome - which always win, because they
26
26
  * are what reach the running application.
27
27
  * @param components Components the host adds, such as a package an application composes with.
@@ -1,20 +1,43 @@
1
- import type { SceneElement, Screen, UiProfile } from '@cratis/scene.model';
2
- import type { PackageCatalog } from '@cratis/scene.engine';
1
+ import { type SceneElement, type Screen, type UiProfile } from '@cratis/scene.model';
2
+ import { type PackageCatalog } from '@cratis/scene.engine';
3
3
  import { type ComponentRegistry } from '@cratis/scene.react';
4
4
  /** The qualified name Stage registers its locale picker under. */
5
5
  export declare const stageLocaleComponent = "Stage:locale";
6
+ /** The package a host renders with when the profile lists no component library: the Cratis component library, built on React Aria. */
7
+ export declare const stageBaselinePackage = "Cratis.Components";
8
+ /** The component library the profile opts in to by listing it; the application registers its support only then. */
9
+ export declare const primeReactPackage = "PrimeReact";
10
+ /**
11
+ * A component library a profile opted in to, registered by the host: the components it registers and what it declares.
12
+ */
13
+ export interface StageLibrary {
14
+ /** The components the library adds to the registry. */
15
+ components: ComponentRegistry;
16
+ /** What the library declares, so a bare name resolves to it. */
17
+ declared: string[];
18
+ }
19
+ /** Whether the profiles the scene declares list PrimeReact. */
20
+ export declare function listsPrimeReact(profiles: UiProfile[] | undefined): boolean;
21
+ /**
22
+ * Registers a component library a profile opts in to. The application or live Stage that installs the library registers it
23
+ * before rendering; the runtime itself never imports one, so it stays fully usable with none registered.
24
+ *
25
+ * @param name The package name the library is listed under in a profile.
26
+ * @param library The components the library adds and what it declares.
27
+ */
28
+ export declare function registerStageLibrary(name: string, library: StageLibrary): void;
6
29
  /**
7
30
  * The profile a scene renders against: the shared one - the model's own `ui profile` with the packages every host renders with
8
- * admitted - with the PrimeReact widgets the default blueprint is built from between Scene's core and the blueprint, so the
9
- * blueprint's component still wins a name both declare.
31
+ * admitted - ordered core, then Cratis.Components, then the libraries the profile lists (PrimeReact only when it lists it), then
32
+ * the blueprint, so the blueprint's component still wins a name another package also declares.
10
33
  *
11
34
  * @param profiles The profiles the scene declares.
12
35
  * @returns The profile to resolve component names with.
13
36
  */
14
37
  export declare function stageProfile(profiles: UiProfile[] | undefined): UiProfile;
15
- /** What each package declares, so a bare name resolves to the package that provides it. */
38
+ /** What each package every Stage declares, so a bare name resolves to the package that provides it. */
16
39
  export declare const stageCatalog: PackageCatalog;
17
- /** Every component the Stage can render: Scene's core, PrimeReact, the default blueprint's shell, and the template wrapper the shared composition places screens in. */
40
+ /** Every component the Stage can render: Scene's core, the Cratis component library, the libraries a profile opted in to, the default blueprint's shell, and the template wrapper the shared composition places screens in. */
18
41
  export declare function stageRegistry(overrides: ComponentRegistry): ComponentRegistry;
19
42
  /**
20
43
  * What every package the application renders with declares: the Stage's own packages, and the components of the
@@ -1,9 +1,11 @@
1
1
  export { App, App as StageApplication, composeStageScreen, stageApplicationRegistry, stageComposition, stageShellOf } from './App';
2
2
  export type { StageSceneApplication } from './App';
3
+ export { stageDarkSelector } from './stageDarkSelector';
4
+ export { listsPrimeReact, registerStageLibrary } from './blueprint';
5
+ export type { StageLibrary } from './blueprint';
3
6
  export { StageSourceProvider, staticStageSource, useStageSource, stageEndpoints } from './stageSource';
4
7
  export type { StageSource, StageStaticContent } from './stageSource';
5
8
  export type { StageRoutes } from './stageRoutes';
6
- export { stageTheme, stageDarkSelector } from './stageTheme';
7
9
  export { executeRegisteredCommand, registeredCommand, useStageCommandExecutor } from './commandExecutor';
8
10
  export { hostedBasePath } from './hostedBasePath';
9
11
  export { registeredQuery, performQuery, subscribeQuery, registerQueryRouteResolver } from './queryExecutor';