@cratis/event-models 0.281.0 → 0.281.2

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.
@@ -36,6 +36,7 @@ export interface ScreenEditorEnvironment {
36
36
  references?: (target: string) => readonly EditorReference[];
37
37
  };
38
38
  ownTemplates?: readonly ScreenTemplate[];
39
+ selectableTemplates?: readonly ScreenTemplate[];
39
40
  templateScope?: TemplateScope;
40
41
  navigation?: ScreenEditorNavigation;
41
42
  location?: ScreenEditorLocation;
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  import type { SceneDocument } from '@cratis/scene.model';
2
3
  import type { ScreenEditorStrings } from '../Inspector/ScreenEditorStrings';
3
4
  import type { ScreenEditorController } from './ScreenEditorController';
@@ -24,12 +25,11 @@ export interface ScreenEditorWindowProps {
24
25
  strings: ScreenEditorStrings;
25
26
  window: ScreenEditorWindowState;
26
27
  authoringTemplate?: string;
28
+ title?: ReactNode;
27
29
  deviceFrame?: boolean;
28
30
  saveFailure?: string;
29
31
  onKeepEditing?: () => void;
30
32
  onDiscard?: () => void;
31
- onSave?: () => void;
32
- isSaving?: boolean;
33
33
  onPreview?: (document: SceneDocument) => void;
34
34
  }
35
- export declare const ScreenEditorWindow: ({ controller, environment, strings, window: state, authoringTemplate, deviceFrame, saveFailure, onKeepEditing, onDiscard, onSave, isSaving, onPreview }: ScreenEditorWindowProps) => import("react").JSX.Element;
35
+ export declare const ScreenEditorWindow: ({ controller, environment, strings, window: state, authoringTemplate, title, deviceFrame, saveFailure, onKeepEditing, onDiscard, onPreview }: ScreenEditorWindowProps) => import("react").JSX.Element;
@@ -16,6 +16,7 @@ export interface ScreenEditorWorkspaceProps {
16
16
  };
17
17
  onChange?: (result: ScreenEditorResult) => void;
18
18
  renderPaletteHost?: (palette: ReactNode) => ReactNode;
19
+ title?: ReactNode;
19
20
  onDismiss?: () => void;
20
21
  }
21
22
  export declare const ScreenEditorWorkspace: (props: ScreenEditorWorkspaceProps) => import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export interface WindowTitleBarProps {
3
3
  controls: ReactNode;
4
+ title?: ReactNode;
4
5
  }
5
- export declare const WindowTitleBar: ({ controls }: WindowTitleBarProps) => import("react").JSX.Element;
6
+ export declare const WindowTitleBar: ({ controls, title }: WindowTitleBarProps) => import("react").JSX.Element;
@@ -16,6 +16,7 @@ export interface ScreenEditorEnvironmentSource {
16
16
  fileUpload?: ScreenEditorFileUpload;
17
17
  templateScope?: TemplateScope;
18
18
  ownTemplates?: readonly ScreenTemplate[];
19
+ selectableTemplates?: readonly ScreenTemplate[];
19
20
  navigation?: ScreenEditorEnvironment['navigation'];
20
21
  location?: ScreenEditorEnvironment['location'];
21
22
  }
@@ -1,4 +1,4 @@
1
- import type { SceneDocument } from '@cratis/scene.model';
1
+ import type { SceneDocument, ScreenTemplate } from '@cratis/scene.model';
2
2
  import { type SceneDocumentProblem } from '../Document/readSceneDocument';
3
3
  import type { ScreenEditorRuntime } from '../Runtime/screenEditorRuntime';
4
4
  import type { ScreenEditorSubject } from './ScreenEditorHost';
@@ -13,5 +13,5 @@ export type OpenResult = {
13
13
  problem: SceneDocumentProblem;
14
14
  };
15
15
  type OpeningRuntime = Pick<ScreenEditorRuntime, 'profile' | 'packages'> & Partial<Pick<ScreenEditorRuntime, 'bundles'>>;
16
- export declare function openSubject(subject: ScreenEditorSubject, runtime?: OpeningRuntime): OpenResult;
16
+ export declare function openSubject(subject: ScreenEditorSubject, runtime?: OpeningRuntime, selectableTemplates?: readonly ScreenTemplate[]): OpenResult;
17
17
  export {};