@cratis/event-models 0.0.0-stage → 0.105.6
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.
- package/README.md +44 -2
- package/dist/Board/BoardActions.d.ts +37 -0
- package/dist/Board/BoardCanvas.d.ts +6 -0
- package/dist/Board/BoardCanvasChrome.d.ts +9 -0
- package/dist/Board/BoardCollectionView.d.ts +22 -0
- package/dist/Board/BoardCollections.d.ts +17 -0
- package/dist/Board/BoardContextValue.d.ts +8 -0
- package/dist/Board/BoardEditing.d.ts +22 -0
- package/dist/Board/BoardInteraction.d.ts +10 -0
- package/dist/Board/BoardInteractionContext.d.ts +3 -0
- package/dist/Board/BoardInteractionProvider.d.ts +6 -0
- package/dist/Board/BoardNavigation.d.ts +4 -0
- package/dist/Board/BoardProvider.d.ts +7 -0
- package/dist/Board/BoardReadOnlyContext.d.ts +1 -0
- package/dist/Board/BoardSelection.d.ts +5 -0
- package/dist/Board/BoardToolbar.d.ts +7 -0
- package/dist/Board/EventModelBoard.d.ts +13 -0
- package/dist/Board/EventModelBoardEditor.d.ts +16 -0
- package/dist/Board/EventModelBoardHandle.d.ts +5 -0
- package/dist/Board/HostedEventModelBoard.d.ts +18 -0
- package/dist/Board/boardMinimap.d.ts +20 -0
- package/dist/Board/index.d.ts +19 -0
- package/dist/Board/isLargeBoard.d.ts +4 -0
- package/dist/Board/useBoard.d.ts +2 -0
- package/dist/Cards/ArtifactCard.d.ts +17 -0
- package/dist/Cards/ArtifactCardKind.d.ts +5 -0
- package/dist/Cards/Card.d.ts +18 -0
- package/dist/Cards/CardAction.d.ts +12 -0
- package/dist/Cards/CardActionButton.d.ts +9 -0
- package/dist/Cards/CardCorner.d.ts +4 -0
- package/dist/Cards/CardNameInput.d.ts +11 -0
- package/dist/Cards/CardSurface.d.ts +6 -0
- package/dist/Cards/EventTags.d.ts +8 -0
- package/dist/Cards/autoFitTitle.d.ts +29 -0
- package/dist/Cards/cardColors.d.ts +30 -0
- package/dist/Cards/index.d.ts +12 -0
- package/dist/Cards/pascalCaseBreak.d.ts +20 -0
- package/dist/Cards/useAutoFitTitle.d.ts +21 -0
- package/dist/Collections/CollectionGrid.d.ts +28 -0
- package/dist/Collections/CollectionGridEditor.d.ts +16 -0
- package/dist/Collections/CollectionGridFeature.d.ts +19 -0
- package/dist/Collections/CollectionGridFeatureColumn.d.ts +26 -0
- package/dist/Collections/CollectionGridFeatureHeaderControls.d.ts +13 -0
- package/dist/Collections/CollectionGridModule.d.ts +23 -0
- package/dist/Collections/CollectionGridModuleHeaderControls.d.ts +8 -0
- package/dist/Collections/CollectionGridSlice.d.ts +19 -0
- package/dist/Collections/CollectionGridSliceHeaderControls.d.ts +14 -0
- package/dist/Collections/CollectionGridSlots.d.ts +20 -0
- package/dist/Collections/CollectionGridTemplate.d.ts +6 -0
- package/dist/Collections/CollectionMoveHandle.d.ts +12 -0
- package/dist/Collections/CollectionMoved.d.ts +4 -0
- package/dist/Collections/CollectionViewport.d.ts +27 -0
- package/dist/Collections/collectionGridLayout.d.ts +11 -0
- package/dist/Collections/collectionState.d.ts +24 -0
- package/dist/Collections/estimateCollectionSize.d.ts +7 -0
- package/dist/Collections/index.d.ts +13 -0
- package/dist/Collections/useCollectionMove.d.ts +10 -0
- package/dist/Collections/useCollectionsArea.d.ts +27 -0
- package/dist/Connections/Connectors.d.ts +23 -0
- package/dist/Connections/FlowNodeActor.d.ts +13 -0
- package/dist/Connections/SliceConnections.d.ts +7 -0
- package/dist/Connections/SliceConnectionsContext.d.ts +11 -0
- package/dist/Connections/computeSliceConnections.d.ts +23 -0
- package/dist/Connections/flowNodeOrder.d.ts +3 -0
- package/dist/Connections/index.d.ts +7 -0
- package/dist/Connections/useConnectionHighlight.d.ts +7 -0
- package/dist/Features/FeatureAddMenu.d.ts +10 -0
- package/dist/Features/FeatureColumnFrame.d.ts +10 -0
- package/dist/Features/FeatureGridSurface.d.ts +15 -0
- package/dist/Features/FeatureHeader.d.ts +21 -0
- package/dist/Features/FeatureHeaderAction.d.ts +12 -0
- package/dist/Features/FeatureHeaderCell.d.ts +10 -0
- package/dist/Features/FeatureHeaderMenu.d.ts +10 -0
- package/dist/Features/FeatureHeaderMenuAction.d.ts +14 -0
- package/dist/Features/FeatureHeaderSuggestion.d.ts +9 -0
- package/dist/Features/FeatureSuggestions.d.ts +4 -0
- package/dist/Features/FeaturesArea.d.ts +42 -0
- package/dist/Features/FeaturesReordered.d.ts +2 -0
- package/dist/Features/featureAreaState.d.ts +27 -0
- package/dist/Features/featureDropEdge.d.ts +2 -0
- package/dist/Features/featureHeaderMenuItems.d.ts +4 -0
- package/dist/Features/index.d.ts +12 -0
- package/dist/Features/useFeatureDrag.d.ts +16 -0
- package/dist/Features/useFeatureSlotTargets.d.ts +11 -0
- package/dist/Geometry/CurveAxis.d.ts +5 -0
- package/dist/Geometry/connectionCurve.d.ts +13 -0
- package/dist/Geometry/index.d.ts +5 -0
- package/dist/Geometry/linkGeometry.d.ts +62 -0
- package/dist/Geometry/pillLabelWidth.d.ts +38 -0
- package/dist/Geometry/rowLabelWidth.d.ts +1 -0
- package/dist/HeaderDragging/HeaderDragGhost.d.ts +6 -0
- package/dist/HeaderDragging/HeaderDragStart.d.ts +8 -0
- package/dist/HeaderDragging/HeaderDragState.d.ts +8 -0
- package/dist/HeaderDragging/createHeaderDragGhost.d.ts +1 -0
- package/dist/HeaderDragging/headerDropIndex.d.ts +5 -0
- package/dist/HeaderDragging/index.d.ts +8 -0
- package/dist/HeaderDragging/reorderedIds.d.ts +2 -0
- package/dist/HeaderDragging/useHeaderDragIntent.d.ts +8 -0
- package/dist/HeaderDragging/zoomOfAncestor.d.ts +1 -0
- package/dist/Headers/CollapseButton.d.ts +6 -0
- package/dist/Headers/DetailsToggle.d.ts +5 -0
- package/dist/Headers/EditableLabel.d.ts +10 -0
- package/dist/Headers/EntityErrorIndicator.d.ts +10 -0
- package/dist/Headers/EntityErrorKind.d.ts +6 -0
- package/dist/Headers/ErroredEntity.d.ts +17 -0
- package/dist/Headers/PillHeader.d.ts +25 -0
- package/dist/Headers/index.d.ts +7 -0
- package/dist/Icons/CogWheel.d.ts +1 -0
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Layout/boardMetrics.d.ts +20 -0
- package/dist/Layout/index.d.ts +3 -0
- package/dist/Layout/sliceLayout.d.ts +14 -0
- package/dist/Layout/sliceRows.d.ts +7 -0
- package/dist/Links/ModuleCollectionLinks.d.ts +19 -0
- package/dist/Links/drawableLinks.d.ts +8 -0
- package/dist/Links/index.d.ts +2 -0
- package/dist/Links/linkState.d.ts +17 -0
- package/dist/Menus/MenuDropdown.d.ts +29 -0
- package/dist/Menus/index.d.ts +1 -0
- package/dist/Messages/EventModelMessages.d.ts +153 -0
- package/dist/Messages/EventModelMessagesContext.d.ts +3 -0
- package/dist/Messages/EventModelMessagesProvider.d.ts +7 -0
- package/dist/Messages/defaultEventModelMessages.d.ts +2 -0
- package/dist/Messages/index.d.ts +4 -0
- package/dist/Model/Actor.d.ts +9 -0
- package/dist/Model/ActorType.d.ts +5 -0
- package/dist/Model/Assignee.d.ts +8 -0
- package/dist/Model/AssigneeKind.d.ts +5 -0
- package/dist/Model/AutomationTrigger.d.ts +9 -0
- package/dist/Model/AutomationTriggerSchedule.d.ts +8 -0
- package/dist/Model/AutomationTriggerType.d.ts +6 -0
- package/dist/Model/CommandConcurrency.d.ts +9 -0
- package/dist/Model/CommandItem.d.ts +13 -0
- package/dist/Model/CommandPropertyRules.d.ts +5 -0
- package/dist/Model/CommandRule.d.ts +4 -0
- package/dist/Model/ConcurrencyBinding.d.ts +5 -0
- package/dist/Model/ConcurrencyValueSource.d.ts +5 -0
- package/dist/Model/EventConstraint.d.ts +4 -0
- package/dist/Model/EventConstraints.d.ts +5 -0
- package/dist/Model/EventItem.d.ts +11 -0
- package/dist/Model/EventModel.d.ts +11 -0
- package/dist/Model/ExternalEventItem.d.ts +6 -0
- package/dist/Model/Feature.d.ts +14 -0
- package/dist/Model/Module.d.ts +12 -0
- package/dist/Model/ModuleCollection.d.ts +10 -0
- package/dist/Model/ModuleCollectionLink.d.ts +6 -0
- package/dist/Model/PersonaReference.d.ts +5 -0
- package/dist/Model/Position.d.ts +4 -0
- package/dist/Model/QueryItem.d.ts +7 -0
- package/dist/Model/QueryParameter.d.ts +5 -0
- package/dist/Model/QueryParameterType.d.ts +8 -0
- package/dist/Model/ReadModelItem.d.ts +8 -0
- package/dist/Model/ScreenTemplate.d.ts +4 -0
- package/dist/Model/Slice.d.ts +31 -0
- package/dist/Model/SliceSpecification.d.ts +19 -0
- package/dist/Model/SliceStatus.d.ts +9 -0
- package/dist/Model/SliceType.d.ts +6 -0
- package/dist/Model/SpecificationCommand.d.ts +7 -0
- package/dist/Model/SpecificationError.d.ts +7 -0
- package/dist/Model/SpecificationErrorRuleKind.d.ts +5 -0
- package/dist/Model/SpecificationErrorRuleReference.d.ts +8 -0
- package/dist/Model/SpecificationGivenEvent.d.ts +7 -0
- package/dist/Model/SpecificationReadModel.d.ts +6 -0
- package/dist/Model/SpecificationRunOutcome.d.ts +5 -0
- package/dist/Model/SpecificationThenEvent.d.ts +7 -0
- package/dist/Model/StickyNote.d.ts +8 -0
- package/dist/Model/UserExperienceActor.d.ts +10 -0
- package/dist/Model/index.d.ts +43 -0
- package/dist/Modules/ModuleColumnFrame.d.ts +11 -0
- package/dist/Modules/ModuleDropIndicator.d.ts +1 -0
- package/dist/Modules/ModuleHeader.d.ts +20 -0
- package/dist/Modules/ModuleHeaderAction.d.ts +14 -0
- package/dist/Modules/ModuleHeaderCell.d.ts +7 -0
- package/dist/Modules/ModuleHeaderMenu.d.ts +10 -0
- package/dist/Modules/ModulePlaceholder.d.ts +6 -0
- package/dist/Modules/ModuleSurface.d.ts +15 -0
- package/dist/Modules/ModulesArea.d.ts +23 -0
- package/dist/Modules/ModulesReordered.d.ts +2 -0
- package/dist/Modules/index.d.ts +12 -0
- package/dist/Modules/moduleAreaState.d.ts +27 -0
- package/dist/Modules/moduleWidth.d.ts +2 -0
- package/dist/Modules/persistModuleChange.d.ts +1 -0
- package/dist/Modules/useModuleDrag.d.ts +15 -0
- package/dist/Pickers/EventReferencePicker.d.ts +10 -0
- package/dist/Pickers/PickerPanel.d.ts +16 -0
- package/dist/Pickers/index.d.ts +2 -0
- package/dist/Pickers/useDismissOnOutsidePointer.d.ts +2 -0
- package/dist/Presentation/DetailLevel.d.ts +20 -0
- package/dist/Presentation/EventModelPresentation.d.ts +8 -0
- package/dist/Presentation/EventModelPresentationContext.d.ts +3 -0
- package/dist/Presentation/EventModelPresentationProvider.d.ts +7 -0
- package/dist/Presentation/VisualizationMode.d.ts +1 -0
- package/dist/Presentation/defaultEventModelPresentation.d.ts +2 -0
- package/dist/Presentation/detailsVisibility.d.ts +12 -0
- package/dist/Presentation/index.d.ts +7 -0
- package/dist/Properties/SchemaTooltipProperties.d.ts +9 -0
- package/dist/Properties/TypeBadge.d.ts +10 -0
- package/dist/Properties/index.d.ts +3 -0
- package/dist/Properties/schemaProperties.d.ts +6 -0
- package/dist/Reading/DocumentNode.d.ts +22 -0
- package/dist/Reading/InvalidEventModelDocument.d.ts +4 -0
- package/dist/Reading/index.d.ts +4 -0
- package/dist/Reading/isKnownValue.d.ts +1 -0
- package/dist/Reading/readActors.d.ts +4 -0
- package/dist/Reading/readBoardItems.d.ts +5 -0
- package/dist/Reading/readEventModelDocument.d.ts +2 -0
- package/dist/Reading/readJsonSchema.d.ts +2 -0
- package/dist/Reading/readModules.d.ts +3 -0
- package/dist/Reading/readSlice.d.ts +3 -0
- package/dist/Reading/readSliceItems.d.ts +7 -0
- package/dist/Reading/readSpecification.d.ts +3 -0
- package/dist/References/EventNavigateButton.d.ts +5 -0
- package/dist/References/ExternalEventCard.d.ts +14 -0
- package/dist/References/index.d.ts +3 -0
- package/dist/References/useReferenceHover.d.ts +12 -0
- package/dist/RowLabels/ActorRowDragGhost.d.ts +5 -0
- package/dist/RowLabels/ActorRowDropIndicator.d.ts +1 -0
- package/dist/RowLabels/ActorsReordered.d.ts +3 -0
- package/dist/RowLabels/RowLabel.d.ts +19 -0
- package/dist/RowLabels/RowLabelAction.d.ts +8 -0
- package/dist/RowLabels/RowLabelBadge.d.ts +8 -0
- package/dist/RowLabels/RowLabelsColumn.d.ts +20 -0
- package/dist/RowLabels/RowLabelsColumnFrame.d.ts +7 -0
- package/dist/RowLabels/actorKinds.d.ts +8 -0
- package/dist/RowLabels/actorRows.d.ts +4 -0
- package/dist/RowLabels/index.d.ts +12 -0
- package/dist/RowLabels/rowTypeName.d.ts +3 -0
- package/dist/RowLabels/useActorRowDrag.d.ts +30 -0
- package/dist/Rows/CellAction.d.ts +8 -0
- package/dist/Rows/CellActionButton.d.ts +6 -0
- package/dist/Rows/CellCorner.d.ts +7 -0
- package/dist/Rows/CellCornerAction.d.ts +7 -0
- package/dist/Rows/CellCornerPlacement.d.ts +4 -0
- package/dist/Rows/Chat/ChatCell.d.ts +9 -0
- package/dist/Rows/Chat/index.d.ts +1 -0
- package/dist/Rows/Events/EventCard.d.ts +9 -0
- package/dist/Rows/Events/EventReferenceCard.d.ts +7 -0
- package/dist/Rows/Events/EventsCell.d.ts +12 -0
- package/dist/Rows/Events/SliceEvents.d.ts +11 -0
- package/dist/Rows/Events/index.d.ts +5 -0
- package/dist/Rows/Events/referenceableEvents.d.ts +2 -0
- package/dist/Rows/Interaction/InteractionCard.d.ts +14 -0
- package/dist/Rows/Interaction/InteractionCell.d.ts +31 -0
- package/dist/Rows/Interaction/InteractionMiniCard.d.ts +4 -0
- package/dist/Rows/Interaction/OptionalReadModel.d.ts +6 -0
- package/dist/Rows/Interaction/SliceInteraction.d.ts +11 -0
- package/dist/Rows/Interaction/index.d.ts +5 -0
- package/dist/Rows/RowType.d.ts +7 -0
- package/dist/Rows/System/SystemCell.d.ts +12 -0
- package/dist/Rows/System/TriggerControl.d.ts +8 -0
- package/dist/Rows/System/TriggerKind.d.ts +5 -0
- package/dist/Rows/System/index.d.ts +4 -0
- package/dist/Rows/System/triggerBadges.d.ts +4 -0
- package/dist/Rows/UserExperience/AddPrototypeButton.d.ts +7 -0
- package/dist/Rows/UserExperience/PrototypeTemplate.d.ts +6 -0
- package/dist/Rows/UserExperience/UiCell.d.ts +17 -0
- package/dist/Rows/UserExperience/addPrototypeMenuItems.d.ts +8 -0
- package/dist/Rows/UserExperience/index.d.ts +4 -0
- package/dist/Rows/eventRowAffordances.d.ts +5 -0
- package/dist/Rows/index.d.ts +12 -0
- package/dist/SliceDragging/SliceDragGestureVerdict.d.ts +5 -0
- package/dist/SliceDragging/SliceDragGhost.d.ts +6 -0
- package/dist/SliceDragging/SliceDropIndicator.d.ts +5 -0
- package/dist/SliceDragging/SliceDropTarget.d.ts +14 -0
- package/dist/SliceDragging/SliceDropVerdict.d.ts +4 -0
- package/dist/SliceDragging/SliceMoved.d.ts +2 -0
- package/dist/SliceDragging/ValidateSliceDrop.d.ts +3 -0
- package/dist/SliceDragging/dropIndicatorClassName.d.ts +1 -0
- package/dist/SliceDragging/index.d.ts +14 -0
- package/dist/SliceDragging/readSliceDragGesture.d.ts +5 -0
- package/dist/SliceDragging/readSlicePress.d.ts +20 -0
- package/dist/SliceDragging/sliceMove.d.ts +10 -0
- package/dist/SliceDragging/snapshotSlice.d.ts +8 -0
- package/dist/SliceDragging/useSliceDrag.d.ts +30 -0
- package/dist/SliceDragging/useSliceDragIntent.d.ts +10 -0
- package/dist/SliceTypes/SliceTypeIcon.d.ts +5 -0
- package/dist/SliceTypes/SliceTypeMenu.d.ts +6 -0
- package/dist/SliceTypes/index.d.ts +3 -0
- package/dist/SliceTypes/sliceTypeMenuItems.d.ts +7 -0
- package/dist/Slices/SliceColumn.d.ts +18 -0
- package/dist/Slices/SliceColumnFrame.d.ts +20 -0
- package/dist/Slices/SliceContext.d.ts +2 -0
- package/dist/Slices/SliceContextValue.d.ts +7 -0
- package/dist/Slices/SliceHeader.d.ts +14 -0
- package/dist/Slices/SliceHeaderAction.d.ts +10 -0
- package/dist/Slices/SliceHeaderSlice.d.ts +2 -0
- package/dist/Slices/SliceNames.d.ts +6 -0
- package/dist/Slices/SlicePlaceholder.d.ts +15 -0
- package/dist/Slices/SliceProvider.d.ts +10 -0
- package/dist/Slices/SliceRows.d.ts +28 -0
- package/dist/Slices/SlicesArea.d.ts +38 -0
- package/dist/Slices/createOptimisticSlice.d.ts +3 -0
- package/dist/Slices/index.d.ts +15 -0
- package/dist/Slices/resolveSliceReadOnly.d.ts +3 -0
- package/dist/Slices/sliceAreaState.d.ts +43 -0
- package/dist/Slices/useSlice.d.ts +3 -0
- package/dist/Specifications/GivenSection.d.ts +12 -0
- package/dist/Specifications/SpecificationAction.d.ts +19 -0
- package/dist/Specifications/SpecificationAddPicker.d.ts +11 -0
- package/dist/Specifications/SpecificationCollection.d.ts +16 -0
- package/dist/Specifications/SpecificationEditing.d.ts +20 -0
- package/dist/Specifications/SpecificationErrorCard.d.ts +5 -0
- package/dist/Specifications/SpecificationHeader.d.ts +14 -0
- package/dist/Specifications/SpecificationItemCard.d.ts +7 -0
- package/dist/Specifications/SpecificationItemKind.d.ts +5 -0
- package/dist/Specifications/SpecificationItemToOpen.d.ts +14 -0
- package/dist/Specifications/SpecificationRow.d.ts +8 -0
- package/dist/Specifications/SpecificationRunButton.d.ts +7 -0
- package/dist/Specifications/SpecificationRunState.d.ts +23 -0
- package/dist/Specifications/SpecificationSection.d.ts +8 -0
- package/dist/Specifications/SpecificationStatus.d.ts +14 -0
- package/dist/Specifications/ThenSection.d.ts +15 -0
- package/dist/Specifications/WhenSection.d.ts +12 -0
- package/dist/Specifications/index.d.ts +10 -0
- package/dist/Specifications/itemValues.d.ts +7 -0
- package/dist/Specifications/ruleErrors.d.ts +8 -0
- package/dist/Specifications/specificationCollectionState.d.ts +7 -0
- package/dist/Specifications/specificationEvents.d.ts +3 -0
- package/dist/Statuses/SliceStatusIcon.d.ts +5 -0
- package/dist/Statuses/SliceStatusPicker.d.ts +8 -0
- package/dist/Statuses/changeSliceStatus.d.ts +2 -0
- package/dist/Statuses/index.d.ts +4 -0
- package/dist/Statuses/sliceStatuses.d.ts +6 -0
- package/dist/StickyNotes/StickyNoteBounds.d.ts +6 -0
- package/dist/StickyNotes/StickyNoteChanges.d.ts +9 -0
- package/dist/StickyNotes/StickyNoteHandle.d.ts +4 -0
- package/dist/StickyNotes/StickyNoteState.d.ts +16 -0
- package/dist/StickyNotes/StickyNotes.d.ts +6 -0
- package/dist/StickyNotes/index.d.ts +6 -0
- package/dist/StickyNotes/isEditableTarget.d.ts +1 -0
- package/dist/Tooltips/AnchoredOverlay.d.ts +27 -0
- package/dist/Tooltips/GridTooltip.d.ts +21 -0
- package/dist/Tooltips/index.d.ts +2 -0
- package/dist/Viewport/index.d.ts +2 -0
- package/dist/Viewport/useInViewport.d.ts +3 -0
- package/dist/Viewport/viewportFlushScheduler.d.ts +7 -0
- package/dist/event-model-document.schema.json +827 -0
- package/dist/event-models.css +2 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +7682 -0
- package/dist/index.js.map +1 -0
- package/dist/theme.css +53 -0
- package/package.json +66 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import { type FeaturesAreaHandle } from '../Features';
|
|
4
|
+
import { type Feature, type ModuleCollection } from '../Model';
|
|
5
|
+
import { RowType } from '../Rows';
|
|
6
|
+
import type { CollectionGridSlots } from './CollectionGridSlots';
|
|
7
|
+
import type { CollectionGridEditor } from './CollectionGridEditor';
|
|
8
|
+
export interface CollectionGridFeatureProps {
|
|
9
|
+
ref?: Ref<FeaturesAreaHandle<Feature>>;
|
|
10
|
+
moduleId: Guid;
|
|
11
|
+
collection: ModuleCollection;
|
|
12
|
+
features: Feature[];
|
|
13
|
+
rows: RowType[];
|
|
14
|
+
heights: Record<RowType, number>;
|
|
15
|
+
slots?: CollectionGridSlots;
|
|
16
|
+
editor: CollectionGridEditor;
|
|
17
|
+
onFeaturesChanged?: (features: Feature[]) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const CollectionGridFeature: ({ ref, moduleId, collection, features, rows, heights, slots, editor, onFeaturesChanged }: CollectionGridFeatureProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import { type FeaturesAreaProps } from '../Features';
|
|
4
|
+
import { type SlicesAreaHandle } from '../Slices';
|
|
5
|
+
import { type EventItem, type Feature, type ModuleCollection, type Slice } from '../Model';
|
|
6
|
+
import { RowType } from '../Rows';
|
|
7
|
+
import type { CollectionGridSlots } from './CollectionGridSlots';
|
|
8
|
+
import type { CollectionGridEditor } from './CollectionGridEditor';
|
|
9
|
+
import type { CollectionGridFeatureHeaderControls } from './CollectionGridFeatureHeaderControls';
|
|
10
|
+
export interface CollectionGridFeatureColumnProps {
|
|
11
|
+
feature: Feature;
|
|
12
|
+
options: Parameters<FeaturesAreaProps<Feature>['renderColumn']>[1];
|
|
13
|
+
moduleId: Guid;
|
|
14
|
+
collection: ModuleCollection;
|
|
15
|
+
rows: RowType[];
|
|
16
|
+
heights: Record<RowType, number>;
|
|
17
|
+
slices: Slice[];
|
|
18
|
+
externalEvents: EventItem[];
|
|
19
|
+
slots?: CollectionGridSlots;
|
|
20
|
+
editor: CollectionGridEditor;
|
|
21
|
+
onSliceArea: (handle: SlicesAreaHandle<Slice> | null) => void;
|
|
22
|
+
sliceAreas: ReadonlyMap<string, SlicesAreaHandle<Slice>>;
|
|
23
|
+
renderHeader: (controls: CollectionGridFeatureHeaderControls) => ReactNode;
|
|
24
|
+
onSlicesChanged?: (slices: Slice[]) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const CollectionGridFeatureColumn: ({ feature, options, moduleId, collection, rows, heights, slices, externalEvents, slots, editor, onSliceArea, sliceAreas, renderHeader, onSlicesChanged }: CollectionGridFeatureColumnProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HeaderDragStart } from '../HeaderDragging';
|
|
2
|
+
import type { SliceType } from '../Model';
|
|
3
|
+
import type { SliceNames } from '../Slices';
|
|
4
|
+
export interface CollectionGridFeatureHeaderControls {
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
dragging: boolean;
|
|
7
|
+
onDragStart?: (start: HeaderDragStart) => void;
|
|
8
|
+
onAddSubFeature?: (name?: string) => void;
|
|
9
|
+
onAddSlice?: (sliceType: SliceType, names?: SliceNames) => void;
|
|
10
|
+
onRenamed?: (name: string) => void;
|
|
11
|
+
onToggleCollapse?: () => void;
|
|
12
|
+
onCollapseFailed?: () => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { Feature, Module, ModuleCollection } from '../Model';
|
|
3
|
+
import { RowType } from '../Rows';
|
|
4
|
+
import type { CollectionGridSlots } from './CollectionGridSlots';
|
|
5
|
+
import type { CollectionGridEditor } from './CollectionGridEditor';
|
|
6
|
+
import type { HeaderDragStart } from '../HeaderDragging';
|
|
7
|
+
export interface CollectionGridModuleProps {
|
|
8
|
+
module: Module;
|
|
9
|
+
liveFeatures?: Feature[];
|
|
10
|
+
index: number;
|
|
11
|
+
collection: ModuleCollection;
|
|
12
|
+
rows: RowType[];
|
|
13
|
+
heights: Record<RowType, number>;
|
|
14
|
+
slots?: CollectionGridSlots;
|
|
15
|
+
editor: CollectionGridEditor;
|
|
16
|
+
dragging?: boolean;
|
|
17
|
+
onDragStart?: (start: HeaderDragStart) => void;
|
|
18
|
+
onAddModule?: () => void;
|
|
19
|
+
onToggleCollapse?: () => void;
|
|
20
|
+
onRenamed?: (name: string) => void;
|
|
21
|
+
onFeaturesChanged?: (moduleId: Guid, features: Feature[]) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const CollectionGridModule: ({ module, liveFeatures, index, collection, rows, heights, slots, editor, dragging, onDragStart, onAddModule, onToggleCollapse, onRenamed, onFeaturesChanged }: CollectionGridModuleProps) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HeaderDragStart } from '../HeaderDragging';
|
|
2
|
+
export interface CollectionGridModuleHeaderControls {
|
|
3
|
+
onDragStart?: (start: HeaderDragStart) => void;
|
|
4
|
+
onAddModule?: () => void;
|
|
5
|
+
onAddFeature?: (name?: string) => void;
|
|
6
|
+
onToggleCollapse?: () => void;
|
|
7
|
+
onRenamed?: (name: string) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type EventItem, type Slice } from '../Model';
|
|
2
|
+
import { RowType } from '../Rows';
|
|
3
|
+
import type { Feature, Module, ModuleCollection } from '../Model';
|
|
4
|
+
import type { CollectionGridSlots } from './CollectionGridSlots';
|
|
5
|
+
import type { CollectionGridSliceHeaderControls } from './CollectionGridSliceHeaderControls';
|
|
6
|
+
export interface CollectionGridSliceProps {
|
|
7
|
+
slice: Slice;
|
|
8
|
+
collapsed: boolean;
|
|
9
|
+
moduleId: Module['id'];
|
|
10
|
+
featureId: Feature['id'];
|
|
11
|
+
collection: ModuleCollection;
|
|
12
|
+
rows: RowType[];
|
|
13
|
+
heights: Record<RowType, number>;
|
|
14
|
+
priorEvents: EventItem[];
|
|
15
|
+
externalEvents: EventItem[];
|
|
16
|
+
slots?: CollectionGridSlots;
|
|
17
|
+
controls?: CollectionGridSliceHeaderControls;
|
|
18
|
+
}
|
|
19
|
+
export declare const CollectionGridSlice: ({ slice, collapsed, moduleId, featureId, collection, rows, heights, priorEvents, externalEvents, slots, controls }: CollectionGridSliceProps) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { SliceType } from '../Model';
|
|
3
|
+
import type { SliceDragStartHandler } from '../SliceDragging';
|
|
4
|
+
export interface CollectionGridSliceHeaderControls {
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
sliceCollapsed: boolean;
|
|
7
|
+
isDragging: boolean;
|
|
8
|
+
onSliceDragStart?: SliceDragStartHandler;
|
|
9
|
+
onAddSlice?: (sliceType: SliceType, afterSliceId?: Guid) => void;
|
|
10
|
+
onToggleCollapse?: () => void;
|
|
11
|
+
onRenamed?: (name: string) => void;
|
|
12
|
+
onMoveToFeature?: (targetFeatureId: Guid) => void;
|
|
13
|
+
onDuplicated?: (newSliceId: Guid) => void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Feature, Module, Slice } from '../Model';
|
|
3
|
+
import type { SliceRowCell } from '../Slices';
|
|
4
|
+
import type { Actor } from '../Model';
|
|
5
|
+
import type { CollectionGridModuleHeaderControls } from './CollectionGridModuleHeaderControls';
|
|
6
|
+
import type { CollectionGridFeatureHeaderControls } from './CollectionGridFeatureHeaderControls';
|
|
7
|
+
import type { CollectionGridSliceHeaderControls } from './CollectionGridSliceHeaderControls';
|
|
8
|
+
export interface CollectionGridSlots {
|
|
9
|
+
moduleBoundary?: (module: Module, children: ReactNode) => ReactNode;
|
|
10
|
+
featureBoundary?: (feature: Feature, children: ReactNode) => ReactNode;
|
|
11
|
+
sliceBoundary?: (slice: Slice, children: ReactNode) => ReactNode;
|
|
12
|
+
moduleHeader?: (module: Module, controls: CollectionGridModuleHeaderControls) => ReactNode;
|
|
13
|
+
moduleTemplate?: (module: Module, width: number) => ReactNode;
|
|
14
|
+
featureHeader?: (feature: Feature, controls: CollectionGridFeatureHeaderControls) => ReactNode;
|
|
15
|
+
featureTemplate?: (feature: Feature, width: number) => ReactNode;
|
|
16
|
+
sliceHeader?: (slice: Slice, controls: CollectionGridSliceHeaderControls) => ReactNode;
|
|
17
|
+
sliceCell?: (slice: Slice, cell: SliceRowCell<Actor>) => ReactNode | undefined;
|
|
18
|
+
sliceBodyOverlay?: (slice: Slice, collapsed: boolean) => ReactNode;
|
|
19
|
+
specifications?: (slice: Slice, inView: boolean, specificationsWidth: number, sliceCollapsed: boolean) => ReactNode;
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ScreenTemplate } from '../Model';
|
|
2
|
+
export interface CollectionGridTemplateProps {
|
|
3
|
+
template: ScreenTemplate;
|
|
4
|
+
width: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const CollectionGridTemplate: ({ template, width }: CollectionGridTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { Position } from '../Model';
|
|
3
|
+
import type { CollectionMoved, CollectionMoving } from './CollectionMoved';
|
|
4
|
+
export interface CollectionMoveHandleProps {
|
|
5
|
+
collectionId: Guid;
|
|
6
|
+
position: Position;
|
|
7
|
+
getZoom: () => number;
|
|
8
|
+
topOffset?: number;
|
|
9
|
+
onCollectionMoving?: CollectionMoving;
|
|
10
|
+
onCollectionMoved?: CollectionMoved;
|
|
11
|
+
}
|
|
12
|
+
export declare const CollectionMoveHandle: ({ onCollectionMoved, ...props }: CollectionMoveHandleProps) => import("react").JSX.Element | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { CollectionItem } from './collectionState';
|
|
4
|
+
interface CollectionModule {
|
|
5
|
+
id: Guid;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
interface ViewportCollection extends CollectionItem {
|
|
9
|
+
modules: CollectionModule[];
|
|
10
|
+
}
|
|
11
|
+
export interface CollectionViewportProps<T extends ViewportCollection> {
|
|
12
|
+
collection: T;
|
|
13
|
+
estimatedSize: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
moduleWidths: number[];
|
|
17
|
+
};
|
|
18
|
+
measuredSize?: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
onSize?: (id: Guid, width: number, height: number) => void;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
declare function Viewport<T extends ViewportCollection>({ collection, estimatedSize, measuredSize, onSize, children }: CollectionViewportProps<T>): import("react").JSX.Element;
|
|
26
|
+
export declare const CollectionViewport: import("react").MemoExoticComponent<typeof Viewport>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Feature, type ModuleCollection, type Slice } from '../Model';
|
|
2
|
+
import { RowType } from '../Rows';
|
|
3
|
+
export declare const collectionSlices: (collection: ModuleCollection) => {
|
|
4
|
+
slice: Slice;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const collectionRows: (collection: ModuleCollection) => RowType[];
|
|
7
|
+
export declare const collectionRowHeights: (collection: ModuleCollection) => Record<RowType, number>;
|
|
8
|
+
export declare const collectionContentHeight: (collection: ModuleCollection, rows: readonly RowType[], heights: Readonly<Record<RowType, number>>) => number;
|
|
9
|
+
export declare const featureWidth: (feature: Feature) => number;
|
|
10
|
+
export declare const featureColumns: (features: Feature[]) => Feature[];
|
|
11
|
+
export declare const collectionModuleWidth: (name: string, features: Feature[]) => number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { Position } from '../Model';
|
|
3
|
+
export interface CollectionItem {
|
|
4
|
+
id: Guid;
|
|
5
|
+
position: Position;
|
|
6
|
+
}
|
|
7
|
+
export interface CollectionState<T extends CollectionItem> {
|
|
8
|
+
snapshot: T[];
|
|
9
|
+
collections: T[];
|
|
10
|
+
additions: T[];
|
|
11
|
+
locallyMovedAt: ReadonlyMap<string, number>;
|
|
12
|
+
pendingMoveIds: ReadonlySet<string>;
|
|
13
|
+
contentSignature: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const collectionContentSignature: (collections: readonly CollectionItem[]) => string;
|
|
16
|
+
export declare function createCollectionState<T extends CollectionItem>(snapshot: T[]): CollectionState<T>;
|
|
17
|
+
export declare function reconcileCollections<T extends CollectionItem>(state: CollectionState<T>, snapshot: T[], now: number): CollectionState<T>;
|
|
18
|
+
export declare function revertCollectionMove<T extends CollectionItem>(state: CollectionState<T>, id: Guid): CollectionState<T>;
|
|
19
|
+
export declare function beginCollectionMovePersistence<T extends CollectionItem>(state: CollectionState<T>, id: Guid): CollectionState<T>;
|
|
20
|
+
export declare function endCollectionMovePersistence<T extends CollectionItem>(state: CollectionState<T>, id: Guid): CollectionState<T>;
|
|
21
|
+
export declare function moveCollection<T extends CollectionItem>(state: CollectionState<T>, id: Guid, deltaX: number, deltaY: number, now: number): CollectionState<T>;
|
|
22
|
+
export declare const OVERLAP_STEP = 48;
|
|
23
|
+
export declare const SAME_SPOT_TOLERANCE = 0.5;
|
|
24
|
+
export declare function resolveOverlappingCollections<T extends CollectionItem>(collections: T[]): T[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './CollectionMoved';
|
|
2
|
+
export * from './CollectionMoveHandle';
|
|
3
|
+
export * from './useCollectionMove';
|
|
4
|
+
export * from './collectionState';
|
|
5
|
+
export * from './useCollectionsArea';
|
|
6
|
+
export * from './CollectionViewport';
|
|
7
|
+
export * from './estimateCollectionSize';
|
|
8
|
+
export * from './CollectionGrid';
|
|
9
|
+
export * from './CollectionGridSlots';
|
|
10
|
+
export * from './CollectionGridEditor';
|
|
11
|
+
export * from './CollectionGridModuleHeaderControls';
|
|
12
|
+
export * from './CollectionGridFeatureHeaderControls';
|
|
13
|
+
export * from './CollectionGridSliceHeaderControls';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PointerEvent } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { Position } from '../Model';
|
|
4
|
+
import type { CollectionMoved, CollectionMoving } from './CollectionMoved';
|
|
5
|
+
export interface CollectionMoveHandlers {
|
|
6
|
+
onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
|
|
7
|
+
onPointerMove: (event: PointerEvent<HTMLDivElement>) => void;
|
|
8
|
+
onPointerUp: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useCollectionMove(collectionId: Guid, position: Position, getZoom: () => number, onCollectionMoving?: CollectionMoving, onCollectionMoved?: CollectionMoved): CollectionMoveHandlers;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SetStateAction } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import { type CollectionItem } from './collectionState';
|
|
4
|
+
export interface CollectionsAreaOptions<T extends CollectionItem> {
|
|
5
|
+
initialCollections: T[];
|
|
6
|
+
onAddCollection?: (x: number, y: number, collections: T[]) => Promise<T | undefined>;
|
|
7
|
+
onCollectionMoved?: (id: Guid, position: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}) => Promise<boolean>;
|
|
11
|
+
onCollectionsChange?: (collections: T[]) => void;
|
|
12
|
+
onPersistenceError?: (error: unknown) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface CollectionsArea<T extends CollectionItem> {
|
|
15
|
+
collections: T[];
|
|
16
|
+
pendingMoveIds: ReadonlySet<string>;
|
|
17
|
+
setCollections: (updater: SetStateAction<T[]>) => void;
|
|
18
|
+
addCollection: (x: number, y: number) => Promise<void>;
|
|
19
|
+
moveCollection: (id: Guid, deltaX: number, deltaY: number) => void;
|
|
20
|
+
collectionMoved: (id: Guid, position: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}) => Promise<void>;
|
|
24
|
+
canMove: boolean;
|
|
25
|
+
canAdd: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function useCollectionsArea<T extends CollectionItem>({ initialCollections, onAddCollection, onCollectionMoved, onCollectionsChange, onPersistenceError, }: CollectionsAreaOptions<T>): CollectionsArea<T>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SliceType } from '../Model';
|
|
3
|
+
import { RowType } from '../Rows';
|
|
4
|
+
export interface ConnectorProps {
|
|
5
|
+
/**
|
|
6
|
+
* Override the horizontal center of the connector arrow/fill-line.
|
|
7
|
+
* 'left' = 25% (read-model column), 'center' = 50% (default), 'right' = 75% (command column).
|
|
8
|
+
*/
|
|
9
|
+
columnPosition?: 'left' | 'center' | 'right';
|
|
10
|
+
}
|
|
11
|
+
export declare const ConnectorIncomingTop: React.FC<ConnectorProps>;
|
|
12
|
+
export declare const ConnectorOutgoingTop: React.FC<ConnectorProps>;
|
|
13
|
+
export declare const PassthroughConnector: React.FC<ConnectorProps>;
|
|
14
|
+
export declare const ConnectorOutgoingBottom: React.FC<ConnectorProps>;
|
|
15
|
+
export declare const ConnectorIncomingBottom: React.FC<ConnectorProps>;
|
|
16
|
+
export interface CellConnectors {
|
|
17
|
+
bottomOutgoing?: boolean;
|
|
18
|
+
topIncoming?: boolean;
|
|
19
|
+
topOutgoing?: boolean;
|
|
20
|
+
bottomIncoming?: boolean;
|
|
21
|
+
passthrough?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function cellConnectors(rowType: RowType, sliceType: SliceType, contentRows?: RowType[]): CellConnectors;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies the role a card plays in a slice's flow, used to anchor the curved
|
|
3
|
+
* connection lines drawn in the "lines" visualization mode. The string values
|
|
4
|
+
* are emitted as the `data-flow-node` attribute on the corresponding card element.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum FlowNodeActor {
|
|
7
|
+
ui = "ui",
|
|
8
|
+
command = "command",
|
|
9
|
+
readModel = "readModel",
|
|
10
|
+
cogwheel = "cogwheel",
|
|
11
|
+
event = "event",
|
|
12
|
+
externalEvent = "externalEvent"
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SliceConnection } from './computeSliceConnections';
|
|
3
|
+
export interface SliceConnectionsContextValue {
|
|
4
|
+
getConnection: (sliceId: string) => SliceConnection | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface SliceConnectionsProviderProps {
|
|
7
|
+
connections: Map<string, SliceConnection>;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const SliceConnectionsProvider: ({ connections, children }: SliceConnectionsProviderProps) => React.JSX.Element;
|
|
11
|
+
export declare const useSliceConnection: (sliceId: string) => SliceConnection | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ConnectionEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
sourceEventId?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ConnectionSlice {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
events: ConnectionEvent[];
|
|
10
|
+
automationTriggerEventId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SliceConnectionLink {
|
|
13
|
+
eventId: string;
|
|
14
|
+
eventName: string;
|
|
15
|
+
sliceId: string;
|
|
16
|
+
sliceName: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SliceConnection {
|
|
19
|
+
connectedSliceIds: ReadonlySet<string>;
|
|
20
|
+
consumed: SliceConnectionLink[];
|
|
21
|
+
produced: SliceConnectionLink[];
|
|
22
|
+
}
|
|
23
|
+
export declare function computeSliceConnections(slices: readonly ConnectionSlice[]): Map<string, SliceConnection>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './Connectors';
|
|
2
|
+
export * from './FlowNodeActor';
|
|
3
|
+
export * from './computeSliceConnections';
|
|
4
|
+
export * from './SliceConnections';
|
|
5
|
+
export * from './SliceConnectionsContext';
|
|
6
|
+
export * from './useConnectionHighlight';
|
|
7
|
+
export * from './flowNodeOrder';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ConnectionHighlight {
|
|
3
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
4
|
+
onMouseEnter: () => void;
|
|
5
|
+
onMouseLeave: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useConnectionHighlight(connectedSliceIds: ReadonlySet<string> | undefined): ConnectionHighlight;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
import type { SliceType } from '../Model';
|
|
3
|
+
import type { FeatureHeaderMenuAction } from './FeatureHeaderMenuAction';
|
|
4
|
+
export interface FeatureAddMenuProps {
|
|
5
|
+
featureId: Guid;
|
|
6
|
+
onAddSubFeature?: () => void;
|
|
7
|
+
onAddSlice?: (sliceType: SliceType) => void;
|
|
8
|
+
actions?: readonly FeatureHeaderMenuAction[];
|
|
9
|
+
}
|
|
10
|
+
export declare const FeatureAddMenu: ({ featureId, onAddSubFeature, onAddSlice, actions }: FeatureAddMenuProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
export interface FeatureColumnFrameProps {
|
|
4
|
+
featureId: Guid;
|
|
5
|
+
moduleId: Guid;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
dragging?: boolean;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const FeatureColumnFrame: ({ featureId, moduleId, enabled, dragging, children }: FeatureColumnFrameProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
export interface FeatureGridSurfaceProps {
|
|
4
|
+
featureId: Guid;
|
|
5
|
+
moduleId: Guid;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
rowCollapsed: boolean;
|
|
9
|
+
width: number;
|
|
10
|
+
headerVisibility: 'visible' | 'hidden' | 'none';
|
|
11
|
+
header: ReactNode;
|
|
12
|
+
screenTemplate?: ReactNode;
|
|
13
|
+
slices: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const FeatureGridSurface: ({ featureId, moduleId, enabled, collapsed, rowCollapsed, width, headerVisibility, header, screenTemplate, slices }: FeatureGridSurfaceProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SliceType } from '../Model';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { SliceStatus } from '../Model';
|
|
4
|
+
import { type HeaderDragStart } from '../HeaderDragging';
|
|
5
|
+
export interface FeatureHeaderProps {
|
|
6
|
+
featureId: Guid;
|
|
7
|
+
name: string;
|
|
8
|
+
height: number;
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
onToggleCollapse?: () => void;
|
|
11
|
+
onRenamed?: (featureId: Guid, name: string) => void;
|
|
12
|
+
status?: SliceStatus;
|
|
13
|
+
detailsVisible?: boolean;
|
|
14
|
+
onToggleDetails?: () => void;
|
|
15
|
+
dragging?: boolean;
|
|
16
|
+
onDragStart?: (start: HeaderDragStart) => void;
|
|
17
|
+
error?: string;
|
|
18
|
+
onAddSubFeature?: () => void;
|
|
19
|
+
onAddSlice?: (sliceType: SliceType) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const FeatureHeader: ({ featureId, name, height, collapsed, onToggleCollapse, onRenamed, status, detailsVisible, onToggleDetails, dragging, onDragStart, error, onAddSubFeature, onAddSlice, }: FeatureHeaderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
export interface FeatureHeaderAction {
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
tooltip: string;
|
|
6
|
+
when?: (featureId: Guid) => boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
disabledTooltip?: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
indicator?: boolean;
|
|
11
|
+
onActivate: (featureId: Guid, host: DOMRect) => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
|
+
import type { FeatureDropEdge } from './featureDropEdge';
|
|
3
|
+
export interface FeatureHeaderCellProps {
|
|
4
|
+
width: number;
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
dropEdge?: FeatureDropEdge;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
9
|
+
}
|
|
10
|
+
export declare const FeatureHeaderCell: ({ width, collapsed, dropEdge, children, ref }: FeatureHeaderCellProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import type { FeatureHeaderMenuAction } from './FeatureHeaderMenuAction';
|
|
4
|
+
export interface FeatureHeaderMenuProps {
|
|
5
|
+
featureId: Guid;
|
|
6
|
+
tooltip: string;
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
actions: readonly FeatureHeaderMenuAction[];
|
|
9
|
+
}
|
|
10
|
+
export declare const FeatureHeaderMenu: ({ featureId, tooltip, icon, actions }: FeatureHeaderMenuProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
export interface FeatureHeaderMenuAction {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
description?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
isSeparator?: boolean;
|
|
11
|
+
when?: (featureId: Guid) => boolean;
|
|
12
|
+
onActivate: (featureId: Guid, host: DOMRect) => void;
|
|
13
|
+
items?: readonly FeatureHeaderMenuAction[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
3
|
+
import { useFeatureDrag } from './useFeatureDrag';
|
|
4
|
+
import { type FeatureAreaItem } from './featureAreaState';
|
|
5
|
+
export interface FeaturesAreaHandle<T> {
|
|
6
|
+
addFeature: (name?: string) => Promise<void>;
|
|
7
|
+
addSubFeature: (parentId: Guid, name?: string) => Promise<void>;
|
|
8
|
+
updateFeature: (id: Guid, update: (feature: T) => T) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface FeaturesAreaProps<T extends FeatureAreaItem<T>> {
|
|
11
|
+
ref?: Ref<FeaturesAreaHandle<T>>;
|
|
12
|
+
initialFeatures: T[];
|
|
13
|
+
moduleId: Guid;
|
|
14
|
+
widthOf: (feature: T) => number;
|
|
15
|
+
isCollapsed: (feature: T) => boolean;
|
|
16
|
+
forceCollapsed?: boolean;
|
|
17
|
+
onCollapseChanged?: (featureId: Guid, collapsed: boolean) => void;
|
|
18
|
+
occupiesColumn: (feature: T) => boolean;
|
|
19
|
+
renderHeader: (feature: T, options: {
|
|
20
|
+
collapsed: boolean;
|
|
21
|
+
dragging: boolean;
|
|
22
|
+
onDragStart?: NonNullable<ReturnType<typeof useFeatureDrag>['handleFeatureDragStart']>;
|
|
23
|
+
addSubFeature?: (name?: string) => void;
|
|
24
|
+
onRenamed?: (name: string) => void;
|
|
25
|
+
onToggleCollapse?: () => void;
|
|
26
|
+
onCollapseFailed?: () => void;
|
|
27
|
+
}) => ReactNode;
|
|
28
|
+
renderColumn: (feature: T, options: {
|
|
29
|
+
headerVisibility: 'visible' | 'hidden' | 'none';
|
|
30
|
+
addSubFeature?: (name?: string) => void;
|
|
31
|
+
onRenamed?: (name: string) => void;
|
|
32
|
+
onToggleCollapse?: () => void;
|
|
33
|
+
onCollapseFailed?: () => void;
|
|
34
|
+
collapsed: boolean;
|
|
35
|
+
}) => ReactNode;
|
|
36
|
+
renderFeatureBoundary?: (feature: T, content: ReactNode) => ReactNode;
|
|
37
|
+
onAddFeature?: (name?: string, parentId?: Guid) => Promise<T | undefined>;
|
|
38
|
+
onRenameFeature?: (featureId: Guid, name: string) => Promise<void>;
|
|
39
|
+
onFeaturesReordered?: (features: T[]) => void;
|
|
40
|
+
onFeaturesChanged?: (features: T[]) => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function FeaturesArea<T extends FeatureAreaItem<T>>({ ref, initialFeatures, moduleId, widthOf, isCollapsed, forceCollapsed, onCollapseChanged, occupiesColumn, renderHeader, renderColumn, renderFeatureBoundary, onAddFeature, onRenameFeature, onFeaturesReordered, onFeaturesChanged, }: FeaturesAreaProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Guid } from '@cratis/fundamentals';
|
|
2
|
+
export interface FeatureAreaItem<T> {
|
|
3
|
+
id: Guid;
|
|
4
|
+
subFeatures: T[];
|
|
5
|
+
name: string;
|
|
6
|
+
collapsed: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface FeatureAreaState<T extends FeatureAreaItem<T>> {
|
|
9
|
+
snapshot: T[];
|
|
10
|
+
features: T[];
|
|
11
|
+
pendingAdditions: {
|
|
12
|
+
feature: T;
|
|
13
|
+
parentId?: Guid;
|
|
14
|
+
}[];
|
|
15
|
+
order?: Guid[];
|
|
16
|
+
pendingRenames: ReadonlyMap<string, string>;
|
|
17
|
+
pendingCollapses: ReadonlyMap<string, boolean>;
|
|
18
|
+
}
|
|
19
|
+
export declare const createFeatureAreaState: <T extends FeatureAreaItem<T>>(features: T[]) => FeatureAreaState<T>;
|
|
20
|
+
export declare function updateFeature<T extends FeatureAreaItem<T>>(features: T[], id: Guid, update: (feature: T) => T): T[];
|
|
21
|
+
export declare function insertFeature<T extends FeatureAreaItem<T>>(features: T[], feature: T, parentId?: Guid): T[];
|
|
22
|
+
export declare function reconcileFeatures<T extends FeatureAreaItem<T>>(state: FeatureAreaState<T>, snapshot: T[]): FeatureAreaState<T>;
|
|
23
|
+
export declare function revertFeatureRename<T extends FeatureAreaItem<T>>(state: FeatureAreaState<T>, id: Guid): FeatureAreaState<T>;
|
|
24
|
+
export declare function containsFeature<T extends FeatureAreaItem<T>>(features: T[], id: Guid): boolean;
|
|
25
|
+
export declare function collapseFeature<T extends FeatureAreaItem<T>>(features: T[], id: string, collapsed: boolean): T[];
|
|
26
|
+
export declare function renameFeature<T extends FeatureAreaItem<T>>(features: T[], id: string, name: string): T[];
|
|
27
|
+
export declare function orderFeatures<T extends FeatureAreaItem<T>>(features: T[], ids: Guid[]): T[];
|