@cratis/event-models 0.152.5 → 0.153.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.
@@ -7,6 +7,8 @@ import type { StructureEditRejection } from '../Structure/StructureEditRejection
7
7
  import type { SurfaceStrings } from '../Surface/DesignTime/SurfaceStrings';
8
8
  import type { DestinationProblemKind } from '../Destinations/DestinationProblemKind';
9
9
  import type { TemplateInapplicability } from '../Templates/TemplateInapplicability';
10
+ import type { TemplatePreviewSize } from '../Templates/TemplatePreviewSize';
11
+ import type { TemplatePreviewState } from '@cratis/scene.blueprint.default';
10
12
  export interface ScreenEditorStrings {
11
13
  inspectorTitle: string;
12
14
  windowLabel: string;
@@ -82,6 +84,22 @@ export interface ScreenEditorStrings {
82
84
  uncategorized: string;
83
85
  provenance: (packageName: string) => string;
84
86
  inapplicable: Record<TemplateInapplicability, string>;
87
+ previewAction: string;
88
+ preview: (template: string) => string;
89
+ previewState: string;
90
+ previewStates: Record<TemplatePreviewState, string>;
91
+ previewSize: string;
92
+ previewSizes: Record<TemplatePreviewSize, string>;
93
+ previewFailed: string;
94
+ noPreview: string;
95
+ provenanceLabel: string;
96
+ license: string;
97
+ attribution: string;
98
+ compatibility: string;
99
+ compatible: string;
100
+ incompatible: string;
101
+ apply: string;
102
+ discard: string;
85
103
  };
86
104
  outlets: {
87
105
  label: string;
@@ -8,5 +8,6 @@ export interface TemplateBrowserProps {
8
8
  disabled: boolean;
9
9
  strings: ScreenEditorStrings['properties']['templates'];
10
10
  onSelect: (template: string | undefined) => void;
11
+ onPreview?: (template: string) => void;
11
12
  }
12
- export declare const TemplateBrowser: ({ packages, scope, selected, disabled, strings, onSelect }: TemplateBrowserProps) => import("react").JSX.Element;
13
+ export declare const TemplateBrowser: ({ packages, scope, selected, disabled, strings, onSelect, onPreview }: TemplateBrowserProps) => import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { ScreenEditorEnvironment } from '../Host/ScreenEditorHost';
2
+ import type { ScreenEditorStrings } from './ScreenEditorStrings';
3
+ export interface TemplatePreviewPaneProps {
4
+ templateName: string;
5
+ environment: ScreenEditorEnvironment;
6
+ strings: ScreenEditorStrings['properties']['templates'];
7
+ disabled: boolean;
8
+ onApply: () => void;
9
+ onDiscard: () => void;
10
+ }
11
+ export declare const TemplatePreviewPane: ({ templateName, environment, strings, disabled, onApply, onDiscard }: TemplatePreviewPaneProps) => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare enum TemplatePreviewSize {
2
+ Desktop = "desktop",
3
+ Tablet = "tablet",
4
+ Phone = "phone"
5
+ }
@@ -0,0 +1,6 @@
1
+ import type { SceneElement, UiProfile } from '@cratis/scene.model';
2
+ import { type TemplateCatalogEntry } from '@cratis/scene.engine';
3
+ import { type TemplatePreviewState } from '@cratis/scene.blueprint.default';
4
+ import type { ScenePackageBundle } from '@cratis/scene.react';
5
+ export declare function templatePreview(templateName: string, state: TemplatePreviewState, bundles: readonly ScenePackageBundle[], profile: UiProfile): SceneElement | undefined;
6
+ export declare function catalogEntryOf(templateName: string, catalog: readonly TemplateCatalogEntry[]): TemplateCatalogEntry | undefined;