@foblex/flow 18.6.0 → 18.6.1
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/fesm2022/foblex-flow.mjs +56 -5
- package/fesm2022/foblex-flow.mjs.map +1 -1
- package/index.d.ts +30 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _foblex_2d from '@foblex/2d';
|
|
2
|
-
import { ITransformModel, IPoint, IRect, ILine, IRoundedRect,
|
|
2
|
+
import { ITransformModel, IPoint, IRect, ISize, ILine, IRoundedRect, Point, IMinMaxPoint, RoundedRect } from '@foblex/2d';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, OnInit, OnChanges, SimpleChanges, AfterContentInit, OnDestroy, InputSignalWithTransform, OutputEmitterRef, Signal, ElementRef, DestroyRef, Provider, ModelSignal, InputSignal, AfterViewInit, Renderer2, ProviderToken, Injector, TemplateRef, EventEmitter, Type } from '@angular/core';
|
|
5
5
|
import * as _foblex_flow from '@foblex/flow';
|
|
@@ -97,7 +97,7 @@ declare class FBackgroundComponent extends FBackgroundBase implements OnInit, Af
|
|
|
97
97
|
static ɵcmp: i0.ɵɵComponentDeclaration<FBackgroundComponent, "f-background", never, {}, {}, ["fBackgroundPattern"], ["*"], true, never>;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
declare const F_BACKGROUND_PROVIDERS: (typeof
|
|
100
|
+
declare const F_BACKGROUND_PROVIDERS: (typeof FRectPatternComponent | typeof FCirclePatternComponent | typeof FBackgroundComponent)[];
|
|
101
101
|
|
|
102
102
|
declare abstract class FAutoPanBase implements IHasHostElement {
|
|
103
103
|
readonly hostElement: any;
|
|
@@ -621,7 +621,7 @@ declare class UpdateScale implements IExecution<UpdateScaleRequest, void> {
|
|
|
621
621
|
/**
|
|
622
622
|
* This file exports all the canvas-related executions that can be used in the FCanvas feature.
|
|
623
623
|
*/
|
|
624
|
-
declare const F_CANVAS_FEATURES: (typeof
|
|
624
|
+
declare const F_CANVAS_FEATURES: (typeof AddCanvasToStore | typeof CenterGroupOrNode | typeof FitToFlow | typeof InputCanvasPosition | typeof InputCanvasScale | typeof RedrawCanvasWithAnimation | typeof RemoveCanvasFromStore | typeof ResetScale | typeof ResetScaleAndCenter | typeof UpdateScale)[];
|
|
625
625
|
|
|
626
626
|
/** Unit tangent vector. */
|
|
627
627
|
interface ITangent extends IPoint {
|
|
@@ -735,6 +735,17 @@ interface IPolylineContent {
|
|
|
735
735
|
offset: Signal<number>;
|
|
736
736
|
align: Signal<PolylineContentAlign>;
|
|
737
737
|
hostElement: HTMLElement;
|
|
738
|
+
/**
|
|
739
|
+
* Returns the latest measured size of the content's host element.
|
|
740
|
+
*
|
|
741
|
+
* Implementations cache the size and refresh it via a
|
|
742
|
+
* `ResizeObserver` rather than reading the DOM on every call —
|
|
743
|
+
* placement runs in a tight loop interleaved with style writes, so
|
|
744
|
+
* a per-call `getBoundingClientRect()` forces a synchronous layout
|
|
745
|
+
* flush per label and turns drag into a layout-thrashing storm at
|
|
746
|
+
* a few hundred labels (see issue #304).
|
|
747
|
+
*/
|
|
748
|
+
measureSize(): ISize;
|
|
738
749
|
}
|
|
739
750
|
|
|
740
751
|
/**
|
|
@@ -771,6 +782,9 @@ declare abstract class FConnectionContentBase implements IPolylineContent {
|
|
|
771
782
|
* Used internally for positioning calculations.
|
|
772
783
|
*/
|
|
773
784
|
readonly hostElement: any;
|
|
785
|
+
private _cachedSize;
|
|
786
|
+
private _observer;
|
|
787
|
+
constructor();
|
|
774
788
|
/**
|
|
775
789
|
* Position along the connection.
|
|
776
790
|
*
|
|
@@ -797,6 +811,7 @@ declare abstract class FConnectionContentBase implements IPolylineContent {
|
|
|
797
811
|
* - `'along'` — aligned along the path (tangent).
|
|
798
812
|
*/
|
|
799
813
|
abstract align: Signal<PolylineContentAlign>;
|
|
814
|
+
measureSize(): ISize;
|
|
800
815
|
}
|
|
801
816
|
|
|
802
817
|
/**
|
|
@@ -1497,8 +1512,8 @@ declare class FSnapConnectionComponent extends FConnectionBase implements AfterV
|
|
|
1497
1512
|
static ngAcceptInputType_fBehavior: unknown;
|
|
1498
1513
|
}
|
|
1499
1514
|
|
|
1500
|
-
declare const F_CONNECTION_PROVIDERS: (typeof
|
|
1501
|
-
declare const F_CONNECTION_IMPORTS_EXPORTS: (typeof FConnectionContent | typeof
|
|
1515
|
+
declare const F_CONNECTION_PROVIDERS: (typeof FConnectionMarker | typeof FConnectionPath | typeof FConnectionSelection | typeof FConnectionDragHandleStart | typeof FConnectionComponent | typeof FConnectionForCreateComponent | typeof FSnapConnectionComponent)[];
|
|
1516
|
+
declare const F_CONNECTION_IMPORTS_EXPORTS: (typeof FConnectionContent | typeof FConnectionWaypoints | typeof FConnectionMarkerArrow | typeof FConnectionMarkerCircle | typeof FConnectionGradientRenderer | typeof FConnectionGradient)[];
|
|
1502
1517
|
|
|
1503
1518
|
declare class AddConnectionForCreateToStoreRequest {
|
|
1504
1519
|
readonly connection: FConnectionForCreateComponent;
|
|
@@ -2747,7 +2762,7 @@ declare class FNodeDirective extends FNodeBase implements OnInit, AfterViewInit,
|
|
|
2747
2762
|
|
|
2748
2763
|
declare function isNode(element: HTMLElement | SVGElement): boolean;
|
|
2749
2764
|
|
|
2750
|
-
declare const F_NODE_PROVIDERS: (typeof
|
|
2765
|
+
declare const F_NODE_PROVIDERS: (typeof FRotateHandleDirective | typeof FGroupDirective | typeof FNodeDirective)[];
|
|
2751
2766
|
|
|
2752
2767
|
declare class GetNormalizedParentNodeRectRequest {
|
|
2753
2768
|
readonly nodeOrGroup: FNodeBase;
|
|
@@ -3526,7 +3541,7 @@ declare const DRAG_MINIMAP_HANDLER_TYPE = "minimap";
|
|
|
3526
3541
|
declare const DRAG_MINIMAP_HANDLER_KIND = "minimap";
|
|
3527
3542
|
declare function isDragMinimapHandler(value: DragHandlerBase<unknown>): value is DragMinimapHandler;
|
|
3528
3543
|
|
|
3529
|
-
declare const DRAG_MINIMAP_PROVIDERS: (typeof
|
|
3544
|
+
declare const DRAG_MINIMAP_PROVIDERS: (typeof CalculateFlowPointFromMinimapPoint | typeof DragMinimapFinalize | typeof DragMinimapPreparation)[];
|
|
3530
3545
|
|
|
3531
3546
|
declare class CreateConnectionFinalizeRequest {
|
|
3532
3547
|
readonly event: IPointerEvent;
|
|
@@ -3957,7 +3972,7 @@ declare class FConnectionWaypointsChangedEvent {
|
|
|
3957
3972
|
constructor(connectionId: string, waypoints: IPoint[]);
|
|
3958
3973
|
}
|
|
3959
3974
|
|
|
3960
|
-
declare const DRAG_CONNECTIONS_PROVIDERS: (typeof
|
|
3975
|
+
declare const DRAG_CONNECTIONS_PROVIDERS: (typeof ResolveConnectableOutputForOutlet | typeof CreateConnectionFinalize | typeof CreateConnectionCreateDragHandler | typeof CreateConnectionFromOutletPreparation | typeof CreateConnectionFromOutputPreparation | typeof CreateConnectionPreparation | typeof ReassignConnectionFinalize | typeof ReassignConnectionPreparation | typeof DragConnectionWaypointFinalize | typeof DragConnectionWaypointPreparation)[];
|
|
3961
3976
|
|
|
3962
3977
|
declare class DropToGroupFinalizeRequest {
|
|
3963
3978
|
readonly event: IPointerEvent;
|
|
@@ -5438,7 +5453,7 @@ declare class FDraggableDataContext {
|
|
|
5438
5453
|
|
|
5439
5454
|
declare function isDragBlocker(element: HTMLElement): boolean;
|
|
5440
5455
|
|
|
5441
|
-
declare const F_DRAGGABLE_PROVIDERS: (typeof _foblex_flow.
|
|
5456
|
+
declare const F_DRAGGABLE_PROVIDERS: (typeof _foblex_flow.EmitEndDragSequenceEvent | typeof _foblex_flow.EmitStartDragSequenceEvent | typeof _foblex_flow.DragCanvasFinalize | typeof _foblex_flow.DragCanvasPreparation | typeof _foblex_flow.ResolveConnectableOutputForOutlet | typeof _foblex_flow.CreateConnectionFinalize | typeof _foblex_flow.CreateConnectionCreateDragHandler | typeof _foblex_flow.CreateConnectionFromOutletPreparation | typeof _foblex_flow.CreateConnectionFromOutputPreparation | typeof _foblex_flow.CreateConnectionPreparation | typeof _foblex_flow.MagneticLinesPreparation | typeof _foblex_flow.MagneticRectsPreparation | typeof _foblex_flow.CreateDragNodeHierarchy | typeof _foblex_flow.ReadNodeBoundsWithPaddings | typeof _foblex_flow.BuildDragNodeConstraints | typeof _foblex_flow.AttachSoftParentConnectionDragHandlersToNode | typeof _foblex_flow.CreateDragNodeHandler | typeof _foblex_flow.AttachTargetConnectionDragHandlersToNode | typeof _foblex_flow.AttachSourceConnectionDragHandlersToNode | typeof _foblex_flow.AttachDragNodeHandlerFromSelection | typeof _foblex_flow.DragNodeFinalize | typeof _foblex_flow.DragNodePreparation | typeof _foblex_flow.DropToGroupFinalize | typeof _foblex_flow.SortDropCandidatesByLayer | typeof _foblex_flow.DragExternalItemCreatePlaceholder | typeof _foblex_flow.DragExternalItemCreatePreview | typeof _foblex_flow.DragExternalItemFinalize | typeof _foblex_flow.DragExternalItemPreparation | typeof _foblex_flow.PreventDefaultIsExternalItem | typeof _foblex_flow.DropToGroupPreparation | typeof _foblex_flow.ReassignConnectionFinalize | typeof _foblex_flow.ReassignConnectionPreparation | typeof _foblex_flow.DragConnectionWaypointFinalize | typeof _foblex_flow.DragConnectionWaypointPreparation | typeof _foblex_flow.PinchToZoomFinalize | typeof _foblex_flow.PinchToZoomPreparation | typeof _foblex_flow.SelectionAreaFinalize | typeof _foblex_flow.SelectionAreaPreparation | typeof _foblex_flow.ApplyChildResizeConstraints | typeof _foblex_flow.ApplyParentResizeConstraints | typeof _foblex_flow.CalculateChangedRectFromDifference | typeof _foblex_flow.CalculateDirectChildrenUnionRect | typeof _foblex_flow.CalculateResizeLimits | typeof _foblex_flow.ResizeNodeFinalize | typeof _foblex_flow.AttachResizeConnectionDragHandlersToNode | typeof _foblex_flow.ResizeNodePreparation | typeof _foblex_flow.RotateNodeFinalize | typeof _foblex_flow.RotateNodePreparation | typeof _foblex_flow.CalculateFlowPointFromMinimapPoint | typeof _foblex_flow.DragMinimapFinalize | typeof _foblex_flow.DragMinimapPreparation | typeof _foblex_flow.EmitSelectionChangeEvent | typeof _foblex_flow.GetNormalizedParentNodeRect | typeof _foblex_flow.IsArrayHasParentNode | typeof _foblex_flow.DetectConnectionsUnderDragNode | typeof _foblex_flow.StopAutoPan | typeof _foblex_flow.ScheduleAutoPanFrame | typeof _foblex_flow.RunAutoPanFrame | typeof _foblex_flow.SelectByPointer)[];
|
|
5442
5457
|
|
|
5443
5458
|
declare class AddDndToStoreRequest {
|
|
5444
5459
|
fComponent: FDraggableBase;
|
|
@@ -5841,7 +5856,7 @@ declare class QueueConnectionRedrawState {
|
|
|
5841
5856
|
* This includes adding, retrieving, and removing the Flow,
|
|
5842
5857
|
* as well as getting the Flow host element and its state.
|
|
5843
5858
|
*/
|
|
5844
|
-
declare const F_FLOW_FEATURES: (typeof
|
|
5859
|
+
declare const F_FLOW_FEATURES: (typeof AddFlowToStore | typeof GetFlow | typeof _foblex_flow.CalculateFlowState | typeof _foblex_flow.CalculateNodesState | typeof _foblex_flow.CalculateConnectionsState | typeof RemoveFlowFromStore | typeof RenderLifecycleState | typeof NotifyNodesRendered | typeof NotifyFullRendered | typeof WaitForConnectionsRendered | typeof ResetRenderLifecycle | typeof QueueConnectionRedrawState | typeof QueueConnectionRedraw)[];
|
|
5845
5860
|
|
|
5846
5861
|
declare class AddNodeToStoreRequest {
|
|
5847
5862
|
readonly nodeOrGroup: FNodeBase;
|
|
@@ -6378,7 +6393,7 @@ declare class SetZoom implements IExecution<SetZoomRequest, void> {
|
|
|
6378
6393
|
* These executions handle the addition, removal, and resetting of zoom levels
|
|
6379
6394
|
* in the FComponentsStore.
|
|
6380
6395
|
*/
|
|
6381
|
-
declare const F_ZOOM_FEATURES: (typeof
|
|
6396
|
+
declare const F_ZOOM_FEATURES: (typeof ResetZoom | typeof SetZoom)[];
|
|
6382
6397
|
|
|
6383
6398
|
declare class MinimapDrawNodesRequest {
|
|
6384
6399
|
static readonly fToken: unique symbol;
|
|
@@ -6439,7 +6454,7 @@ declare class FMinimapState {
|
|
|
6439
6454
|
constructor(element: SVGSVGElement, scale?: number, viewBox?: IRect);
|
|
6440
6455
|
}
|
|
6441
6456
|
|
|
6442
|
-
declare const F_MINIMAP_FEATURES: (typeof
|
|
6457
|
+
declare const F_MINIMAP_FEATURES: (typeof MinimapDrawNodes | typeof MinimapCalculateViewport | typeof MinimapCalculateViewRect)[];
|
|
6443
6458
|
|
|
6444
6459
|
declare class GetDeepChildrenNodesAndGroupsRequest {
|
|
6445
6460
|
readonly nodeOrGroupId: string;
|
|
@@ -6698,7 +6713,7 @@ declare function LogExecutionTime(label?: string): MethodDecorator;
|
|
|
6698
6713
|
* draggable elements, flow, line alignment, nodes, selection, zoom,
|
|
6699
6714
|
* and various utility executions.
|
|
6700
6715
|
*/
|
|
6701
|
-
declare const COMMON_PROVIDERS: (typeof _foblex_flow.
|
|
6716
|
+
declare const COMMON_PROVIDERS: (typeof _foblex_flow.FCache | typeof _foblex_flow.InvalidateFCacheNode | typeof _foblex_flow.RegisterFCacheNode | typeof _foblex_flow.UnregisterFCacheNode | typeof _foblex_flow.RegisterFCacheConnector | typeof _foblex_flow.UnregisterFCacheConnector | typeof _foblex_flow.GetCachedFCacheRect | typeof _foblex_flow.SetFCacheConnectorRect | typeof _foblex_flow.SetFCacheNodeRect | typeof _foblex_flow.UpdateFCacheRectByElement | typeof GetNormalizedElementRect | typeof _foblex_flow.AddCanvasToStore | typeof _foblex_flow.CenterGroupOrNode | typeof _foblex_flow.FitToFlow | typeof _foblex_flow.InputCanvasPosition | typeof _foblex_flow.InputCanvasScale | typeof _foblex_flow.RedrawCanvasWithAnimation | typeof _foblex_flow.ResetScaleAndCenter | typeof _foblex_flow.UpdateScale | typeof _foblex_flow.ConnectionRedrawState | typeof _foblex_flow.ConnectionWorkerState | typeof _foblex_flow.AddConnectionForCreateToStore | typeof _foblex_flow.AddConnectionMarkerToStore | typeof _foblex_flow.AddConnectionToStore | typeof _foblex_flow.AddSnapConnectionToStore | typeof _foblex_flow.CreateConnectionMarkers | typeof _foblex_flow.ApplyConnectionWorkerResult | typeof _foblex_flow.ApplyConnectionRender | typeof _foblex_flow.BuildConnectionLine | typeof _foblex_flow.BuildConnectionWorkerBatch | typeof _foblex_flow.BuildConnectionWorkerPayloadItem | typeof _foblex_flow.CompleteConnectionRedraw | typeof _foblex_flow.DisableConnectionWorker | typeof _foblex_flow.HandleConnectionWorkerMessage | typeof _foblex_flow.IsConnectionRedrawCurrent | typeof _foblex_flow.MarkConnectionConnectorsAsConnected | typeof _foblex_flow.RenderConnection | typeof _foblex_flow.RenderConnectionFromGeometry | typeof _foblex_flow.RenderConnectionWithLine | typeof _foblex_flow.ResolveConnectionEndpointRect | typeof _foblex_flow.ResolveConnectionEndpointRotationContext | typeof _foblex_flow.ResolveConnectionEndpoints | typeof _foblex_flow.ResolveConnectionGeometry | typeof _foblex_flow.ResetConnectionWorkerRuntime | typeof _foblex_flow.RunConnectionRedrawSlice | typeof _foblex_flow.RunConnectionWorker | typeof _foblex_flow.RunConnectionWorkerBatch | typeof _foblex_flow.ShouldUseConnectionWorker | typeof _foblex_flow.StartConnectionWorkerRedraw | typeof _foblex_flow.RemoveConnectionFromStore | typeof _foblex_flow.RemoveConnectionMarkerFromStore | typeof _foblex_flow.RemoveConnectionWaypoint | typeof _foblex_flow.AddPatternToBackground | typeof _foblex_flow.SetBackgroundTransform | typeof _foblex_flow.AddConnectorToStore | typeof _foblex_flow.RemoveConnectorFromStore | typeof _foblex_flow.CalculateClosestConnector | typeof _foblex_flow.FindConnectableConnectorUsingPriorityAndPosition | typeof _foblex_flow.CalculateSourceConnectorsToConnect | typeof _foblex_flow.CalculateTargetConnectorsToConnect | typeof _foblex_flow.GetConnectorRectReference | typeof _foblex_flow.MarkConnectableConnectors | typeof _foblex_flow.UnmarkConnectableConnectors | typeof _foblex_flow.AddDndToStore | typeof _foblex_flow.OnPointerMove | typeof _foblex_flow.AddFlowToStore | typeof _foblex_flow.CalculateFlowState | typeof _foblex_flow.CalculateNodesState | typeof _foblex_flow.RemoveFlowFromStore | typeof _foblex_flow.RenderLifecycleState | typeof _foblex_flow.WaitForConnectionsRendered | typeof _foblex_flow.QueueConnectionRedrawState | typeof _foblex_flow.QueueConnectionRedraw | typeof _foblex_flow.AddNodeToStore | typeof _foblex_flow.CalculateConnectableSideByConnectedPositions | typeof _foblex_flow.CalculateConnectableSideByInternalPosition | typeof _foblex_flow.CalculateInputConnections | typeof _foblex_flow.CalculateConnectorsConnectableSides | typeof _foblex_flow.CalculateNodesBoundingBoxNormalizedPosition | typeof _foblex_flow.CalculateOutputConnections | typeof _foblex_flow.FitToChildNodesAndGroups | typeof _foblex_flow.GetChildNodeIds | typeof _foblex_flow.GetNodePadding | typeof _foblex_flow.GetParentNodes | typeof _foblex_flow.UpdateNodeWhenStateOrSizeChanged | typeof _foblex_flow.RemoveNodeFromStore | typeof _foblex_flow.Select | typeof _foblex_flow.SelectAndUpdateNodeLayer | typeof _foblex_flow.SetZoom | typeof _foblex_flow.MinimapCalculateViewport | typeof GetDeepChildrenNodesAndGroups | typeof GetNormalizedConnectorRect | typeof GetNormalizedPoint | typeof SortItemsByParent | typeof UpdateItemAndChildrenLayers | typeof MoveFrontElementsBeforeTargetElement)[];
|
|
6702
6717
|
|
|
6703
6718
|
declare function transitionEnd(element: HTMLElement, callback: (event: TransitionEvent) => void): void;
|
|
6704
6719
|
|
|
@@ -7138,7 +7153,7 @@ declare class FMinimapComponent extends FMinimapBase implements AfterViewInit, O
|
|
|
7138
7153
|
static ɵcmp: i0.ɵɵComponentDeclaration<FMinimapComponent, "f-minimap", ["fComponent"], { "fMinSize": { "alias": "fMinSize"; "required": false; "isSignal": true; }; "fNodeRenderLimit": { "alias": "fNodeRenderLimit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7139
7154
|
}
|
|
7140
7155
|
|
|
7141
|
-
declare const F_MINIMAP_PROVIDERS: (typeof
|
|
7156
|
+
declare const F_MINIMAP_PROVIDERS: (typeof FMinimapFlowDirective | typeof FMinimapCanvasDirective | typeof FMinimapViewDirective | typeof FMinimapComponent)[];
|
|
7142
7157
|
|
|
7143
7158
|
declare class FComponentsStore {
|
|
7144
7159
|
readonly transformChanges$: FChannel;
|
|
@@ -7924,7 +7939,7 @@ declare class FReflowBaselineTracker {
|
|
|
7924
7939
|
* by `withReflowOnResize(...)` so consumers can `inject(FReflowController)`
|
|
7925
7940
|
* directly from the same component that calls `provideFFlow(...)`.
|
|
7926
7941
|
*/
|
|
7927
|
-
declare const F_REFLOW_PROVIDERS: (typeof
|
|
7942
|
+
declare const F_REFLOW_PROVIDERS: (typeof FReflowOrchestrator | typeof FReflowIgnoreRegistry | typeof FReflowPlanner | typeof FReflowBaselineTracker)[];
|
|
7928
7943
|
|
|
7929
7944
|
/**
|
|
7930
7945
|
* Activates the reflow-on-resize feature inside `provideFFlow(...)`.
|
package/package.json
CHANGED