@cratis/event-models 0.259.3 → 0.259.5

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,2 @@
1
+ import type { Rect } from '../Geometry';
2
+ export declare function flowConnectionPath(source: Rect, target: Rect): string;
@@ -0,0 +1,6 @@
1
+ import type { FeatureAreaItem } from './featureAreaState';
2
+ export interface FeatureGroup<T> {
3
+ feature: T;
4
+ children: T[];
5
+ }
6
+ export declare function groupFeatures<T extends FeatureAreaItem<T>>(features: T[]): FeatureGroup<T>[];
@@ -0,0 +1,8 @@
1
+ export type FeatureSlot = 'header' | 'column';
2
+ export type FeatureSlotTargets<TNode> = {
3
+ header?: TNode;
4
+ column?: TNode;
5
+ };
6
+ export type SlotTargets<TNode> = ReadonlyMap<string, FeatureSlotTargets<TNode>>;
7
+ export declare function attachSlotTarget<TNode>(previous: SlotTargets<TNode>, featureId: string, slot: FeatureSlot, node: TNode): SlotTargets<TNode>;
8
+ export declare function detachSlotTarget<TNode>(previous: SlotTargets<TNode>, featureId: string, slot: FeatureSlot, node: TNode, replacement?: TNode): SlotTargets<TNode>;
@@ -1,11 +1,6 @@
1
1
  import { type RefCallback } from 'react';
2
- type Slot = 'header' | 'column';
3
- type Targets = {
4
- header?: HTMLDivElement;
5
- column?: HTMLDivElement;
6
- };
2
+ import { type FeatureSlot, type SlotTargets } from './featureSlotTargets';
7
3
  export declare function useFeatureSlotTargets(): {
8
- targets: Map<string, Targets>;
9
- register: (featureId: string, slot: Slot) => RefCallback<HTMLDivElement>;
4
+ targets: SlotTargets<HTMLDivElement>;
5
+ register: (featureId: string, slot: FeatureSlot) => RefCallback<HTMLDivElement>;
10
6
  };
11
- export {};