@cratis/stage.runtime 0.0.0 → 4.157.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/LICENSE +21 -0
- package/README.md +11 -1
- package/dist/src/App.d.ts +65 -0
- package/dist/src/StageChrome.d.ts +44 -0
- package/dist/src/StageCommandForm.d.ts +18 -0
- package/dist/src/StageCommandOutcome.d.ts +11 -0
- package/dist/src/StageGuardedAction.d.ts +20 -0
- package/dist/src/StageShellSettings.d.ts +15 -0
- package/dist/src/app.css +2 -0
- package/dist/src/blueprint.d.ts +48 -0
- package/dist/src/commandExecutor.d.ts +11 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +1897 -0
- package/dist/src/navigationTree.d.ts +69 -0
- package/dist/src/stageComponents.d.ts +31 -0
- package/dist/src/stageData.d.ts +72 -0
- package/dist/src/stageDataSources.d.ts +17 -0
- package/dist/src/stageGuards.d.ts +88 -0
- package/dist/src/stageNavigation.d.ts +33 -0
- package/dist/src/stageNavigationModel.d.ts +22 -0
- package/dist/src/stageRoutes.d.ts +24 -0
- package/dist/src/stageRowInteractions.d.ts +26 -0
- package/dist/src/stageShell.d.ts +55 -0
- package/dist/src/stageSlices.d.ts +21 -0
- package/dist/src/stageSource.d.ts +33 -0
- package/dist/src/stageTheme.d.ts +19 -0
- package/dist/src/useStrings.d.ts +21 -0
- package/dist/styledPrimeReact.d.ts +23 -0
- package/dist/styledPrimeReact.js +30 -0
- package/package.json +62 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cratis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
# @cratis/stage.runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Cratis Stage runtime renders Scene documents using Arc, Cratis Components and the default Scene blueprint.
|
|
4
|
+
It shares React, Arc contexts and Scene's command registry with the consuming application through exact peer dependencies.
|
|
5
|
+
|
|
6
|
+
Import `App` (also exported as `StageApplication`), `StageSourceProvider`, `staticStageSource` and the corresponding types from `@cratis/stage.runtime`.
|
|
7
|
+
Wrap the application in `StageSourceProvider` with its content source. The live Stage host supplies HTTP transport;
|
|
8
|
+
a built application can supply `staticStageSource({ scene, routes, strings })` instead.
|
|
9
|
+
|
|
10
|
+
Use `styledPrimeReact` from `@cratis/stage.runtime/vite` in the consuming Vite configuration.
|
|
11
|
+
The runtime imports its own CSS; `@cratis/stage.runtime/styles.css` also exposes it for host-only surfaces.
|
|
12
|
+
|
|
13
|
+
The runtime's version follows the Stage release. Generated applications continue to receive the embedded runtime until the renderer switches to this package.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type ApplicationStructure, type DialogTemplate, type InstanceContribution, type Layout, type NavigationModel, type SceneElement, type Screen, type ScreenTemplate, type Theme, type UiProfile, type ExposureDeclaration } from '@cratis/scene.model';
|
|
2
|
+
import type { EffectiveNavItem, PackageCatalog } from '@cratis/scene.engine';
|
|
3
|
+
import { type ComponentRegistry } from '@cratis/scene.react';
|
|
4
|
+
import { type CompositionOptions } from '@cratis/scene.blueprint.default';
|
|
5
|
+
import '@cratis/scene.blueprint.default/styles.css';
|
|
6
|
+
import './app.css';
|
|
7
|
+
export interface StageSceneApplication {
|
|
8
|
+
uiProfiles?: UiProfile[];
|
|
9
|
+
themes?: Theme[];
|
|
10
|
+
layouts: Layout[];
|
|
11
|
+
screenTemplates: ScreenTemplate[];
|
|
12
|
+
dialogTemplates?: DialogTemplate[];
|
|
13
|
+
screens: Screen[];
|
|
14
|
+
exposures?: ExposureDeclaration[];
|
|
15
|
+
instanceContributions?: InstanceContribution[];
|
|
16
|
+
/** The navigation regions of the application and its modules; absent when the model declares none. */
|
|
17
|
+
navigation?: NavigationModel;
|
|
18
|
+
/** The modules, features and slices navigation targets and toolbar slice buttons resolve against. */
|
|
19
|
+
structure?: ApplicationStructure;
|
|
20
|
+
/** The JSON schema of every modeled command, by name, which a toolbar slice's task dialog reads its fields from. */
|
|
21
|
+
commandSchemas?: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The registry a Stage renders with: Scene's core vocabulary, PrimeReact and the default blueprint, then any
|
|
25
|
+
* components the host adds, then the Stage's own table, action, form and chrome - which always win, because they
|
|
26
|
+
* are what reach the running application.
|
|
27
|
+
* @param components Components the host adds, such as a package an application composes with.
|
|
28
|
+
* @returns The registry.
|
|
29
|
+
*/
|
|
30
|
+
export declare function stageApplicationRegistry(components?: ComponentRegistry): ComponentRegistry;
|
|
31
|
+
/**
|
|
32
|
+
* The shell the application starts in - the one the profile's root template names, resolved by the Scene engine against the
|
|
33
|
+
* default blueprint and the application's own templates, exactly as the Studio preview resolves it.
|
|
34
|
+
*
|
|
35
|
+
* @param scene The scene the Stage renders.
|
|
36
|
+
* @param screenTemplates The templates the approved domain blueprints bring.
|
|
37
|
+
* @returns The effective shell, with the engine's diagnostics.
|
|
38
|
+
*/
|
|
39
|
+
export declare function stageShellOf(scene: StageSceneApplication, screenTemplates?: ScreenTemplate[]): import("@cratis/scene.engine").EffectiveShell;
|
|
40
|
+
/**
|
|
41
|
+
* What the Stage decides about composing a screen, on top of the composition it shares with the preview: its own chrome around the
|
|
42
|
+
* shell (the effective navigation regions are Scene's), its command form, its status line and its data sources.
|
|
43
|
+
*/
|
|
44
|
+
export declare function stageComposition(scene: StageSceneApplication, locales: string[], locale: string, packageCatalog?: PackageCatalog, dictionary?: Record<string, string>, blueprintTemplates?: ScreenTemplate[], showFooter?: boolean): CompositionOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Composes one screen the way the application shows it: the shared composition - the shell for the screen's layout, the chrome in
|
|
47
|
+
* its slots, the screen inside the template it names - with the Stage's own decisions.
|
|
48
|
+
*/
|
|
49
|
+
export declare function composeStageScreen(scene: StageSceneApplication, screen: Screen, locales: string[], locale: string, packageCatalog?: PackageCatalog, blueprintTemplates?: ScreenTemplate[]): SceneElement;
|
|
50
|
+
export interface AppProps {
|
|
51
|
+
/** Components the host adds to the registry, beneath the Stage's own. */
|
|
52
|
+
components?: ComponentRegistry;
|
|
53
|
+
/**
|
|
54
|
+
* What each package the host adds components for declares, by package name. A name an authored screen gives as
|
|
55
|
+
* `Package.component`, or a bare name only such a package declares, resolves to the host's component through it.
|
|
56
|
+
*/
|
|
57
|
+
packageCatalog?: PackageCatalog;
|
|
58
|
+
/** The screen templates the approved domain blueprints bring; a screen's `template blueprint ...` reference resolves to one of them. */
|
|
59
|
+
screenTemplates?: ScreenTemplate[];
|
|
60
|
+
/** The dialog templates the approved domain blueprints bring, which an authored dialog destination can open. */
|
|
61
|
+
dialogTemplates?: DialogTemplate[];
|
|
62
|
+
/** Hides a navigation item the user may not see - hidden, never disabled, so nothing about it leaks. */
|
|
63
|
+
isVisible?: (item: EffectiveNavItem) => boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare function App({ components, packageCatalog, screenTemplates, dialogTemplates, isVisible }?: AppProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ComponentRegistry, RegisteredComponentProps } from '@cratis/scene.react';
|
|
3
|
+
/** What the Stage's own components need that the document itself does not carry. */
|
|
4
|
+
export interface StageChromeState {
|
|
5
|
+
locales: string[];
|
|
6
|
+
locale: string;
|
|
7
|
+
setLocale: (locale: string) => void;
|
|
8
|
+
activity: string;
|
|
9
|
+
}
|
|
10
|
+
/** Provides {@link StageChromeState} to the Stage's own components. */
|
|
11
|
+
export declare function StageChromeProvider({ state, children }: {
|
|
12
|
+
state: StageChromeState;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/** The name the status line is registered under. */
|
|
16
|
+
export declare const stageActivityComponent = "Stage:activity";
|
|
17
|
+
/** The language picker in the topbar, shown only when the model declares more than one. */
|
|
18
|
+
export declare function StageLocale(): import("react").JSX.Element | null;
|
|
19
|
+
/**
|
|
20
|
+
* The application's navigation as the hierarchy the model declared: a group per module and feature, nested as deep
|
|
21
|
+
* as the model nests them, each entry linking to the screen it opens.
|
|
22
|
+
*/
|
|
23
|
+
export declare function StageNavigationTree({ element }: RegisteredComponentProps): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* The `core:outlet` the Stage renders: the screen the Scene navigation host placed in the named outlet, drawn
|
|
26
|
+
* inside the Stage's own data scope so its queries, selections and commands work as they do on a primary screen.
|
|
27
|
+
*
|
|
28
|
+
* Scene's own outlet renders the placed screen in a scope of its own, which cannot see what the Stage resolves
|
|
29
|
+
* queries and selections with, so the Stage draws the same region itself - including the `Close` button of an outlet the host
|
|
30
|
+
* put in a slot the shell declares (`slot side`).
|
|
31
|
+
*/
|
|
32
|
+
export declare function StageOutlet({ element }: RegisteredComponentProps): import("react").JSX.Element;
|
|
33
|
+
/** What the last interaction did, or could not do. */
|
|
34
|
+
export declare function StageActivity(): import("react").JSX.Element | null;
|
|
35
|
+
/**
|
|
36
|
+
* Mirrors the active theme's colour scheme and page colors onto the document.
|
|
37
|
+
*
|
|
38
|
+
* The theme provider scopes its tokens to its own element, but PrimeReact portals a dialog or an overlay to
|
|
39
|
+
* `body`, outside that element, and the page behind the shell is `body` too. Without this, a dark theme would
|
|
40
|
+
* paint the shell dark, leave the page around it light and open every dialog light.
|
|
41
|
+
*/
|
|
42
|
+
export declare function ColorSchemeMirror(): null;
|
|
43
|
+
/** The Stage's own components, to merge over the blueprint's. */
|
|
44
|
+
export declare const stageChromeComponents: ComponentRegistry;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExternalComponent } from '@cratis/scene.model';
|
|
2
|
+
export interface SchemaProperty {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: 'text' | 'number' | 'boolean' | 'date';
|
|
5
|
+
required: boolean;
|
|
6
|
+
unsupportedReason?: string;
|
|
7
|
+
}
|
|
8
|
+
interface StageCommandFormProps {
|
|
9
|
+
element: ExternalComponent;
|
|
10
|
+
}
|
|
11
|
+
/** Renders an authored screen form through Cratis Arc's native CommandForm boundary. */
|
|
12
|
+
export declare function StageCommandForm({ element }: StageCommandFormProps): import("react").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* The properties a command's JSON schema declares, with the type the native form gives each and whether it is required. A toolbar
|
|
15
|
+
* slice's task dialog is built from the same reading, so a command is the same fields wherever it is presented.
|
|
16
|
+
*/
|
|
17
|
+
export declare function schemaPropertiesOf(schema: string): SchemaProperty[];
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** What executing a modeled command came back with. */
|
|
2
|
+
export interface StageCommandOutcome {
|
|
3
|
+
isSuccess: boolean;
|
|
4
|
+
response?: unknown;
|
|
5
|
+
validationErrors: {
|
|
6
|
+
member: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}[];
|
|
9
|
+
/** Why the command did not run or failed, as a person should read it. Empty on success. */
|
|
10
|
+
messages: string[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExternalComponent } from '@cratis/scene.model';
|
|
2
|
+
import type { InteractionHandlers } from '@cratis/scene.react';
|
|
3
|
+
export interface StageGuardedActionProps {
|
|
4
|
+
element: ExternalComponent;
|
|
5
|
+
interactions?: InteractionHandlers;
|
|
6
|
+
}
|
|
7
|
+
/** Whether an element is an action authored with `when ... otherwise`. */
|
|
8
|
+
export declare function isGuardedAction(element: ExternalComponent): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Renders an action authored with `when <guard> execute <command> ... otherwise ...`.
|
|
11
|
+
*
|
|
12
|
+
* The guard is evaluated against the item on every render, so the action follows the data: a work item that is
|
|
13
|
+
* closed while the screen is open stops offering Close. The first alternative that holds is the command the action
|
|
14
|
+
* executes; when none holds, the authored `otherwise` decides - `hidden` renders nothing, `execute` offers its
|
|
15
|
+
* command instead. Without an item there is nothing to decide about, so nothing is offered.
|
|
16
|
+
*
|
|
17
|
+
* A guard this runtime cannot evaluate never lets a command through: the action is shown disabled with the
|
|
18
|
+
* diagnostic, which is the same refusal Stage reports when it admits the Scene.
|
|
19
|
+
*/
|
|
20
|
+
export declare function StageGuardedAction({ element, interactions }: StageGuardedActionProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StageShellSettings } from './stageShell';
|
|
2
|
+
/** The query that says the operating system prefers a dark scheme. */
|
|
3
|
+
export declare const prefersDarkQuery = "(prefers-color-scheme: dark)";
|
|
4
|
+
/** Whether the operating system prefers a dark scheme right now. */
|
|
5
|
+
export declare function systemPrefersDark(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Starts the shell the way the profile says: its sidebar mode, its menu tint and the theme its colour scheme selects. The user can
|
|
8
|
+
* still switch theme or mode afterwards, as in the Scene preview; this is only what the application starts in.
|
|
9
|
+
*
|
|
10
|
+
* It renders nothing and sits inside the shell's layout configuration, so it speaks to the same provider the topbar's toggle does.
|
|
11
|
+
*/
|
|
12
|
+
export declare function StageShellSettingsApplier({ settings, onSystemSchemeChange }: {
|
|
13
|
+
settings: StageShellSettings;
|
|
14
|
+
onSystemSchemeChange?: (prefersDark: boolean) => void;
|
|
15
|
+
}): null;
|
package/dist/src/app.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
body{min-width:20rem;min-height:100vh;margin:0;font-family:system-ui,-apple-system,Segoe UI,sans-serif}button{font:inherit}.stage-message{text-align:center;place-content:center;min-height:100vh;padding:2rem;display:grid}.stage-activity{background:var(--layout-highlight,#eef2ff);border-radius:var(--layout-radius,.5rem);color:var(--layout-highlight-text,#3730a3);margin-top:1rem;padding:.75rem}.stage-locale{background:var(--layout-card,#fff);border:1px solid var(--layout-border,#e2e5e9);border-radius:var(--layout-radius,.5rem);color:var(--layout-text,inherit);padding:.35rem .5rem}.stage-table{background:var(--layout-card,#fff);border:1px solid var(--layout-border,#e2e5e9);border-radius:var(--layout-radius,.5rem);padding:.5rem}.stage-table table{border-collapse:collapse;width:100%}.stage-table th,.stage-table td{border-bottom:1px solid var(--layout-border,#e2e5e9);text-align:left;padding:.5rem .75rem}.stage-table th{color:var(--layout-text-muted,#6b7280);text-transform:uppercase;font-size:.85rem;font-weight:600}.stage-empty{color:var(--layout-text-muted,#6b7280);font-style:italic}.stage-note{color:var(--layout-text-muted,#6b7280);margin:0 0 .5rem}.stage-note--error{color:#dc2626}.stage-action{justify-items:start;gap:.75rem;display:grid}.stage-command-form__layout{gap:var(--layout-gap,1rem);width:100%;min-width:0;display:grid}.stage-command-form__field{min-width:0;display:block}.stage-form{background:var(--layout-card,#fff);border:1px solid var(--layout-border,#e2e5e9);border-radius:var(--layout-radius,.5rem);gap:.6rem;min-width:20rem;padding:1rem;display:grid}.stage-form label{gap:.25rem;display:grid}.stage-form span{color:var(--layout-text-muted,#6b7280);font-size:.85rem}.stage-form input{background:var(--layout-background,#fff);border:1px solid var(--layout-border,#e2e5e9);color:inherit;border-radius:.3rem;padding:.45rem .6rem}pre{background:var(--layout-background,#f4f5f7);border-radius:.4rem;padding:1rem;overflow:auto}[role=table] header{gap:1rem;font-weight:600;display:flex}.stage-dialog-backdrop{z-index:1000;background:#00000073;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.stage-dialog{background:var(--layout-card,#fff);border:1px solid var(--layout-border,#e2e5e9);border-radius:var(--layout-radius,.5rem);color:var(--layout-text,inherit);gap:.75rem;min-width:min(90vw,24rem);max-width:min(90vw,48rem);max-height:90vh;padding:1rem;display:grid;overflow:auto;box-shadow:0 1rem 3rem #0000004d}.stage-dialog>button{justify-self:end}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SceneElement, Screen, UiProfile } from '@cratis/scene.model';
|
|
2
|
+
import type { PackageCatalog } from '@cratis/scene.engine';
|
|
3
|
+
import { type ComponentRegistry } from '@cratis/scene.react';
|
|
4
|
+
/** The qualified name Stage registers its locale picker under. */
|
|
5
|
+
export declare const stageLocaleComponent = "Stage:locale";
|
|
6
|
+
/**
|
|
7
|
+
* 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.
|
|
10
|
+
*
|
|
11
|
+
* @param profiles The profiles the scene declares.
|
|
12
|
+
* @returns The profile to resolve component names with.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stageProfile(profiles: UiProfile[] | undefined): UiProfile;
|
|
15
|
+
/** What each package declares, so a bare name resolves to the package that provides it. */
|
|
16
|
+
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. */
|
|
18
|
+
export declare function stageRegistry(overrides: ComponentRegistry): ComponentRegistry;
|
|
19
|
+
/**
|
|
20
|
+
* What every package the application renders with declares: the Stage's own packages, and the components of the
|
|
21
|
+
* custom packages the application approved.
|
|
22
|
+
*
|
|
23
|
+
* A custom package never replaces what a Stage package declares; it only adds its own entry.
|
|
24
|
+
*
|
|
25
|
+
* @param approved What each approved custom package declares, by package name.
|
|
26
|
+
* @returns The catalog component names are resolved against.
|
|
27
|
+
*/
|
|
28
|
+
export declare function stageCatalogWith(approved: PackageCatalog | undefined): PackageCatalog;
|
|
29
|
+
/** The qualified name Stage registers its navigation tree under. */
|
|
30
|
+
export declare const stageNavigationTreeComponent = "Stage:navigationTree";
|
|
31
|
+
/** The name the application shows in its topbar and sidebar when the model gives it no logo. */
|
|
32
|
+
export declare const stageApplicationName = "Cratis Stage";
|
|
33
|
+
/**
|
|
34
|
+
* The chrome the blueprint's application shell wraps every screen in, besides the screen itself.
|
|
35
|
+
*
|
|
36
|
+
* When the model declares navigation regions, the topbar and sidebar draw the *effective* navigation of the module the user is in
|
|
37
|
+
* (Scene's regions: inherit, extend, override) and nothing here lists items. A model that declares none keeps what it always had:
|
|
38
|
+
* the entries its screens authored as `Navigation` contributions - or one flat list of its screens - as the menu, and the topbar and
|
|
39
|
+
* sidebar draw no region of their own.
|
|
40
|
+
*/
|
|
41
|
+
export declare function applicationChrome(screens: Screen[], activeScreen: string, locales: string[], locale: string, application?: {
|
|
42
|
+
title: string;
|
|
43
|
+
image?: string;
|
|
44
|
+
}, regions?: boolean, showFooter?: boolean): Record<string, SceneElement[]>;
|
|
45
|
+
/** The hash a screen is addressed by - what the blueprint's breadcrumb links point at. */
|
|
46
|
+
export declare function screenHash(name: string): string;
|
|
47
|
+
/** The screen name a hash addresses, or undefined when it addresses none. Parameters after `?` are not part of it. */
|
|
48
|
+
export declare function screenFromHash(hash: string): string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ArcConfiguration } from '@cratis/arc.react';
|
|
2
|
+
import { Command, type ICommandResult } from '@cratis/arc/commands';
|
|
3
|
+
import type { StageCommandOutcome } from './StageCommandOutcome';
|
|
4
|
+
/** Resolves only native Arc command proxies; unrelated registry entries cannot execute. */
|
|
5
|
+
export declare function registeredCommand(name: string, typeName?: string, route?: string): (new () => Command) | undefined;
|
|
6
|
+
/** Executes the registered proxy with the same host configuration as Arc's useCommand. */
|
|
7
|
+
export declare function executeRegisteredCommand(name: string, values: Record<string, unknown>, arc: ArcConfiguration): Promise<StageCommandOutcome>;
|
|
8
|
+
/** Maps Arc's typed result without treating a rejection or authorization failure as success. */
|
|
9
|
+
export declare function commandOutcome(name: string, result: ICommandResult): StageCommandOutcome;
|
|
10
|
+
/** The command executor for interactions, guarded actions and slice task dialogs. */
|
|
11
|
+
export declare function useStageCommandExecutor(): (name: string, values: Record<string, unknown>) => Promise<StageCommandOutcome>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { App, App as StageApplication, composeStageScreen, stageApplicationRegistry, stageComposition, stageShellOf } from './App';
|
|
2
|
+
export type { StageSceneApplication } from './App';
|
|
3
|
+
export { StageSourceProvider, staticStageSource, useStageSource, stageEndpoints } from './stageSource';
|
|
4
|
+
export type { StageSource, StageStaticContent } from './stageSource';
|
|
5
|
+
export type { StageRoutes } from './stageRoutes';
|
|
6
|
+
export { stageTheme, stageDarkSelector } from './stageTheme';
|
|
7
|
+
export { executeRegisteredCommand, registeredCommand, useStageCommandExecutor } from './commandExecutor';
|
|
8
|
+
export { StageCommandForm } from './StageCommandForm';
|
|
9
|
+
export { StageGuardedAction } from './StageGuardedAction';
|
|
10
|
+
export { StageDataProvider, useStageData, useStageQuery, dataChanged } from './stageData';
|
|
11
|
+
export { createStageSliceInvoker, sliceFieldsFrom } from './stageSlices';
|