@vectoriox/iox-builder 1.6.13 → 1.7.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-builder",
3
- "version": "1.6.13",
3
+ "version": "1.7.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -9,7 +9,9 @@
9
9
  "@vectoriox/iox-ui": ">=4.2.0",
10
10
  "interactjs": "^1.10.27",
11
11
  "primeng": ">=20.0.0",
12
- "swiper": ">=12.0.0"
12
+ "swiper": ">=12.0.0",
13
+ "moveable": "^0.53.0",
14
+ "selecto": "^1.26.0"
13
15
  },
14
16
  "dependencies": {
15
17
  "tslib": "^2.3.0"
@@ -740,6 +740,54 @@ declare class DragEngineService {
740
740
  static ɵprov: i0.ɵɵInjectableDeclaration<DragEngineService>;
741
741
  }
742
742
 
743
+ /**
744
+ * MoveableCanvasService — Phase 1 of the Moveable + Selecto migration
745
+ * (see iox-ai-guidance/architecture/builder/moveable-migration.md).
746
+ *
747
+ * Drives DRAG for the SELECTED element via Moveable instead of interact.js, while REUSING the
748
+ * proven reorder machinery (`DragEngineService.handleDrop`). It is a pure INPUT device: during a
749
+ * drag it applies a TRANSIENT transform, and on drop it RESETS the transform to nothing and instead
750
+ * reorders the layout tree (constraint C1 — a persisted transform on an in-flow canvas element
751
+ * breaks Lenis scroll). Everything here runs ONLY when `moveableMode` is on; interact.js is
752
+ * untouched, so the flag-off path is byte-identical to today.
753
+ *
754
+ * Scale: Moveable reads `getBoundingClientRect()` (already post-scale) and works in viewport
755
+ * client coordinates, so drop hit-testing via `elementsFromPoint` / rects is scale-correct without
756
+ * extra math. The control box is rendered into the same overlay container the selection overlay uses.
757
+ */
758
+ declare class MoveableCanvasService {
759
+ private dragEngine;
760
+ private moveable;
761
+ private container;
762
+ private scaleGetter;
763
+ private target;
764
+ private node;
765
+ private sourceId;
766
+ /** Called after a successful reorder so the host can emit LAYOUT_CHANGED / refresh selection. */
767
+ onReorder: (() => void) | null;
768
+ constructor(dragEngine: DragEngineService);
769
+ /** Wire the Moveable control box into `container`; `scaleGetter` returns the live canvas zoom. */
770
+ init(container: HTMLElement, scaleGetter: () => number): void;
771
+ /** Point Moveable at the selected element (skips inline-edit + preview-clone targets). */
772
+ select(element: HTMLElement | null, node: ComponentNode | null): void;
773
+ /** Recompute the control-box position (call on scroll/zoom/layout changes). */
774
+ refresh(): void;
775
+ destroy(): void;
776
+ private ensureMoveable;
777
+ private destroyMoveable;
778
+ private commitDrag;
779
+ /** Final pointer position from the Moveable end event (client/viewport px). */
780
+ private lastPointer;
781
+ /** Walk up from an element to the nearest registered dropzone id (el.id is stamped by DragEngine). */
782
+ private resolveDropzoneId;
783
+ /** Topmost registered dropzone under the pointer that is NOT inside the dragged element's subtree. */
784
+ private dropzoneUnderPoint;
785
+ /** Insertion index within a dropzone by comparing pointer Y to each child's vertical midpoint. */
786
+ private calcInsertIndex;
787
+ static ɵfac: i0.ɵɵFactoryDeclaration<MoveableCanvasService, never>;
788
+ static ɵprov: i0.ɵɵInjectableDeclaration<MoveableCanvasService>;
789
+ }
790
+
743
791
  /**
744
792
  * Page-scoped registry that holds the current page's data sources.
745
793
  * Scoped to PageUiComponent.providers[] so every builder service
@@ -957,6 +1005,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
957
1005
  private symbolRegistry;
958
1006
  private cdr;
959
1007
  private appRef;
1008
+ private moveableCanvas;
960
1009
  layout: ComponentNode[];
961
1010
  dataSources: IoxDataSource[];
962
1011
  orgId: string;
@@ -968,6 +1017,10 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
968
1017
  globalElements: ComponentNode[];
969
1018
  canUndo: boolean;
970
1019
  canRedo: boolean;
1020
+ /** Feature flag: drive drag/select/resize via Moveable + Selecto instead of interact.js.
1021
+ * Default OFF — the proven interact.js path is unchanged until cutover. See
1022
+ * iox-ai-guidance/architecture/builder/moveable-migration.md. */
1023
+ moveableMode: boolean;
971
1024
  save: EventEmitter<void>;
972
1025
  undo: EventEmitter<void>;
973
1026
  redo: EventEmitter<void>;
@@ -1049,7 +1102,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
1049
1102
  get canvasMinHeight(): number;
1050
1103
  private sub?;
1051
1104
  private registrySub?;
1052
- constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, symbolRegistry: SymbolRegistryService, cdr: ChangeDetectorRef, appRef: ApplicationRef);
1105
+ constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, symbolRegistry: SymbolRegistryService, cdr: ChangeDetectorRef, appRef: ApplicationRef, moveableCanvas: MoveableCanvasService);
1053
1106
  ngOnInit(): void;
1054
1107
  ngOnChanges(changes: SimpleChanges): void;
1055
1108
  ngAfterViewInit(): void;
@@ -1111,7 +1164,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
1111
1164
  private findSymbolAncestorOf;
1112
1165
  private handlePanelEvents;
1113
1166
  static ɵfac: i0.ɵɵFactoryDeclaration<BuilderComponent, never>;
1114
- static ɵcmp: i0.ɵɵComponentDeclaration<BuilderComponent, "app-builder", never, { "layout": { "alias": "layout"; "required": false; }; "dataSources": { "alias": "dataSources"; "required": false; }; "orgId": { "alias": "orgId"; "required": false; }; "routeParams": { "alias": "routeParams"; "required": false; }; "pageName": { "alias": "pageName"; "required": false; }; "isSaving": { "alias": "isSaving"; "required": false; }; "pageStatus": { "alias": "pageStatus"; "required": false; }; "pageSettings": { "alias": "pageSettings"; "required": false; }; "globalElements": { "alias": "globalElements"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; }, { "save": "save"; "undo": "undo"; "redo": "redo"; "back": "back"; "preview": "preview"; "publishToggle": "publishToggle"; "pageSettingsChange": "pageSettingsChange"; "applyAnimationToAll": "applyAnimationToAll"; "saveBlock": "saveBlock"; "globalElementsChange": "globalElementsChange"; }, never, ["[builderComponents]", "[builderTokens]", "[builderPanel]"], false, never>;
1167
+ static ɵcmp: i0.ɵɵComponentDeclaration<BuilderComponent, "app-builder", never, { "layout": { "alias": "layout"; "required": false; }; "dataSources": { "alias": "dataSources"; "required": false; }; "orgId": { "alias": "orgId"; "required": false; }; "routeParams": { "alias": "routeParams"; "required": false; }; "pageName": { "alias": "pageName"; "required": false; }; "isSaving": { "alias": "isSaving"; "required": false; }; "pageStatus": { "alias": "pageStatus"; "required": false; }; "pageSettings": { "alias": "pageSettings"; "required": false; }; "globalElements": { "alias": "globalElements"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "moveableMode": { "alias": "moveableMode"; "required": false; }; }, { "save": "save"; "undo": "undo"; "redo": "redo"; "back": "back"; "preview": "preview"; "publishToggle": "publishToggle"; "pageSettingsChange": "pageSettingsChange"; "applyAnimationToAll": "applyAnimationToAll"; "saveBlock": "saveBlock"; "globalElementsChange": "globalElementsChange"; }, never, ["[builderComponents]", "[builderTokens]", "[builderPanel]"], false, never>;
1115
1168
  }
1116
1169
 
1117
1170
  /**