@cratis/event-models 0.251.0 → 0.251.1

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.
@@ -0,0 +1,8 @@
1
+ import type { ScreenEditorStrings } from '../Inspector/ScreenEditorStrings';
2
+ export interface SaveRefusedNoticeProps {
3
+ strings: Pick<ScreenEditorStrings, 'saveRefused' | 'keepEditing' | 'discardAndClose'>;
4
+ message: string;
5
+ onKeepEditing?: () => void;
6
+ onDiscard?: () => void;
7
+ }
8
+ export declare const SaveRefusedNotice: ({ strings, message, onKeepEditing, onDiscard }: SaveRefusedNoticeProps) => import("react").JSX.Element;
@@ -10,6 +10,7 @@ export interface ScreenEditorOverlayFrameState {
10
10
  isInspectorOpen: boolean;
11
11
  toggleInspector: () => void;
12
12
  close: () => void;
13
+ closeWithoutSaving: () => void;
13
14
  }
14
15
  export interface ScreenEditorOverlayFrameProps {
15
16
  sourceRect: DOMRect;
@@ -26,8 +26,10 @@ export interface ScreenEditorWindowProps {
26
26
  authoringTemplate?: string;
27
27
  deviceFrame?: boolean;
28
28
  saveFailure?: string;
29
+ onKeepEditing?: () => void;
30
+ onDiscard?: () => void;
29
31
  onSave?: () => void;
30
32
  isSaving?: boolean;
31
33
  onPreview?: (document: SceneDocument) => void;
32
34
  }
33
- export declare const ScreenEditorWindow: ({ controller, environment, strings, window: state, authoringTemplate, deviceFrame, saveFailure, onSave, isSaving, onPreview }: ScreenEditorWindowProps) => import("react").JSX.Element;
35
+ export declare const ScreenEditorWindow: ({ controller, environment, strings, window: state, authoringTemplate, deviceFrame, saveFailure, onKeepEditing, onDiscard, onSave, isSaving, onPreview }: ScreenEditorWindowProps) => import("react").JSX.Element;
@@ -12,4 +12,6 @@ export type OpenResult = {
12
12
  opened: false;
13
13
  problem: SceneDocumentProblem;
14
14
  };
15
- export declare function openSubject(subject: ScreenEditorSubject, runtime?: Pick<ScreenEditorRuntime, 'profile' | 'packages'>): OpenResult;
15
+ type OpeningRuntime = Pick<ScreenEditorRuntime, 'profile' | 'packages'> & Partial<Pick<ScreenEditorRuntime, 'bundles'>>;
16
+ export declare function openSubject(subject: ScreenEditorSubject, runtime?: OpeningRuntime): OpenResult;
17
+ export {};
@@ -56,6 +56,8 @@ export interface ScreenEditorStrings {
56
56
  closeDrawer: string;
57
57
  deleteElement: string;
58
58
  saveRefused: string;
59
+ keepEditing: string;
60
+ discardAndClose: string;
59
61
  save: string;
60
62
  unsavedChanges: string;
61
63
  previewScreen: string;