@cratis/event-models 0.205.6 → 0.206.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.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The size classes a UI profile can assume by default, spelled as the stored profile and the Screenplay `target size` line spell them.
3
+ */
4
+ export declare const profileSizeClasses: readonly ['compact', 'regular', 'expanded'];
5
+ /** One of {@link profileSizeClasses}. */
6
+ export type ProfileSizeClass = typeof profileSizeClasses[number];
7
+ /**
8
+ * Reads a stored size class back, ignoring one this build does not know (written by a newer build) rather than failing to open the profile.
9
+ *
10
+ * @param stored What the application stored; empty or absent for none chosen.
11
+ * @returns The size class, or `undefined` for none.
12
+ */
13
+ export declare function sizeClassOf(stored: string | undefined | null): ProfileSizeClass | undefined;
@@ -1,6 +1,7 @@
1
1
  import { ColorScheme, LayoutMode } from '@cratis/scene.blueprint.default';
2
2
  import type { RootTemplate } from '@cratis/scene.model';
3
3
  import type { SampleDataSelectionSettings } from './SampleDataSelectionSettings';
4
+ import type { ProfileSizeClass } from './ProfileSizeClass';
4
5
  /**
5
6
  * The choices that make up an application's UI profile - what a draft edits and what applying persists.
6
7
  *
@@ -33,6 +34,11 @@ export interface UiProfileSettings {
33
34
  accent: string;
34
35
  /** The screen template new screens start from, or empty for none. Chosen per level by Cratis/StudioIssues#396. */
35
36
  defaultScreenTemplate: string;
37
+ /**
38
+ * The size class the application assumes by default (`target size` of the Screenplay `ui profile`). Stored apart from the profile (its own event),
39
+ * like the sample data choice. Absent for a profile that never chose one.
40
+ */
41
+ sizeClass?: ProfileSizeClass;
36
42
  /**
37
43
  * The sample data every preview and run of the application uses: chosen once here (the user's own pack or a blueprint's)
38
44
  * and inherited everywhere, never per screen. Absent for a profile stored before sample data existed: generated data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/event-models",
3
- "version": "0.205.6",
3
+ "version": "0.206.0",
4
4
  "description": "The Cratis event model board as a configurable React component.",
5
5
  "license": "MIT",
6
6
  "author": "Cratis",
@@ -68,7 +68,7 @@
68
68
  "peerDependencies": {
69
69
  "@cratis/components": "^4.26.2",
70
70
  "@cratis/fundamentals": "^7.22.0",
71
- "@cratis/scene": "^0.205.6",
71
+ "@cratis/scene": "^0.206.0",
72
72
  "@cratis/scene.blueprint.approvals": "^4.12.0",
73
73
  "@cratis/scene.blueprint.components": "^4.12.0",
74
74
  "@cratis/scene.blueprint.crm": "^4.12.0",
@@ -96,7 +96,7 @@
96
96
  "devDependencies": {
97
97
  "@cratis/components": "^4.26.2",
98
98
  "@cratis/fundamentals": "^7.22.0",
99
- "@cratis/scene": "0.205.6",
99
+ "@cratis/scene": "0.206.0",
100
100
  "@cratis/scene.blueprint.approvals": "4.68.0",
101
101
  "@cratis/scene.blueprint.components": "4.68.0",
102
102
  "@cratis/scene.blueprint.crm": "4.68.0",