@cratis/event-models 0.245.0 → 0.245.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.
@@ -99,6 +99,9 @@ export interface ScreenEditorStrings {
99
99
  category: string;
100
100
  scope: string;
101
101
  anyScope: string;
102
+ sliceKinds: string;
103
+ slots: string;
104
+ slotsHint: string;
102
105
  missing: (template: string) => string;
103
106
  picker: TemplatePickerLabels;
104
107
  preview: (template: string) => string;
@@ -1,5 +1,5 @@
1
1
  import { type InsertNodeEdit, type MoveNodeEdit, type RemoveNodeEdit, type SceneElement } from '@cratis/scene.model';
2
2
  import type { StructureEdit } from '../Structure/StructureEdit';
3
- export declare function toMoveNodeEdit(edit: StructureEdit): MoveNodeEdit | undefined;
4
- export declare function toInsertNodeEdit(parentId: string, index: number, element: SceneElement): InsertNodeEdit;
3
+ export declare function toMoveNodeEdit(edit: StructureEdit, authoredTemplate?: string): MoveNodeEdit | undefined;
4
+ export declare function toInsertNodeEdit(parentId: string, index: number, element: SceneElement, authoredTemplate?: string): InsertNodeEdit;
5
5
  export declare function toRemoveNodeEdit(elementId: string): RemoveNodeEdit;
@@ -4,5 +4,6 @@ export interface EditorComposition {
4
4
  element: Panel;
5
5
  roots: SceneElement[];
6
6
  templates: string[];
7
+ entry?: string;
7
8
  }
8
9
  export declare function composeEditorScreen(document: SceneDocument, authoredTemplate?: string): EditorComposition;
@@ -0,0 +1,18 @@
1
+ import { type SceneElement, type ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const slotSectionId: (slot: string) => string;
3
+ export declare const isSlotSection: (id: string) => boolean;
4
+ export declare const isSlotLabel: (id: string) => boolean;
5
+ export declare const slotOfSection: (id: string) => string;
6
+ export declare const needsSlotSections: (template: ScreenTemplate) => boolean;
7
+ export declare function slotTargetOf(parentId: string, authoredTemplate: string | undefined): string | undefined;
8
+ export declare const slotIndexOf: (parentId: string, index: number) => number;
9
+ /**
10
+ * The slots of a template as the sections they are drawn in.
11
+ *
12
+ * @param template The template being authored.
13
+ * @returns The elements the template is drawn as, and the id of the section a component goes into when no place is named - the first slot it declares.
14
+ */
15
+ export declare function slotSectionsOf(template: ScreenTemplate): {
16
+ elements: SceneElement[];
17
+ entry: string | undefined;
18
+ };