@cratis/event-models 0.144.4 → 0.145.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.
@@ -3,4 +3,4 @@ import type { BoardCanvasChrome } from './BoardCanvasChrome';
3
3
  export interface BoardCanvasProps extends Omit<CanvasProps, 'controlsLabels' | 'controlsIcons' | 'controlsGlassSurface' | 'captureAttributes' | 'controlsFollowViewportInsets' | 'readOnly'> {
4
4
  chrome?: BoardCanvasChrome;
5
5
  }
6
- export declare const BoardCanvas: ({ chrome, onHelp, helpTitle, ...props }: BoardCanvasProps) => import("react").JSX.Element;
6
+ export declare const BoardCanvas: ({ chrome, onHelp, helpTitle, onTransformChange, ...props }: BoardCanvasProps) => import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare const DEFAULT_MIN_ZOOM = 0.1;
2
+ export declare const DEFAULT_MAX_ZOOM = 5;
3
+ export declare const zoomWheelHasNoEffect: (event: {
4
+ ctrlKey: boolean;
5
+ metaKey: boolean;
6
+ deltaY: number;
7
+ }, zoom: number, minZoom: number, maxZoom: number) => boolean;
@@ -0,0 +1,5 @@
1
+ import type { SpecificationAddExtra } from './SpecificationAddPicker';
2
+ export interface SpecificationAddGroup {
3
+ heading: string;
4
+ options: readonly SpecificationAddExtra[];
5
+ }
@@ -1,3 +1,5 @@
1
+ import React from 'react';
2
+ import type { SpecificationAddGroup } from './SpecificationAddGroup';
1
3
  export interface SpecificationAddExtra {
2
4
  label: string;
3
5
  onChosen: () => void;
@@ -7,5 +9,6 @@ export interface SpecificationAddPickerProps<TOption> {
7
9
  nameOf: (option: TOption) => string;
8
10
  onChosen: (option: TOption) => void;
9
11
  errors?: readonly SpecificationAddExtra[];
12
+ groups?: readonly SpecificationAddGroup[];
10
13
  }
11
- export declare const SpecificationAddPicker: <TOption>({ options, nameOf, onChosen, errors }: SpecificationAddPickerProps<TOption>) => import("react").JSX.Element;
14
+ export declare const SpecificationAddPicker: <TOption>({ options, nameOf, onChosen, errors, groups }: SpecificationAddPickerProps<TOption>) => React.JSX.Element;
@@ -2,6 +2,7 @@ import { type ReactNode } from 'react';
2
2
  import { Guid } from '@cratis/fundamentals';
3
3
  import type { CommandItem, EventItem, ReadModelItem, SliceSpecification } from '../Model';
4
4
  import { SliceType } from '../Model';
5
+ import type { SpecificationAddGroup } from './SpecificationAddGroup';
5
6
  export interface ThenSectionProps {
6
7
  sliceId: Guid;
7
8
  sliceType: SliceType;
@@ -11,5 +12,6 @@ export interface ThenSectionProps {
11
12
  readModel?: ReadModelItem;
12
13
  renamedEventNames?: Readonly<Record<string, string>>;
13
14
  extra?: ReactNode;
15
+ extraGroups?: readonly SpecificationAddGroup[];
14
16
  }
15
- export declare const ThenSection: ({ sliceId, sliceType, specification, events, command, readModel, renamedEventNames, extra }: ThenSectionProps) => import("react").JSX.Element;
17
+ export declare const ThenSection: ({ sliceId, sliceType, specification, events, command, readModel, renamedEventNames, extra, extraGroups }: ThenSectionProps) => import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SliceType } from '../Model';
2
+ export interface AllowedThenKinds {
3
+ events: boolean;
4
+ errors: boolean;
5
+ readModel: boolean;
6
+ }
7
+ export declare const allowedThenKinds: (sliceType: SliceType) => AllowedThenKinds;
@@ -8,3 +8,5 @@ export * from './SpecificationSection';
8
8
  export * from './GivenSection';
9
9
  export * from './WhenSection';
10
10
  export * from './ThenSection';
11
+ export * from './allowedThenKinds';
12
+ export * from './SpecificationAddGroup';